From 0c502988efbf8d4fee17c73eed2f8358bb2bc204 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:49:30 -0300 Subject: [PATCH] Rename Peep::disgusting_count to DisgustingCount --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- src/openrct2/peep/Peep.cpp | 12 ++++++------ src/openrct2/peep/Peep.h | 2 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index b95675d910..7c4b2ecdb4 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -293,7 +293,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, no_action_frame_num); COMPARE_FIELD(Peep, litter_count); COMPARE_FIELD(Peep, time_on_ride); - COMPARE_FIELD(Peep, disgusting_count); + COMPARE_FIELD(Peep, DisgustingCount); COMPARE_FIELD(Peep, PaidToEnter); COMPARE_FIELD(Peep, PaidOnRides); COMPARE_FIELD(Peep, PaidOnFood); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index d29cb69d69..ccb2981ac8 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -6212,7 +6212,7 @@ static void peep_update_walking_break_scenery(Peep* peep) if (peep->state != PEEP_STATE_WALKING) return; - if ((peep->litter_count & 0xC0) != 0xC0 && (peep->disgusting_count & 0xC0) != 0xC0) + if ((peep->litter_count & 0xC0) != 0xC0 && (peep->DisgustingCount & 0xC0) != 0xC0) return; if ((scenario_rand() & 0xFFFF) > 3276) diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 14ae6aac3f..c492718e3e 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1762,7 +1762,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->item_extra_flags = 0; peep->guest_heading_to_ride_id = RIDE_ID_NULL; peep->litter_count = 0; - peep->disgusting_count = 0; + peep->DisgustingCount = 0; peep->VandalismSeen = 0; peep->PaidToEnter = 0; peep->PaidOnRides = 0; @@ -2727,14 +2727,14 @@ static void peep_footpath_move_forward(Peep* peep, int16_t x, int16_t y, TileEle litter_count = std::min(static_cast(3), litter_count); sick_count = std::min(static_cast(3), sick_count); - uint8_t disgusting_time = peep->disgusting_count & 0xC0; - uint8_t disgusting_count = ((peep->disgusting_count & 0xF) << 2) | sick_count; - peep->disgusting_count = disgusting_count | disgusting_time; + uint8_t disgusting_time = peep->DisgustingCount & 0xC0; + uint8_t disgusting_count = ((peep->DisgustingCount & 0xF) << 2) | sick_count; + peep->DisgustingCount = disgusting_count | disgusting_time; if (disgusting_time & 0xC0 && (scenario_rand() & 0xFFFF) <= 4369) { // Reduce the disgusting time - peep->disgusting_count -= 0x40; + peep->DisgustingCount -= 0x40; } else { @@ -2749,7 +2749,7 @@ static void peep_footpath_move_forward(Peep* peep, int16_t x, int16_t y, TileEle peep->InsertNewThought(PEEP_THOUGHT_TYPE_PATH_DISGUSTING, PEEP_THOUGHT_ITEM_NONE); peep->happiness_target = std::max(0, peep->happiness_target - 17); // Reset disgusting time - peep->disgusting_count |= 0xC0; + peep->DisgustingCount |= 0xC0; } } diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index ce712cc35f..255e143ed4 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -709,7 +709,7 @@ struct Peep : SpriteBase uint8_t staff_mowing_timeout; }; // 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8_t disgusting_count; + uint8_t DisgustingCount; union { money16 PaidToEnter; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index bd42bcaeb4..b1e3afc42b 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1460,7 +1460,7 @@ private: dst->mass = src->mass; dst->litter_count = src->litter_count; - dst->disgusting_count = src->disgusting_count; + dst->DisgustingCount = src->disgusting_count; dst->intensity = static_cast(src->intensity); dst->nausea_tolerance = src->nausea_tolerance; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index dd1adf1794..03c9f99320 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1220,7 +1220,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->no_action_frame_num = src->no_action_frame_num; dst->litter_count = src->litter_count; dst->time_on_ride = src->time_on_ride; - dst->disgusting_count = src->disgusting_count; + dst->disgusting_count = src->DisgustingCount; dst->paid_to_enter = src->PaidToEnter; dst->paid_on_rides = src->PaidOnRides; dst->paid_on_food = src->PaidOnFood; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 61f0e354d8..470d31f308 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1485,7 +1485,7 @@ public: dst->no_action_frame_num = src->no_action_frame_num; dst->litter_count = src->litter_count; dst->time_on_ride = src->time_on_ride; - dst->disgusting_count = src->disgusting_count; + dst->DisgustingCount = src->disgusting_count; dst->PaidToEnter = src->paid_to_enter; dst->PaidOnRides = src->paid_on_rides; dst->PaidOnFood = src->paid_on_food; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index e40506a874..eac0e41859 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -246,7 +246,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(no_action_frame_num); COMPARE_FIELD(litter_count); COMPARE_FIELD(time_on_ride); - COMPARE_FIELD(disgusting_count); + COMPARE_FIELD(DisgustingCount); COMPARE_FIELD(PaidToEnter); COMPARE_FIELD(PaidOnRides); COMPARE_FIELD(PaidOnFood);