| 614 | } |
| 615 | |
| 616 | void G_ReadConfig(const char* game) |
| 617 | { |
| 618 | GameConfig->DoGameSetup(game); |
| 619 | GameConfig->DoKeySetup(game); |
| 620 | |
| 621 | // Process automatically executed files |
| 622 | FExecList *exec; |
| 623 | FArgs *execFiles = new FArgs; |
| 624 | if (!(Args->CheckParm("-noautoexec"))) |
| 625 | GameConfig->AddAutoexec(execFiles, game); |
| 626 | exec = D_MultiExec(execFiles, NULL); |
| 627 | delete execFiles; |
| 628 | |
| 629 | // Process .cfg files at the start of the command line. |
| 630 | execFiles = Args->GatherFiles ("-exec"); |
| 631 | exec = D_MultiExec(execFiles, exec); |
| 632 | delete execFiles; |
| 633 | |
| 634 | // [RH] process all + commands on the command line |
| 635 | exec = C_ParseCmdLineParams(exec); |
| 636 | |
| 637 | // Actually exec command line commands and exec files. |
| 638 | if (exec != NULL) |
| 639 | { |
| 640 | exec->ExecCommands(); |
| 641 | delete exec; |
| 642 | exec = NULL; |
| 643 | } |
| 644 | |
| 645 | FBaseCVar::EnableCallbacks(); |
| 646 | GameName = game; |
| 647 | } |
| 648 | |
| 649 | void G_SaveConfig() |
| 650 | { |
no test coverage detected