1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 10:45:16 +01:00

Adding ride build date, reset function

This commit is contained in:
Maciek Baron
2014-05-09 23:06:53 +01:00
parent 3b8f0d685b
commit 73d06418b6
3 changed files with 22 additions and 2 deletions

View File

@@ -150,3 +150,20 @@ void ride_init_all()
ride_measurement->var_00 = 0xFF;
}
}
/**
*
* rct2: 0x006B7A38
*/
void reset_all_ride_build_dates() {
int i;
rct_ride *ride;
for (i = 0; i < MAX_RIDES; i++) {
ride = GET_RIDE(i);
if (ride->type != RIDE_TYPE_NULL) {
//mov ax, current_month_year
//sub [esi + 180h], ax
ride->build_date -= RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16);
}
}
}

View File

@@ -72,7 +72,9 @@ typedef struct {
uint8 var_14D;
uint8 pad_14E[0x0A];
uint16 var_158;
uint8 pad_15A[0x3C];
uint8 pad_15A[0x26];
uint16 build_date;
uint8 pad_182[0x14];
uint16 var_196;
uint8 pad_198;
uint8 var_199;
@@ -257,5 +259,6 @@ int ride_get_count();
int ride_get_total_queue_length(rct_ride *ride);
int ride_get_max_queue_time(rct_ride *ride);
void ride_init_all();
void reset_all_ride_build_dates();
#endif

View File

@@ -513,7 +513,7 @@ void scenario_load_and_play(rct_scenario_basic *scenario)
RCT2_GLOBAL(0x013587D8, uint16) = 63;
RCT2_CALLPROC_EBPSAFE(0x0069E869); // (loan related, called above already)
RCT2_CALLPROC_EBPSAFE(0x0066729F); // reset history / finance / awards
RCT2_CALLPROC_EBPSAFE(0x006B7A38); // reset_all_ride_build_dates
reset_all_ride_build_dates();
date_reset();
RCT2_CALLPROC_EBPSAFE(0x00674576);
park_calculate_size();