Move gNextGuestNumber to Gamestate_t

This commit is contained in:
Harry Hopkinson committed 2024-01-25 09:34:47 +00:00
1 parent f8fa43f578
commit 8816aa607c
7 files changed
+5 -8

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ void GameState::InitAll(const TileCoordsXY& mapSize)
gInMapInitCode = false;
gNextGuestNumber = 1;
GetGameState().NextGuestNumber = 1;
ContextInit();
ScenerySetDefaultPlacementConfiguration();
+1
View File
@@ -41,6 +41,7 @@ namespace OpenRCT2
uint8_t GuestInitialHappiness;
uint8_t GuestInitialHunger;
uint8_t GuestInitialThirst;
uint32_t NextGuestNumber;
money64 WeeklyProfitAverageDividend;
uint16_t WeeklyProfitAverageDivisor;
money64 WeeklyProfitHistory[FINANCE_GRAPH_SIZE];
+1 -1
View File
@@ -7179,7 +7179,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords)
peep->TimeToConsume = 0;
peep->GuestNumRides = 0;
peep->PeepId = gNextGuestNumber++;
peep->PeepId = gameState.NextGuestNumber++;
peep->Name = nullptr;
money64 cash = (static_cast<money64>(ScenarioRand() & 0x3) * 100) - 100 + gameState.GuestInitialCash;
-2
View File
@@ -465,8 +465,6 @@ extern uint32_t gNumGuestsInPark;
extern uint32_t gNumGuestsInParkLastWeek;
extern uint32_t gNumGuestsHeadingForPark;
extern uint32_t gNextGuestNumber;
void PeepThoughtSetFormatArgs(const PeepThought* thought, Formatter& ft);
void IncrementGuestsInPark();
-2
View File
@@ -71,8 +71,6 @@ uint32_t gNumGuestsInPark;
uint32_t gNumGuestsInParkLastWeek;
uint32_t gNumGuestsHeadingForPark;
uint32_t gNextGuestNumber;
uint8_t gPeepWarningThrottle[16];
std::unique_ptr<GuestPathfinding> gGuestPathfinder = std::make_unique<OriginalPathfinding>();
+1 -1
View File
@@ -527,7 +527,7 @@ namespace OpenRCT2
cs.ReadWrite(gameState.GuestInitialHunger);
cs.ReadWrite(gameState.GuestInitialThirst);
cs.ReadWrite(gNextGuestNumber);
cs.ReadWrite(gameState.NextGuestNumber);
cs.ReadWriteVector(gPeepSpawns, [&cs](PeepSpawn& spawn) {
cs.ReadWrite(spawn.x);
cs.ReadWrite(spawn.y);
+1 -1
View File
@@ -446,7 +446,7 @@ namespace RCT2
ImportRideRatingsCalcData();
ImportRideMeasurements();
gNextGuestNumber = _s6.NextGuestIndex;
gameState.NextGuestNumber = _s6.NextGuestIndex;
gGrassSceneryTileLoopPosition = _s6.GrassAndSceneryTilepos;
// unk_13CA73E
// Pad13CA73F