mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 08:14:38 +01:00
Change GameState_t members to lowerCamelCase
This commit is contained in:
@@ -102,20 +102,20 @@ namespace OpenRCT2::Editor
|
||||
auto* context = GetContext();
|
||||
context->SetActiveScene(context->GetGameScene());
|
||||
|
||||
auto& gameState = GetGameState();
|
||||
auto& gameState = getGameState();
|
||||
Audio::StopAll();
|
||||
ObjectListLoad();
|
||||
gameStateInitAll(gameState, kDefaultMapSize);
|
||||
gLegacyScene = LegacyScene::scenarioEditor;
|
||||
gameState.EditorStep = EditorStep::ObjectSelection;
|
||||
gameState.Park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gameState.ScenarioCategory = SCENARIO_CATEGORY_OTHER;
|
||||
gameState.editorStep = EditorStep::ObjectSelection;
|
||||
gameState.park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gameState.scenarioCategory = SCENARIO_CATEGORY_OTHER;
|
||||
ViewportInitAll();
|
||||
WindowBase* mainWindow = OpenEditorWindows();
|
||||
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
|
||||
LoadPalette();
|
||||
gScreenAge = 0;
|
||||
gameState.ScenarioName = LanguageGetString(STR_MY_NEW_SCENARIO);
|
||||
gameState.scenarioName = LanguageGetString(STR_MY_NEW_SCENARIO);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,12 +144,12 @@ namespace OpenRCT2::Editor
|
||||
return;
|
||||
}
|
||||
|
||||
auto& gameState = GetGameState();
|
||||
auto& gameState = getGameState();
|
||||
ScenarioReset(gameState);
|
||||
|
||||
gLegacyScene = LegacyScene::scenarioEditor;
|
||||
gameState.EditorStep = EditorStep::ObjectiveSelection;
|
||||
gameState.ScenarioCategory = SCENARIO_CATEGORY_OTHER;
|
||||
gameState.editorStep = EditorStep::ObjectiveSelection;
|
||||
gameState.scenarioCategory = SCENARIO_CATEGORY_OTHER;
|
||||
ViewportInitAll();
|
||||
OpenEditorWindows();
|
||||
FinaliseMainView();
|
||||
@@ -172,9 +172,9 @@ namespace OpenRCT2::Editor
|
||||
|
||||
ObjectManagerUnloadAllObjects();
|
||||
ObjectListLoad();
|
||||
gameStateInitAll(GetGameState(), kDefaultMapSize);
|
||||
gameStateInitAll(getGameState(), kDefaultMapSize);
|
||||
SetAllLandOwned();
|
||||
GetGameState().EditorStep = EditorStep::ObjectSelection;
|
||||
getGameState().editorStep = EditorStep::ObjectSelection;
|
||||
ViewportInitAll();
|
||||
WindowBase* mainWindow = OpenEditorWindows();
|
||||
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
|
||||
@@ -197,9 +197,9 @@ namespace OpenRCT2::Editor
|
||||
|
||||
ObjectManagerUnloadAllObjects();
|
||||
ObjectListLoad();
|
||||
gameStateInitAll(GetGameState(), kDefaultMapSize);
|
||||
gameStateInitAll(getGameState(), kDefaultMapSize);
|
||||
SetAllLandOwned();
|
||||
GetGameState().EditorStep = EditorStep::ObjectSelection;
|
||||
getGameState().editorStep = EditorStep::ObjectSelection;
|
||||
ViewportInitAll();
|
||||
WindowBase* mainWindow = OpenEditorWindows();
|
||||
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
|
||||
@@ -212,9 +212,9 @@ namespace OpenRCT2::Editor
|
||||
*/
|
||||
static void SetAllLandOwned()
|
||||
{
|
||||
auto& gameState = GetGameState();
|
||||
MapRange range = { 2 * kCoordsXYStep, 2 * kCoordsXYStep, (gameState.MapSize.x - 3) * kCoordsXYStep,
|
||||
(gameState.MapSize.y - 3) * kCoordsXYStep };
|
||||
auto& gameState = getGameState();
|
||||
MapRange range = { 2 * kCoordsXYStep, 2 * kCoordsXYStep, (gameState.mapSize.x - 3) * kCoordsXYStep,
|
||||
(gameState.mapSize.y - 3) * kCoordsXYStep };
|
||||
auto landSetRightsAction = LandSetRightsAction(range, LandSetRightSetting::SetForSale);
|
||||
landSetRightsAction.SetFlags(GAME_COMMAND_FLAG_NO_SPEND);
|
||||
GameActions::Execute(&landSetRightsAction);
|
||||
@@ -232,7 +232,7 @@ namespace OpenRCT2::Editor
|
||||
auto* context = GetContext();
|
||||
context->SetActiveScene(context->GetGameScene());
|
||||
|
||||
GetGameState().EditorStep = EditorStep::LandscapeEditor;
|
||||
getGameState().editorStep = EditorStep::LandscapeEditor;
|
||||
gScreenAge = 0;
|
||||
gLegacyScene = LegacyScene::scenarioEditor;
|
||||
ViewportInitAll();
|
||||
@@ -274,39 +274,39 @@ namespace OpenRCT2::Editor
|
||||
staff->SetName({});
|
||||
}
|
||||
|
||||
auto& gameState = GetGameState();
|
||||
auto& gameState = getGameState();
|
||||
|
||||
ResetAllEntities();
|
||||
UpdateConsolidatedPatrolAreas();
|
||||
gameState.NumGuestsInPark = 0;
|
||||
gameState.NumGuestsHeadingForPark = 0;
|
||||
gameState.NumGuestsInParkLastWeek = 0;
|
||||
gameState.GuestChangeModifier = 0;
|
||||
gameState.numGuestsInPark = 0;
|
||||
gameState.numGuestsHeadingForPark = 0;
|
||||
gameState.numGuestsInParkLastWeek = 0;
|
||||
gameState.guestChangeModifier = 0;
|
||||
if (fromSave)
|
||||
{
|
||||
gameState.Park.Flags |= PARK_FLAGS_NO_MONEY;
|
||||
gameState.park.Flags |= PARK_FLAGS_NO_MONEY;
|
||||
|
||||
if (gameState.Park.EntranceFee == 0)
|
||||
if (gameState.park.EntranceFee == 0)
|
||||
{
|
||||
gameState.Park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
gameState.park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
}
|
||||
else
|
||||
{
|
||||
gameState.Park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
gameState.park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
}
|
||||
|
||||
gameState.Park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED;
|
||||
gameState.park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED;
|
||||
|
||||
gameState.GuestInitialCash = std::clamp(gameState.GuestInitialCash, 10.00_GBP, kMaxEntranceFee);
|
||||
gameState.guestInitialCash = std::clamp(gameState.guestInitialCash, 10.00_GBP, kMaxEntranceFee);
|
||||
|
||||
gameState.InitialCash = std::min<money64>(gameState.InitialCash, 100000);
|
||||
gameState.initialCash = std::min<money64>(gameState.initialCash, 100000);
|
||||
FinanceResetCashToInitial();
|
||||
|
||||
gameState.BankLoan = std::clamp<money64>(gameState.BankLoan, 0.00_GBP, 5000000.00_GBP);
|
||||
gameState.bankLoan = std::clamp<money64>(gameState.bankLoan, 0.00_GBP, 5000000.00_GBP);
|
||||
|
||||
gameState.MaxBankLoan = std::clamp<money64>(gameState.MaxBankLoan, 0.00_GBP, 5000000.00_GBP);
|
||||
gameState.maxBankLoan = std::clamp<money64>(gameState.maxBankLoan, 0.00_GBP, 5000000.00_GBP);
|
||||
|
||||
gameState.BankLoanInterestRate = std::clamp<uint8_t>(gameState.BankLoanInterestRate, 5, MaxBankLoanInterestRate);
|
||||
gameState.bankLoanInterestRate = std::clamp<uint8_t>(gameState.bankLoanInterestRate, 5, MaxBankLoanInterestRate);
|
||||
}
|
||||
|
||||
ClimateReset();
|
||||
@@ -327,7 +327,7 @@ namespace OpenRCT2::Editor
|
||||
|
||||
auto* windowMgr = Ui::GetWindowManager();
|
||||
|
||||
switch (GetGameState().EditorStep)
|
||||
switch (getGameState().editorStep)
|
||||
{
|
||||
case EditorStep::ObjectSelection:
|
||||
if (windowMgr->FindByClass(WindowClass::EditorObjectSelection) != nullptr)
|
||||
@@ -383,8 +383,8 @@ namespace OpenRCT2::Editor
|
||||
static void FinaliseMainView()
|
||||
{
|
||||
auto windowManager = Ui::GetWindowManager();
|
||||
auto& gameState = GetGameState();
|
||||
windowManager->SetMainView(gameState.SavedView, gameState.SavedViewZoom, gameState.SavedViewRotation);
|
||||
auto& gameState = getGameState();
|
||||
windowManager->SetMainView(gameState.savedView, gameState.savedViewZoom, gameState.savedViewRotation);
|
||||
|
||||
ResetAllSpriteQuadrantPlacements();
|
||||
|
||||
@@ -474,19 +474,19 @@ namespace OpenRCT2::Editor
|
||||
*/
|
||||
ResultWithMessage CheckPark()
|
||||
{
|
||||
auto& gameState = GetGameState();
|
||||
auto& gameState = getGameState();
|
||||
int32_t parkSize = Park::UpdateSize(gameState);
|
||||
if (parkSize == 0)
|
||||
{
|
||||
return { false, STR_PARK_MUST_OWN_SOME_LAND };
|
||||
}
|
||||
|
||||
if (gameState.Park.Entrances.empty())
|
||||
if (gameState.park.Entrances.empty())
|
||||
{
|
||||
return { false, STR_NO_PARK_ENTRANCES };
|
||||
}
|
||||
|
||||
for (const auto& parkEntrance : gameState.Park.Entrances)
|
||||
for (const auto& parkEntrance : gameState.park.Entrances)
|
||||
{
|
||||
int32_t direction = DirectionReverse(parkEntrance.direction);
|
||||
|
||||
@@ -504,7 +504,7 @@ namespace OpenRCT2::Editor
|
||||
}
|
||||
}
|
||||
|
||||
if (gameState.PeepSpawns.empty())
|
||||
if (gameState.peepSpawns.empty())
|
||||
{
|
||||
return { false, STR_PEEP_SPAWNS_NOT_SET };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user