| 316 | DEFINE_FIELD_X(UserConfigStruct, UserConfig, nologo) |
| 317 | |
| 318 | void UserConfig::ProcessOptions() |
| 319 | { |
| 320 | // -help etc are omitted |
| 321 | |
| 322 | // -cfg / -setupfile refer to Build style config which are not supported. |
| 323 | if (Args->CheckParm("-cfg") || Args->CheckParm("-setupfile")) |
| 324 | { |
| 325 | Printf("Build-format config files not supported and will be ignored\n"); |
| 326 | } |
| 327 | |
| 328 | auto v = Args->CheckValue("-addon"); |
| 329 | if (v) |
| 330 | { |
| 331 | auto val = strtol(v, nullptr, 0); |
| 332 | static const char* const addons[] = { "DUKE3D.GRP", "DUKEDC.GRP", "NWINTER.GRP", "VACATION.GRP" }; |
| 333 | if (val >= 0 && val < 4) gamegrp = addons[val]; |
| 334 | else Printf("%s: Unknown Addon\n", v); |
| 335 | } |
| 336 | else if (Args->CheckParm("-nam")) |
| 337 | { |
| 338 | gamegrp = "NAM.GRP"; |
| 339 | } |
| 340 | else if (Args->CheckParm("-napalm")) |
| 341 | { |
| 342 | gamegrp = "NAPALM.GRP"; |
| 343 | } |
| 344 | else if (Args->CheckParm("-ww2gi")) |
| 345 | { |
| 346 | gamegrp = "WW2GI.GRP"; |
| 347 | } |
| 348 | // Set up all needed content for these two mod which feature a very messy distribution. |
| 349 | // As an alternative they can be zipped up - the launcher will be able to detect and set up such versions automatically. |
| 350 | else if (Args->CheckParm("-route66")) |
| 351 | { |
| 352 | gamegrp = "REDNECK.GRP"; |
| 353 | DefaultCon = "GAME66.CON"; |
| 354 | const char* argv[] = { "tilesa66.art" , "tilesb66.art" }; |
| 355 | AddArt.reset(new FArgs(2, argv)); |
| 356 | toBeDeleted.Push("turd66.anm*turdmov.anm"); |
| 357 | toBeDeleted.Push("turd66.voc*turdmov.voc"); |
| 358 | toBeDeleted.Push("end66.anm*rr_outro.anm"); |
| 359 | toBeDeleted.Push("end66.voc*ln_final.voc"); |
| 360 | } |
| 361 | else if (Args->CheckParm("-cryptic")) |
| 362 | { |
| 363 | gamegrp = "BLOOD.RFF"; |
| 364 | DefaultCon = "CRYPTIC.INI"; |
| 365 | const char* argv[] = { "CPART07.AR_", "CPART15.AR_" }; |
| 366 | AddArt.reset(new FArgs(2, argv)); |
| 367 | } |
| 368 | |
| 369 | v = Args->CheckValue("-gamegrp"); |
| 370 | if (v) |
| 371 | { |
| 372 | gamegrp = v; |
| 373 | } |
| 374 | else |
| 375 | { |
no test coverage detected