From 14e0cc5e4acb4e6a07777bca319b06d54e8f150c Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:01:03 -0300 Subject: [PATCH 01/10] Rename Peep::item_standard_flags to ItemStandardFlags --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/RideDemolishAction.hpp | 8 +-- src/openrct2/actions/SetCheatAction.hpp | 6 +-- src/openrct2/management/Marketing.cpp | 8 +-- src/openrct2/peep/Guest.cpp | 56 ++++++++++----------- src/openrct2/peep/GuestPathfinding.cpp | 4 +- src/openrct2/peep/Peep.cpp | 12 ++--- src/openrct2/peep/Peep.h | 4 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 12 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index d53290125b..229b50ea38 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -313,7 +313,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, hat_colour); COMPARE_FIELD(Peep, favourite_ride); COMPARE_FIELD(Peep, favourite_ride_rating); - COMPARE_FIELD(Peep, item_standard_flags); + COMPARE_FIELD(Peep, ItemStandardFlags); } void CompareSpriteDataVehicle( diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index 0bc5de3bef..1f85a68b4b 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -176,20 +176,20 @@ private: } // remove any free voucher for this ride from peep - if (peep->item_standard_flags & PEEP_ITEM_VOUCHER) + if (peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) { if (peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->voucher_arguments == _rideIndex) { - peep->item_standard_flags &= ~(PEEP_ITEM_VOUCHER); + peep->ItemStandardFlags &= ~(PEEP_ITEM_VOUCHER); } } // remove any photos of this ride from peep - if (peep->item_standard_flags & PEEP_ITEM_PHOTO) + if (peep->ItemStandardFlags & PEEP_ITEM_PHOTO) { if (peep->photo1_ride_ref == _rideIndex) { - peep->item_standard_flags &= ~PEEP_ITEM_PHOTO; + peep->ItemStandardFlags &= ~PEEP_ITEM_PHOTO; } } if (peep->item_extra_flags & PEEP_ITEM_PHOTO2) diff --git a/src/openrct2/actions/SetCheatAction.hpp b/src/openrct2/actions/SetCheatAction.hpp index 40f858a4b5..a9e012aa34 100644 --- a/src/openrct2/actions/SetCheatAction.hpp +++ b/src/openrct2/actions/SetCheatAction.hpp @@ -633,15 +633,15 @@ private: peep->cash_in_pocket = MONEY(1000, 00); break; case OBJECT_PARK_MAP: - peep->item_standard_flags |= PEEP_ITEM_MAP; + peep->ItemStandardFlags |= PEEP_ITEM_MAP; break; case OBJECT_BALLOON: - peep->item_standard_flags |= PEEP_ITEM_BALLOON; + peep->ItemStandardFlags |= PEEP_ITEM_BALLOON; peep->balloon_colour = scenario_rand_max(COLOUR_COUNT - 1); peep->UpdateSpriteType(); break; case OBJECT_UMBRELLA: - peep->item_standard_flags |= PEEP_ITEM_UMBRELLA; + peep->ItemStandardFlags |= PEEP_ITEM_UMBRELLA; peep->umbrella_colour = scenario_rand_max(COLOUR_COUNT - 1); peep->UpdateSpriteType(); break; diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index 0f6fa1faa0..3b3caa930c 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -135,22 +135,22 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType) switch (campaign->Type) { case ADVERTISING_CAMPAIGN_PARK_ENTRY_FREE: - peep->item_standard_flags |= PEEP_ITEM_VOUCHER; + peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; peep->voucher_type = VOUCHER_TYPE_PARK_ENTRY_FREE; break; case ADVERTISING_CAMPAIGN_RIDE_FREE: - peep->item_standard_flags |= PEEP_ITEM_VOUCHER; + peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; peep->voucher_type = VOUCHER_TYPE_RIDE_FREE; peep->voucher_arguments = campaign->RideId; peep->guest_heading_to_ride_id = campaign->RideId; peep->peep_is_lost_countdown = 240; break; case ADVERTISING_CAMPAIGN_PARK_ENTRY_HALF_PRICE: - peep->item_standard_flags |= PEEP_ITEM_VOUCHER; + peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; peep->voucher_type = VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE; break; case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE: - peep->item_standard_flags |= PEEP_ITEM_VOUCHER; + peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; peep->voucher_type = VOUCHER_TYPE_FOOD_OR_DRINK_FREE; peep->voucher_arguments = campaign->ShopItemType; break; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index fb704287e6..b27197d49f 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -446,10 +446,10 @@ void Guest::GivePassingPeepsPurpleClothes(Guest* passingPeep) void Guest::GivePassingPeepsPizza(Guest* passingPeep) { - if ((passingPeep->item_standard_flags & PEEP_ITEM_PIZZA)) + if ((passingPeep->ItemStandardFlags & PEEP_ITEM_PIZZA)) return; - passingPeep->item_standard_flags |= PEEP_ITEM_PIZZA; + passingPeep->ItemStandardFlags |= PEEP_ITEM_PIZZA; int32_t peepDirection = (sprite_direction >> 3) ^ 2; int32_t otherPeepOppositeDirection = passingPeep->sprite_direction >> 3; @@ -485,10 +485,10 @@ void Guest::GivePassingPeepsIceCream(Guest* passingPeep) { if (this == passingPeep) return; - if (passingPeep->item_standard_flags & PEEP_ITEM_ICE_CREAM) + if (passingPeep->ItemStandardFlags & PEEP_ITEM_ICE_CREAM) return; - passingPeep->item_standard_flags |= PEEP_ITEM_ICE_CREAM; + passingPeep->ItemStandardFlags |= PEEP_ITEM_ICE_CREAM; passingPeep->UpdateSpriteType(); } @@ -822,7 +822,7 @@ void Guest::Tick128UpdateGuest(int32_t index) } } - if ((scenario_rand() & 0xFFFF) <= ((item_standard_flags & PEEP_ITEM_MAP) ? 8192U : 2184U)) + if ((scenario_rand() & 0xFFFF) <= ((ItemStandardFlags & PEEP_ITEM_MAP) ? 8192U : 2184U)) { PickRideToGoOn(); } @@ -1085,12 +1085,12 @@ void Guest::Tick128UpdateGuest(int32_t index) int32_t chosen_food = bitscanforward(HasFoodStandardFlag()); if (chosen_food != -1) { - item_standard_flags &= ~(1 << chosen_food); + ItemStandardFlags &= ~(1 << chosen_food); uint8_t discard_container = peep_item_containers[chosen_food]; if (discard_container != 0xFF) { - item_standard_flags |= (1 << discard_container); + ItemStandardFlags |= (1 << discard_container); } window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; @@ -1108,7 +1108,7 @@ void Guest::Tick128UpdateGuest(int32_t index) if (discard_container >= 32) item_extra_flags |= (1 << (discard_container - 32)); else - item_standard_flags |= (1 << discard_container); + ItemStandardFlags |= (1 << discard_container); } window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; @@ -1320,7 +1320,7 @@ bool Guest::HasItem(int32_t peepItem) const { if (peepItem < 32) { - return item_standard_flags & (1u << peepItem); + return ItemStandardFlags & (1u << peepItem); } else { @@ -1330,7 +1330,7 @@ bool Guest::HasItem(int32_t peepItem) const int32_t Guest::HasFoodStandardFlag() const { - return item_standard_flags + return ItemStandardFlags & (PEEP_ITEM_DRINK | PEEP_ITEM_BURGER | PEEP_ITEM_CHIPS | PEEP_ITEM_ICE_CREAM | PEEP_ITEM_CANDYFLOSS | PEEP_ITEM_PIZZA | PEEP_ITEM_POPCORN | PEEP_ITEM_HOT_DOG | PEEP_ITEM_TENTACLE | PEEP_ITEM_TOFFEE_APPLE | PEEP_ITEM_DOUGHNUT | PEEP_ITEM_COFFEE | PEEP_ITEM_CHICKEN | PEEP_ITEM_LEMONADE); @@ -1347,7 +1347,7 @@ int32_t Guest::HasFoodExtraFlag() const bool Guest::HasDrinkStandardFlag() const { - return item_standard_flags & (PEEP_ITEM_DRINK | PEEP_ITEM_COFFEE | PEEP_ITEM_LEMONADE); + return ItemStandardFlags & (PEEP_ITEM_DRINK | PEEP_ITEM_COFFEE | PEEP_ITEM_LEMONADE); } bool Guest::HasDrinkExtraFlag() const @@ -1367,7 +1367,7 @@ bool Guest::HasDrink() const int32_t Guest::HasEmptyContainerStandardFlag() const { - return item_standard_flags + return ItemStandardFlags & (PEEP_ITEM_EMPTY_CAN | PEEP_ITEM_EMPTY_BURGER_BOX | PEEP_ITEM_EMPTY_CUP | PEEP_ITEM_RUBBISH | PEEP_ITEM_EMPTY_BOX | PEEP_ITEM_EMPTY_BOTTLE); } @@ -1481,7 +1481,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price) bool hasVoucher = false; - if ((item_standard_flags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_FOOD_OR_DRINK_FREE) + if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_FOOD_OR_DRINK_FREE) && (voucher_arguments == shopItem)) { hasVoucher = true; @@ -1650,7 +1650,7 @@ loc_69B221: if (shopItem >= 32) item_extra_flags |= (1u << (shopItem - 32)); else - item_standard_flags |= (1u << shopItem); + ItemStandardFlags |= (1u << shopItem); if (shopItem == SHOP_ITEM_TSHIRT) tshirt_colour = ride->track_colour[0].main; @@ -1726,7 +1726,7 @@ loc_69B221: expenditure = static_cast(static_cast(expenditure) - 1); if (hasVoucher) { - item_standard_flags &= ~PEEP_ITEM_VOUCHER; + ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; } else if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) @@ -1869,7 +1869,7 @@ void Guest::PickRideToGoOn() window_invalidate_flags |= PEEP_INVALIDATE_PEEP_ACTION; // Make peep look at their map if they have one - if (item_standard_flags & PEEP_ITEM_MAP) + if (ItemStandardFlags & PEEP_ITEM_MAP) { ReadMap(); } @@ -1907,7 +1907,7 @@ std::bitset Guest::FindRidesToGoOn() // FIX Originally checked for a toy, likely a mistake and should be a map, // but then again this seems to only allow the peep to go on // rides they haven't been on before. - if (item_standard_flags & PEEP_ITEM_MAP) + if (ItemStandardFlags & PEEP_ITEM_MAP) { // Consider rides that peep hasn't been on yet for (auto& ride : GetRideManager()) @@ -2413,7 +2413,7 @@ void Guest::ReadMap() static bool peep_has_voucher_for_free_ride(Peep* peep, Ride* ride) { - return peep->item_standard_flags & PEEP_ITEM_VOUCHER && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE + return peep->ItemStandardFlags & PEEP_ITEM_VOUCHER && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->voucher_arguments == ride->id; } @@ -2634,7 +2634,7 @@ static void peep_update_ride_at_entrance_try_leave(Guest* peep) static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 ridePrice) { - if ((peep->item_standard_flags & PEEP_ITEM_VOUCHER) && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE + if ((peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->voucher_arguments == peep->current_ride) return true; @@ -3160,7 +3160,7 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co } std::bitset rideConsideration; - if (!considerOnlyCloseRides && (peep->item_standard_flags & PEEP_ITEM_MAP)) + if (!considerOnlyCloseRides && (peep->ItemStandardFlags & PEEP_ITEM_MAP)) { // Consider all rides in the park for (const auto& ride : GetRideManager()) @@ -3857,10 +3857,10 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) money16 ridePrice = ride_get_price(ride); if (ridePrice != 0) { - if ((item_standard_flags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_RIDE_FREE) + if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_RIDE_FREE) && (voucher_arguments == current_ride)) { - item_standard_flags &= ~PEEP_ITEM_VOUCHER; + ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; } else @@ -5337,7 +5337,7 @@ void Guest::UpdateWalking() if (pos_stnd != 32) { - item_standard_flags &= ~(1u << pos_stnd); + ItemStandardFlags &= ~(1u << pos_stnd); litterType = item_standard_litter[pos_stnd]; } else @@ -5916,7 +5916,7 @@ void Guest::UpdateUsingBin() // switched to scenario_rand as it is more reliable if ((scenario_rand() & 7) == 0) space_left_in_bin--; - item_standard_flags &= ~(1 << cur_container); + ItemStandardFlags &= ~(1 << cur_container); window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; UpdateSpriteType(); continue; @@ -5927,7 +5927,7 @@ void Guest::UpdateUsingBin() int32_t litterY = y + (scenario_rand() & 7) - 3; litter_create(litterX, litterY, z, scenario_rand() & 3, litterType); - item_standard_flags &= ~(1 << cur_container); + ItemStandardFlags &= ~(1 << cur_container); window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; UpdateSpriteType(); @@ -6855,11 +6855,11 @@ void Guest::UpdateSpriteType() } create_balloon(x, y, z + 9, balloon_colour, isBalloonPopped); } - item_standard_flags &= ~PEEP_ITEM_BALLOON; + ItemStandardFlags &= ~PEEP_ITEM_BALLOON; window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; } - if (climate_is_raining() && (item_standard_flags & PEEP_ITEM_UMBRELLA) && x != LOCATION_NULL) + if (climate_is_raining() && (ItemStandardFlags & PEEP_ITEM_UMBRELLA) && x != LOCATION_NULL) { CoordsXY loc = { x, y }; if (map_is_location_valid(loc.ToTileStart())) @@ -6886,7 +6886,7 @@ void Guest::UpdateSpriteType() { if (item_pref->type == 0) { - if (item_standard_flags & item_pref->item) + if (ItemStandardFlags & item_pref->item) { SetSpriteType(item_pref->sprite_type); return; diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index 2046ddabdc..012109648e 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -455,7 +455,7 @@ static uint8_t peep_pathfind_get_max_number_junctions(Peep* peep) return 8; } - if (peep->item_standard_flags & PEEP_ITEM_MAP) + if (peep->ItemStandardFlags & PEEP_ITEM_MAP) return 7; if (peep->peep_flags & PEEP_FLAGS_LEAVING_PARK) @@ -2024,7 +2024,7 @@ int32_t guest_path_finding(Guest* peep) /* If there are still multiple directions to choose from, * peeps with maps will randomly read the map: probability of doing so * is much higher when heading for a ride or the park exit. */ - if (peep->item_standard_flags & PEEP_ITEM_MAP) + if (peep->ItemStandardFlags & PEEP_ITEM_MAP) { // If at least 2 directions consult map if (bitcount(edges) >= 2) diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 6cb641ad29..98fd83019e 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1758,7 +1758,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->pathfind_goal.y = 0xFF; peep->pathfind_goal.z = 0xFF; peep->pathfind_goal.direction = INVALID_DIRECTION; - peep->item_standard_flags = 0; + peep->ItemStandardFlags = 0; peep->item_extra_flags = 0; peep->guest_heading_to_ride_id = RIDE_ID_NULL; peep->litter_count = 0; @@ -2601,18 +2601,18 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl money16 entranceFee = park_get_entrance_fee(); if (entranceFee != 0) { - if (peep->item_standard_flags & PEEP_ITEM_VOUCHER) + if (peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) { if (peep->voucher_type == VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE) { entranceFee /= 2; - peep->item_standard_flags &= ~PEEP_ITEM_VOUCHER; + peep->ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; } else if (peep->voucher_type == VOUCHER_TYPE_PARK_ENTRY_FREE) { entranceFee = 0; - peep->item_standard_flags &= ~PEEP_ITEM_VOUCHER; + peep->ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; } } @@ -3392,9 +3392,9 @@ void decrement_guests_heading_for_park() static void peep_release_balloon(Guest* peep, int16_t spawn_height) { - if (peep->item_standard_flags & PEEP_ITEM_BALLOON) + if (peep->ItemStandardFlags & PEEP_ITEM_BALLOON) { - peep->item_standard_flags &= ~PEEP_ITEM_BALLOON; + peep->ItemStandardFlags &= ~PEEP_ITEM_BALLOON; if (peep->sprite_type == PEEP_SPRITE_TYPE_BALLOON && peep->x != LOCATION_NULL) { diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index b643e3a796..6fed27d33c 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -403,7 +403,7 @@ enum PeepNauseaTolerance enum PeepItem { - // item_standard_flags + // ItemStandardFlags PEEP_ITEM_BALLOON = (1 << 0), PEEP_ITEM_TOY = (1 << 1), PEEP_ITEM_MAP = (1 << 2), @@ -747,7 +747,7 @@ struct Peep : SpriteBase uint8_t hat_colour; uint8_t favourite_ride; uint8_t favourite_ride_rating; - uint32_t item_standard_flags; + uint32_t ItemStandardFlags; public: // Peep Guest* AsGuest(); diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index b881f42780..5bd273095c 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1551,7 +1551,7 @@ private: dst->favourite_ride_rating = 0; } - dst->item_standard_flags = src->item_standard_flags; + dst->ItemStandardFlags = src->item_standard_flags; if (dst->type == PEEP_TYPE_GUEST) { diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 2b4c0f255e..799d4d763d 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1240,7 +1240,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->hat_colour = src->hat_colour; dst->favourite_ride = src->favourite_ride; dst->favourite_ride_rating = src->favourite_ride_rating; - dst->item_standard_flags = src->item_standard_flags; + dst->item_standard_flags = src->ItemStandardFlags; } void S6Exporter::ExportSpriteMisc(RCT12SpriteBase* cdst, const SpriteBase* csrc) diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index f88065df46..ad2e0f0a90 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1505,7 +1505,7 @@ public: dst->hat_colour = src->hat_colour; dst->favourite_ride = src->favourite_ride; dst->favourite_ride_rating = src->favourite_ride_rating; - dst->item_standard_flags = src->item_standard_flags; + dst->ItemStandardFlags = src->item_standard_flags; } void ImportSpriteMisc(SpriteBase* cdst, const RCT12SpriteBase* csrc) diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 45b56ed293..62a7f948dd 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -266,7 +266,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(hat_colour); COMPARE_FIELD(favourite_ride); COMPARE_FIELD(favourite_ride_rating); - COMPARE_FIELD(item_standard_flags); + COMPARE_FIELD(ItemStandardFlags); } static void CompareSpriteDataVehicle(const Vehicle& left, const Vehicle& right) From 7a6de648fee641b6d0c2461326cf0520b88d71c2 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:03:58 -0300 Subject: [PATCH 02/10] Rename Peep::favourite_ride_rating to FavouriteRideRating --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 4 ++-- src/openrct2/peep/Peep.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/rct1/S4Importer.cpp | 4 ++-- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 229b50ea38..f66435f787 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -312,7 +312,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, umbrella_colour); COMPARE_FIELD(Peep, hat_colour); COMPARE_FIELD(Peep, favourite_ride); - COMPARE_FIELD(Peep, favourite_ride_rating); + COMPARE_FIELD(Peep, FavouriteRideRating); COMPARE_FIELD(Peep, ItemStandardFlags); } diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index b27197d49f..72d79776bf 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -2713,11 +2713,11 @@ static void peep_update_favourite_ride(Peep* peep, Ride* ride) { peep->peep_flags &= ~PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE; uint8_t peepRideRating = std::clamp((ride->excitement / 4) + peep->happiness, 0, PEEP_MAX_HAPPINESS); - if (peepRideRating >= peep->favourite_ride_rating) + if (peepRideRating >= peep->FavouriteRideRating) { if (peep->happiness >= 160 && peep->happiness_target >= 160) { - peep->favourite_ride_rating = peepRideRating; + peep->FavouriteRideRating = peepRideRating; peep->peep_flags |= PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE; } } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 98fd83019e..4b89aa3970 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1635,7 +1635,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->action_sprite_type = PEEP_ACTION_SPRITE_TYPE_NONE; peep->peep_flags = 0; peep->favourite_ride = RIDE_ID_NULL; - peep->favourite_ride_rating = 0; + peep->FavouriteRideRating = 0; const rct_sprite_bounds* spriteBounds = g_peep_animation_entries[peep->sprite_type].sprite_bounds; peep->sprite_width = spriteBounds[peep->action_sprite_type].sprite_width; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 6fed27d33c..5791542dc7 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -746,7 +746,7 @@ struct Peep : SpriteBase uint8_t umbrella_colour; uint8_t hat_colour; uint8_t favourite_ride; - uint8_t favourite_ride_rating; + uint8_t FavouriteRideRating; uint32_t ItemStandardFlags; public: // Peep diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 5bd273095c..a08d75ec8c 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1543,12 +1543,12 @@ private: if (_gameVersion == FILE_VERSION_RCT1_LL) { dst->favourite_ride = src->favourite_ride; - dst->favourite_ride_rating = src->favourite_ride_rating; + dst->FavouriteRideRating = src->favourite_ride_rating; } else { dst->favourite_ride = RIDE_ID_NULL; - dst->favourite_ride_rating = 0; + dst->FavouriteRideRating = 0; } dst->ItemStandardFlags = src->item_standard_flags; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 799d4d763d..bddb50df95 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1239,7 +1239,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->umbrella_colour = src->umbrella_colour; dst->hat_colour = src->hat_colour; dst->favourite_ride = src->favourite_ride; - dst->favourite_ride_rating = src->favourite_ride_rating; + dst->favourite_ride_rating = src->FavouriteRideRating; dst->item_standard_flags = src->ItemStandardFlags; } diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index ad2e0f0a90..f273392085 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1504,7 +1504,7 @@ public: dst->umbrella_colour = src->umbrella_colour; dst->hat_colour = src->hat_colour; dst->favourite_ride = src->favourite_ride; - dst->favourite_ride_rating = src->favourite_ride_rating; + dst->FavouriteRideRating = src->favourite_ride_rating; dst->ItemStandardFlags = src->item_standard_flags; } diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 62a7f948dd..a4bbf03ce7 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -265,7 +265,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(umbrella_colour); COMPARE_FIELD(hat_colour); COMPARE_FIELD(favourite_ride); - COMPARE_FIELD(favourite_ride_rating); + COMPARE_FIELD(FavouriteRideRating); COMPARE_FIELD(ItemStandardFlags); } From 3b632fcf9519952d1b19c4351ac755efad7b585c Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:06:40 -0300 Subject: [PATCH 03/10] Rename Peep::favourite_ride to FavouriteRide --- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/RideDemolishAction.hpp | 4 ++-- src/openrct2/actions/StaffHireNewAction.hpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- src/openrct2/peep/Peep.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/rct1/S4Importer.cpp | 4 ++-- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- src/openrct2/ride/Ride.cpp | 4 ++-- test/tests/S6ImportExportTests.cpp | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index f2e48afedd..af5f299deb 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1698,9 +1698,9 @@ void window_guest_rides_paint(rct_window* w, rct_drawpixelinfo* dpi) y = w->windowPos.y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].bottom - 12; set_format_arg(0, rct_string_id, STR_PEEP_FAVOURITE_RIDE_NOT_AVAILABLE); - if (peep->favourite_ride != RIDE_ID_NULL) + if (peep->FavouriteRide != RIDE_ID_NULL) { - auto ride = get_ride(peep->favourite_ride); + auto ride = get_ride(peep->FavouriteRide); if (ride != nullptr) { ride->FormatNameTo(gCommonFormatArgs); diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index f66435f787..b59645f0cd 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -311,7 +311,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, balloon_colour); COMPARE_FIELD(Peep, umbrella_colour); COMPARE_FIELD(Peep, hat_colour); - COMPARE_FIELD(Peep, favourite_ride); + COMPARE_FIELD(Peep, FavouriteRide); COMPARE_FIELD(Peep, FavouriteRideRating); COMPARE_FIELD(Peep, ItemStandardFlags); } diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index 1f85a68b4b..a001fb611b 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -218,9 +218,9 @@ private: { peep->guest_heading_to_ride_id = RIDE_ID_NULL; } - if (peep->favourite_ride == _rideIndex) + if (peep->FavouriteRide == _rideIndex) { - peep->favourite_ride = RIDE_ID_NULL; + peep->FavouriteRide = RIDE_ID_NULL; } for (int32_t i = 0; i < PEEP_MAX_THOUGHTS; i++) diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index 0b4185de55..9edc1b10f4 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -173,7 +173,7 @@ private: newPeep->paid_on_rides = 0; newPeep->paid_on_food = 0; newPeep->paid_on_souvenirs = 0; - newPeep->favourite_ride = RIDE_ID_NULL; + newPeep->FavouriteRide = RIDE_ID_NULL; newPeep->staff_orders = _staffOrders; uint16_t idSearchSpriteIndex; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 72d79776bf..71d660812d 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1787,7 +1787,7 @@ void Guest::OnExitRide(ride_id_t rideIndex) if (peep_flags & PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE) { peep_flags &= ~PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE; - favourite_ride = rideIndex; + FavouriteRide = rideIndex; // TODO fix this flag name or add another one window_invalidate_flags |= PEEP_INVALIDATE_STAFF_STATS; } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 4b89aa3970..b0d43b040b 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1634,7 +1634,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->no_action_frame_num = 0; peep->action_sprite_type = PEEP_ACTION_SPRITE_TYPE_NONE; peep->peep_flags = 0; - peep->favourite_ride = RIDE_ID_NULL; + peep->FavouriteRide = RIDE_ID_NULL; peep->FavouriteRideRating = 0; const rct_sprite_bounds* spriteBounds = g_peep_animation_entries[peep->sprite_type].sprite_bounds; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 5791542dc7..0ac11bcab7 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -745,7 +745,7 @@ struct Peep : SpriteBase uint8_t balloon_colour; uint8_t umbrella_colour; uint8_t hat_colour; - uint8_t favourite_ride; + uint8_t FavouriteRide; uint8_t FavouriteRideRating; uint32_t ItemStandardFlags; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index a08d75ec8c..a2e3a9f258 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1542,12 +1542,12 @@ private: // Set it to N/A if the save comes from the original or AA. if (_gameVersion == FILE_VERSION_RCT1_LL) { - dst->favourite_ride = src->favourite_ride; + dst->FavouriteRide = src->favourite_ride; dst->FavouriteRideRating = src->favourite_ride_rating; } else { - dst->favourite_ride = RIDE_ID_NULL; + dst->FavouriteRide = RIDE_ID_NULL; dst->FavouriteRideRating = 0; } diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index bddb50df95..27f1cd8a6e 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1238,7 +1238,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->balloon_colour = src->balloon_colour; dst->umbrella_colour = src->umbrella_colour; dst->hat_colour = src->hat_colour; - dst->favourite_ride = src->favourite_ride; + dst->favourite_ride = src->FavouriteRide; dst->favourite_ride_rating = src->FavouriteRideRating; dst->item_standard_flags = src->ItemStandardFlags; } diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index f273392085..30a2c430ce 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1503,7 +1503,7 @@ public: dst->balloon_colour = src->balloon_colour; dst->umbrella_colour = src->umbrella_colour; dst->hat_colour = src->hat_colour; - dst->favourite_ride = src->favourite_ride; + dst->FavouriteRide = src->favourite_ride; dst->FavouriteRideRating = src->favourite_ride_rating; dst->ItemStandardFlags = src->item_standard_flags; } diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index b15d9bae91..03a2b48536 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -324,9 +324,9 @@ void ride_update_favourited_stat() FOR_ALL_GUESTS (spriteIndex, peep) { - if (peep->favourite_ride != RIDE_ID_NULL) + if (peep->FavouriteRide != RIDE_ID_NULL) { - auto ride = get_ride(peep->favourite_ride); + auto ride = get_ride(peep->FavouriteRide); if (ride != nullptr) { ride->guests_favourite++; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index a4bbf03ce7..ceec56d252 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -264,7 +264,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(balloon_colour); COMPARE_FIELD(umbrella_colour); COMPARE_FIELD(hat_colour); - COMPARE_FIELD(favourite_ride); + COMPARE_FIELD(FavouriteRide); COMPARE_FIELD(FavouriteRideRating); COMPARE_FIELD(ItemStandardFlags); } From 222f8df6cba8177a15b421d6d631f468d89ab12f Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:11:28 -0300 Subject: [PATCH 04/10] Rename Peep::hat_colour to HatColour --- src/openrct2-ui/windows/GameBottomToolbar.cpp | 2 +- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/paint/sprite/Paint.Peep.cpp | 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 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index dd1fef3035..da5f739a5a 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -649,7 +649,7 @@ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo* dpi, rc else if (image_id_base >= 0x29DD && image_id_base < 0x29FD) { image_id_base += 32; - image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour); + image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->HatColour); gfx_draw_sprite(&cliped_dpi, image_id_base, clip_x, clip_y, 0); } diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index af5f299deb..9b47ad87bb 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -910,7 +910,7 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp if (animationFrame >= 0x29DD && animationFrame < 0x29FD) { animationFrame += 32; - animationFrame |= SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour); + animationFrame |= SPRITE_ID_PALETTE_COLOUR_1(peep->HatColour); gfx_draw_sprite(&clip_dpi, animationFrame, x, y, 0); } } @@ -1981,7 +1981,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item } break; case SHOP_ITEM_HAT: - set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour) | ShopItems[item].Image); + set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->HatColour) | ShopItems[item].Image); break; case SHOP_ITEM_TSHIRT: set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->tshirt_colour) | ShopItems[item].Image); diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 330f452c97..e94877850c 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1064,7 +1064,7 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) if (ebx >= 0x29DD && ebx < 0x29FD) { ebx += 32; - ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour); + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->HatColour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index b59645f0cd..235b349d98 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -310,7 +310,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, days_in_queue); COMPARE_FIELD(Peep, balloon_colour); COMPARE_FIELD(Peep, umbrella_colour); - COMPARE_FIELD(Peep, hat_colour); + COMPARE_FIELD(Peep, HatColour); COMPARE_FIELD(Peep, FavouriteRide); COMPARE_FIELD(Peep, FavouriteRideRating); COMPARE_FIELD(Peep, ItemStandardFlags); diff --git a/src/openrct2/paint/sprite/Paint.Peep.cpp b/src/openrct2/paint/sprite/Paint.Peep.cpp index ffac5bf987..22a46fe62b 100644 --- a/src/openrct2/paint/sprite/Paint.Peep.cpp +++ b/src/openrct2/paint/sprite/Paint.Peep.cpp @@ -87,7 +87,7 @@ void peep_paint(paint_session* session, const Peep* peep, int32_t imageDirection if (baseImageId >= 10717 && baseImageId < 10749) { - imageId = (baseImageId + 32) | peep->hat_colour << 19 | IMAGE_TYPE_REMAP; + imageId = (baseImageId + 32) | peep->HatColour << 19 | IMAGE_TYPE_REMAP; sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); return; } diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 71d660812d..2ff5f1d73e 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1656,7 +1656,7 @@ loc_69B221: tshirt_colour = ride->track_colour[0].main; if (shopItem == SHOP_ITEM_HAT) - hat_colour = ride->track_colour[0].main; + HatColour = ride->track_colour[0].main; if (shopItem == SHOP_ITEM_BALLOON) balloon_colour = ride->track_colour[0].main; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 0ac11bcab7..036e06f62b 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -744,7 +744,7 @@ struct Peep : SpriteBase uint8_t days_in_queue; uint8_t balloon_colour; uint8_t umbrella_colour; - uint8_t hat_colour; + uint8_t HatColour; uint8_t FavouriteRide; uint8_t FavouriteRideRating; uint32_t ItemStandardFlags; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index a2e3a9f258..e62bcf89b4 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1431,7 +1431,7 @@ private: dst->tshirt_colour = RCT1::GetColour(src->tshirt_colour); dst->trousers_colour = RCT1::GetColour(src->trousers_colour); dst->umbrella_colour = RCT1::GetColour(src->umbrella_colour); - dst->hat_colour = RCT1::GetColour(src->hat_colour); + dst->HatColour = RCT1::GetColour(src->hat_colour); // Balloons were always blue in RCT1 without AA/LL if (_gameVersion == FILE_VERSION_RCT1) diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 27f1cd8a6e..756899bbaf 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1237,7 +1237,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->days_in_queue = src->days_in_queue; dst->balloon_colour = src->balloon_colour; dst->umbrella_colour = src->umbrella_colour; - dst->hat_colour = src->hat_colour; + dst->hat_colour = src->HatColour; dst->favourite_ride = src->FavouriteRide; dst->favourite_ride_rating = src->FavouriteRideRating; dst->item_standard_flags = src->ItemStandardFlags; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 30a2c430ce..72ce74d350 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1502,7 +1502,7 @@ public: dst->days_in_queue = src->days_in_queue; dst->balloon_colour = src->balloon_colour; dst->umbrella_colour = src->umbrella_colour; - dst->hat_colour = src->hat_colour; + dst->HatColour = src->hat_colour; dst->FavouriteRide = src->favourite_ride; dst->FavouriteRideRating = src->favourite_ride_rating; dst->ItemStandardFlags = src->item_standard_flags; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index ceec56d252..a452529c88 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -263,7 +263,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(days_in_queue); COMPARE_FIELD(balloon_colour); COMPARE_FIELD(umbrella_colour); - COMPARE_FIELD(hat_colour); + COMPARE_FIELD(HatColour); COMPARE_FIELD(FavouriteRide); COMPARE_FIELD(FavouriteRideRating); COMPARE_FIELD(ItemStandardFlags); From 6c57f33dc97147ffac50b18ec55110e288a67a34 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:14:45 -0300 Subject: [PATCH 05/10] Rename Peep::umbrella_colour to UmbrellaColour --- src/openrct2-ui/windows/GameBottomToolbar.cpp | 2 +- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/SetCheatAction.hpp | 2 +- src/openrct2/paint/sprite/Paint.Peep.cpp | 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 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index da5f739a5a..cac2b83890 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -642,7 +642,7 @@ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo* dpi, rc else if (image_id_base >= 0x2BBD && image_id_base < 0x2BDD) { image_id_base += 32; - image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour); + image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->UmbrellaColour); gfx_draw_sprite(&cliped_dpi, image_id_base, clip_x, clip_y, 0); } diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 9b47ad87bb..941b624bac 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -902,7 +902,7 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp if (animationFrame >= 0x2BBD && animationFrame < 0x2BDD) { animationFrame += 32; - animationFrame |= SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour); + animationFrame |= SPRITE_ID_PALETTE_COLOUR_1(peep->UmbrellaColour); gfx_draw_sprite(&clip_dpi, animationFrame, x, y, 0); } @@ -1951,7 +1951,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item ride->FormatNameTo(gCommonFormatArgs + 6); break; case SHOP_ITEM_UMBRELLA: - set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour) | ShopItems[item].Image); + set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->UmbrellaColour) | ShopItems[item].Image); break; case SHOP_ITEM_VOUCHER: switch (peep->voucher_type) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index e94877850c..e0b1e7bb93 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1056,7 +1056,7 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) if (ebx >= 0x2BBD && ebx < 0x2BDD) { ebx += 32; - ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour); + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->UmbrellaColour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 235b349d98..3691b5f8b2 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -309,7 +309,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, time_lost); COMPARE_FIELD(Peep, days_in_queue); COMPARE_FIELD(Peep, balloon_colour); - COMPARE_FIELD(Peep, umbrella_colour); + COMPARE_FIELD(Peep, UmbrellaColour); COMPARE_FIELD(Peep, HatColour); COMPARE_FIELD(Peep, FavouriteRide); COMPARE_FIELD(Peep, FavouriteRideRating); diff --git a/src/openrct2/actions/SetCheatAction.hpp b/src/openrct2/actions/SetCheatAction.hpp index a9e012aa34..190a514948 100644 --- a/src/openrct2/actions/SetCheatAction.hpp +++ b/src/openrct2/actions/SetCheatAction.hpp @@ -642,7 +642,7 @@ private: break; case OBJECT_UMBRELLA: peep->ItemStandardFlags |= PEEP_ITEM_UMBRELLA; - peep->umbrella_colour = scenario_rand_max(COLOUR_COUNT - 1); + peep->UmbrellaColour = scenario_rand_max(COLOUR_COUNT - 1); peep->UpdateSpriteType(); break; } diff --git a/src/openrct2/paint/sprite/Paint.Peep.cpp b/src/openrct2/paint/sprite/Paint.Peep.cpp index 22a46fe62b..7307ed9620 100644 --- a/src/openrct2/paint/sprite/Paint.Peep.cpp +++ b/src/openrct2/paint/sprite/Paint.Peep.cpp @@ -101,7 +101,7 @@ void peep_paint(paint_session* session, const Peep* peep, int32_t imageDirection if (baseImageId >= 11197 && baseImageId < 11229) { - imageId = (baseImageId + 32) | peep->umbrella_colour << 19 | IMAGE_TYPE_REMAP; + imageId = (baseImageId + 32) | peep->UmbrellaColour << 19 | IMAGE_TYPE_REMAP; sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); return; } diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 2ff5f1d73e..3c588b64b5 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1662,7 +1662,7 @@ loc_69B221: balloon_colour = ride->track_colour[0].main; if (shopItem == SHOP_ITEM_UMBRELLA) - umbrella_colour = ride->track_colour[0].main; + UmbrellaColour = ride->track_colour[0].main; if (shopItem == SHOP_ITEM_MAP) peep_reset_pathfind_goal(this); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 036e06f62b..a2fc75d9fa 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -743,7 +743,7 @@ struct Peep : SpriteBase uint8_t time_lost; // the time the peep has been lost when it reaches 254 generates the lost thought uint8_t days_in_queue; uint8_t balloon_colour; - uint8_t umbrella_colour; + uint8_t UmbrellaColour; uint8_t HatColour; uint8_t FavouriteRide; uint8_t FavouriteRideRating; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index e62bcf89b4..790ffe200a 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1430,7 +1430,7 @@ private: dst->tshirt_colour = RCT1::GetColour(src->tshirt_colour); dst->trousers_colour = RCT1::GetColour(src->trousers_colour); - dst->umbrella_colour = RCT1::GetColour(src->umbrella_colour); + dst->UmbrellaColour = RCT1::GetColour(src->umbrella_colour); dst->HatColour = RCT1::GetColour(src->hat_colour); // Balloons were always blue in RCT1 without AA/LL diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 756899bbaf..9cd9b846e6 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1236,7 +1236,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->time_lost = src->time_lost; dst->days_in_queue = src->days_in_queue; dst->balloon_colour = src->balloon_colour; - dst->umbrella_colour = src->umbrella_colour; + dst->umbrella_colour = src->UmbrellaColour; dst->hat_colour = src->HatColour; dst->favourite_ride = src->FavouriteRide; dst->favourite_ride_rating = src->FavouriteRideRating; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 72ce74d350..118d62b483 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1501,7 +1501,7 @@ public: dst->time_lost = src->time_lost; dst->days_in_queue = src->days_in_queue; dst->balloon_colour = src->balloon_colour; - dst->umbrella_colour = src->umbrella_colour; + dst->UmbrellaColour = src->umbrella_colour; dst->HatColour = src->hat_colour; dst->FavouriteRide = src->favourite_ride; dst->FavouriteRideRating = src->favourite_ride_rating; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index a452529c88..75f0284cfb 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -262,7 +262,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(time_lost); COMPARE_FIELD(days_in_queue); COMPARE_FIELD(balloon_colour); - COMPARE_FIELD(umbrella_colour); + COMPARE_FIELD(UmbrellaColour); COMPARE_FIELD(HatColour); COMPARE_FIELD(FavouriteRide); COMPARE_FIELD(FavouriteRideRating); From 128c1993c109a808976a78db02791737a07d6359 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:16:43 -0300 Subject: [PATCH 06/10] Rename Peep::balloon_colour to BalloonColour --- src/openrct2-ui/windows/GameBottomToolbar.cpp | 2 +- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/SetCheatAction.hpp | 2 +- src/openrct2/paint/sprite/Paint.Peep.cpp | 2 +- src/openrct2/peep/Guest.cpp | 4 ++-- src/openrct2/peep/Peep.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/rct1/S4Importer.cpp | 4 ++-- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index cac2b83890..4ae4dd95d7 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -635,7 +635,7 @@ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo* dpi, rc if (image_id_base >= 0x2A1D && image_id_base < 0x2A3D) { image_id_base += 32; - image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour); + image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->BalloonColour); gfx_draw_sprite(&cliped_dpi, image_id_base, clip_x, clip_y, 0); } diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 941b624bac..2511e3fa04 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -894,7 +894,7 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp if (animationFrame >= 0x2A1D && animationFrame < 0x2A3D) { animationFrame += 32; - animationFrame |= SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour); + animationFrame |= SPRITE_ID_PALETTE_COLOUR_1(peep->BalloonColour); gfx_draw_sprite(&clip_dpi, animationFrame, x, y, 0); } @@ -1943,7 +1943,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item switch (item) { case SHOP_ITEM_BALLOON: - set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour) | ShopItems[item].Image); + 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); diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index e0b1e7bb93..b87d07245f 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1048,7 +1048,7 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) if (ebx >= 0x2A1D && ebx < 0x2A3D) { ebx += 32; - ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour); + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->BalloonColour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 3691b5f8b2..00a78c63f5 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -308,7 +308,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, angriness); COMPARE_FIELD(Peep, time_lost); COMPARE_FIELD(Peep, days_in_queue); - COMPARE_FIELD(Peep, balloon_colour); + COMPARE_FIELD(Peep, BalloonColour); COMPARE_FIELD(Peep, UmbrellaColour); COMPARE_FIELD(Peep, HatColour); COMPARE_FIELD(Peep, FavouriteRide); diff --git a/src/openrct2/actions/SetCheatAction.hpp b/src/openrct2/actions/SetCheatAction.hpp index 190a514948..9fb9d84815 100644 --- a/src/openrct2/actions/SetCheatAction.hpp +++ b/src/openrct2/actions/SetCheatAction.hpp @@ -637,7 +637,7 @@ private: break; case OBJECT_BALLOON: peep->ItemStandardFlags |= PEEP_ITEM_BALLOON; - peep->balloon_colour = scenario_rand_max(COLOUR_COUNT - 1); + peep->BalloonColour = scenario_rand_max(COLOUR_COUNT - 1); peep->UpdateSpriteType(); break; case OBJECT_UMBRELLA: diff --git a/src/openrct2/paint/sprite/Paint.Peep.cpp b/src/openrct2/paint/sprite/Paint.Peep.cpp index 7307ed9620..a478c65c4b 100644 --- a/src/openrct2/paint/sprite/Paint.Peep.cpp +++ b/src/openrct2/paint/sprite/Paint.Peep.cpp @@ -94,7 +94,7 @@ void peep_paint(paint_session* session, const Peep* peep, int32_t imageDirection if (baseImageId >= 10781 && baseImageId < 10813) { - imageId = (baseImageId + 32) | peep->balloon_colour << 19 | IMAGE_TYPE_REMAP; + imageId = (baseImageId + 32) | peep->BalloonColour << 19 | IMAGE_TYPE_REMAP; sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); return; } diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 3c588b64b5..00204785e9 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1659,7 +1659,7 @@ loc_69B221: HatColour = ride->track_colour[0].main; if (shopItem == SHOP_ITEM_BALLOON) - balloon_colour = ride->track_colour[0].main; + BalloonColour = ride->track_colour[0].main; if (shopItem == SHOP_ITEM_UMBRELLA) UmbrellaColour = ride->track_colour[0].main; @@ -6853,7 +6853,7 @@ void Guest::UpdateSpriteType() isBalloonPopped = true; audio_play_sound_at_location(SoundId::BalloonPop, { x, y, z }); } - create_balloon(x, y, z + 9, balloon_colour, isBalloonPopped); + create_balloon(x, y, z + 9, BalloonColour, isBalloonPopped); } ItemStandardFlags &= ~PEEP_ITEM_BALLOON; window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index b0d43b040b..390107e0f3 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -3398,7 +3398,7 @@ static void peep_release_balloon(Guest* peep, int16_t spawn_height) if (peep->sprite_type == PEEP_SPRITE_TYPE_BALLOON && peep->x != LOCATION_NULL) { - create_balloon(peep->x, peep->y, spawn_height, peep->balloon_colour, false); + create_balloon(peep->x, peep->y, spawn_height, peep->BalloonColour, false); peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; peep->UpdateSpriteType(); } diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index a2fc75d9fa..6748cac002 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -742,7 +742,7 @@ struct Peep : SpriteBase uint8_t angriness; uint8_t time_lost; // the time the peep has been lost when it reaches 254 generates the lost thought uint8_t days_in_queue; - uint8_t balloon_colour; + uint8_t BalloonColour; uint8_t UmbrellaColour; uint8_t HatColour; uint8_t FavouriteRide; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 790ffe200a..d744c79f95 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1436,11 +1436,11 @@ private: // Balloons were always blue in RCT1 without AA/LL if (_gameVersion == FILE_VERSION_RCT1) { - dst->balloon_colour = COLOUR_LIGHT_BLUE; + dst->BalloonColour = COLOUR_LIGHT_BLUE; } else { - dst->balloon_colour = RCT1::GetColour(src->balloon_colour); + dst->BalloonColour = RCT1::GetColour(src->balloon_colour); } dst->destination_x = src->destination_x; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 9cd9b846e6..8d25a61995 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1235,7 +1235,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->angriness = src->angriness; dst->time_lost = src->time_lost; dst->days_in_queue = src->days_in_queue; - dst->balloon_colour = src->balloon_colour; + dst->balloon_colour = src->BalloonColour; dst->umbrella_colour = src->UmbrellaColour; dst->hat_colour = src->HatColour; dst->favourite_ride = src->FavouriteRide; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 118d62b483..1faa524015 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1500,7 +1500,7 @@ public: dst->angriness = src->angriness; dst->time_lost = src->time_lost; dst->days_in_queue = src->days_in_queue; - dst->balloon_colour = src->balloon_colour; + dst->BalloonColour = src->balloon_colour; dst->UmbrellaColour = src->umbrella_colour; dst->HatColour = src->hat_colour; dst->FavouriteRide = src->favourite_ride; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 75f0284cfb..5de5c13265 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -261,7 +261,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(angriness); COMPARE_FIELD(time_lost); COMPARE_FIELD(days_in_queue); - COMPARE_FIELD(balloon_colour); + COMPARE_FIELD(BalloonColour); COMPARE_FIELD(UmbrellaColour); COMPARE_FIELD(HatColour); COMPARE_FIELD(FavouriteRide); From a216cb9930904e0a5b07603ed1b81cd43d976d02 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:19:41 -0300 Subject: [PATCH 07/10] Rename Peep::days_in_queue to DaysInQueue --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- src/openrct2/peep/Peep.cpp | 8 ++++---- 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, 11 insertions(+), 11 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 00a78c63f5..9c0a7767cc 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -307,7 +307,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, surroundings_thought_timeout); COMPARE_FIELD(Peep, angriness); COMPARE_FIELD(Peep, time_lost); - COMPARE_FIELD(Peep, days_in_queue); + COMPARE_FIELD(Peep, DaysInQueue); COMPARE_FIELD(Peep, BalloonColour); COMPARE_FIELD(Peep, UmbrellaColour); COMPARE_FIELD(Peep, HatColour); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 00204785e9..4582ce84d7 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -3872,7 +3872,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) } sub_state = PEEP_RIDE_LEAVE_ENTRANCE; - uint8_t queueTime = days_in_queue; + uint8_t queueTime = DaysInQueue; if (queueTime < 253) queueTime += 3; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 390107e0f3..17d2954c21 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1482,9 +1482,9 @@ void peep_update_days_in_queue() { if (peep->outside_of_park == 0 && peep->state == PEEP_STATE_QUEUING) { - if (peep->days_in_queue < 255) + if (peep->DaysInQueue < 255) { - peep->days_in_queue += 1; + peep->DaysInQueue += 1; } } } @@ -2435,7 +2435,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl peep->current_ride = rideIndex; peep->current_ride_station = stationNum; - peep->days_in_queue = 0; + peep->DaysInQueue = 0; peep->SetState(PEEP_STATE_QUEUING); peep->sub_state = 11; peep->time_in_queue = 0; @@ -2865,7 +2865,7 @@ static void peep_interact_with_path(Peep* peep, int16_t x, int16_t y, TileElemen peep->current_ride = rideIndex; peep->current_ride_station = stationNum; peep->state = PEEP_STATE_QUEUING; - peep->days_in_queue = 0; + peep->DaysInQueue = 0; peep_window_state_update(peep); peep->sub_state = 10; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 6748cac002..9b60199ff1 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -741,7 +741,7 @@ struct Peep : SpriteBase uint8_t surroundings_thought_timeout; uint8_t angriness; uint8_t time_lost; // the time the peep has been lost when it reaches 254 generates the lost thought - uint8_t days_in_queue; + uint8_t DaysInQueue; uint8_t BalloonColour; uint8_t UmbrellaColour; uint8_t HatColour; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index d744c79f95..d7d643eab8 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1472,7 +1472,7 @@ private: dst->current_car = src->current_car; dst->current_seat = src->current_seat; dst->time_on_ride = src->time_on_ride; - dst->days_in_queue = src->days_in_queue; + dst->DaysInQueue = src->days_in_queue; dst->interaction_ride_index = src->interaction_ride_index; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 8d25a61995..6503be2d7a 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1234,7 +1234,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->surroundings_thought_timeout = src->surroundings_thought_timeout; dst->angriness = src->angriness; dst->time_lost = src->time_lost; - dst->days_in_queue = src->days_in_queue; + dst->days_in_queue = src->DaysInQueue; dst->balloon_colour = src->BalloonColour; dst->umbrella_colour = src->UmbrellaColour; dst->hat_colour = src->HatColour; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 1faa524015..4d57bcc264 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1499,7 +1499,7 @@ public: dst->surroundings_thought_timeout = src->surroundings_thought_timeout; dst->angriness = src->angriness; dst->time_lost = src->time_lost; - dst->days_in_queue = src->days_in_queue; + dst->DaysInQueue = src->days_in_queue; dst->BalloonColour = src->balloon_colour; dst->UmbrellaColour = src->umbrella_colour; dst->HatColour = src->hat_colour; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 5de5c13265..c021aa59be 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -260,7 +260,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(surroundings_thought_timeout); COMPARE_FIELD(angriness); COMPARE_FIELD(time_lost); - COMPARE_FIELD(days_in_queue); + COMPARE_FIELD(DaysInQueue); COMPARE_FIELD(BalloonColour); COMPARE_FIELD(UmbrellaColour); COMPARE_FIELD(HatColour); From 589a7a48be06b3bfd758dd9e8164ed328dbb5a19 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:22:08 -0300 Subject: [PATCH 08/10] Rename Peep::time_lost to TimeLost --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 8 ++++---- src/openrct2/peep/Peep.cpp | 10 +++++----- 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, 15 insertions(+), 15 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 9c0a7767cc..94651026de 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -306,7 +306,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, voucher_arguments); COMPARE_FIELD(Peep, surroundings_thought_timeout); COMPARE_FIELD(Peep, angriness); - COMPARE_FIELD(Peep, time_lost); + COMPARE_FIELD(Peep, TimeLost); COMPARE_FIELD(Peep, DaysInQueue); COMPARE_FIELD(Peep, BalloonColour); COMPARE_FIELD(Peep, UmbrellaColour); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 4582ce84d7..4af5e5c388 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1399,10 +1399,10 @@ void Guest::CheckIfLost() if (!(peep_flags & PEEP_FLAGS_21)) return; - time_lost++; - if (time_lost != 254) + TimeLost++; + if (TimeLost != 254) return; - time_lost = 230; + TimeLost = 230; } InsertNewThought(PEEP_THOUGHT_TYPE_LOST, PEEP_THOUGHT_ITEM_NONE); @@ -3245,7 +3245,7 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co peep->peep_is_lost_countdown = 200; peep_reset_pathfind_goal(peep); peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_ACTION; - peep->time_lost = 0; + peep->TimeLost = 0; } } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 17d2954c21..535eb680a0 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1774,7 +1774,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->no_of_souvenirs = 0; peep->surroundings_thought_timeout = 0; peep->angriness = 0; - peep->time_lost = 0; + peep->TimeLost = 0; uint8_t tshirtColour = static_cast(scenario_rand() % std::size(tshirt_colours)); peep->tshirt_colour = tshirt_colours[tshirtColour]; @@ -2410,7 +2410,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl return; } - peep->time_lost = 0; + peep->TimeLost = 0; auto stationNum = tile_element->AsEntrance()->GetStationIndex(); // Guest walks up to the ride for the first time since entering // the path tile or since considering another ride attached to @@ -2839,7 +2839,7 @@ static void peep_interact_with_path(Peep* peep, int16_t x, int16_t y, TileElemen else { // Peep is not queuing. - peep->time_lost = 0; + peep->TimeLost = 0; auto stationNum = tile_element->AsPath()->GetStationIndex(); if ((tile_element->AsPath()->HasQueueBanner()) @@ -2929,7 +2929,7 @@ static bool peep_interact_with_shop(Peep* peep, int16_t x, int16_t y, TileElemen return true; } - peep->time_lost = 0; + peep->TimeLost = 0; if (ride->status != RIDE_STATUS_OPEN) { @@ -2951,7 +2951,7 @@ static bool peep_interact_with_shop(Peep* peep, int16_t x, int16_t y, TileElemen if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_PEEP_SHOULD_GO_INSIDE_FACILITY)) { - peep->time_lost = 0; + peep->TimeLost = 0; if (!guest->ShouldGoOnRide(ride, 0, false, false)) { peep_return_to_centre_of_tile(peep); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 9b60199ff1..edc6385aa8 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -740,7 +740,7 @@ struct Peep : SpriteBase uint8_t voucher_arguments; // ride_id or string_offset_id uint8_t surroundings_thought_timeout; uint8_t angriness; - uint8_t time_lost; // the time the peep has been lost when it reaches 254 generates the lost thought + uint8_t TimeLost; // the time the peep has been lost when it reaches 254 generates the lost thought uint8_t DaysInQueue; uint8_t BalloonColour; uint8_t UmbrellaColour; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index d7d643eab8..80ecc97401 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1499,7 +1499,7 @@ private: dst->surroundings_thought_timeout = src->surroundings_thought_timeout; dst->angriness = src->angriness; - dst->time_lost = src->time_lost; + dst->TimeLost = src->time_lost; for (size_t i = 0; i < 32; i++) { diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 6503be2d7a..7a95091431 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1233,7 +1233,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->voucher_arguments = src->voucher_arguments; dst->surroundings_thought_timeout = src->surroundings_thought_timeout; dst->angriness = src->angriness; - dst->time_lost = src->time_lost; + dst->time_lost = src->TimeLost; dst->days_in_queue = src->DaysInQueue; dst->balloon_colour = src->BalloonColour; dst->umbrella_colour = src->UmbrellaColour; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 4d57bcc264..32b88be66b 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1498,7 +1498,7 @@ public: dst->voucher_arguments = src->voucher_arguments; dst->surroundings_thought_timeout = src->surroundings_thought_timeout; dst->angriness = src->angriness; - dst->time_lost = src->time_lost; + dst->TimeLost = src->time_lost; dst->DaysInQueue = src->days_in_queue; dst->BalloonColour = src->balloon_colour; dst->UmbrellaColour = src->umbrella_colour; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index c021aa59be..a832a0dca5 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -259,7 +259,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(voucher_arguments); COMPARE_FIELD(surroundings_thought_timeout); COMPARE_FIELD(angriness); - COMPARE_FIELD(time_lost); + COMPARE_FIELD(TimeLost); COMPARE_FIELD(DaysInQueue); COMPARE_FIELD(BalloonColour); COMPARE_FIELD(UmbrellaColour); From 32c8e5614fb6aa67cf580af201e1a5db38999c38 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:25:09 -0300 Subject: [PATCH 09/10] Rename Peep::angriness to Angriness --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/SetCheatAction.hpp | 2 +- src/openrct2/peep/Guest.cpp | 6 +++--- src/openrct2/peep/Peep.cpp | 4 ++-- 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, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 94651026de..66935c1448 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -305,7 +305,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, voucher_type); COMPARE_FIELD(Peep, voucher_arguments); COMPARE_FIELD(Peep, surroundings_thought_timeout); - COMPARE_FIELD(Peep, angriness); + COMPARE_FIELD(Peep, Angriness); COMPARE_FIELD(Peep, TimeLost); COMPARE_FIELD(Peep, DaysInQueue); COMPARE_FIELD(Peep, BalloonColour); diff --git a/src/openrct2/actions/SetCheatAction.hpp b/src/openrct2/actions/SetCheatAction.hpp index 9fb9d84815..474da7a9a5 100644 --- a/src/openrct2/actions/SetCheatAction.hpp +++ b/src/openrct2/actions/SetCheatAction.hpp @@ -588,7 +588,7 @@ private: if (value > 0) { peep->peep_flags &= ~PEEP_FLAGS_ANGRY; - peep->angriness = 0; + peep->Angriness = 0; } break; case GUEST_PARAMETER_ENERGY: diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 4af5e5c388..16f0680077 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -750,8 +750,8 @@ void Guest::Tick128UpdateGuest(int32_t index) nausea = 130; } - if (angriness != 0) - angriness--; + if (Angriness != 0) + Angriness--; if (state == PEEP_STATE_WALKING || state == PEEP_STATE_SITTING) { @@ -6292,7 +6292,7 @@ static void peep_update_walking_break_scenery(Peep* peep) map_invalidate_tile_zoom1({ peep->NextLoc, tileElement->GetBaseZ(), tileElement->GetBaseZ() + 32 }); - peep->angriness = 16; + peep->Angriness = 16; } /** diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 535eb680a0..f20a25d338 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1773,7 +1773,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->no_of_drinks = 0; peep->no_of_souvenirs = 0; peep->surroundings_thought_timeout = 0; - peep->angriness = 0; + peep->Angriness = 0; peep->TimeLost = 0; uint8_t tshirtColour = static_cast(scenario_rand() % std::size(tshirt_colours)); @@ -2172,7 +2172,7 @@ static constexpr const int32_t face_sprite_large[] = { static int32_t get_face_sprite_offset(Peep* peep) { // ANGRY - if (peep->angriness > 0) + if (peep->Angriness > 0) return PEEP_FACE_OFFSET_ANGRY; // VERY_VERY_SICK diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index edc6385aa8..ee69c0d032 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -739,7 +739,7 @@ struct Peep : SpriteBase uint8_t voucher_type; uint8_t voucher_arguments; // ride_id or string_offset_id uint8_t surroundings_thought_timeout; - uint8_t angriness; + uint8_t Angriness; uint8_t TimeLost; // the time the peep has been lost when it reaches 254 generates the lost thought uint8_t DaysInQueue; uint8_t BalloonColour; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 80ecc97401..c6d3659b99 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1498,7 +1498,7 @@ private: dst->voucher_type = src->voucher_type; dst->surroundings_thought_timeout = src->surroundings_thought_timeout; - dst->angriness = src->angriness; + dst->Angriness = src->angriness; dst->TimeLost = src->time_lost; for (size_t i = 0; i < 32; i++) diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 7a95091431..34e49e276a 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1232,7 +1232,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->voucher_type = src->voucher_type; dst->voucher_arguments = src->voucher_arguments; dst->surroundings_thought_timeout = src->surroundings_thought_timeout; - dst->angriness = src->angriness; + dst->angriness = src->Angriness; dst->time_lost = src->TimeLost; dst->days_in_queue = src->DaysInQueue; dst->balloon_colour = src->BalloonColour; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 32b88be66b..a7969e3a68 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1497,7 +1497,7 @@ public: dst->voucher_type = src->voucher_type; dst->voucher_arguments = src->voucher_arguments; dst->surroundings_thought_timeout = src->surroundings_thought_timeout; - dst->angriness = src->angriness; + dst->Angriness = src->angriness; dst->TimeLost = src->time_lost; dst->DaysInQueue = src->days_in_queue; dst->BalloonColour = src->balloon_colour; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index a832a0dca5..6a2105c42e 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -258,7 +258,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(voucher_type); COMPARE_FIELD(voucher_arguments); COMPARE_FIELD(surroundings_thought_timeout); - COMPARE_FIELD(angriness); + COMPARE_FIELD(Angriness); COMPARE_FIELD(TimeLost); COMPARE_FIELD(DaysInQueue); COMPARE_FIELD(BalloonColour); From c17aa095d58ea2c01a97dcd722b6bccd14f80c0a Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Wed, 13 May 2020 23:28:16 -0300 Subject: [PATCH 10/10] Rename Peep::surrounding_thought_timeout > SurroundingsThoughtTimeout --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 6 +++--- src/openrct2/peep/Peep.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 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 66935c1448..43f4e0ff7c 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -304,7 +304,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, vandalism_seen); COMPARE_FIELD(Peep, voucher_type); COMPARE_FIELD(Peep, voucher_arguments); - COMPARE_FIELD(Peep, surroundings_thought_timeout); + COMPARE_FIELD(Peep, SurroundingsThoughtTimeout); COMPARE_FIELD(Peep, Angriness); COMPARE_FIELD(Peep, TimeLost); COMPARE_FIELD(Peep, DaysInQueue); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 16f0680077..8bb270408d 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -755,10 +755,10 @@ void Guest::Tick128UpdateGuest(int32_t index) if (state == PEEP_STATE_WALKING || state == PEEP_STATE_SITTING) { - surroundings_thought_timeout++; - if (surroundings_thought_timeout >= 18) + SurroundingsThoughtTimeout++; + if (SurroundingsThoughtTimeout >= 18) { - surroundings_thought_timeout = 0; + SurroundingsThoughtTimeout = 0; if (x != LOCATION_NULL) { PeepThoughtType thought_type = peep_assess_surroundings(x & 0xFFE0, y & 0xFFE0, z); diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index f20a25d338..d20ae7f671 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1772,7 +1772,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->no_of_food = 0; peep->no_of_drinks = 0; peep->no_of_souvenirs = 0; - peep->surroundings_thought_timeout = 0; + peep->SurroundingsThoughtTimeout = 0; peep->Angriness = 0; peep->TimeLost = 0; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index ee69c0d032..6aa33c773d 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -738,7 +738,7 @@ struct Peep : SpriteBase uint8_t vandalism_seen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen uint8_t voucher_type; uint8_t voucher_arguments; // ride_id or string_offset_id - uint8_t surroundings_thought_timeout; + uint8_t SurroundingsThoughtTimeout; uint8_t Angriness; uint8_t TimeLost; // the time the peep has been lost when it reaches 254 generates the lost thought uint8_t DaysInQueue; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index c6d3659b99..58460b7092 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1497,7 +1497,7 @@ private: dst->voucher_arguments = src->voucher_arguments; dst->voucher_type = src->voucher_type; - dst->surroundings_thought_timeout = src->surroundings_thought_timeout; + dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; dst->Angriness = src->angriness; dst->TimeLost = src->time_lost; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 34e49e276a..4e51e91970 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1231,7 +1231,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->vandalism_seen = src->vandalism_seen; dst->voucher_type = src->voucher_type; dst->voucher_arguments = src->voucher_arguments; - dst->surroundings_thought_timeout = src->surroundings_thought_timeout; + dst->surroundings_thought_timeout = src->SurroundingsThoughtTimeout; dst->angriness = src->Angriness; dst->time_lost = src->TimeLost; dst->days_in_queue = src->DaysInQueue; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index a7969e3a68..760a678879 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1496,7 +1496,7 @@ public: dst->vandalism_seen = src->vandalism_seen; dst->voucher_type = src->voucher_type; dst->voucher_arguments = src->voucher_arguments; - dst->surroundings_thought_timeout = src->surroundings_thought_timeout; + dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; dst->Angriness = src->angriness; dst->TimeLost = src->time_lost; dst->DaysInQueue = src->days_in_queue; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 6a2105c42e..8ede42c145 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -257,7 +257,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(vandalism_seen); COMPARE_FIELD(voucher_type); COMPARE_FIELD(voucher_arguments); - COMPARE_FIELD(surroundings_thought_timeout); + COMPARE_FIELD(SurroundingsThoughtTimeout); COMPARE_FIELD(Angriness); COMPARE_FIELD(TimeLost); COMPARE_FIELD(DaysInQueue);