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

Function LoadLandscape

src/openrct2/Editor.cpp:276–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274 }
275
276 bool LoadLandscape(const utf8* path)
277 {
278 // #4996: Make sure the object selection window closes here to prevent unload objects
279 // after we have loaded a new park.
280 auto* windowMgr = Ui::GetWindowManager();
281 windowMgr->CloseAll();
282
283 if (!GetContext()->LoadParkFromFile(path))
284 return false;
285
286 auto extension = Path::GetExtension(path);
287 bool loadedFromSave = !ParkImporter::ExtensionIsScenario(extension);
288
289 AfterLoadCleanup(loadedFromSave);
290 return true;
291 }
292
293 static void ClearMapForEditing(bool fromSave)
294 {

Callers

nothing calls this directly

Calls 7

GetWindowManagerFunction · 0.85
GetContextFunction · 0.85
GetExtensionFunction · 0.85
ExtensionIsScenarioFunction · 0.85
AfterLoadCleanupFunction · 0.85
CloseAllMethod · 0.80
LoadParkFromFileMethod · 0.45

Tested by

no test coverage detected