From 7357eeca6098095f93fd623d00dc01d1fdc4f12a Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sun, 31 May 2020 17:49:56 -0300 Subject: [PATCH] Rename Peep::photo1_ride_ref to Photo1RideRef --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/RideDemolishAction.hpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- 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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index c4a5d8d43a..e61ec966de 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1947,7 +1947,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->BalloonColour) | ShopItems[item].Image); break; case SHOP_ITEM_PHOTO: - ride = get_ride(peep->photo1_ride_ref); + ride = get_ride(peep->Photo1RideRef); if (ride != nullptr) ride->FormatNameTo(gCommonFormatArgs + 6); break; diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index e850a064a6..b88e5aa7fa 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -283,7 +283,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, path_check_optimisation); COMPARE_FIELD(Peep, guest_heading_to_ride_id); COMPARE_FIELD(Peep, staff_orders); - COMPARE_FIELD(Peep, photo1_ride_ref); + COMPARE_FIELD(Peep, Photo1RideRef); COMPARE_FIELD(Peep, PeepFlags); COMPARE_FIELD(Peep, PathfindGoal); for (int i = 0; i < 4; i++) diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index 7aa53e15df..5b6ee4662c 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -187,7 +187,7 @@ private: // remove any photos of this ride from peep if (peep->ItemStandardFlags & PEEP_ITEM_PHOTO) { - if (peep->photo1_ride_ref == _rideIndex) + if (peep->Photo1RideRef == _rideIndex) { peep->ItemStandardFlags &= ~PEEP_ITEM_PHOTO; } diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index ceb4f36372..5cf006c3f8 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1671,7 +1671,7 @@ loc_69B221: time_to_consume = std::min((time_to_consume + consumptionTime), 255); if (shopItem == SHOP_ITEM_PHOTO) - photo1_ride_ref = ride->id; + Photo1RideRef = ride->id; if (shopItem == SHOP_ITEM_PHOTO2) photo2_ride_ref = ride->id; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index f03c0f7467..dc67e8889e 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -696,7 +696,7 @@ struct Peep : SpriteBase uint8_t staff_orders; uint8_t peep_is_lost_countdown; }; - uint8_t photo1_ride_ref; + uint8_t Photo1RideRef; uint32_t PeepFlags; rct12_xyzd8 PathfindGoal; rct12_xyzd8 PathfindHistory[4]; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 28ec875277..0a784ef824 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1510,7 +1510,7 @@ private: dst->ride_types_been_on[i] = src->ride_types_been_on[i]; } - dst->photo1_ride_ref = src->photo1_ride_ref; + dst->Photo1RideRef = src->photo1_ride_ref; for (size_t i = 0; i < std::size(src->thoughts); i++) { diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 109dac4a3c..86cf27dcfc 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1210,7 +1210,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->path_check_optimisation = src->path_check_optimisation; dst->guest_heading_to_ride_id = src->guest_heading_to_ride_id; dst->peep_is_lost_countdown = src->peep_is_lost_countdown; - dst->photo1_ride_ref = src->photo1_ride_ref; + dst->photo1_ride_ref = src->Photo1RideRef; dst->peep_flags = src->PeepFlags; dst->pathfind_goal = src->PathfindGoal; for (size_t i = 0; i < std::size(src->PathfindHistory); i++) diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 6aa9b36992..2f18bcadb8 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1475,7 +1475,7 @@ public: dst->path_check_optimisation = src->path_check_optimisation; dst->guest_heading_to_ride_id = src->guest_heading_to_ride_id; dst->peep_is_lost_countdown = src->peep_is_lost_countdown; - dst->photo1_ride_ref = src->photo1_ride_ref; + dst->Photo1RideRef = src->photo1_ride_ref; dst->PeepFlags = src->peep_flags; dst->PathfindGoal = src->pathfind_goal; for (size_t i = 0; i < std::size(src->pathfind_history); i++) diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 21f2d986da..cef1f8f36e 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -230,7 +230,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(path_check_optimisation); COMPARE_FIELD(guest_heading_to_ride_id); COMPARE_FIELD(staff_orders); - COMPARE_FIELD(photo1_ride_ref); + COMPARE_FIELD(Photo1RideRef); COMPARE_FIELD(PeepFlags); COMPARE_FIELD(PathfindGoal.x); COMPARE_FIELD(PathfindGoal.y);