diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index cbe2bae1d5..1e51bd375e 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -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(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(); diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index f8e92d73ad..2affab5b9b 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -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(&peep->time_in_park), COLOUR_BLACK, x, y); + gfx_draw_string_left(dpi, STR_STAFF_STAT_EMPLOYED_FOR, static_cast(&peep->TimeInPark), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; switch (peep->staff_type) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 4731ae81a9..6cba345f77 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -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); diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index b9b3aa9c45..d182b9d03e 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -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; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 6791f252ec..7193ad2114 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -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); diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 0756c52d16..bcca8c6723 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -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; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 9acaf9c79e..4d9577845e 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -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; diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index af154689bf..4539081333 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -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; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index f3c04a2d2c..aa3783aea3 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -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; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index d4ccf26890..6e4cc75d51 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -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; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index b9fc8278c1..f80b34a5bb 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -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; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index d9d12f6a5e..45bd96dcec 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -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);