1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 07:43:01 +01:00

Stabilize scenario and track editors\

This commit is contained in:
Aaron van Geffen
2024-05-01 12:34:10 +02:00
committed by GitHub
parent ad79699b21
commit 8973e35ba1

View File

@@ -102,6 +102,10 @@ namespace Editor
*/ */
void Load() void Load()
{ {
// TODO: replace with dedicated scene
auto* context = GetContext();
context->SetActiveScene(context->GetGameScene());
auto& gameState = GetGameState(); auto& gameState = GetGameState();
Audio::StopAll(); Audio::StopAll();
ObjectListLoad(); ObjectListLoad();
@@ -161,6 +165,10 @@ namespace Editor
*/ */
void LoadTrackDesigner() void LoadTrackDesigner()
{ {
// TODO: replace with dedicated scene
auto* context = GetContext();
context->SetActiveScene(context->GetGameScene());
Audio::StopAll(); Audio::StopAll();
gScreenFlags = SCREEN_FLAGS_TRACK_DESIGNER; gScreenFlags = SCREEN_FLAGS_TRACK_DESIGNER;
gScreenAge = 0; gScreenAge = 0;
@@ -182,6 +190,10 @@ namespace Editor
*/ */
void LoadTrackManager() void LoadTrackManager()
{ {
// TODO: replace with dedicated scene
auto* context = GetContext();
context->SetActiveScene(context->GetGameScene());
Audio::StopAll(); Audio::StopAll();
gScreenFlags = SCREEN_FLAGS_TRACK_MANAGER; gScreenFlags = SCREEN_FLAGS_TRACK_MANAGER;
gScreenAge = 0; gScreenAge = 0;
@@ -244,6 +256,10 @@ namespace Editor
{ {
ClearMapForEditing(loadedFromSave); ClearMapForEditing(loadedFromSave);
// TODO: replace with dedicated scene
auto* context = GetContext();
context->SetActiveScene(context->GetGameScene());
GetGameState().EditorStep = EditorStep::LandscapeEditor; GetGameState().EditorStep = EditorStep::LandscapeEditor;
gScreenAge = 0; gScreenAge = 0;
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;