diff --git a/src/addresses.h b/src/addresses.h index f993ff1a18..69a3de147a 100644 --- a/src/addresses.h +++ b/src/addresses.h @@ -283,6 +283,7 @@ #define RCT2_ADDRESS_INITIAL_CASH 0x013573DC #define RCT2_ADDRESS_CURRENT_LOAN 0x013573E0 #define RCT2_ADDRESS_MAXIMUM_LOAN 0x013580F0 +#define RCT2_ADDRESS_PEEP_WARNING_THROTTLE 0x01358750 #define RCT2_ADDRESS_LOAN_HASH 0x013587C4 #define RCT2_ADDRESS_PARK_FLAGS 0x013573E4 #define RCT2_ADDRESS_PARK_ENTRANCE_FEE 0x013573E8 diff --git a/src/management/news_item.c b/src/management/news_item.c index 77014321a0..e2892b2f50 100644 --- a/src/management/news_item.c +++ b/src/management/news_item.c @@ -67,9 +67,11 @@ void news_item_init_queue() news_item_get(0)->type = NEWS_ITEM_NULL; news_item_get(11)->type = NEWS_ITEM_NULL; + // Throttles for warning types (PEEP_*_WARNING) - for (i = 0; i < 16; i++) - RCT2_ADDRESS(0x01358750, uint8)[i] = 0; + for (i = 0; i < 16; i++) { + gPeepWarningThrottle[i] = 0; + } window_game_bottom_toolbar_invalidate_news_item(); } diff --git a/src/peep/peep.c b/src/peep/peep.c index 933906024c..2ad20bb6bb 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -40,6 +40,8 @@ #include "peep.h" #include "staff.h" +extern uint8 *gPeepWarningThrottle = RCT2_ADDRESS(RCT2_ADDRESS_PEEP_WARNING_THROTTLE, uint8); + enum { PATH_SEARCH_DEAD_END, PATH_SEARCH_RIDE_EXIT, @@ -5786,7 +5788,7 @@ void peep_problem_warnings_update() uint16 guests_in_park = gNumGuestsInPark; int hunger_counter = 0, lost_counter = 0, noexit_counter = 0, thirst_counter = 0, litter_counter = 0, disgust_counter = 0, bathroom_counter = 0 ,vandalism_counter = 0; - uint8* warning_throttle = RCT2_ADDRESS(0x01358750, uint8); + uint8 *warning_throttle = gPeepWarningThrottle; RCT2_GLOBAL(RCT2_ADDRESS_RIDE_COUNT, sint16) = ride_get_count(); // refactor this to somewhere else diff --git a/src/peep/peep.h b/src/peep/peep.h index a13cbde84f..eef49192dc 100644 --- a/src/peep/peep.h +++ b/src/peep/peep.h @@ -607,6 +607,8 @@ enum { #define gNextGuestNumber RCT2_GLOBAL(RCT2_ADDRESS_NEXT_GUEST_NUMBER, uint32) +extern uint8 *gPeepWarningThrottle; + int peep_get_staff_count(); int peep_can_be_picked_up(rct_peep* peep); void peep_update_all(); diff --git a/src/rct2/S6Exporter.cpp b/src/rct2/S6Exporter.cpp index 730d9e423d..0f1f3fb624 100644 --- a/src/rct2/S6Exporter.cpp +++ b/src/rct2/S6Exporter.cpp @@ -339,7 +339,7 @@ void S6Exporter::Export() _s6.total_admissions = gTotalAdmissions; _s6.income_from_admissions = gTotalIncomeFromAdmissions; _s6.company_value = gCompanyValue; - memcpy(_s6.byte_01358750, RCT2_ADDRESS(0x01358750, uint8), sizeof(_s6.byte_01358750)); + memcpy(_s6.peep_warning_throttle, gPeepWarningThrottle, sizeof(_s6.peep_warning_throttle)); memcpy(_s6.awards, gCurrentAwards, sizeof(_s6.awards)); _s6.land_price = gLandPrice; _s6.construction_rights_price = gConstructionRightsPrice; diff --git a/src/rct2/S6Importer.cpp b/src/rct2/S6Importer.cpp index 351ebe4ac4..9c28cd2e3f 100644 --- a/src/rct2/S6Importer.cpp +++ b/src/rct2/S6Importer.cpp @@ -271,7 +271,7 @@ void S6Importer::Import() gTotalAdmissions = _s6.total_admissions; gTotalIncomeFromAdmissions = _s6.income_from_admissions; gCompanyValue = _s6.company_value; - memcpy(RCT2_ADDRESS(0x01358750, uint8), _s6.byte_01358750, sizeof(_s6.byte_01358750)); + memcpy(gPeepWarningThrottle, _s6.peep_warning_throttle, sizeof(_s6.peep_warning_throttle)); memcpy(gCurrentAwards, _s6.awards, sizeof(_s6.awards)); gLandPrice = _s6.land_price; gConstructionRightsPrice = _s6.construction_rights_price; diff --git a/src/scenario.h b/src/scenario.h index 076e50c5fb..a0fab0fbcd 100644 --- a/src/scenario.h +++ b/src/scenario.h @@ -235,7 +235,7 @@ typedef struct { uint32 total_admissions; money32 income_from_admissions; money32 company_value; - uint8 byte_01358750[16]; + uint8 peep_warning_throttle[16]; rct_award awards[4]; money16 land_price; money16 construction_rights_price;