1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Move gNextGuestNumber to Gamestate_t

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

View File

@@ -88,7 +88,7 @@ void GameState::InitAll(const TileCoordsXY& mapSize)
gInMapInitCode = false;
gNextGuestNumber = 1;
GetGameState().NextGuestNumber = 1;
ContextInit();
ScenerySetDefaultPlacementConfiguration();

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];

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;

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();

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>();

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);

View File

@@ -446,7 +446,7 @@ namespace RCT2
ImportRideRatingsCalcData();
ImportRideMeasurements();
gNextGuestNumber = _s6.NextGuestIndex;
gameState.NextGuestNumber = _s6.NextGuestIndex;
gGrassSceneryTileLoopPosition = _s6.GrassAndSceneryTilepos;
// unk_13CA73E
// Pad13CA73F