mirror of https://github.com/OpenRCT2/OpenRCT2.git
Integrate gParkRatingCasualtyPenalty
This commit is contained in:
parent
9478e0a53e
commit
ae0eb1804c
|
@ -1882,10 +1882,7 @@ static void peep_update_falling(rct_peep* peep){
|
|||
news_item_add_to_queue(NEWS_ITEM_BLANK, STR_NEWS_ITEM_GUEST_DROWNED, peep->x | (peep->y << 16));
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x135882E, uint16) += 25;
|
||||
if (RCT2_GLOBAL(0x135882E, uint16) > 1000){
|
||||
RCT2_GLOBAL(0x135882E, uint16) = 1000;
|
||||
}
|
||||
gParkRatingCasualtyPenalty = min(gParkRatingCasualtyPenalty + 25, 1000);
|
||||
peep_remove(peep);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ void S6Exporter::Export()
|
|||
memcpy(_s6.scenario_completed_name, gScenarioCompletedBy, sizeof(_s6.scenario_completed_name));
|
||||
_s6.cash = gCashEncrypted;
|
||||
// pad_013587FC
|
||||
_s6.word_0135882E = RCT2_GLOBAL(0x0135882E, uint16);
|
||||
_s6.park_rating_casualty_penalty = gParkRatingCasualtyPenalty;
|
||||
_s6.map_size_units = gMapSizeUnits;
|
||||
_s6.map_size_minus_2 = gMapSizeMinus2;
|
||||
_s6.map_size = gMapSize;
|
||||
|
|
|
@ -278,7 +278,7 @@ void S6Importer::Import()
|
|||
memcpy(gScenarioCompletedBy, _s6.scenario_completed_name, sizeof(_s6.scenario_completed_name));
|
||||
gCashEncrypted = _s6.cash;
|
||||
// pad_013587FC
|
||||
RCT2_GLOBAL(0x0135882E, uint16) = _s6.word_0135882E;
|
||||
gParkRatingCasualtyPenalty = _s6.park_rating_casualty_penalty;
|
||||
gMapSizeUnits = _s6.map_size_units;
|
||||
gMapSizeMinus2 = _s6.map_size_minus_2;
|
||||
gMapSize = _s6.map_size;
|
||||
|
|
|
@ -4342,8 +4342,8 @@ static void vehicle_kill_all_passengers(rct_vehicle* vehicle) {
|
|||
set_format_arg(4, uint32, ride->name_arguments);
|
||||
news_item_add_to_queue(NEWS_ITEM_RIDE, STR_X_PEOPLE_DIED_ON_X, vehicle->ride);
|
||||
|
||||
if (RCT2_GLOBAL(0x135882E, uint16) < 500) {
|
||||
RCT2_GLOBAL(0x135882E, uint16) += 200;
|
||||
if (gParkRatingCasualtyPenalty < 500) {
|
||||
gParkRatingCasualtyPenalty += 200;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ void scenario_begin()
|
|||
staff_reset_stats();
|
||||
gLastEntranceStyle = RIDE_ENTRANCE_STYLE_PLAIN;
|
||||
memset(RCT2_ADDRESS(0x001358102, void), 0, 20);
|
||||
RCT2_GLOBAL(0x00135882E, uint16) = 0;
|
||||
gParkRatingCasualtyPenalty = 0;
|
||||
|
||||
// Open park with free entry when there is no money
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
|
@ -434,8 +434,9 @@ static void scenario_day_update()
|
|||
break;
|
||||
}
|
||||
|
||||
uint16 unk = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 40 : 7;
|
||||
RCT2_GLOBAL(0x00135882E, uint16) = RCT2_GLOBAL(0x00135882E, uint16) > unk ? RCT2_GLOBAL(0x00135882E, uint16) - unk : 0;
|
||||
// Lower the casualty penalty
|
||||
uint16 casualtyPenaltyModifier = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 40 : 7;
|
||||
gParkRatingCasualtyPenalty = max(0, gParkRatingCasualtyPenalty - casualtyPenaltyModifier);
|
||||
|
||||
gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_DATE;
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ typedef struct rct_s6_data {
|
|||
char scenario_completed_name[32];
|
||||
money32 cash;
|
||||
uint8 pad_013587FC[50];
|
||||
uint16 word_0135882E;
|
||||
uint16 park_rating_casualty_penalty;
|
||||
uint16 map_size_units;
|
||||
uint16 map_size_minus_2;
|
||||
uint16 map_size;
|
||||
|
|
|
@ -50,6 +50,7 @@ money32 gTotalIncomeFromAdmissions;
|
|||
money32 gParkValue;
|
||||
money32 gCompanyValue;
|
||||
|
||||
sint16 gParkRatingCasualtyPenalty;
|
||||
uint8 gParkRatingHistory[32];
|
||||
uint8 gGuestsInParkHistory[32];
|
||||
|
||||
|
@ -303,7 +304,7 @@ int calculate_park_rating()
|
|||
result -= 600 - (4 * (150 - min(150, num_litter)));
|
||||
}
|
||||
|
||||
result -= RCT2_GLOBAL(0x0135882E, sint16);
|
||||
result -= gParkRatingCasualtyPenalty;
|
||||
result = clamp(0, result, 999);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ extern money32 gTotalIncomeFromAdmissions;
|
|||
extern money32 gParkValue;
|
||||
extern money32 gCompanyValue;
|
||||
|
||||
extern sint16 gParkRatingCasualtyPenalty;
|
||||
extern uint8 gParkRatingHistory[32];
|
||||
extern uint8 gGuestsInParkHistory[32];
|
||||
extern int _guestGenerationProbability;
|
||||
|
|
Loading…
Reference in New Issue