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

Function MakeNewEditorWorld

src/openttd.cpp:919–929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919static void MakeNewEditorWorld()
920{
921 _game_mode = GM_EDITOR;
922 /* "reload" command needs to know what mode we were in. */
923 _file_to_saveload.SetMode(FIOS_TYPE_INVALID, SLO_INVALID);
924
925 ResetGRFConfig(true);
926
927 GenerateWorldSetCallback(&MakeNewEditorWorldDone);
928 GenerateWorld(GWM_EMPTY, 1 << _settings_game.game_creation.map_x, 1 << _settings_game.game_creation.map_y);
929}
930
931/**
932 * Load the specified savegame but on error do different things.

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