diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 33466760fa..61fb347918 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -281,7 +281,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, thoughts[i]); } COMPARE_FIELD(Peep, path_check_optimisation); - COMPARE_FIELD(Peep, guest_heading_to_ride_id); + COMPARE_FIELD(Peep, GuestHeadingToRideId); COMPARE_FIELD(Peep, StaffOrders); COMPARE_FIELD(Peep, Photo1RideRef); COMPARE_FIELD(Peep, PeepFlags); diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index 5b6ee4662c..07314d1037 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -214,9 +214,9 @@ private: } } - if (peep->guest_heading_to_ride_id == _rideIndex) + if (peep->GuestHeadingToRideId == _rideIndex) { - peep->guest_heading_to_ride_id = RIDE_ID_NULL; + peep->GuestHeadingToRideId = RIDE_ID_NULL; } if (peep->FavouriteRide == _rideIndex) { diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index cae6de58d3..650e9872a3 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -142,7 +142,7 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType) peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; peep->VoucherType = VOUCHER_TYPE_RIDE_FREE; peep->VoucherArguments = campaign->RideId; - peep->guest_heading_to_ride_id = campaign->RideId; + peep->GuestHeadingToRideId = campaign->RideId; peep->PeepIsLostCountdown = 240; break; case ADVERTISING_CAMPAIGN_PARK_ENTRY_HALF_PRICE: @@ -157,7 +157,7 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType) case ADVERTISING_CAMPAIGN_PARK: break; case ADVERTISING_CAMPAIGN_RIDE: - peep->guest_heading_to_ride_id = campaign->RideId; + peep->GuestHeadingToRideId = campaign->RideId; peep->PeepIsLostCountdown = 240; break; } diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 94f969aaed..8752b0556b 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -803,7 +803,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 - && guest_heading_to_ride_id == RIDE_ID_NULL) + && GuestHeadingToRideId == RIDE_ID_NULL) { uint32_t time_duration = gScenarioTicks - time_in_park; time_duration /= 2048; @@ -812,7 +812,7 @@ void Guest::Tick128UpdateGuest(int32_t index) { PickRideToGoOn(); - if (guest_heading_to_ride_id == RIDE_ID_NULL) + if (GuestHeadingToRideId == RIDE_ID_NULL) { happiness_target = std::max(happiness_target - 128, 0); peep_leave_park(this); @@ -1416,13 +1416,13 @@ void Guest::CheckIfLost() */ void Guest::CheckCantFindRide() { - if (guest_heading_to_ride_id == RIDE_ID_NULL) + if (GuestHeadingToRideId == RIDE_ID_NULL) return; // Peeps will think "I can't find ride X" twice before giving up completely. if (PeepIsLostCountdown == 30 || PeepIsLostCountdown == 60) { - InsertNewThought(PEEP_THOUGHT_TYPE_CANT_FIND, guest_heading_to_ride_id); + InsertNewThought(PEEP_THOUGHT_TYPE_CANT_FIND, GuestHeadingToRideId); happiness_target = std::max(happiness_target - 30, 0); } @@ -1430,7 +1430,7 @@ void Guest::CheckCantFindRide() if (PeepIsLostCountdown != 0) return; - guest_heading_to_ride_id = RIDE_ID_NULL; + GuestHeadingToRideId = RIDE_ID_NULL; rct_window* w = window_find_by_number(WC_PEEP, sprite_index); if (w) @@ -1800,7 +1800,7 @@ void Guest::OnExitRide(ride_id_t rideIndex) if (ride != nullptr && peep_should_go_on_ride_again(this, ride)) { - guest_heading_to_ride_id = rideIndex; + GuestHeadingToRideId = rideIndex; PeepIsLostCountdown = 200; peep_reset_pathfind_goal(this); window_invalidate_flags |= PEEP_INVALIDATE_PEEP_ACTION; @@ -1850,7 +1850,7 @@ void Guest::PickRideToGoOn() { if (state != PEEP_STATE_WALKING) return; - if (guest_heading_to_ride_id != RIDE_ID_NULL) + if (GuestHeadingToRideId != RIDE_ID_NULL) return; if (PeepFlags & PEEP_FLAGS_LEAVING_PARK) return; @@ -1863,7 +1863,7 @@ void Guest::PickRideToGoOn() if (ride != nullptr) { // Head to that ride - guest_heading_to_ride_id = ride->id; + GuestHeadingToRideId = ride->id; PeepIsLostCountdown = 200; peep_reset_pathfind_goal(this); window_invalidate_flags |= PEEP_INVALIDATE_PEEP_ACTION; @@ -2093,7 +2093,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, int32_t entranceNum, bool atQueue, bool t { // If a peep has already decided that they're going to go on a ride, they'll skip the weather and // excitement check and will only do a basic intensity check when they arrive at the ride itself. - if (ride->id == guest_heading_to_ride_id) + if (ride->id == GuestHeadingToRideId) { if (ride->intensity > RIDE_RATING(10, 00) && !gCheatsIgnoreRideIntensity) { @@ -2240,7 +2240,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, int32_t entranceNum, bool atQueue, bool t ride_update_popularity(ride, 1); } - if (ride->id == guest_heading_to_ride_id) + if (ride->id == GuestHeadingToRideId) { peep_reset_ride_heading(this); } @@ -2319,7 +2319,7 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop) if (peepAtShop) { ride_update_popularity(ride, 1); - if (ride->id == guest_heading_to_ride_id) + if (ride->id == GuestHeadingToRideId) { peep_reset_ride_heading(this); } @@ -2394,7 +2394,7 @@ void Guest::ChoseNotToGoOnRide(Ride* ride, bool peepAtRide, bool updateLastRide) previous_ride_time_out = 0; } - if (ride->id == guest_heading_to_ride_id) + if (ride->id == GuestHeadingToRideId) { peep_reset_ride_heading(this); } @@ -2428,7 +2428,7 @@ static void peep_tried_to_enter_full_queue(Peep* peep, Ride* ride) peep->previous_ride = ride->id; peep->previous_ride_time_out = 0; // Change status "Heading to" to "Walking" if queue is full - if (ride->id == peep->guest_heading_to_ride_id) + if (ride->id == peep->GuestHeadingToRideId) { peep_reset_ride_heading(peep); } @@ -2436,7 +2436,7 @@ static void peep_tried_to_enter_full_queue(Peep* peep, Ride* ride) static void peep_reset_ride_heading(Peep* peep) { - peep->guest_heading_to_ride_id = RIDE_ID_NULL; + peep->GuestHeadingToRideId = RIDE_ID_NULL; peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_ACTION; } @@ -3117,7 +3117,7 @@ static void peep_decide_whether_to_leave_park(Peep* peep) */ static void peep_leave_park(Peep* peep) { - peep->guest_heading_to_ride_id = RIDE_ID_NULL; + peep->GuestHeadingToRideId = RIDE_ID_NULL; if (peep->PeepFlags & PEEP_FLAGS_LEAVING_PARK) { if (peep->PeepIsLostCountdown < 60) @@ -3150,9 +3150,9 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co return; if (peep->x == LOCATION_NULL) return; - if (peep->guest_heading_to_ride_id != RIDE_ID_NULL) + if (peep->GuestHeadingToRideId != RIDE_ID_NULL) { - auto ride = get_ride(peep->guest_heading_to_ride_id); + auto ride = get_ride(peep->GuestHeadingToRideId); if (ride != nullptr && predicate(*ride)) { return; @@ -3241,7 +3241,7 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co if (closestRide != nullptr) { // Head to that ride - peep->guest_heading_to_ride_id = closestRide->id; + peep->GuestHeadingToRideId = closestRide->id; peep->PeepIsLostCountdown = 200; peep_reset_pathfind_goal(peep); peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_ACTION; @@ -6944,5 +6944,5 @@ void Guest::UpdateSpriteType() bool Guest::HeadingForRideOrParkExit() const { - return (PeepFlags & PEEP_FLAGS_LEAVING_PARK) || (guest_heading_to_ride_id != 0xFF); + return (PeepFlags & PEEP_FLAGS_LEAVING_PARK) || (GuestHeadingToRideId != 0xFF); } diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index 1c99933907..589f34c9f7 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -2053,7 +2053,7 @@ int32_t guest_path_finding(Guest* peep) return guest_path_find_park_entrance(peep, edges); } - if (peep->guest_heading_to_ride_id == 0xFF) + if (peep->GuestHeadingToRideId == 0xFF) { #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (gPathFindDebug) @@ -2066,7 +2066,7 @@ int32_t guest_path_finding(Guest* peep) } // Peep is heading for a ride. - ride_id_t rideIndex = peep->guest_heading_to_ride_id; + ride_id_t rideIndex = peep->GuestHeadingToRideId; auto ride = get_ride(rideIndex); if (ride == nullptr || ride->status != RIDE_STATUS_OPEN) { diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 75dfde8e3e..efab02d193 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1209,34 +1209,34 @@ void peep_problem_warnings_update() break; case PEEP_THOUGHT_TYPE_HUNGRY: // 0x14 - if (peep->guest_heading_to_ride_id == 0xFF) + if (peep->GuestHeadingToRideId == 0xFF) { hunger_counter++; break; } - ride = get_ride(peep->guest_heading_to_ride_id); + ride = get_ride(peep->GuestHeadingToRideId); if (ride != nullptr && !ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) hunger_counter++; break; case PEEP_THOUGHT_TYPE_THIRSTY: - if (peep->guest_heading_to_ride_id == 0xFF) + if (peep->GuestHeadingToRideId == 0xFF) { thirst_counter++; break; } - ride = get_ride(peep->guest_heading_to_ride_id); + ride = get_ride(peep->GuestHeadingToRideId); if (ride != nullptr && !ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_SELLS_DRINKS)) thirst_counter++; break; case PEEP_THOUGHT_TYPE_TOILET: - if (peep->guest_heading_to_ride_id == 0xFF) + if (peep->GuestHeadingToRideId == 0xFF) { toilet_counter++; break; } - ride = get_ride(peep->guest_heading_to_ride_id); + ride = get_ride(peep->GuestHeadingToRideId); if (ride != nullptr && !ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_TOILET)) toilet_counter++; break; @@ -1760,7 +1760,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->PathfindGoal.direction = INVALID_DIRECTION; peep->ItemStandardFlags = 0; peep->item_extra_flags = 0; - peep->guest_heading_to_ride_id = RIDE_ID_NULL; + peep->GuestHeadingToRideId = RIDE_ID_NULL; peep->LitterCount = 0; peep->DisgustingCount = 0; peep->VandalismSeen = 0; @@ -1841,9 +1841,9 @@ void Peep::FormatActionTo(void* argsV) const } case PEEP_STATE_WALKING: case PEEP_STATE_USING_BIN: - if (guest_heading_to_ride_id != RIDE_ID_NULL) + if (GuestHeadingToRideId != RIDE_ID_NULL) { - auto ride = get_ride(guest_heading_to_ride_id); + auto ride = get_ride(GuestHeadingToRideId); if (ride != nullptr) { ft.Add(STR_HEADING_FOR); @@ -2993,8 +2993,8 @@ static bool peep_interact_with_shop(Peep* peep, int16_t x, int16_t y, TileElemen } else { - if (peep->guest_heading_to_ride_id == rideIndex) - peep->guest_heading_to_ride_id = 0xFF; + if (peep->GuestHeadingToRideId == rideIndex) + peep->GuestHeadingToRideId = 0xFF; peep->action_sprite_image_offset = _unk_F1AEF0; peep->SetState(PEEP_STATE_BUYING); peep->current_ride = rideIndex; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 7b80bedaa3..86aaacf156 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -521,7 +521,7 @@ enum PeepInvalidate PEEP_INVALIDATE_PEEP_2 = 1 << 2, PEEP_INVALIDATE_PEEP_INVENTORY = 1 << 3, PEEP_INVALIDATE_STAFF_STATS = 1 << 4, - PEEP_INVALIDATE_PEEP_ACTION = 1 << 5, // Currently set only when guest_heading_to_ride_id is changed + PEEP_INVALIDATE_PEEP_ACTION = 1 << 5, // Currently set only when GuestHeadingToRideId is changed }; // Flags used by peep_should_go_on_ride() @@ -689,7 +689,7 @@ struct Peep : SpriteBase union { uint8_t staff_id; - uint8_t guest_heading_to_ride_id; + uint8_t GuestHeadingToRideId; }; union { diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 8277df8333..c0113add8a 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1526,7 +1526,7 @@ private: dst->previous_ride_time_out = src->previous_ride_time_out; dst->path_check_optimisation = 0; - dst->guest_heading_to_ride_id = src->guest_heading_to_ride_id; + dst->GuestHeadingToRideId = src->guest_heading_to_ride_id; // Doubles as staff orders dst->PeepIsLostCountdown = src->peep_is_lost_countdown; // The ID is fixed later diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index f7af4dd403..33346654ea 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1208,7 +1208,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dstThought->fresh_timeout = srcThought->fresh_timeout; } dst->path_check_optimisation = src->path_check_optimisation; - dst->guest_heading_to_ride_id = src->guest_heading_to_ride_id; + dst->guest_heading_to_ride_id = src->GuestHeadingToRideId; dst->peep_is_lost_countdown = src->PeepIsLostCountdown; dst->photo1_ride_ref = src->Photo1RideRef; dst->peep_flags = src->PeepFlags; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 379a2e3073..99039d1ada 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1473,7 +1473,7 @@ public: dstThought->fresh_timeout = srcThought->fresh_timeout; } dst->path_check_optimisation = src->path_check_optimisation; - dst->guest_heading_to_ride_id = src->guest_heading_to_ride_id; + dst->GuestHeadingToRideId = src->guest_heading_to_ride_id; dst->PeepIsLostCountdown = src->peep_is_lost_countdown; dst->Photo1RideRef = src->photo1_ride_ref; dst->PeepFlags = src->peep_flags; diff --git a/test/tests/Pathfinding.cpp b/test/tests/Pathfinding.cpp index f641810ad7..48d2658a27 100644 --- a/test/tests/Pathfinding.cpp +++ b/test/tests/Pathfinding.cpp @@ -78,7 +78,7 @@ protected: // that with no actual ride to head towards, when a peep reaches a junction they use the 'aimless' // pathfinder instead of pursuing their original pathfinding target. So, we always need to give them // an actual ride to walk to the entrance of. - peep->guest_heading_to_ride_id = targetRideID; + peep->GuestHeadingToRideId = targetRideID; // Pick the direction the peep should initially move in, given the goal position. // This will also store the goal position and initialize pathfinding data for the peep. diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 6099aaf84d..83ced84df5 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -228,7 +228,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(thoughts[i].fresh_timeout); } COMPARE_FIELD(path_check_optimisation); - COMPARE_FIELD(guest_heading_to_ride_id); + COMPARE_FIELD(GuestHeadingToRideId); COMPARE_FIELD(StaffOrders); COMPARE_FIELD(Photo1RideRef); COMPARE_FIELD(PeepFlags);