diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index ec116b2e5c..0357dd961c 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -6235,7 +6235,7 @@ namespace OpenRCT2::Ui::Windows static void UpdateSamePriceThroughoutFlags(ShopItem shop_item) { const auto& gameState = getGameState(); - const auto existingFlags = gameState.samePriceThroughoutPark; + const auto existingFlags = gameState.park.samePriceThroughoutPark; auto newFlags = existingFlags; if (GetShopItemDescriptor(shop_item).IsPhoto()) diff --git a/src/openrct2/GameState.h b/src/openrct2/GameState.h index afbf1ae71c..797df645a1 100644 --- a/src/openrct2/GameState.h +++ b/src/openrct2/GameState.h @@ -94,8 +94,6 @@ namespace OpenRCT2 uint16_t grassSceneryTileLoopPosition; CoordsXY widePathTileLoopPosition; - uint64_t samePriceThroughoutPark{}; - uint8_t researchFundingLevel; uint8_t researchPriorities; uint16_t researchProgress; diff --git a/src/openrct2/actions/ParkSetParameterAction.cpp b/src/openrct2/actions/ParkSetParameterAction.cpp index 7bcaa29a47..e5ed31c6d7 100644 --- a/src/openrct2/actions/ParkSetParameterAction.cpp +++ b/src/openrct2/actions/ParkSetParameterAction.cpp @@ -77,7 +77,7 @@ GameActions::Result ParkSetParameterAction::Execute() const } break; case ParkParameter::SamePriceInPark: - gameState.samePriceThroughoutPark = _value; + gameState.park.samePriceThroughoutPark = _value; windowMgr->InvalidateByClass(WindowClass::Ride); break; default: diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 56a8abd89f..658ed84d90 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -912,7 +912,7 @@ namespace OpenRCT2 cs.ReadWrite(gameState.park.staffHandymanColour); cs.ReadWrite(gameState.park.staffMechanicColour); cs.ReadWrite(gameState.park.staffSecurityColour); - cs.ReadWrite(gameState.samePriceThroughoutPark); + cs.ReadWrite(gameState.park.samePriceThroughoutPark); // Finances if (cs.GetMode() == OrcaStream::Mode::READING) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 0988e8b484..811edd6dec 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2334,10 +2334,10 @@ namespace OpenRCT2::RCT1 gameState.park.Size = _s4.ParkSize; gameState.totalRideValueForMoney = _s4.TotalRideValueForMoney; - gameState.samePriceThroughoutPark = 0; + gameState.park.samePriceThroughoutPark = 0; if (_gameVersion == FILE_VERSION_RCT1_LL) { - gameState.samePriceThroughoutPark = _s4.SamePriceThroughout; + gameState.park.samePriceThroughoutPark = _s4.SamePriceThroughout; } } diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 9e9593ddfb..2ec43aad78 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -527,7 +527,7 @@ namespace OpenRCT2::RCT2 // Pad013587FC gameState.park.RatingCasualtyPenalty = _s6.ParkRatingCasualtyPenalty; gameState.mapSize = { _s6.MapSize, _s6.MapSize }; - gameState.samePriceThroughoutPark = _s6.SamePriceThroughout + gameState.park.samePriceThroughoutPark = _s6.SamePriceThroughout | (static_cast(_s6.SamePriceThroughoutExtended) << 32); gameState.suggestedGuestMaximum = _s6.SuggestedMaxGuests; gameState.scenarioParkRatingWarningDays = _s6.ParkRatingWarningDays; diff --git a/src/openrct2/ride/ShopItem.cpp b/src/openrct2/ride/ShopItem.cpp index ecc2ff5d05..df5ba2b365 100644 --- a/src/openrct2/ride/ShopItem.cpp +++ b/src/openrct2/ride/ShopItem.cpp @@ -147,7 +147,7 @@ money64 ShopItemGetCommonPrice(Ride* forRide, const ShopItem shopItem) bool ShopItemHasCommonPrice(const ShopItem shopItem) { - return (getGameState().samePriceThroughoutPark & EnumToFlag(shopItem)) != 0; + return (getGameState().park.samePriceThroughoutPark & EnumToFlag(shopItem)) != 0; } bool ShopItemDescriptor::IsFood() const diff --git a/src/openrct2/world/ParkData.h b/src/openrct2/world/ParkData.h index b214256ef8..38cbcc2013 100644 --- a/src/openrct2/world/ParkData.h +++ b/src/openrct2/world/ParkData.h @@ -91,6 +91,8 @@ namespace OpenRCT2::Park money64 bankLoan; money64 maxBankLoan; + uint64_t samePriceThroughoutPark{}; + colour_t staffHandymanColour; colour_t staffMechanicColour; colour_t staffSecurityColour;