From bf228abf5549ad426487aa70ee2d4a319a00ad9f Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:15:50 -0300 Subject: [PATCH 01/18] Rename Peep::voucher_arguments to VoucherArguments --- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/RideDemolishAction.hpp | 2 +- src/openrct2/management/Marketing.cpp | 4 ++-- src/openrct2/peep/Guest.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 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index cad9472fdb..207719d8f7 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1963,7 +1963,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item set_format_arg(10, const char*, parkName); break; case VOUCHER_TYPE_RIDE_FREE: - ride = get_ride(peep->voucher_arguments); + ride = get_ride(peep->VoucherArguments); if (ride != nullptr) { set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_RIDE_FREE); @@ -1977,7 +1977,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item break; case VOUCHER_TYPE_FOOD_OR_DRINK_FREE: set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_FOOD_OR_DRINK_FREE); - set_format_arg(8, rct_string_id, ShopItems[peep->voucher_arguments].Naming.Singular); + set_format_arg(8, rct_string_id, ShopItems[peep->VoucherArguments].Naming.Singular); break; } break; diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 4505ed3c0b..e607fd90a7 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -303,7 +303,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, no_of_souvenirs); COMPARE_FIELD(Peep, vandalism_seen); COMPARE_FIELD(Peep, voucher_type); - COMPARE_FIELD(Peep, voucher_arguments); + COMPARE_FIELD(Peep, VoucherArguments); COMPARE_FIELD(Peep, SurroundingsThoughtTimeout); COMPARE_FIELD(Peep, Angriness); COMPARE_FIELD(Peep, TimeLost); diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index a001fb611b..f5afd18462 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -178,7 +178,7 @@ private: // remove any free voucher for this ride from peep if (peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) { - if (peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->voucher_arguments == _rideIndex) + if (peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->VoucherArguments == _rideIndex) { peep->ItemStandardFlags &= ~(PEEP_ITEM_VOUCHER); } diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index 3b3caa930c..cfc1ad8886 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -141,7 +141,7 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType) case ADVERTISING_CAMPAIGN_RIDE_FREE: peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; peep->voucher_type = VOUCHER_TYPE_RIDE_FREE; - peep->voucher_arguments = campaign->RideId; + peep->VoucherArguments = campaign->RideId; peep->guest_heading_to_ride_id = campaign->RideId; peep->peep_is_lost_countdown = 240; break; @@ -152,7 +152,7 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType) case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE: peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; peep->voucher_type = VOUCHER_TYPE_FOOD_OR_DRINK_FREE; - peep->voucher_arguments = campaign->ShopItemType; + peep->VoucherArguments = campaign->ShopItemType; break; case ADVERTISING_CAMPAIGN_PARK: break; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index d982d52f6d..ce24c9e8a8 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1482,7 +1482,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price) bool hasVoucher = false; if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_FOOD_OR_DRINK_FREE) - && (voucher_arguments == shopItem)) + && (VoucherArguments == shopItem)) { hasVoucher = true; } @@ -2414,7 +2414,7 @@ void Guest::ReadMap() static bool peep_has_voucher_for_free_ride(Peep* peep, Ride* ride) { return peep->ItemStandardFlags & PEEP_ITEM_VOUCHER && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE - && peep->voucher_arguments == ride->id; + && peep->VoucherArguments == ride->id; } /** @@ -2635,7 +2635,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->ItemStandardFlags & PEEP_ITEM_VOUCHER) && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE - && peep->voucher_arguments == peep->current_ride) + && peep->VoucherArguments == peep->current_ride) return true; if (peep->cash_in_pocket <= 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) @@ -3858,7 +3858,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) if (ridePrice != 0) { if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_RIDE_FREE) - && (voucher_arguments == current_ride)) + && (VoucherArguments == current_ride)) { ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 580534603f..593774d260 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -737,7 +737,7 @@ struct Peep : SpriteBase uint8_t no_of_souvenirs; 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 VoucherArguments; // ride_id or string_offset_id uint8_t SurroundingsThoughtTimeout; uint8_t Angriness; uint8_t TimeLost; // the time the peep has been lost when it reaches 254 generates the lost thought diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index ba7dd3b95e..2dacfe512f 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1494,7 +1494,7 @@ private: dst->paid_on_food = src->paid_on_food; dst->paid_on_souvenirs = src->paid_on_souvenirs; - dst->voucher_arguments = src->voucher_arguments; + dst->VoucherArguments = src->voucher_arguments; dst->voucher_type = src->voucher_type; dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 0479a8a152..7bd0e9ee99 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1230,7 +1230,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->no_of_souvenirs = src->no_of_souvenirs; dst->vandalism_seen = src->vandalism_seen; dst->voucher_type = src->voucher_type; - dst->voucher_arguments = src->voucher_arguments; + dst->voucher_arguments = src->VoucherArguments; dst->surroundings_thought_timeout = src->SurroundingsThoughtTimeout; dst->angriness = src->Angriness; dst->time_lost = src->TimeLost; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index eed88c0408..57d9077a02 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1495,7 +1495,7 @@ public: dst->no_of_souvenirs = src->no_of_souvenirs; dst->vandalism_seen = src->vandalism_seen; dst->voucher_type = src->voucher_type; - dst->voucher_arguments = src->voucher_arguments; + dst->VoucherArguments = src->voucher_arguments; dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; dst->Angriness = src->angriness; dst->TimeLost = src->time_lost; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 24c7da0843..e9278ad4c0 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -256,7 +256,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(no_of_souvenirs); COMPARE_FIELD(vandalism_seen); COMPARE_FIELD(voucher_type); - COMPARE_FIELD(voucher_arguments); + COMPARE_FIELD(VoucherArguments); COMPARE_FIELD(SurroundingsThoughtTimeout); COMPARE_FIELD(Angriness); COMPARE_FIELD(TimeLost); From fd71b1b0093b16e54ed39fd1bcbadc05c765e898 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:20:20 -0300 Subject: [PATCH 02/18] Rename Peep::voucher_type to VoucherType --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/RideDemolishAction.hpp | 2 +- src/openrct2/management/Marketing.cpp | 8 ++++---- src/openrct2/peep/Guest.cpp | 8 ++++---- 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 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 207719d8f7..7d59e1f424 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1955,7 +1955,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->UmbrellaColour) | ShopItems[item].Image); break; case SHOP_ITEM_VOUCHER: - switch (peep->voucher_type) + switch (peep->VoucherType) { case VOUCHER_TYPE_PARK_ENTRY_FREE: set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_PARK_ENTRY_FREE); diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index e607fd90a7..e985a6bd9b 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -302,7 +302,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, no_of_drinks); COMPARE_FIELD(Peep, no_of_souvenirs); COMPARE_FIELD(Peep, vandalism_seen); - COMPARE_FIELD(Peep, voucher_type); + COMPARE_FIELD(Peep, VoucherType); COMPARE_FIELD(Peep, VoucherArguments); COMPARE_FIELD(Peep, SurroundingsThoughtTimeout); COMPARE_FIELD(Peep, Angriness); diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index f5afd18462..7aa53e15df 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -178,7 +178,7 @@ private: // remove any free voucher for this ride from peep if (peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) { - if (peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->VoucherArguments == _rideIndex) + if (peep->VoucherType == VOUCHER_TYPE_RIDE_FREE && peep->VoucherArguments == _rideIndex) { peep->ItemStandardFlags &= ~(PEEP_ITEM_VOUCHER); } diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index cfc1ad8886..a8c54304dc 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -136,22 +136,22 @@ void marketing_set_guest_campaign(Peep* peep, int32_t campaignType) { case ADVERTISING_CAMPAIGN_PARK_ENTRY_FREE: peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; - peep->voucher_type = VOUCHER_TYPE_PARK_ENTRY_FREE; + peep->VoucherType = VOUCHER_TYPE_PARK_ENTRY_FREE; break; case ADVERTISING_CAMPAIGN_RIDE_FREE: peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; - peep->voucher_type = VOUCHER_TYPE_RIDE_FREE; + peep->VoucherType = VOUCHER_TYPE_RIDE_FREE; peep->VoucherArguments = 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->ItemStandardFlags |= PEEP_ITEM_VOUCHER; - peep->voucher_type = VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE; + peep->VoucherType = VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE; break; case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE: peep->ItemStandardFlags |= PEEP_ITEM_VOUCHER; - peep->voucher_type = VOUCHER_TYPE_FOOD_OR_DRINK_FREE; + peep->VoucherType = VOUCHER_TYPE_FOOD_OR_DRINK_FREE; peep->VoucherArguments = campaign->ShopItemType; break; case ADVERTISING_CAMPAIGN_PARK: diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index ce24c9e8a8..2191f2062d 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1481,7 +1481,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price) bool hasVoucher = false; - if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_FOOD_OR_DRINK_FREE) + if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (VoucherType == VOUCHER_TYPE_FOOD_OR_DRINK_FREE) && (VoucherArguments == shopItem)) { hasVoucher = true; @@ -2413,7 +2413,7 @@ void Guest::ReadMap() static bool peep_has_voucher_for_free_ride(Peep* peep, Ride* ride) { - return peep->ItemStandardFlags & PEEP_ITEM_VOUCHER && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE + return peep->ItemStandardFlags & PEEP_ITEM_VOUCHER && peep->VoucherType == VOUCHER_TYPE_RIDE_FREE && peep->VoucherArguments == 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->ItemStandardFlags & PEEP_ITEM_VOUCHER) && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE + if ((peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) && peep->VoucherType == VOUCHER_TYPE_RIDE_FREE && peep->VoucherArguments == peep->current_ride) return true; @@ -3857,7 +3857,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) money16 ridePrice = ride_get_price(ride); if (ridePrice != 0) { - if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (voucher_type == VOUCHER_TYPE_RIDE_FREE) + if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (VoucherType == VOUCHER_TYPE_RIDE_FREE) && (VoucherArguments == current_ride)) { ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index d20ae7f671..849984757f 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -2603,13 +2603,13 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl { if (peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) { - if (peep->voucher_type == VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE) + if (peep->VoucherType == VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE) { entranceFee /= 2; peep->ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; } - else if (peep->voucher_type == VOUCHER_TYPE_PARK_ENTRY_FREE) + else if (peep->VoucherType == VOUCHER_TYPE_PARK_ENTRY_FREE) { entranceFee = 0; peep->ItemStandardFlags &= ~PEEP_ITEM_VOUCHER; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 593774d260..5112ec947a 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -736,7 +736,7 @@ struct Peep : SpriteBase uint8_t no_of_drinks; uint8_t no_of_souvenirs; uint8_t vandalism_seen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen - uint8_t voucher_type; + uint8_t VoucherType; uint8_t VoucherArguments; // ride_id or string_offset_id uint8_t SurroundingsThoughtTimeout; uint8_t Angriness; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 2dacfe512f..1d0dbfc5b9 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1495,7 +1495,7 @@ private: dst->paid_on_souvenirs = src->paid_on_souvenirs; dst->VoucherArguments = src->voucher_arguments; - dst->voucher_type = src->voucher_type; + dst->VoucherType = src->voucher_type; dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; dst->Angriness = src->angriness; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 7bd0e9ee99..8b6afa371b 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1229,7 +1229,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->no_of_drinks = src->no_of_drinks; dst->no_of_souvenirs = src->no_of_souvenirs; dst->vandalism_seen = src->vandalism_seen; - dst->voucher_type = src->voucher_type; + dst->voucher_type = src->VoucherType; dst->voucher_arguments = src->VoucherArguments; dst->surroundings_thought_timeout = src->SurroundingsThoughtTimeout; dst->angriness = src->Angriness; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 57d9077a02..509b33ea7d 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1494,7 +1494,7 @@ public: dst->no_of_drinks = src->no_of_drinks; dst->no_of_souvenirs = src->no_of_souvenirs; dst->vandalism_seen = src->vandalism_seen; - dst->voucher_type = src->voucher_type; + dst->VoucherType = src->voucher_type; dst->VoucherArguments = src->voucher_arguments; dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; dst->Angriness = src->angriness; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index e9278ad4c0..362420b247 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -255,7 +255,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(no_of_drinks); COMPARE_FIELD(no_of_souvenirs); COMPARE_FIELD(vandalism_seen); - COMPARE_FIELD(voucher_type); + COMPARE_FIELD(VoucherType); COMPARE_FIELD(VoucherArguments); COMPARE_FIELD(SurroundingsThoughtTimeout); COMPARE_FIELD(Angriness); From fc1ba40dc8eb270790fe4fa5051bbcc6786074be Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:22:28 -0300 Subject: [PATCH 03/18] Rename Peep::vandalism_seen to VandalismSeen --- src/openrct2/GameStateSnapshots.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 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index e985a6bd9b..0f1f014146 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -301,7 +301,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, no_of_food); COMPARE_FIELD(Peep, no_of_drinks); COMPARE_FIELD(Peep, no_of_souvenirs); - COMPARE_FIELD(Peep, vandalism_seen); + COMPARE_FIELD(Peep, VandalismSeen); COMPARE_FIELD(Peep, VoucherType); COMPARE_FIELD(Peep, VoucherArguments); COMPARE_FIELD(Peep, SurroundingsThoughtTimeout); diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 849984757f..80a24c4eed 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1763,7 +1763,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->guest_heading_to_ride_id = RIDE_ID_NULL; peep->litter_count = 0; peep->disgusting_count = 0; - peep->vandalism_seen = 0; + peep->VandalismSeen = 0; peep->paid_to_enter = 0; peep->paid_on_rides = 0; peep->paid_on_food = 0; @@ -2659,9 +2659,9 @@ static void peep_footpath_move_forward(Peep* peep, int16_t x, int16_t y, TileEle return; } - uint8_t vandalThoughtTimeout = (peep->vandalism_seen & 0xC0) >> 6; + uint8_t vandalThoughtTimeout = (peep->VandalismSeen & 0xC0) >> 6; // Advance the vandalised tiles by 1 - uint8_t vandalisedTiles = (peep->vandalism_seen * 2) & 0x3F; + uint8_t vandalisedTiles = (peep->VandalismSeen * 2) & 0x3F; if (vandalism) { @@ -2684,7 +2684,7 @@ static void peep_footpath_move_forward(Peep* peep, int16_t x, int16_t y, TileEle vandalThoughtTimeout--; } - peep->vandalism_seen = (vandalThoughtTimeout << 6) | vandalisedTiles; + peep->VandalismSeen = (vandalThoughtTimeout << 6) | vandalisedTiles; uint16_t crowded = 0; uint8_t litter_count = 0; uint8_t sick_count = 0; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 5112ec947a..f93babcece 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -735,7 +735,7 @@ struct Peep : SpriteBase uint8_t no_of_food; uint8_t no_of_drinks; uint8_t no_of_souvenirs; - uint8_t vandalism_seen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen + uint8_t VandalismSeen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen uint8_t VoucherType; uint8_t VoucherArguments; // ride_id or string_offset_id uint8_t SurroundingsThoughtTimeout; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 1d0dbfc5b9..ca12d0c549 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1424,7 +1424,7 @@ private: dst->var_37 = src->var_37; dst->time_to_consume = src->time_to_consume; dst->step_progress = src->step_progress; - dst->vandalism_seen = src->vandalism_seen; + dst->VandalismSeen = src->vandalism_seen; dst->type = static_cast(src->type); diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 8b6afa371b..2cfb0924aa 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1228,7 +1228,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->no_of_food = src->no_of_food; dst->no_of_drinks = src->no_of_drinks; dst->no_of_souvenirs = src->no_of_souvenirs; - dst->vandalism_seen = src->vandalism_seen; + dst->vandalism_seen = src->VandalismSeen; dst->voucher_type = src->VoucherType; dst->voucher_arguments = src->VoucherArguments; dst->surroundings_thought_timeout = src->SurroundingsThoughtTimeout; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 509b33ea7d..6f88bf8a20 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1493,7 +1493,7 @@ public: dst->no_of_food = src->no_of_food; dst->no_of_drinks = src->no_of_drinks; dst->no_of_souvenirs = src->no_of_souvenirs; - dst->vandalism_seen = src->vandalism_seen; + dst->VandalismSeen = src->vandalism_seen; dst->VoucherType = src->voucher_type; dst->VoucherArguments = src->voucher_arguments; dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 362420b247..3e9786c90b 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -254,7 +254,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(no_of_food); COMPARE_FIELD(no_of_drinks); COMPARE_FIELD(no_of_souvenirs); - COMPARE_FIELD(vandalism_seen); + COMPARE_FIELD(VandalismSeen); COMPARE_FIELD(VoucherType); COMPARE_FIELD(VoucherArguments); COMPARE_FIELD(SurroundingsThoughtTimeout); From 625f7859a433a895a3fb1f565527e45329f76e18 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:24:23 -0300 Subject: [PATCH 04/18] Rename Peep::no_of_souvenirs to NoOfSouvenirs --- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- 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 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 7d59e1f424..36c99e1c68 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1835,8 +1835,8 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on souvenirs y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_souvenirs); - set_format_arg(4, uint16_t, peep->no_of_souvenirs); - if (peep->no_of_souvenirs != 1) + set_format_arg(4, uint16_t, peep->NoOfSouvenirs); + if (peep->NoOfSouvenirs != 1) { gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 0f1f014146..17248a11f4 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -300,7 +300,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, paid_on_souvenirs); COMPARE_FIELD(Peep, no_of_food); COMPARE_FIELD(Peep, no_of_drinks); - COMPARE_FIELD(Peep, no_of_souvenirs); + COMPARE_FIELD(Peep, NoOfSouvenirs); COMPARE_FIELD(Peep, VandalismSeen); COMPARE_FIELD(Peep, VoucherType); COMPARE_FIELD(Peep, VoucherArguments); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 2191f2062d..c2fda68a19 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1702,7 +1702,7 @@ loc_69B221: no_of_drinks++; if (ShopItems[shopItem].IsSouvenir()) - no_of_souvenirs++; + NoOfSouvenirs++; money16* expend_type = &paid_on_souvenirs; ExpenditureType expenditure = ExpenditureType::ShopStock; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 80a24c4eed..373d7dbecb 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1771,7 +1771,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->paid_on_souvenirs = 0; peep->no_of_food = 0; peep->no_of_drinks = 0; - peep->no_of_souvenirs = 0; + peep->NoOfSouvenirs = 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 f93babcece..5ab7c61101 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -734,7 +734,7 @@ struct Peep : SpriteBase }; uint8_t no_of_food; uint8_t no_of_drinks; - uint8_t no_of_souvenirs; + uint8_t NoOfSouvenirs; uint8_t VandalismSeen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen uint8_t VoucherType; uint8_t VoucherArguments; // ride_id or string_offset_id diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index ca12d0c549..02fd698434 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1486,7 +1486,7 @@ private: dst->no_of_drinks = src->no_of_drinks; dst->no_of_food = src->no_of_food; - dst->no_of_souvenirs = src->no_of_souvenirs; + dst->NoOfSouvenirs = src->no_of_souvenirs; dst->paid_to_enter = src->paid_to_enter; dst->paid_on_rides = src->paid_on_rides; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 2cfb0924aa..482b2ceb83 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1227,7 +1227,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->paid_on_souvenirs = src->paid_on_souvenirs; dst->no_of_food = src->no_of_food; dst->no_of_drinks = src->no_of_drinks; - dst->no_of_souvenirs = src->no_of_souvenirs; + dst->no_of_souvenirs = src->NoOfSouvenirs; dst->vandalism_seen = src->VandalismSeen; dst->voucher_type = src->VoucherType; dst->voucher_arguments = src->VoucherArguments; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 6f88bf8a20..e1e6aab6b4 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1492,7 +1492,7 @@ public: dst->paid_on_souvenirs = src->paid_on_souvenirs; dst->no_of_food = src->no_of_food; dst->no_of_drinks = src->no_of_drinks; - dst->no_of_souvenirs = src->no_of_souvenirs; + dst->NoOfSouvenirs = src->no_of_souvenirs; dst->VandalismSeen = src->vandalism_seen; dst->VoucherType = src->voucher_type; dst->VoucherArguments = src->voucher_arguments; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 3e9786c90b..168f20168e 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -253,7 +253,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(paid_on_souvenirs); COMPARE_FIELD(no_of_food); COMPARE_FIELD(no_of_drinks); - COMPARE_FIELD(no_of_souvenirs); + COMPARE_FIELD(NoOfSouvenirs); COMPARE_FIELD(VandalismSeen); COMPARE_FIELD(VoucherType); COMPARE_FIELD(VoucherArguments); From bc7ea40c4b1ba52e8248ce25c4e458b14a7b764c Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:26:24 -0300 Subject: [PATCH 05/18] Rename Peep::no_of_drinks to NoOfDrinks --- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- 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 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 36c99e1c68..85847a7d8a 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1822,8 +1822,8 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on drinks y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_drink); - set_format_arg(4, uint16_t, peep->no_of_drinks); - if (peep->no_of_drinks != 1) + set_format_arg(4, uint16_t, peep->NoOfDrinks); + if (peep->NoOfDrinks != 1) { gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 17248a11f4..48f69a5c1e 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -299,7 +299,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, paid_on_food); COMPARE_FIELD(Peep, paid_on_souvenirs); COMPARE_FIELD(Peep, no_of_food); - COMPARE_FIELD(Peep, no_of_drinks); + COMPARE_FIELD(Peep, NoOfDrinks); COMPARE_FIELD(Peep, NoOfSouvenirs); COMPARE_FIELD(Peep, VandalismSeen); COMPARE_FIELD(Peep, VoucherType); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index c2fda68a19..d1462bf4e0 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1699,7 +1699,7 @@ loc_69B221: no_of_food++; if (ShopItems[shopItem].IsDrink()) - no_of_drinks++; + NoOfDrinks++; if (ShopItems[shopItem].IsSouvenir()) NoOfSouvenirs++; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 373d7dbecb..2f09bd698e 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1770,7 +1770,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->paid_on_drink = 0; peep->paid_on_souvenirs = 0; peep->no_of_food = 0; - peep->no_of_drinks = 0; + peep->NoOfDrinks = 0; peep->NoOfSouvenirs = 0; peep->SurroundingsThoughtTimeout = 0; peep->Angriness = 0; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 5ab7c61101..6b41163154 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -733,7 +733,7 @@ struct Peep : SpriteBase uint16_t staff_bins_emptied; }; uint8_t no_of_food; - uint8_t no_of_drinks; + uint8_t NoOfDrinks; uint8_t NoOfSouvenirs; uint8_t VandalismSeen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen uint8_t VoucherType; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 02fd698434..492a4d3dd5 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1484,7 +1484,7 @@ private: // This doubles as staff type dst->no_of_rides = src->no_of_rides; - dst->no_of_drinks = src->no_of_drinks; + dst->NoOfDrinks = src->no_of_drinks; dst->no_of_food = src->no_of_food; dst->NoOfSouvenirs = src->no_of_souvenirs; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 482b2ceb83..eb6016a6b3 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1226,7 +1226,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->paid_on_food = src->paid_on_food; dst->paid_on_souvenirs = src->paid_on_souvenirs; dst->no_of_food = src->no_of_food; - dst->no_of_drinks = src->no_of_drinks; + dst->no_of_drinks = src->NoOfDrinks; dst->no_of_souvenirs = src->NoOfSouvenirs; dst->vandalism_seen = src->VandalismSeen; dst->voucher_type = src->VoucherType; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index e1e6aab6b4..ecfcbde585 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1491,7 +1491,7 @@ public: dst->paid_on_food = src->paid_on_food; dst->paid_on_souvenirs = src->paid_on_souvenirs; dst->no_of_food = src->no_of_food; - dst->no_of_drinks = src->no_of_drinks; + dst->NoOfDrinks = src->no_of_drinks; dst->NoOfSouvenirs = src->no_of_souvenirs; dst->VandalismSeen = src->vandalism_seen; dst->VoucherType = src->voucher_type; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 168f20168e..f635643f82 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -252,7 +252,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(paid_on_food); COMPARE_FIELD(paid_on_souvenirs); COMPARE_FIELD(no_of_food); - COMPARE_FIELD(no_of_drinks); + COMPARE_FIELD(NoOfDrinks); COMPARE_FIELD(NoOfSouvenirs); COMPARE_FIELD(VandalismSeen); COMPARE_FIELD(VoucherType); From a729ac15895f215d11dffd350dab284941420211 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:28:18 -0300 Subject: [PATCH 06/18] Rename Peep::no_of_food to NoOfFood --- src/openrct2-ui/windows/Guest.cpp | 4 ++-- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- 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 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 85847a7d8a..87feac848b 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1809,8 +1809,8 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on food y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_food); - set_format_arg(4, uint16_t, peep->no_of_food); - if (peep->no_of_food != 1) + set_format_arg(4, uint16_t, peep->NoOfFood); + if (peep->NoOfFood != 1) { gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 48f69a5c1e..80f3f66822 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -298,7 +298,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, paid_on_rides); COMPARE_FIELD(Peep, paid_on_food); COMPARE_FIELD(Peep, paid_on_souvenirs); - COMPARE_FIELD(Peep, no_of_food); + COMPARE_FIELD(Peep, NoOfFood); COMPARE_FIELD(Peep, NoOfDrinks); COMPARE_FIELD(Peep, NoOfSouvenirs); COMPARE_FIELD(Peep, VandalismSeen); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index d1462bf4e0..f1d7bcc9f2 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1696,7 +1696,7 @@ loc_69B221: } if (ShopItems[shopItem].IsFood()) - no_of_food++; + NoOfFood++; if (ShopItems[shopItem].IsDrink()) NoOfDrinks++; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 2f09bd698e..45310d3946 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1769,7 +1769,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->paid_on_food = 0; peep->paid_on_drink = 0; peep->paid_on_souvenirs = 0; - peep->no_of_food = 0; + peep->NoOfFood = 0; peep->NoOfDrinks = 0; peep->NoOfSouvenirs = 0; peep->SurroundingsThoughtTimeout = 0; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 6b41163154..16a607a5af 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -732,7 +732,7 @@ struct Peep : SpriteBase money16 paid_on_souvenirs; uint16_t staff_bins_emptied; }; - uint8_t no_of_food; + uint8_t NoOfFood; uint8_t NoOfDrinks; uint8_t NoOfSouvenirs; uint8_t VandalismSeen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 492a4d3dd5..a5c19b3e6c 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1485,7 +1485,7 @@ private: dst->no_of_rides = src->no_of_rides; dst->NoOfDrinks = src->no_of_drinks; - dst->no_of_food = src->no_of_food; + dst->NoOfFood = src->no_of_food; dst->NoOfSouvenirs = src->no_of_souvenirs; dst->paid_to_enter = src->paid_to_enter; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index eb6016a6b3..9a208ff8ed 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1225,7 +1225,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->paid_on_rides = src->paid_on_rides; dst->paid_on_food = src->paid_on_food; dst->paid_on_souvenirs = src->paid_on_souvenirs; - dst->no_of_food = src->no_of_food; + dst->no_of_food = src->NoOfFood; dst->no_of_drinks = src->NoOfDrinks; dst->no_of_souvenirs = src->NoOfSouvenirs; dst->vandalism_seen = src->VandalismSeen; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index ecfcbde585..2fb916818a 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1490,7 +1490,7 @@ public: dst->paid_on_rides = src->paid_on_rides; dst->paid_on_food = src->paid_on_food; dst->paid_on_souvenirs = src->paid_on_souvenirs; - dst->no_of_food = src->no_of_food; + dst->NoOfFood = src->no_of_food; dst->NoOfDrinks = src->no_of_drinks; dst->NoOfSouvenirs = src->no_of_souvenirs; dst->VandalismSeen = src->vandalism_seen; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index f635643f82..fce45149fd 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -251,7 +251,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(paid_on_rides); COMPARE_FIELD(paid_on_food); COMPARE_FIELD(paid_on_souvenirs); - COMPARE_FIELD(no_of_food); + COMPARE_FIELD(NoOfFood); COMPARE_FIELD(NoOfDrinks); COMPARE_FIELD(NoOfSouvenirs); COMPARE_FIELD(VandalismSeen); From 7d581e697813cca8c1a223b2eded0ac4e2b3bc39 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:28:33 -0300 Subject: [PATCH 07/18] Rename Peep::staff_bins_emptied to StaffBinsEmptied --- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/peep/Staff.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index b87d07245f..c42f85d963 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1120,7 +1120,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) dpi, STR_STAFF_STAT_LITTER_SWEPT, static_cast(&peep->staff_litter_swept), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( - dpi, STR_STAFF_STAT_BINS_EMPTIED, static_cast(&peep->staff_bins_emptied), COLOUR_BLACK, x, y); + dpi, STR_STAFF_STAT_BINS_EMPTIED, static_cast(&peep->StaffBinsEmptied), COLOUR_BLACK, x, y); break; case STAFF_TYPE_MECHANIC: gfx_draw_string_left( diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 16a607a5af..f5ed9514f5 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -730,7 +730,7 @@ struct Peep : SpriteBase union { money16 paid_on_souvenirs; - uint16_t staff_bins_emptied; + uint16_t StaffBinsEmptied; }; uint8_t NoOfFood; uint8_t NoOfDrinks; diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 04367258d0..60f0c6ab37 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -372,7 +372,7 @@ void staff_reset_stats() peep->staff_gardens_watered = 0; peep->staff_rides_inspected = 0; peep->staff_litter_swept = 0; - peep->staff_bins_emptied = 0; + peep->StaffBinsEmptied = 0; } } @@ -1375,7 +1375,7 @@ void Staff::UpdateEmptyingBin() tile_element->AsPath()->SetAdditionStatus(additionStatus); map_invalidate_tile_zoom0({ NextLoc, tile_element->GetBaseZ(), tile_element->GetClearanceZ() }); - staff_bins_emptied++; + StaffBinsEmptied++; window_invalidate_flags |= PEEP_INVALIDATE_STAFF_STATS; } } From c2f7efa32863ec6717f546afa65c377dd1aea340 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:31:34 -0300 Subject: [PATCH 08/18] Rename Peep::paid_on_souvenirs to PaidOnSouvenirs --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- 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 | 2 +- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 87feac848b..d92fffa577 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1834,7 +1834,7 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on souvenirs y += LIST_ROW_HEIGHT; - set_format_arg(0, money32, peep->paid_on_souvenirs); + set_format_arg(0, money32, peep->PaidOnSouvenirs); set_format_arg(4, uint16_t, peep->NoOfSouvenirs); if (peep->NoOfSouvenirs != 1) { diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 80f3f66822..1f53e15b63 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -297,7 +297,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, paid_to_enter); COMPARE_FIELD(Peep, paid_on_rides); COMPARE_FIELD(Peep, paid_on_food); - COMPARE_FIELD(Peep, paid_on_souvenirs); + COMPARE_FIELD(Peep, PaidOnSouvenirs); COMPARE_FIELD(Peep, NoOfFood); COMPARE_FIELD(Peep, NoOfDrinks); COMPARE_FIELD(Peep, NoOfSouvenirs); diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index 9edc1b10f4..d59a0fc67c 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -172,7 +172,7 @@ private: newPeep->paid_to_enter = 0; newPeep->paid_on_rides = 0; newPeep->paid_on_food = 0; - newPeep->paid_on_souvenirs = 0; + newPeep->PaidOnSouvenirs = 0; newPeep->FavouriteRide = RIDE_ID_NULL; newPeep->staff_orders = _staffOrders; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index f1d7bcc9f2..695bda760b 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1704,7 +1704,7 @@ loc_69B221: if (ShopItems[shopItem].IsSouvenir()) NoOfSouvenirs++; - money16* expend_type = &paid_on_souvenirs; + money16* expend_type = &PaidOnSouvenirs; ExpenditureType expenditure = ExpenditureType::ShopStock; if (ShopItems[shopItem].IsFood()) diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 45310d3946..0911254b87 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1768,7 +1768,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->paid_on_rides = 0; peep->paid_on_food = 0; peep->paid_on_drink = 0; - peep->paid_on_souvenirs = 0; + peep->PaidOnSouvenirs = 0; peep->NoOfFood = 0; peep->NoOfDrinks = 0; peep->NoOfSouvenirs = 0; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index f5ed9514f5..5f6786664b 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -729,7 +729,7 @@ struct Peep : SpriteBase }; union { - money16 paid_on_souvenirs; + money16 PaidOnSouvenirs; uint16_t StaffBinsEmptied; }; uint8_t NoOfFood; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index a5c19b3e6c..e38f78102a 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1492,7 +1492,7 @@ private: dst->paid_on_rides = src->paid_on_rides; dst->paid_on_drink = src->paid_on_drink; dst->paid_on_food = src->paid_on_food; - dst->paid_on_souvenirs = src->paid_on_souvenirs; + dst->PaidOnSouvenirs = src->paid_on_souvenirs; dst->VoucherArguments = src->voucher_arguments; dst->VoucherType = src->voucher_type; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 9a208ff8ed..383308c502 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1224,7 +1224,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->paid_to_enter = src->paid_to_enter; dst->paid_on_rides = src->paid_on_rides; dst->paid_on_food = src->paid_on_food; - dst->paid_on_souvenirs = src->paid_on_souvenirs; + dst->paid_on_souvenirs = src->PaidOnSouvenirs; dst->no_of_food = src->NoOfFood; dst->no_of_drinks = src->NoOfDrinks; dst->no_of_souvenirs = src->NoOfSouvenirs; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 2fb916818a..1b8b5c461d 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1489,7 +1489,7 @@ public: dst->paid_to_enter = src->paid_to_enter; dst->paid_on_rides = src->paid_on_rides; dst->paid_on_food = src->paid_on_food; - dst->paid_on_souvenirs = src->paid_on_souvenirs; + dst->PaidOnSouvenirs = src->paid_on_souvenirs; dst->NoOfFood = src->no_of_food; dst->NoOfDrinks = src->no_of_drinks; dst->NoOfSouvenirs = src->no_of_souvenirs; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index fce45149fd..c799388653 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -250,7 +250,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(paid_to_enter); COMPARE_FIELD(paid_on_rides); COMPARE_FIELD(paid_on_food); - COMPARE_FIELD(paid_on_souvenirs); + COMPARE_FIELD(PaidOnSouvenirs); COMPARE_FIELD(NoOfFood); COMPARE_FIELD(NoOfDrinks); COMPARE_FIELD(NoOfSouvenirs); From 5bd3e88972af2430f1cf3ba31801c0bc80b11758 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:31:48 -0300 Subject: [PATCH 09/18] Rename Peep::staff_litter_swept to StaffLitterSwept --- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/peep/Staff.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index c42f85d963..10411e26fa 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1117,7 +1117,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) dpi, STR_STAFF_STAT_GARDENS_WATERED, static_cast(&peep->staff_gardens_watered), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( - dpi, STR_STAFF_STAT_LITTER_SWEPT, static_cast(&peep->staff_litter_swept), COLOUR_BLACK, x, y); + dpi, STR_STAFF_STAT_LITTER_SWEPT, static_cast(&peep->StaffLitterSwept), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( dpi, STR_STAFF_STAT_BINS_EMPTIED, static_cast(&peep->StaffBinsEmptied), COLOUR_BLACK, x, y); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 5f6786664b..4dc84a13e4 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -725,7 +725,7 @@ struct Peep : SpriteBase union { money16 paid_on_food; - uint16_t staff_litter_swept; + uint16_t StaffLitterSwept; }; union { diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 60f0c6ab37..4b77d8a49f 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -371,7 +371,7 @@ void staff_reset_stats() peep->staff_rides_fixed = 0; peep->staff_gardens_watered = 0; peep->staff_rides_inspected = 0; - peep->staff_litter_swept = 0; + peep->StaffLitterSwept = 0; peep->StaffBinsEmptied = 0; } } @@ -1394,7 +1394,7 @@ void Staff::UpdateSweeping() { // Remove sick at this location litter_remove_at(x, y, z); - staff_litter_swept++; + StaffLitterSwept++; window_invalidate_flags |= PEEP_INVALIDATE_STAFF_STATS; } if (auto loc = UpdateAction()) From 414cff9b912933289b87cc888e038de5b88f6fa0 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:33:06 -0300 Subject: [PATCH 10/18] Rename Peep::paid_on_food to PaidOnFood --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- 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 | 2 +- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index d92fffa577..4de771e4ca 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1808,7 +1808,7 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on food y += LIST_ROW_HEIGHT; - set_format_arg(0, money32, peep->paid_on_food); + set_format_arg(0, money32, peep->PaidOnFood); set_format_arg(4, uint16_t, peep->NoOfFood); if (peep->NoOfFood != 1) { diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 1f53e15b63..0f54bff929 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -296,7 +296,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, disgusting_count); COMPARE_FIELD(Peep, paid_to_enter); COMPARE_FIELD(Peep, paid_on_rides); - COMPARE_FIELD(Peep, paid_on_food); + COMPARE_FIELD(Peep, PaidOnFood); COMPARE_FIELD(Peep, PaidOnSouvenirs); COMPARE_FIELD(Peep, NoOfFood); COMPARE_FIELD(Peep, NoOfDrinks); diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index d59a0fc67c..94ea4cbfda 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -171,7 +171,7 @@ private: newPeep->peep_flags = 0; newPeep->paid_to_enter = 0; newPeep->paid_on_rides = 0; - newPeep->paid_on_food = 0; + newPeep->PaidOnFood = 0; newPeep->PaidOnSouvenirs = 0; newPeep->FavouriteRide = RIDE_ID_NULL; newPeep->staff_orders = _staffOrders; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 695bda760b..f02f1f1026 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1709,7 +1709,7 @@ loc_69B221: if (ShopItems[shopItem].IsFood()) { - expend_type = &paid_on_food; + expend_type = &PaidOnFood; expenditure = ExpenditureType::FoodDrinkStock; } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 0911254b87..17d16e0709 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1766,7 +1766,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->VandalismSeen = 0; peep->paid_to_enter = 0; peep->paid_on_rides = 0; - peep->paid_on_food = 0; + peep->PaidOnFood = 0; peep->paid_on_drink = 0; peep->PaidOnSouvenirs = 0; peep->NoOfFood = 0; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 4dc84a13e4..89c1ad1079 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -724,7 +724,7 @@ struct Peep : SpriteBase }; union { - money16 paid_on_food; + money16 PaidOnFood; uint16_t StaffLitterSwept; }; union diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index e38f78102a..6c9568cc56 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1491,7 +1491,7 @@ private: dst->paid_to_enter = src->paid_to_enter; dst->paid_on_rides = src->paid_on_rides; dst->paid_on_drink = src->paid_on_drink; - dst->paid_on_food = src->paid_on_food; + dst->PaidOnFood = src->paid_on_food; dst->PaidOnSouvenirs = src->paid_on_souvenirs; dst->VoucherArguments = src->voucher_arguments; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 383308c502..b2138740f1 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1223,7 +1223,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->disgusting_count = src->disgusting_count; dst->paid_to_enter = src->paid_to_enter; dst->paid_on_rides = src->paid_on_rides; - dst->paid_on_food = src->paid_on_food; + dst->paid_on_food = src->PaidOnFood; dst->paid_on_souvenirs = src->PaidOnSouvenirs; dst->no_of_food = src->NoOfFood; dst->no_of_drinks = src->NoOfDrinks; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 1b8b5c461d..487f8c053a 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1488,7 +1488,7 @@ public: dst->disgusting_count = src->disgusting_count; dst->paid_to_enter = src->paid_to_enter; dst->paid_on_rides = src->paid_on_rides; - dst->paid_on_food = src->paid_on_food; + dst->PaidOnFood = src->paid_on_food; dst->PaidOnSouvenirs = src->paid_on_souvenirs; dst->NoOfFood = src->no_of_food; dst->NoOfDrinks = src->no_of_drinks; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index c799388653..77c5edb201 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -249,7 +249,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(disgusting_count); COMPARE_FIELD(paid_to_enter); COMPARE_FIELD(paid_on_rides); - COMPARE_FIELD(paid_on_food); + COMPARE_FIELD(PaidOnFood); COMPARE_FIELD(PaidOnSouvenirs); COMPARE_FIELD(NoOfFood); COMPARE_FIELD(NoOfDrinks); From 6b56a353f9b6b20de26417d79f378693b8a5b0fc Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:35:08 -0300 Subject: [PATCH 11/18] Rename Peep::staff_rides_inspected to StaffRidesInspected --- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/peep/Staff.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 10411e26fa..34c30fe89a 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1124,7 +1124,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) break; case STAFF_TYPE_MECHANIC: gfx_draw_string_left( - dpi, STR_STAFF_STAT_RIDES_INSPECTED, static_cast(&peep->staff_rides_inspected), COLOUR_BLACK, x, y); + dpi, STR_STAFF_STAT_RIDES_INSPECTED, static_cast(&peep->StaffRidesInspected), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( dpi, STR_STAFF_STAT_RIDES_FIXED, static_cast(&peep->staff_rides_fixed), COLOUR_BLACK, x, y); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 89c1ad1079..313cda69cb 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -720,7 +720,7 @@ struct Peep : SpriteBase { money16 paid_on_rides; uint16_t staff_gardens_watered; - uint16_t staff_rides_inspected; + uint16_t StaffRidesInspected; }; union { diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 4b77d8a49f..494cb72c96 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -370,7 +370,7 @@ void staff_reset_stats() peep->staff_lawns_mown = 0; peep->staff_rides_fixed = 0; peep->staff_gardens_watered = 0; - peep->staff_rides_inspected = 0; + peep->StaffRidesInspected = 0; peep->StaffLitterSwept = 0; peep->StaffBinsEmptied = 0; } @@ -2630,7 +2630,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r { UpdateRideInspected(current_ride); - staff_rides_inspected++; + StaffRidesInspected++; window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST; return true; From 719607f876883f8d3a0a37089bc90c157986eb89 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:39:21 -0300 Subject: [PATCH 12/18] Rename Peep::staff_gardens_watered to StaffGardensWatered --- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/peep/Staff.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 34c30fe89a..0c425aa8cc 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1114,7 +1114,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) dpi, STR_STAFF_STAT_LAWNS_MOWN, static_cast(&peep->staff_lawns_mown), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( - dpi, STR_STAFF_STAT_GARDENS_WATERED, static_cast(&peep->staff_gardens_watered), COLOUR_BLACK, x, y); + dpi, STR_STAFF_STAT_GARDENS_WATERED, static_cast(&peep->StaffGardensWatered), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( dpi, STR_STAFF_STAT_LITTER_SWEPT, static_cast(&peep->StaffLitterSwept), COLOUR_BLACK, x, y); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 313cda69cb..5fceb4ab03 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -719,7 +719,7 @@ struct Peep : SpriteBase union { money16 paid_on_rides; - uint16_t staff_gardens_watered; + uint16_t StaffGardensWatered; uint16_t StaffRidesInspected; }; union diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 494cb72c96..1a57322488 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -369,7 +369,7 @@ void staff_reset_stats() peep->time_in_park = gDateMonthsElapsed; peep->staff_lawns_mown = 0; peep->staff_rides_fixed = 0; - peep->staff_gardens_watered = 0; + peep->StaffGardensWatered = 0; peep->StaffRidesInspected = 0; peep->StaffLitterSwept = 0; peep->StaffBinsEmptied = 0; @@ -1291,7 +1291,7 @@ void Staff::UpdateWatering() tile_element->AsSmallScenery()->SetAge(0); map_invalidate_tile_zoom0({ actionLoc, tile_element->GetBaseZ(), tile_element->GetClearanceZ() }); - staff_gardens_watered++; + StaffGardensWatered++; window_invalidate_flags |= PEEP_INVALIDATE_STAFF_STATS; } while (!(tile_element++)->IsLastForTile()); From 3f091d33e2907d50fa0c8c07db616937dd42c9f0 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:41:57 -0300 Subject: [PATCH 13/18] Rename Peep::paid_on_rides to PaidOnRides --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- 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 | 2 +- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 4de771e4ca..7dc53850b7 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1795,7 +1795,7 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on rides y += LIST_ROW_HEIGHT; - set_format_arg(0, money32, peep->paid_on_rides); + set_format_arg(0, money32, peep->PaidOnRides); set_format_arg(4, uint16_t, peep->no_of_rides); if (peep->no_of_rides != 1) { diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 0f54bff929..bc22d699a6 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -295,7 +295,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, time_on_ride); COMPARE_FIELD(Peep, disgusting_count); COMPARE_FIELD(Peep, paid_to_enter); - COMPARE_FIELD(Peep, paid_on_rides); + COMPARE_FIELD(Peep, PaidOnRides); COMPARE_FIELD(Peep, PaidOnFood); COMPARE_FIELD(Peep, PaidOnSouvenirs); COMPARE_FIELD(Peep, NoOfFood); diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index 94ea4cbfda..dd87c0fcff 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -170,7 +170,7 @@ private: newPeep->outside_of_park = 0; newPeep->peep_flags = 0; newPeep->paid_to_enter = 0; - newPeep->paid_on_rides = 0; + newPeep->PaidOnRides = 0; newPeep->PaidOnFood = 0; newPeep->PaidOnSouvenirs = 0; newPeep->FavouriteRide = RIDE_ID_NULL; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index f02f1f1026..d29cb69d69 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -3867,7 +3867,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) { ride->total_profit += ridePrice; ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - SpendMoney(paid_on_rides, ridePrice, ExpenditureType::ParkRideTickets); + SpendMoney(PaidOnRides, ridePrice, ExpenditureType::ParkRideTickets); } } diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 17d16e0709..9d5f7bd427 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1765,7 +1765,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->disgusting_count = 0; peep->VandalismSeen = 0; peep->paid_to_enter = 0; - peep->paid_on_rides = 0; + peep->PaidOnRides = 0; peep->PaidOnFood = 0; peep->paid_on_drink = 0; peep->PaidOnSouvenirs = 0; diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 5fceb4ab03..cf67a45d28 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -718,7 +718,7 @@ struct Peep : SpriteBase }; union { - money16 paid_on_rides; + money16 PaidOnRides; uint16_t StaffGardensWatered; uint16_t StaffRidesInspected; }; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 6c9568cc56..2d94c8a28f 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1489,7 +1489,7 @@ private: dst->NoOfSouvenirs = src->no_of_souvenirs; dst->paid_to_enter = src->paid_to_enter; - dst->paid_on_rides = src->paid_on_rides; + dst->PaidOnRides = src->paid_on_rides; dst->paid_on_drink = src->paid_on_drink; dst->PaidOnFood = src->paid_on_food; dst->PaidOnSouvenirs = src->paid_on_souvenirs; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index b2138740f1..2e5cc829c9 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1222,7 +1222,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->time_on_ride = src->time_on_ride; dst->disgusting_count = src->disgusting_count; dst->paid_to_enter = src->paid_to_enter; - dst->paid_on_rides = src->paid_on_rides; + dst->paid_on_rides = src->PaidOnRides; dst->paid_on_food = src->PaidOnFood; dst->paid_on_souvenirs = src->PaidOnSouvenirs; dst->no_of_food = src->NoOfFood; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 487f8c053a..1afce9845f 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1487,7 +1487,7 @@ public: dst->time_on_ride = src->time_on_ride; dst->disgusting_count = src->disgusting_count; dst->paid_to_enter = src->paid_to_enter; - dst->paid_on_rides = src->paid_on_rides; + dst->PaidOnRides = src->paid_on_rides; dst->PaidOnFood = src->paid_on_food; dst->PaidOnSouvenirs = src->paid_on_souvenirs; dst->NoOfFood = src->no_of_food; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 77c5edb201..951b482ff6 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -248,7 +248,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(time_on_ride); COMPARE_FIELD(disgusting_count); COMPARE_FIELD(paid_to_enter); - COMPARE_FIELD(paid_on_rides); + COMPARE_FIELD(PaidOnRides); COMPARE_FIELD(PaidOnFood); COMPARE_FIELD(PaidOnSouvenirs); COMPARE_FIELD(NoOfFood); From 133ff992b696f50d48c6165e98b3923701869b81 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:42:13 -0300 Subject: [PATCH 14/18] Rename Peep::staff_rides_fixed to StaffRidesFixed --- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2/peep/Peep.h | 2 +- src/openrct2/peep/Staff.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 0c425aa8cc..f5f63300a2 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1127,7 +1127,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) dpi, STR_STAFF_STAT_RIDES_INSPECTED, static_cast(&peep->StaffRidesInspected), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( - dpi, STR_STAFF_STAT_RIDES_FIXED, static_cast(&peep->staff_rides_fixed), COLOUR_BLACK, x, y); + dpi, STR_STAFF_STAT_RIDES_FIXED, static_cast(&peep->StaffRidesFixed), COLOUR_BLACK, x, y); break; } } diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index cf67a45d28..53abb4bb72 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -714,7 +714,7 @@ struct Peep : SpriteBase { money16 paid_to_enter; uint16_t staff_lawns_mown; - uint16_t staff_rides_fixed; + uint16_t StaffRidesFixed; }; union { diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 1a57322488..753a8044c3 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -368,7 +368,7 @@ void staff_reset_stats() { peep->time_in_park = gDateMonthsElapsed; peep->staff_lawns_mown = 0; - peep->staff_rides_fixed = 0; + peep->StaffRidesFixed = 0; peep->StaffGardensWatered = 0; peep->StaffRidesInspected = 0; peep->StaffLitterSwept = 0; @@ -2636,7 +2636,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r return true; } - staff_rides_fixed++; + StaffRidesFixed++; window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST; sprite_direction = direction << 3; From 07f36a93de569afb39035e29b68468a5cbf2a0c2 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:44:49 -0300 Subject: [PATCH 15/18] Rename Peep::staff_lawns_mown to StaffLawnsMown --- src/openrct2-ui/windows/Staff.cpp | 3 +-- src/openrct2/peep/Peep.h | 2 +- src/openrct2/peep/Staff.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index f5f63300a2..dec8cf591e 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1110,8 +1110,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) switch (peep->staff_type) { case STAFF_TYPE_HANDYMAN: - gfx_draw_string_left( - dpi, STR_STAFF_STAT_LAWNS_MOWN, static_cast(&peep->staff_lawns_mown), COLOUR_BLACK, x, y); + gfx_draw_string_left(dpi, STR_STAFF_STAT_LAWNS_MOWN, static_cast(&peep->StaffLawnsMown), COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; gfx_draw_string_left( dpi, STR_STAFF_STAT_GARDENS_WATERED, static_cast(&peep->StaffGardensWatered), COLOUR_BLACK, x, y); diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 53abb4bb72..256d48d5a6 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -713,7 +713,7 @@ struct Peep : SpriteBase union { money16 paid_to_enter; - uint16_t staff_lawns_mown; + uint16_t StaffLawnsMown; uint16_t StaffRidesFixed; }; union diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 753a8044c3..aeeeaf543a 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -367,7 +367,7 @@ void staff_reset_stats() FOR_ALL_STAFF (spriteIndex, peep) { peep->time_in_park = gDateMonthsElapsed; - peep->staff_lawns_mown = 0; + peep->StaffLawnsMown = 0; peep->StaffRidesFixed = 0; peep->StaffGardensWatered = 0; peep->StaffRidesInspected = 0; @@ -1231,7 +1231,7 @@ void Staff::UpdateMowing() surfaceElement->SetGrassLength(GRASS_LENGTH_MOWED); map_invalidate_tile_zoom0({ NextLoc, surfaceElement->GetBaseZ(), surfaceElement->GetBaseZ() + 16 }); } - staff_lawns_mown++; + StaffLawnsMown++; window_invalidate_flags |= PEEP_INVALIDATE_STAFF_STATS; } } From a987a9ee5e9bd6e04d65a44ef2c7a7f5d48174c0 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:45:09 -0300 Subject: [PATCH 16/18] Rename Peep::paid_to_enter to PaidToEnter --- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/actions/StaffHireNewAction.hpp | 2 +- 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, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 7dc53850b7..502bec06a6 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1790,7 +1790,7 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) gfx_fill_rect_inset(dpi, x, y - 6, x + 179, y - 5, w->colours[1], INSET_RECT_FLAG_BORDER_INSET); // Paid to enter - set_format_arg(0, money32, peep->paid_to_enter); + set_format_arg(0, money32, peep->PaidToEnter); gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_ENTRANCE_FEE, gCommonFormatArgs, COLOUR_BLACK, x, y); // Paid on rides diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index bc22d699a6..b95675d910 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -294,7 +294,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, litter_count); COMPARE_FIELD(Peep, time_on_ride); COMPARE_FIELD(Peep, disgusting_count); - COMPARE_FIELD(Peep, paid_to_enter); + COMPARE_FIELD(Peep, PaidToEnter); COMPARE_FIELD(Peep, PaidOnRides); COMPARE_FIELD(Peep, PaidOnFood); COMPARE_FIELD(Peep, PaidOnSouvenirs); diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index dd87c0fcff..1101d5c9c5 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -169,7 +169,7 @@ private: newPeep->type = PEEP_TYPE_STAFF; newPeep->outside_of_park = 0; newPeep->peep_flags = 0; - newPeep->paid_to_enter = 0; + newPeep->PaidToEnter = 0; newPeep->PaidOnRides = 0; newPeep->PaidOnFood = 0; newPeep->PaidOnSouvenirs = 0; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 9d5f7bd427..14ae6aac3f 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1764,7 +1764,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->litter_count = 0; peep->disgusting_count = 0; peep->VandalismSeen = 0; - peep->paid_to_enter = 0; + peep->PaidToEnter = 0; peep->PaidOnRides = 0; peep->PaidOnFood = 0; peep->paid_on_drink = 0; @@ -2627,7 +2627,7 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl } gTotalIncomeFromAdmissions += entranceFee; - guest->SpendMoney(peep->paid_to_enter, entranceFee, ExpenditureType::ParkEntranceTickets); + guest->SpendMoney(peep->PaidToEnter, entranceFee, ExpenditureType::ParkEntranceTickets); peep->peep_flags |= PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY; } diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 256d48d5a6..ce712cc35f 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -712,7 +712,7 @@ struct Peep : SpriteBase uint8_t disgusting_count; union { - money16 paid_to_enter; + money16 PaidToEnter; uint16_t StaffLawnsMown; uint16_t StaffRidesFixed; }; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 2d94c8a28f..bd42bcaeb4 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1488,7 +1488,7 @@ private: dst->NoOfFood = src->no_of_food; dst->NoOfSouvenirs = src->no_of_souvenirs; - dst->paid_to_enter = src->paid_to_enter; + dst->PaidToEnter = src->paid_to_enter; dst->PaidOnRides = src->paid_on_rides; dst->paid_on_drink = src->paid_on_drink; dst->PaidOnFood = src->paid_on_food; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 2e5cc829c9..dd1adf1794 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1221,7 +1221,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->litter_count = src->litter_count; dst->time_on_ride = src->time_on_ride; dst->disgusting_count = src->disgusting_count; - dst->paid_to_enter = src->paid_to_enter; + dst->paid_to_enter = src->PaidToEnter; dst->paid_on_rides = src->PaidOnRides; dst->paid_on_food = src->PaidOnFood; dst->paid_on_souvenirs = src->PaidOnSouvenirs; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 1afce9845f..61f0e354d8 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1486,7 +1486,7 @@ public: dst->litter_count = src->litter_count; dst->time_on_ride = src->time_on_ride; dst->disgusting_count = src->disgusting_count; - dst->paid_to_enter = src->paid_to_enter; + dst->PaidToEnter = src->paid_to_enter; dst->PaidOnRides = src->paid_on_rides; dst->PaidOnFood = src->paid_on_food; dst->PaidOnSouvenirs = src->paid_on_souvenirs; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 951b482ff6..e40506a874 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -247,7 +247,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(litter_count); COMPARE_FIELD(time_on_ride); COMPARE_FIELD(disgusting_count); - COMPARE_FIELD(paid_to_enter); + COMPARE_FIELD(PaidToEnter); COMPARE_FIELD(PaidOnRides); COMPARE_FIELD(PaidOnFood); COMPARE_FIELD(PaidOnSouvenirs); From 0c502988efbf8d4fee17c73eed2f8358bb2bc204 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 30 May 2020 19:49:30 -0300 Subject: [PATCH 17/18] Rename Peep::disgusting_count to DisgustingCount --- src/openrct2/GameStateSnapshots.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- src/openrct2/peep/Peep.cpp | 12 ++++++------ src/openrct2/peep/Peep.h | 2 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/rct2/S6Exporter.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 2 +- test/tests/S6ImportExportTests.cpp | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index b95675d910..7c4b2ecdb4 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -293,7 +293,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, no_action_frame_num); COMPARE_FIELD(Peep, litter_count); COMPARE_FIELD(Peep, time_on_ride); - COMPARE_FIELD(Peep, disgusting_count); + COMPARE_FIELD(Peep, DisgustingCount); COMPARE_FIELD(Peep, PaidToEnter); COMPARE_FIELD(Peep, PaidOnRides); COMPARE_FIELD(Peep, PaidOnFood); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index d29cb69d69..ccb2981ac8 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -6212,7 +6212,7 @@ static void peep_update_walking_break_scenery(Peep* peep) if (peep->state != PEEP_STATE_WALKING) return; - if ((peep->litter_count & 0xC0) != 0xC0 && (peep->disgusting_count & 0xC0) != 0xC0) + if ((peep->litter_count & 0xC0) != 0xC0 && (peep->DisgustingCount & 0xC0) != 0xC0) return; if ((scenario_rand() & 0xFFFF) > 3276) diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 14ae6aac3f..c492718e3e 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1762,7 +1762,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->item_extra_flags = 0; peep->guest_heading_to_ride_id = RIDE_ID_NULL; peep->litter_count = 0; - peep->disgusting_count = 0; + peep->DisgustingCount = 0; peep->VandalismSeen = 0; peep->PaidToEnter = 0; peep->PaidOnRides = 0; @@ -2727,14 +2727,14 @@ static void peep_footpath_move_forward(Peep* peep, int16_t x, int16_t y, TileEle litter_count = std::min(static_cast(3), litter_count); sick_count = std::min(static_cast(3), sick_count); - uint8_t disgusting_time = peep->disgusting_count & 0xC0; - uint8_t disgusting_count = ((peep->disgusting_count & 0xF) << 2) | sick_count; - peep->disgusting_count = disgusting_count | disgusting_time; + uint8_t disgusting_time = peep->DisgustingCount & 0xC0; + uint8_t disgusting_count = ((peep->DisgustingCount & 0xF) << 2) | sick_count; + peep->DisgustingCount = disgusting_count | disgusting_time; if (disgusting_time & 0xC0 && (scenario_rand() & 0xFFFF) <= 4369) { // Reduce the disgusting time - peep->disgusting_count -= 0x40; + peep->DisgustingCount -= 0x40; } else { @@ -2749,7 +2749,7 @@ static void peep_footpath_move_forward(Peep* peep, int16_t x, int16_t y, TileEle peep->InsertNewThought(PEEP_THOUGHT_TYPE_PATH_DISGUSTING, PEEP_THOUGHT_ITEM_NONE); peep->happiness_target = std::max(0, peep->happiness_target - 17); // Reset disgusting time - peep->disgusting_count |= 0xC0; + peep->DisgustingCount |= 0xC0; } } diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index ce712cc35f..255e143ed4 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -709,7 +709,7 @@ struct Peep : SpriteBase uint8_t staff_mowing_timeout; }; // 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8_t disgusting_count; + uint8_t DisgustingCount; union { money16 PaidToEnter; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index bd42bcaeb4..b1e3afc42b 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1460,7 +1460,7 @@ private: dst->mass = src->mass; dst->litter_count = src->litter_count; - dst->disgusting_count = src->disgusting_count; + dst->DisgustingCount = src->disgusting_count; dst->intensity = static_cast(src->intensity); dst->nausea_tolerance = src->nausea_tolerance; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index dd1adf1794..03c9f99320 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1220,7 +1220,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->no_action_frame_num = src->no_action_frame_num; dst->litter_count = src->litter_count; dst->time_on_ride = src->time_on_ride; - dst->disgusting_count = src->disgusting_count; + dst->disgusting_count = src->DisgustingCount; dst->paid_to_enter = src->PaidToEnter; dst->paid_on_rides = src->PaidOnRides; dst->paid_on_food = src->PaidOnFood; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 61f0e354d8..470d31f308 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1485,7 +1485,7 @@ public: dst->no_action_frame_num = src->no_action_frame_num; dst->litter_count = src->litter_count; dst->time_on_ride = src->time_on_ride; - dst->disgusting_count = src->disgusting_count; + dst->DisgustingCount = src->disgusting_count; dst->PaidToEnter = src->paid_to_enter; dst->PaidOnRides = src->paid_on_rides; dst->PaidOnFood = src->paid_on_food; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index e40506a874..eac0e41859 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -246,7 +246,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(no_action_frame_num); COMPARE_FIELD(litter_count); COMPARE_FIELD(time_on_ride); - COMPARE_FIELD(disgusting_count); + COMPARE_FIELD(DisgustingCount); COMPARE_FIELD(PaidToEnter); COMPARE_FIELD(PaidOnRides); COMPARE_FIELD(PaidOnFood); From e18abc7e3dd70023b8b59c5c863a733c002f707a Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sun, 31 May 2020 09:05:10 -0300 Subject: [PATCH 18/18] Rename NoOf... to AmountOf... on Peep --- src/openrct2-ui/windows/Guest.cpp | 12 ++++++------ src/openrct2/GameStateSnapshots.cpp | 6 +++--- src/openrct2/peep/Guest.cpp | 6 +++--- src/openrct2/peep/Peep.cpp | 6 +++--- src/openrct2/peep/Peep.h | 6 +++--- src/openrct2/rct1/S4Importer.cpp | 6 +++--- src/openrct2/rct2/S6Exporter.cpp | 6 +++--- src/openrct2/rct2/S6Importer.cpp | 6 +++--- test/tests/S6ImportExportTests.cpp | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 502bec06a6..dbe940cf43 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1809,8 +1809,8 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on food y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->PaidOnFood); - set_format_arg(4, uint16_t, peep->NoOfFood); - if (peep->NoOfFood != 1) + set_format_arg(4, uint16_t, peep->AmountOfFood); + if (peep->AmountOfFood != 1) { gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1822,8 +1822,8 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on drinks y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_drink); - set_format_arg(4, uint16_t, peep->NoOfDrinks); - if (peep->NoOfDrinks != 1) + set_format_arg(4, uint16_t, peep->AmountOfDrinks); + if (peep->AmountOfDrinks != 1) { gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1835,8 +1835,8 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi) // Paid on souvenirs y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->PaidOnSouvenirs); - set_format_arg(4, uint16_t, peep->NoOfSouvenirs); - if (peep->NoOfSouvenirs != 1) + set_format_arg(4, uint16_t, peep->AmountOfSouvenirs); + if (peep->AmountOfSouvenirs != 1) { gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 7c4b2ecdb4..6bd0fd18a0 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -298,9 +298,9 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, PaidOnRides); COMPARE_FIELD(Peep, PaidOnFood); COMPARE_FIELD(Peep, PaidOnSouvenirs); - COMPARE_FIELD(Peep, NoOfFood); - COMPARE_FIELD(Peep, NoOfDrinks); - COMPARE_FIELD(Peep, NoOfSouvenirs); + COMPARE_FIELD(Peep, AmountOfFood); + COMPARE_FIELD(Peep, AmountOfDrinks); + COMPARE_FIELD(Peep, AmountOfSouvenirs); COMPARE_FIELD(Peep, VandalismSeen); COMPARE_FIELD(Peep, VoucherType); COMPARE_FIELD(Peep, VoucherArguments); diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index ccb2981ac8..fd43be2d71 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1696,13 +1696,13 @@ loc_69B221: } if (ShopItems[shopItem].IsFood()) - NoOfFood++; + AmountOfFood++; if (ShopItems[shopItem].IsDrink()) - NoOfDrinks++; + AmountOfDrinks++; if (ShopItems[shopItem].IsSouvenir()) - NoOfSouvenirs++; + AmountOfSouvenirs++; money16* expend_type = &PaidOnSouvenirs; ExpenditureType expenditure = ExpenditureType::ShopStock; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index c492718e3e..e4fe95fd4a 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1769,9 +1769,9 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->PaidOnFood = 0; peep->paid_on_drink = 0; peep->PaidOnSouvenirs = 0; - peep->NoOfFood = 0; - peep->NoOfDrinks = 0; - peep->NoOfSouvenirs = 0; + peep->AmountOfFood = 0; + peep->AmountOfDrinks = 0; + peep->AmountOfSouvenirs = 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 255e143ed4..07d85a1084 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -732,9 +732,9 @@ struct Peep : SpriteBase money16 PaidOnSouvenirs; uint16_t StaffBinsEmptied; }; - uint8_t NoOfFood; - uint8_t NoOfDrinks; - uint8_t NoOfSouvenirs; + uint8_t AmountOfFood; + uint8_t AmountOfDrinks; + uint8_t AmountOfSouvenirs; uint8_t VandalismSeen; // 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen uint8_t VoucherType; uint8_t VoucherArguments; // ride_id or string_offset_id diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index b1e3afc42b..0969752dad 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1484,9 +1484,9 @@ private: // This doubles as staff type dst->no_of_rides = src->no_of_rides; - dst->NoOfDrinks = src->no_of_drinks; - dst->NoOfFood = src->no_of_food; - dst->NoOfSouvenirs = src->no_of_souvenirs; + dst->AmountOfDrinks = src->no_of_drinks; + dst->AmountOfFood = src->no_of_food; + dst->AmountOfSouvenirs = src->no_of_souvenirs; dst->PaidToEnter = src->paid_to_enter; dst->PaidOnRides = src->paid_on_rides; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 03c9f99320..a7743f63c6 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1225,9 +1225,9 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) dst->paid_on_rides = src->PaidOnRides; dst->paid_on_food = src->PaidOnFood; dst->paid_on_souvenirs = src->PaidOnSouvenirs; - dst->no_of_food = src->NoOfFood; - dst->no_of_drinks = src->NoOfDrinks; - dst->no_of_souvenirs = src->NoOfSouvenirs; + dst->no_of_food = src->AmountOfFood; + dst->no_of_drinks = src->AmountOfDrinks; + dst->no_of_souvenirs = src->AmountOfSouvenirs; dst->vandalism_seen = src->VandalismSeen; dst->voucher_type = src->VoucherType; dst->voucher_arguments = src->VoucherArguments; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 470d31f308..e9f5638816 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1490,9 +1490,9 @@ public: dst->PaidOnRides = src->paid_on_rides; dst->PaidOnFood = src->paid_on_food; dst->PaidOnSouvenirs = src->paid_on_souvenirs; - dst->NoOfFood = src->no_of_food; - dst->NoOfDrinks = src->no_of_drinks; - dst->NoOfSouvenirs = src->no_of_souvenirs; + dst->AmountOfFood = src->no_of_food; + dst->AmountOfDrinks = src->no_of_drinks; + dst->AmountOfSouvenirs = src->no_of_souvenirs; dst->VandalismSeen = src->vandalism_seen; dst->VoucherType = src->voucher_type; dst->VoucherArguments = src->voucher_arguments; diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index eac0e41859..20380a00a4 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -251,9 +251,9 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) COMPARE_FIELD(PaidOnRides); COMPARE_FIELD(PaidOnFood); COMPARE_FIELD(PaidOnSouvenirs); - COMPARE_FIELD(NoOfFood); - COMPARE_FIELD(NoOfDrinks); - COMPARE_FIELD(NoOfSouvenirs); + COMPARE_FIELD(AmountOfFood); + COMPARE_FIELD(AmountOfDrinks); + COMPARE_FIELD(AmountOfSouvenirs); COMPARE_FIELD(VandalismSeen); COMPARE_FIELD(VoucherType); COMPARE_FIELD(VoucherArguments);