Merge pull request #11834 from tupaschoal/prevent-shadow-peep-2

Renames some Peep member variables to prevent shadowing
This commit is contained in:
Tulio Leao authored and GitHub committed 2020-05-31 16:47:53 -03:00
commit 87a52f773c
14 files changed
+149 -150

No files matched your search

+13 -13
View File
@@ -1790,12 +1790,12 @@ 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
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)
{
@@ -1808,9 +1808,9 @@ 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(0, money32, peep->PaidOnFood);
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->no_of_drinks);
if (peep->no_of_drinks != 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);
}
@@ -1834,9 +1834,9 @@ 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(0, money32, peep->PaidOnSouvenirs);
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);
}
@@ -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);
@@ -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;
+6 -7
View File
@@ -1110,24 +1110,23 @@ 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<void*>(&peep->staff_lawns_mown), COLOUR_BLACK, x, y);
gfx_draw_string_left(dpi, STR_STAFF_STAT_LAWNS_MOWN, static_cast<void*>(&peep->StaffLawnsMown), COLOUR_BLACK, x, y);
y += LIST_ROW_HEIGHT;
gfx_draw_string_left(
dpi, STR_STAFF_STAT_GARDENS_WATERED, static_cast<void*>(&peep->staff_gardens_watered), COLOUR_BLACK, x, y);
dpi, STR_STAFF_STAT_GARDENS_WATERED, static_cast<void*>(&peep->StaffGardensWatered), COLOUR_BLACK, x, y);
y += LIST_ROW_HEIGHT;
gfx_draw_string_left(
dpi, STR_STAFF_STAT_LITTER_SWEPT, static_cast<void*>(&peep->staff_litter_swept), COLOUR_BLACK, x, y);
dpi, STR_STAFF_STAT_LITTER_SWEPT, static_cast<void*>(&peep->StaffLitterSwept), COLOUR_BLACK, x, y);
y += LIST_ROW_HEIGHT;
gfx_draw_string_left(
dpi, STR_STAFF_STAT_BINS_EMPTIED, static_cast<void*>(&peep->staff_bins_emptied), COLOUR_BLACK, x, y);
dpi, STR_STAFF_STAT_BINS_EMPTIED, static_cast<void*>(&peep->StaffBinsEmptied), COLOUR_BLACK, x, y);
break;
case STAFF_TYPE_MECHANIC:
gfx_draw_string_left(
dpi, STR_STAFF_STAT_RIDES_INSPECTED, static_cast<void*>(&peep->staff_rides_inspected), COLOUR_BLACK, x, y);
dpi, STR_STAFF_STAT_RIDES_INSPECTED, static_cast<void*>(&peep->StaffRidesInspected), COLOUR_BLACK, x, y);
y += LIST_ROW_HEIGHT;
gfx_draw_string_left(
dpi, STR_STAFF_STAT_RIDES_FIXED, static_cast<void*>(&peep->staff_rides_fixed), COLOUR_BLACK, x, y);
dpi, STR_STAFF_STAT_RIDES_FIXED, static_cast<void*>(&peep->StaffRidesFixed), COLOUR_BLACK, x, y);
break;
}
}
+11 -11
View File
@@ -293,17 +293,17 @@ 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, paid_to_enter);
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, no_of_drinks);
COMPARE_FIELD(Peep, no_of_souvenirs);
COMPARE_FIELD(Peep, vandalism_seen);
COMPARE_FIELD(Peep, voucher_type);
COMPARE_FIELD(Peep, voucher_arguments);
COMPARE_FIELD(Peep, DisgustingCount);
COMPARE_FIELD(Peep, PaidToEnter);
COMPARE_FIELD(Peep, PaidOnRides);
COMPARE_FIELD(Peep, PaidOnFood);
COMPARE_FIELD(Peep, PaidOnSouvenirs);
COMPARE_FIELD(Peep, AmountOfFood);
COMPARE_FIELD(Peep, AmountOfDrinks);
COMPARE_FIELD(Peep, AmountOfSouvenirs);
COMPARE_FIELD(Peep, VandalismSeen);
COMPARE_FIELD(Peep, VoucherType);
COMPARE_FIELD(Peep, VoucherArguments);
COMPARE_FIELD(Peep, SurroundingsThoughtTimeout);
COMPARE_FIELD(Peep, Angriness);
COMPARE_FIELD(Peep, TimeLost);
+1 -1
View File
@@ -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->VoucherType == VOUCHER_TYPE_RIDE_FREE && peep->VoucherArguments == _rideIndex)
{
peep->ItemStandardFlags &= ~(PEEP_ITEM_VOUCHER);
}
+4 -4
View File
@@ -169,10 +169,10 @@ private:
newPeep->type = PEEP_TYPE_STAFF;
newPeep->outside_of_park = 0;
newPeep->peep_flags = 0;
newPeep->paid_to_enter = 0;
newPeep->paid_on_rides = 0;
newPeep->paid_on_food = 0;
newPeep->paid_on_souvenirs = 0;
newPeep->PaidToEnter = 0;
newPeep->PaidOnRides = 0;
newPeep->PaidOnFood = 0;
newPeep->PaidOnSouvenirs = 0;
newPeep->FavouriteRide = RIDE_ID_NULL;
newPeep->staff_orders = _staffOrders;
+6 -6
View File
@@ -136,23 +136,23 @@ 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->voucher_arguments = campaign->RideId;
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->voucher_arguments = campaign->ShopItemType;
peep->VoucherType = VOUCHER_TYPE_FOOD_OR_DRINK_FREE;
peep->VoucherArguments = campaign->ShopItemType;
break;
case ADVERTISING_CAMPAIGN_PARK:
break;
+15 -15
View File
@@ -1481,8 +1481,8 @@ 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))
if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (VoucherType == VOUCHER_TYPE_FOOD_OR_DRINK_FREE)
&& (VoucherArguments == shopItem))
{
hasVoucher = true;
}
@@ -1696,20 +1696,20 @@ loc_69B221:
}
if (ShopItems[shopItem].IsFood())
no_of_food++;
AmountOfFood++;
if (ShopItems[shopItem].IsDrink())
no_of_drinks++;
AmountOfDrinks++;
if (ShopItems[shopItem].IsSouvenir())
no_of_souvenirs++;
AmountOfSouvenirs++;
money16* expend_type = &paid_on_souvenirs;
money16* expend_type = &PaidOnSouvenirs;
ExpenditureType expenditure = ExpenditureType::ShopStock;
if (ShopItems[shopItem].IsFood())
{
expend_type = &paid_on_food;
expend_type = &PaidOnFood;
expenditure = ExpenditureType::FoodDrinkStock;
}
@@ -2413,8 +2413,8 @@ 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;
return peep->ItemStandardFlags & PEEP_ITEM_VOUCHER && peep->VoucherType == VOUCHER_TYPE_RIDE_FREE
&& peep->VoucherArguments == ride->id;
}
/**
@@ -2634,8 +2634,8 @@ 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)
if ((peep->ItemStandardFlags & PEEP_ITEM_VOUCHER) && peep->VoucherType == VOUCHER_TYPE_RIDE_FREE
&& peep->VoucherArguments == peep->current_ride)
return true;
if (peep->cash_in_pocket <= 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY))
@@ -3857,8 +3857,8 @@ 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)
&& (voucher_arguments == current_ride))
if ((ItemStandardFlags & PEEP_ITEM_VOUCHER) && (VoucherType == VOUCHER_TYPE_RIDE_FREE)
&& (VoucherArguments == current_ride))
{
ItemStandardFlags &= ~PEEP_ITEM_VOUCHER;
window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY;
@@ -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);
}
}
@@ -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)
+20 -20
View File
@@ -1762,16 +1762,16 @@ 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->vandalism_seen = 0;
peep->paid_to_enter = 0;
peep->paid_on_rides = 0;
peep->paid_on_food = 0;
peep->DisgustingCount = 0;
peep->VandalismSeen = 0;
peep->PaidToEnter = 0;
peep->PaidOnRides = 0;
peep->PaidOnFood = 0;
peep->paid_on_drink = 0;
peep->paid_on_souvenirs = 0;
peep->no_of_food = 0;
peep->no_of_drinks = 0;
peep->no_of_souvenirs = 0;
peep->PaidOnSouvenirs = 0;
peep->AmountOfFood = 0;
peep->AmountOfDrinks = 0;
peep->AmountOfSouvenirs = 0;
peep->SurroundingsThoughtTimeout = 0;
peep->Angriness = 0;
peep->TimeLost = 0;
@@ -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;
@@ -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;
}
@@ -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;
@@ -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<uint8_t>(3), litter_count);
sick_count = std::min(static_cast<uint8_t>(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;
}
}
+17 -17
View File
@@ -709,35 +709,35 @@ 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 paid_to_enter;
uint16_t staff_lawns_mown;
uint16_t staff_rides_fixed;
money16 PaidToEnter;
uint16_t StaffLawnsMown;
uint16_t StaffRidesFixed;
};
union
{
money16 paid_on_rides;
uint16_t staff_gardens_watered;
uint16_t staff_rides_inspected;
money16 PaidOnRides;
uint16_t StaffGardensWatered;
uint16_t StaffRidesInspected;
};
union
{
money16 paid_on_food;
uint16_t staff_litter_swept;
money16 PaidOnFood;
uint16_t StaffLitterSwept;
};
union
{
money16 paid_on_souvenirs;
uint16_t staff_bins_emptied;
money16 PaidOnSouvenirs;
uint16_t StaffBinsEmptied;
};
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 voucher_type;
uint8_t voucher_arguments; // ride_id or string_offset_id
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
uint8_t SurroundingsThoughtTimeout;
uint8_t Angriness;
uint8_t TimeLost; // the time the peep has been lost when it reaches 254 generates the lost thought
+12 -12
View File
@@ -367,12 +367,12 @@ void staff_reset_stats()
FOR_ALL_STAFF (spriteIndex, peep)
{
peep->time_in_park = gDateMonthsElapsed;
peep->staff_lawns_mown = 0;
peep->staff_rides_fixed = 0;
peep->staff_gardens_watered = 0;
peep->staff_rides_inspected = 0;
peep->staff_litter_swept = 0;
peep->staff_bins_emptied = 0;
peep->StaffLawnsMown = 0;
peep->StaffRidesFixed = 0;
peep->StaffGardensWatered = 0;
peep->StaffRidesInspected = 0;
peep->StaffLitterSwept = 0;
peep->StaffBinsEmptied = 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;
}
}
@@ -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());
@@ -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;
}
}
@@ -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())
@@ -2630,13 +2630,13 @@ 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;
}
staff_rides_fixed++;
StaffRidesFixed++;
window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST;
sprite_direction = direction << 3;
+11 -11
View File
@@ -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<PeepType>(src->type);
@@ -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<IntensityRange>(src->intensity);
dst->nausea_tolerance = src->nausea_tolerance;
@@ -1484,18 +1484,18 @@ private:
// This doubles as staff type
dst->no_of_rides = src->no_of_rides;
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->AmountOfDrinks = src->no_of_drinks;
dst->AmountOfFood = src->no_of_food;
dst->AmountOfSouvenirs = src->no_of_souvenirs;
dst->paid_to_enter = src->paid_to_enter;
dst->paid_on_rides = src->paid_on_rides;
dst->PaidToEnter = src->paid_to_enter;
dst->PaidOnRides = 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->PaidOnFood = src->paid_on_food;
dst->PaidOnSouvenirs = src->paid_on_souvenirs;
dst->voucher_arguments = src->voucher_arguments;
dst->voucher_type = src->voucher_type;
dst->VoucherArguments = src->voucher_arguments;
dst->VoucherType = src->voucher_type;
dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout;
dst->Angriness = src->angriness;
+11 -11
View File
@@ -1220,17 +1220,17 @@ 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->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->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->voucher_type = src->voucher_type;
dst->voucher_arguments = src->voucher_arguments;
dst->disgusting_count = src->DisgustingCount;
dst->paid_to_enter = src->PaidToEnter;
dst->paid_on_rides = src->PaidOnRides;
dst->paid_on_food = src->PaidOnFood;
dst->paid_on_souvenirs = src->PaidOnSouvenirs;
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;
dst->surroundings_thought_timeout = src->SurroundingsThoughtTimeout;
dst->angriness = src->Angriness;
dst->time_lost = src->TimeLost;
+11 -11
View File
@@ -1485,17 +1485,17 @@ 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->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->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->voucher_type = src->voucher_type;
dst->voucher_arguments = src->voucher_arguments;
dst->DisgustingCount = src->disgusting_count;
dst->PaidToEnter = src->paid_to_enter;
dst->PaidOnRides = src->paid_on_rides;
dst->PaidOnFood = src->paid_on_food;
dst->PaidOnSouvenirs = src->paid_on_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;
dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout;
dst->Angriness = src->angriness;
dst->TimeLost = src->time_lost;
+11 -11
View File
@@ -246,17 +246,17 @@ 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(paid_to_enter);
COMPARE_FIELD(paid_on_rides);
COMPARE_FIELD(paid_on_food);
COMPARE_FIELD(paid_on_souvenirs);
COMPARE_FIELD(no_of_food);
COMPARE_FIELD(no_of_drinks);
COMPARE_FIELD(no_of_souvenirs);
COMPARE_FIELD(vandalism_seen);
COMPARE_FIELD(voucher_type);
COMPARE_FIELD(voucher_arguments);
COMPARE_FIELD(DisgustingCount);
COMPARE_FIELD(PaidToEnter);
COMPARE_FIELD(PaidOnRides);
COMPARE_FIELD(PaidOnFood);
COMPARE_FIELD(PaidOnSouvenirs);
COMPARE_FIELD(AmountOfFood);
COMPARE_FIELD(AmountOfDrinks);
COMPARE_FIELD(AmountOfSouvenirs);
COMPARE_FIELD(VandalismSeen);
COMPARE_FIELD(VoucherType);
COMPARE_FIELD(VoucherArguments);
COMPARE_FIELD(SurroundingsThoughtTimeout);
COMPARE_FIELD(Angriness);
COMPARE_FIELD(TimeLost);