MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MakeNewGame

Function MakeNewGame

src/openttd.cpp:900–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898}
899
900static void MakeNewGame(bool from_heightmap, bool reset_settings)
901{
902 _game_mode = GM_NORMAL;
903 if (!from_heightmap) {
904 /* "reload" command needs to know what mode we were in. */
905 _file_to_saveload.SetMode(FIOS_TYPE_INVALID, SLO_INVALID);
906 }
907
908 ResetGRFConfig(true);
909
910 GenerateWorldSetCallback(&MakeNewGameDone);
911 GenerateWorld(from_heightmap ? GWM_HEIGHTMAP : GWM_NEWGAME, 1 << _settings_game.game_creation.map_x, 1 << _settings_game.game_creation.map_y, reset_settings);
912}
913
914static void MakeNewEditorWorldDone()
915{

Callers 2

SafeLoadFunction · 0.85
SwitchToModeFunction · 0.85

Calls 4

ResetGRFConfigFunction · 0.85
GenerateWorldSetCallbackFunction · 0.85
GenerateWorldFunction · 0.85
SetModeMethod · 0.80

Tested by

no test coverage detected