1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 20:43:04 +01:00

Move gEditorStep to GameState_t (#21492)

* Move gEditorStep to GameState_t

* Fix compilation on GCC

---------

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
This commit is contained in:
Harry Hopkinson
2024-03-01 20:26:20 +00:00
committed by GitHub
parent 14f0479c94
commit 701bbda164
16 changed files with 86 additions and 72 deletions

View File

@@ -12,6 +12,7 @@
#include "Context.h"
#include "Editor.h"
#include "Game.h"
#include "GameState.h"
#include "OpenRCT2.h"
#include "drawing/Drawing.h"
#include "localisation/Formatter.h"
@@ -479,6 +480,7 @@ void ResetSelectedObjectCountAndSize()
void FinishObjectSelection()
{
auto& gameState = OpenRCT2::GetGameState();
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
{
SetEveryRideTypeInvented();
@@ -491,14 +493,14 @@ void FinishObjectSelection()
gLastEntranceStyle = 0;
}
gEditorStep = EditorStep::RollercoasterDesigner;
gameState.EditorStep = EditorStep::RollercoasterDesigner;
GfxInvalidateScreen();
}
else
{
SetAllSceneryItemsInvented();
ScenerySetDefaultPlacementConfiguration();
gEditorStep = EditorStep::LandscapeEditor;
gameState.EditorStep = EditorStep::LandscapeEditor;
GfxInvalidateScreen();
}
}