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

Function LoadTrackDesigner

src/openrct2/Editor.cpp:185–207  ·  view source on GitHub ↗

* * rct2: 0x00672957 */

Source from the content-addressed store, hash-verified

183 * rct2: 0x00672957
184 */
185 void LoadTrackDesigner()
186 {
187 // TODO: replace with dedicated scene
188 auto* sceneMgr = GetContext()->GetSceneManager();
189 sceneMgr->setActiveScene(sceneMgr->getGameScene());
190
191 Audio::StopAll();
192 gLegacyScene = LegacyScene::trackDesigner;
193 gScreenAge = 0;
194
195 auto& gameState = getGameState();
196 gameStateInitAll(gameState, kDefaultMapSize);
197 gameState.editorStep = Editor::Step::objectSelection;
198 SetAllLandOwned();
199 ObjectListLoad();
200 ContextResetSubsystems();
201 WindowBase* mainWindow = OpenEditorWindows();
202 mainWindow->setViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
203 LoadPalette();
204
205 GameLoadScripts();
206 GameNotifyMapChanged();
207 }
208
209 /**
210 *

Callers 1

onDropdownMethod · 0.85

Calls 15

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

Tested by

no test coverage detected