From 8a50fafdc82a779d8eae39671f7a4b5c817941a3 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 6 Jun 2020 10:57:14 -0300 Subject: [PATCH] Rename Peep::interaction_ride_index to use TitleCase --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- src/openrct2/peep/Peep.cpp | 22 +++++++++++----------- 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, 18 insertions(+), 18 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index d74b103a4f..e6a20cd5ff 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -263,7 +263,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, step_progress); COMPARE_FIELD(Peep, next_in_queue); COMPARE_FIELD(Peep, maze_last_edge); - COMPARE_FIELD(Peep, interaction_ride_index); + COMPARE_FIELD(Peep, InteractionRideIndex); COMPARE_FIELD(Peep, TimeInQueue); for (int i = 0; i < 32; i++) { diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index a3cfdccf10..b69d41308a 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -4999,7 +4999,7 @@ void Guest::UpdateRideLeaveExit() } } - interaction_ride_index = RIDE_ID_NULL; + InteractionRideIndex = RIDE_ID_NULL; SetState(PEEP_STATE_FALLING); CoordsXY targetLoc = { x, y }; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 5a95f71ca5..5794f10b86 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1646,7 +1646,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->sprite_direction = 0; peep->mass = (scenario_rand() & 0x1F) + 45; peep->PathCheckOptimisation = 0; - peep->interaction_ride_index = RIDE_ID_NULL; + peep->InteractionRideIndex = RIDE_ID_NULL; peep->type = PEEP_TYPE_GUEST; peep->PreviousRide = RIDE_ID_NULL; peep->Thoughts->type = PEEP_THOUGHT_TYPE_NONE; @@ -2369,7 +2369,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl { // Default guest/staff behaviour attempting to enter a // ride exit is to turn around. - peep->interaction_ride_index = 0xFF; + peep->InteractionRideIndex = 0xFF; peep_return_to_centre_of_tile(peep); return; } @@ -2386,7 +2386,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl { // Default staff behaviour attempting to enter a // ride entrance is to turn around. - peep->interaction_ride_index = 0xFF; + peep->InteractionRideIndex = 0xFF; peep_return_to_centre_of_tile(peep); return; } @@ -2400,7 +2400,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl } // Guest is on a normal path, i.e. ride has no queue. - if (peep->interaction_ride_index == rideIndex) + if (peep->InteractionRideIndex == rideIndex) { // Peep is retrying the ride entrance without leaving // the path tile and without trying any other ride @@ -2419,14 +2419,14 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl { // Peep remembers that this is the last ride they // considered while on this path tile. - peep->interaction_ride_index = rideIndex; + peep->InteractionRideIndex = rideIndex; peep_return_to_centre_of_tile(peep); return; } // Guest has decided to go on the ride. peep->action_sprite_image_offset = _unk_F1AEF0; - peep->interaction_ride_index = rideIndex; + peep->InteractionRideIndex = rideIndex; uint16_t previous_last = ride->stations[stationNum].LastPeepInQueue; ride->stations[stationNum].LastPeepInQueue = peep->sprite_index; @@ -2830,7 +2830,7 @@ static void peep_interact_with_path(Peep* peep, int16_t x, int16_t y, TileElemen else { // Queue got disconnected from the original ride. - peep->interaction_ride_index = 0xFF; + peep->InteractionRideIndex = 0xFF; guest->RemoveFromQueue(); peep->SetState(PEEP_STATE_1); peep_footpath_move_forward(peep, x, y, tile_element, vandalism_present); @@ -2853,7 +2853,7 @@ static void peep_interact_with_path(Peep* peep, int16_t x, int16_t y, TileElemen if (ride != nullptr && guest->ShouldGoOnRide(ride, stationNum, true, false)) { // Peep has decided to go on the ride at the queue. - peep->interaction_ride_index = rideIndex; + peep->InteractionRideIndex = rideIndex; // Add the peep to the ride queue. uint16_t old_last_peep = ride->stations[stationNum].LastPeepInQueue; @@ -2901,7 +2901,7 @@ static void peep_interact_with_path(Peep* peep, int16_t x, int16_t y, TileElemen } else { - peep->interaction_ride_index = 0xFF; + peep->InteractionRideIndex = 0xFF; if (peep->state == PEEP_STATE_QUEUING) { peep->RemoveFromQueue(); @@ -2937,7 +2937,7 @@ static bool peep_interact_with_shop(Peep* peep, int16_t x, int16_t y, TileElemen return true; } - if (peep->interaction_ride_index == rideIndex) + if (peep->InteractionRideIndex == rideIndex) { peep_return_to_centre_of_tile(peep); return true; @@ -3140,7 +3140,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) int16_t height = abs(tile_element_height(newLoc) - z); if (height <= 3 || (type == PEEP_TYPE_STAFF && height <= 32)) { - interaction_ride_index = 0xFF; + InteractionRideIndex = 0xFF; if (state == PEEP_STATE_QUEUING) { RemoveFromQueue(); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 8576638a6f..a4c85bc0c6 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -672,7 +672,7 @@ struct Peep : SpriteBase uint8_t maze_last_edge; Direction direction; // Direction ? }; - uint8_t interaction_ride_index; + uint8_t InteractionRideIndex; uint16_t TimeInQueue; uint8_t RidesBeenOn[32]; // 255 bit bitmap of every ride the peep has been on see diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index a07a41ff73..bfdb58b868 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1474,7 +1474,7 @@ private: dst->GuestTimeOnRide = src->time_on_ride; dst->DaysInQueue = src->days_in_queue; - dst->interaction_ride_index = src->interaction_ride_index; + dst->InteractionRideIndex = src->interaction_ride_index; dst->Id = src->id; dst->CashInPocket = src->cash_in_pocket; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 9de9eee4cc..ae7314fab5 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1185,7 +1185,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->step_progress = src->step_progress; dst->next_in_queue = src->next_in_queue; dst->direction = src->direction; - dst->interaction_ride_index = src->interaction_ride_index; + dst->interaction_ride_index = src->InteractionRideIndex; dst->time_in_queue = src->TimeInQueue; for (size_t i = 0; i < std::size(src->RidesBeenOn); i++) { diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 69b71f861f..19e16d6ad8 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1450,7 +1450,7 @@ public: dst->step_progress = src->step_progress; dst->next_in_queue = src->next_in_queue; dst->direction = src->direction; - dst->interaction_ride_index = src->interaction_ride_index; + dst->InteractionRideIndex = src->interaction_ride_index; dst->TimeInQueue = src->time_in_queue; for (size_t i = 0; i < std::size(src->rides_been_on); i++) { diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 72c04b2ec7..c1c1f9eebb 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -207,7 +207,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(step_progress); COMPARE_FIELD(next_in_queue); COMPARE_FIELD(maze_last_edge); - COMPARE_FIELD(interaction_ride_index); + COMPARE_FIELD(InteractionRideIndex); COMPARE_FIELD(TimeInQueue); for (int i = 0; i < 32; i++) {