MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Load

Function Load

src/openrct2/Editor.cpp:109–132  ·  view source on GitHub ↗

* * rct2: 0x0066FFE1 */

Source from the content-addressed store, hash-verified

107 * rct2: 0x0066FFE1
108 */
109 void Load()
110 {
111 // TODO: replace with dedicated scene
112 auto* sceneMgr = GetContext()->GetSceneManager();
113 sceneMgr->setActiveScene(sceneMgr->getGameScene());
114
115 auto& gameState = getGameState();
116 Audio::StopAll();
117 gameStateInitAll(gameState, kDefaultMapSize);
118 gLegacyScene = LegacyScene::scenarioEditor;
119 gameState.editorStep = Editor::Step::objectSelection;
120 gameState.park.flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
121 gameState.scenarioOptions.category = Scenario::Category::other;
122 ObjectListLoad();
123 ContextResetSubsystems();
124 WindowBase* mainWindow = OpenEditorWindows();
125 mainWindow->setViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
126 LoadPalette();
127 gScreenAge = 0;
128 gameState.scenarioOptions.name = LanguageGetString(STR_MY_NEW_SCENARIO);
129
130 GameLoadScripts();
131 GameNotifyMapChanged();
132 }
133
134 /**
135 *

Callers 5

SwitchToStartUpSceneMethod · 0.85
LoadMethod · 0.85
LoadSavedGameMethod · 0.85
LoadScenarioMethod · 0.85
onDropdownMethod · 0.85

Calls 15

GetContextFunction · 0.85
StopAllFunction · 0.85
gameStateInitAllFunction · 0.85
ObjectListLoadFunction · 0.85
ContextResetSubsystemsFunction · 0.85
OpenEditorWindowsFunction · 0.85
LoadPaletteFunction · 0.85
LanguageGetStringFunction · 0.85
GameLoadScriptsFunction · 0.85
GameNotifyMapChangedFunction · 0.85
GetSceneManagerMethod · 0.80
setActiveSceneMethod · 0.80

Tested by

no test coverage detected