equal
deleted
inserted
replaced
190 " -f = Fork into the background (dedicated only)\n" |
190 " -f = Fork into the background (dedicated only)\n" |
191 #endif |
191 #endif |
192 #endif /* ENABLE_NETWORK */ |
192 #endif /* ENABLE_NETWORK */ |
193 " -i palette = Force to use the DOS (0) or Windows (1) palette\n" |
193 " -i palette = Force to use the DOS (0) or Windows (1) palette\n" |
194 " (defines default setting when adding newgrfs)\n" |
194 " (defines default setting when adding newgrfs)\n" |
|
195 " Default value (2) lets OpenTTD use the palette\n" |
|
196 " specified in graphics set file (see below)\n" |
195 " -I graphics_set = Force the graphics set (see below)\n" |
197 " -I graphics_set = Force the graphics set (see below)\n" |
196 " -c config_file = Use 'config_file' instead of 'openttd.cfg'\n" |
198 " -c config_file = Use 'config_file' instead of 'openttd.cfg'\n" |
197 " -x = Do not automatically save to config file on exit\n" |
199 " -x = Do not automatically save to config file on exit\n" |
198 "\n", |
200 "\n", |
199 lastof(buf) |
201 lastof(buf) |
462 CreateConsole(); |
464 CreateConsole(); |
463 #endif |
465 #endif |
464 if (mgo.opt != NULL) SetDebugString(mgo.opt); |
466 if (mgo.opt != NULL) SetDebugString(mgo.opt); |
465 } break; |
467 } break; |
466 case 'e': _switch_mode = SM_EDITOR; break; |
468 case 'e': _switch_mode = SM_EDITOR; break; |
467 case 'i': _use_palette = (mgo.opt == NULL || atoi(mgo.opt) == 0) ? PAL_DOS : PAL_WINDOWS; break; |
469 case 'i': |
|
470 /* there is an argument, it is not empty, and it is exactly 1 char long */ |
|
471 if (!StrEmpty(mgo.opt) && mgo.opt[1] == '\0') { |
|
472 _use_palette = (PaletteType)(mgo.opt[0] - '0'); |
|
473 if (_use_palette <= MAX_PAL) break; |
|
474 } |
|
475 usererror("Valid value for '-i' is 0, 1 or 2"); |
468 case 'g': |
476 case 'g': |
469 if (mgo.opt != NULL) { |
477 if (mgo.opt != NULL) { |
470 strecpy(_file_to_saveload.name, mgo.opt, lastof(_file_to_saveload.name)); |
478 strecpy(_file_to_saveload.name, mgo.opt, lastof(_file_to_saveload.name)); |
471 _switch_mode = SM_LOAD; |
479 _switch_mode = SM_LOAD; |
472 _file_to_saveload.mode = SL_LOAD; |
480 _file_to_saveload.mode = SL_LOAD; |