The autostart() function in GameSetup.cpp has 282 lines of code. To improve the readability of that function, we should move the contents of the following if-statements into separate functions:
if (mapDirectory == L"random")
if (mapDirectory == L"scenarios" || mapDirectory == L"skirmishes")
if (args.Has("autostart-ai"))
if (args.Has("autostart-aidiff"))
if (args.Has("autostart-civ"))
if (args.Has("autostart-playername"))
if (args.Has("autostart-host"))
if (args.Has("autostart-client"))
Maybe moving this one from Init() would also make sense:
if (!args.Has("mod") && (flags & INIT_MODS) == INIT_MODS)
To allow easy reviewing, we could make one patch / commit per move.