Cube  Check-in [9684b46414]

Overview
Comment:Add long options
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9684b46414b4a589d60bd7067a0b2ea3f8cb1a46bc68d98f068c36be25798352
User & Date: js on 2025-03-04 01:19:15
Other Links: manifest | tags
Context
2025-03-04
23:03
Initial port to macOS check-in: f5b62f8203 user: js tags: trunk
01:19
Add long options check-in: 9684b46414 user: js tags: trunk
01:13
More string cleanups check-in: a401a49dd9 user: js tags: trunk
Changes

Modified src/Cube.mm from [f393e63c6d] to [6a23516b89].

111
112
113
114
115
116
117
118
119
120
121
122








123
124
125
126
127
128
129
111
112
113
114
115
116
117





118
119
120
121
122
123
124
125
126
127
128
129
130
131
132







-
-
-
-
-
+
+
+
+
+
+
+
+








	processInitQueue();

#define log(s) conoutf(@"init: %s", s)
	log("sdl");

	const OFOptionsParserOption options[] = {
	    {'d', nil, 0, &dedicated, NULL}, {'t', nil, 0, &windowed, NULL},
	    {'w', nil, 1, NULL, NULL}, {'h', nil, 1, NULL, NULL},
	    {'u', nil, 1, NULL, NULL}, {'n', nil, 1, NULL, &sdesc},
	    {'i', nil, 1, NULL, &ip}, {'m', nil, 1, NULL, &master},
	    {'p', nil, 1, NULL, &passwd}, {'c', nil, 1, NULL, NULL}};
	    {'d', @"dedicated", 0, &dedicated, NULL},
	    {'t', @"window", 0, &windowed, NULL},
	    {'w', @"width", 1, NULL, NULL}, {'h', @"height", 1, NULL, NULL},
	    {'u', @"upload-rate", 1, NULL, NULL},
	    {'n', @"server-desc", 1, NULL, &sdesc}, {'i', @"ip", 1, NULL, &ip},
	    {'m', @"master", 1, NULL, &master},
	    {'p', @"password", 1, NULL, &passwd},
	    {'c', @"max-clients", 1, NULL, NULL}};
	OFOptionsParser *optionsParser =
	    [OFOptionsParser parserWithOptions:options];
	OFUnichar option;
	while ((option = [optionsParser nextOption]) != '\0') {
		switch (option) {
		case 'w':
			scr_w = optionsParser.argument.longLongValue;