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

Function AfterLoadCleanup

src/openrct2/Editor.cpp:257–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255 }
256
257 static void AfterLoadCleanup(bool loadedFromSave)
258 {
259 ClearMapForEditing(loadedFromSave);
260
261 // TODO: replace with dedicated scene
262 auto* sceneMgr = GetContext()->GetSceneManager();
263 sceneMgr->setActiveScene(sceneMgr->getGameScene());
264
265 getGameState().editorStep = Editor::Step::landscapeEditor;
266 gScreenAge = 0;
267 gLegacyScene = LegacyScene::scenarioEditor;
268 ContextResetSubsystems();
269 OpenEditorWindows();
270 FinaliseMainView();
271
272 GameLoadScripts();
273 GameNotifyMapChanged();
274 }
275
276 bool LoadLandscape(const utf8* path)
277 {

Callers 1

LoadLandscapeFunction · 0.85

Calls 10

ClearMapForEditingFunction · 0.85
GetContextFunction · 0.85
ContextResetSubsystemsFunction · 0.85
OpenEditorWindowsFunction · 0.85
FinaliseMainViewFunction · 0.85
GameLoadScriptsFunction · 0.85
GameNotifyMapChangedFunction · 0.85
GetSceneManagerMethod · 0.80
setActiveSceneMethod · 0.80
getGameSceneMethod · 0.80

Tested by

no test coverage detected