Rename Peep::time_in_park to TimeInPark

This commit is contained in:
Tulio Leao 2020-06-06 10:15:10 -03:00
parent 4c459fada3
commit cf4b052cd4
12 changed files with 15 additions and 15 deletions

View File

@ -1513,10 +1513,10 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
// Time in park
y += LIST_ROW_HEIGHT + 1;
if (peep->time_in_park != -1)
if (peep->TimeInPark != -1)
{
int32_t eax = gScenarioTicks;
eax -= peep->time_in_park;
eax -= peep->TimeInPark;
eax >>= 11;
auto ft = Formatter::Common();
ft.Add<uint16_t>(eax & 0xFFFF);
@ -1579,7 +1579,7 @@ void window_guest_rides_update(rct_window* w)
if (guest != nullptr)
{
// Every 2048 ticks do a full window_invalidate
int32_t number_of_ticks = gScenarioTicks - peep->time_in_park;
int32_t number_of_ticks = gScenarioTicks - peep->TimeInPark;
if (!(number_of_ticks & 0x7FF))
w->Invalidate();

View File

@ -1104,7 +1104,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
y += LIST_ROW_HEIGHT;
}
gfx_draw_string_left(dpi, STR_STAFF_STAT_EMPLOYED_FOR, static_cast<void*>(&peep->time_in_park), COLOUR_BLACK, x, y);
gfx_draw_string_left(dpi, STR_STAFF_STAT_EMPLOYED_FOR, static_cast<void*>(&peep->TimeInPark), COLOUR_BLACK, x, y);
y += LIST_ROW_HEIGHT;
switch (peep->staff_type)

View File

@ -272,7 +272,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
COMPARE_FIELD(Peep, id);
COMPARE_FIELD(Peep, cash_in_pocket);
COMPARE_FIELD(Peep, cash_spent);
COMPARE_FIELD(Peep, time_in_park);
COMPARE_FIELD(Peep, TimeInPark);
COMPARE_FIELD(Peep, RejoinQueueTimeout);
COMPARE_FIELD(Peep, PreviousRide);
COMPARE_FIELD(Peep, PreviousRideTimeOut);

View File

@ -231,7 +231,7 @@ private:
}
// Staff uses this
newPeep->time_in_park = gDateMonthsElapsed;
newPeep->TimeInPark = gDateMonthsElapsed;
newPeep->PathfindGoal.x = 0xFF;
newPeep->PathfindGoal.y = 0xFF;
newPeep->PathfindGoal.z = 0xFF;

View File

@ -805,7 +805,7 @@ void Guest::Tick128UpdateGuest(int32_t index)
if (state == PEEP_STATE_WALKING && outside_of_park == 0 && !(PeepFlags & PEEP_FLAGS_LEAVING_PARK) && no_of_rides == 0
&& GuestHeadingToRideId == RIDE_ID_NULL)
{
uint32_t time_duration = gScenarioTicks - time_in_park;
uint32_t time_duration = gScenarioTicks - TimeInPark;
time_duration /= 2048;
if (time_duration >= 5)
@ -5679,7 +5679,7 @@ void Guest::UpdateEnteringPark()
SetState(PEEP_STATE_FALLING);
outside_of_park = 0;
time_in_park = gScenarioTicks;
TimeInPark = gScenarioTicks;
increment_guests_in_park();
decrement_guests_heading_for_park();
auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT);

View File

@ -1753,7 +1753,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords)
peep->cash_in_pocket = cash;
peep->cash_spent = 0;
peep->time_in_park = -1;
peep->TimeInPark = -1;
peep->PathfindGoal.x = 0xFF;
peep->PathfindGoal.y = 0xFF;
peep->PathfindGoal.z = 0xFF;

View File

@ -680,7 +680,7 @@ struct Peep : SpriteBase
uint32_t id;
money32 cash_in_pocket;
money32 cash_spent;
int32_t time_in_park;
int32_t TimeInPark;
int8_t RejoinQueueTimeout; // whilst waiting for a free vehicle (or pair) in the entrance
uint8_t PreviousRide;
uint16_t PreviousRideTimeOut;

View File

@ -366,7 +366,7 @@ void staff_reset_stats()
FOR_ALL_STAFF (spriteIndex, peep)
{
peep->time_in_park = gDateMonthsElapsed;
peep->TimeInPark = gDateMonthsElapsed;
peep->StaffLawnsMown = 0;
peep->StaffRidesFixed = 0;
peep->StaffGardensWatered = 0;

View File

@ -1479,7 +1479,7 @@ private:
dst->id = src->id;
dst->cash_in_pocket = src->cash_in_pocket;
dst->cash_spent = src->cash_spent;
dst->time_in_park = src->time_in_park;
dst->TimeInPark = src->time_in_park;
// This doubles as staff type
dst->no_of_rides = src->no_of_rides;

View File

@ -1194,7 +1194,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
dst->id = src->id;
dst->cash_in_pocket = src->cash_in_pocket;
dst->cash_spent = src->cash_spent;
dst->time_in_park = src->time_in_park;
dst->time_in_park = src->TimeInPark;
dst->rejoin_queue_timeout = src->RejoinQueueTimeout;
dst->previous_ride = src->PreviousRide;
dst->previous_ride_time_out = src->PreviousRideTimeOut;

View File

@ -1459,7 +1459,7 @@ public:
dst->id = src->id;
dst->cash_in_pocket = src->cash_in_pocket;
dst->cash_spent = src->cash_spent;
dst->time_in_park = src->time_in_park;
dst->TimeInPark = src->time_in_park;
dst->RejoinQueueTimeout = src->rejoin_queue_timeout;
dst->PreviousRide = src->previous_ride;
dst->PreviousRideTimeOut = src->previous_ride_time_out;

View File

@ -216,7 +216,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
COMPARE_FIELD(id);
COMPARE_FIELD(cash_in_pocket);
COMPARE_FIELD(cash_spent);
COMPARE_FIELD(time_in_park);
COMPARE_FIELD(TimeInPark);
COMPARE_FIELD(RejoinQueueTimeout);
COMPARE_FIELD(PreviousRide);
COMPARE_FIELD(PreviousRideTimeOut);