forked from rosebudai/OpenRCT2-Web
Label known offsets
This commit is contained in:
1 parent
9f9d54ead0
commit
9e391d7e03
4 files changed
+35
-30
No files matched your search
+2
-2
@@ -1808,7 +1808,7 @@ static void peep_update_ride_sub_state_0(rct_peep* peep){
|
||||
}
|
||||
|
||||
if (ride->status != RIDE_STATUS_OPEN ||
|
||||
ride->var_1CA != 0){
|
||||
ride->vehicle_change_timeout != 0){
|
||||
if (peep->destination_tolerence == 0){
|
||||
remove_peep_from_queue(peep);
|
||||
peep_decrement_num_riders(peep);
|
||||
@@ -2231,7 +2231,7 @@ static void peep_update_ride_sub_state_2(rct_peep* peep){
|
||||
|
||||
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_13)){
|
||||
if (ride->status != RIDE_STATUS_OPEN ||
|
||||
ride->var_1CA != 0 ||
|
||||
ride->vehicle_change_timeout != 0 ||
|
||||
(++peep->var_AC) == 0){
|
||||
|
||||
peep_update_ride_sub_state_2_rejoin_queue(peep, ride);
|
||||
|
||||
+19
-16
@@ -1859,8 +1859,8 @@ static void ride_update(int rideIndex)
|
||||
int i;
|
||||
rct_ride *ride = get_ride(rideIndex);
|
||||
|
||||
if (ride->var_1CA != 0)
|
||||
ride->var_1CA--;
|
||||
if (ride->vehicle_change_timeout != 0)
|
||||
ride->vehicle_change_timeout--;
|
||||
|
||||
ride_music_update(rideIndex);
|
||||
|
||||
@@ -2255,8 +2255,8 @@ void ride_prepare_breakdown(int rideIndex, int breakdownReason)
|
||||
|
||||
ride->breakdown_reason_pending = breakdownReason;
|
||||
ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED;
|
||||
ride->var_1AC = 0;
|
||||
ride->var_1AD = 0;
|
||||
ride->breakdown_sound_modifier = 0;
|
||||
ride->not_fixed_timeout = 0;
|
||||
|
||||
switch (breakdownReason) {
|
||||
case BREAKDOWN_SAFETY_CUT_OUT:
|
||||
@@ -2337,12 +2337,15 @@ static void ride_breakdown_status_update(int rideIndex)
|
||||
|
||||
// Warn player if ride hasnt been fixed for ages
|
||||
if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) {
|
||||
ride->var_1AD++;
|
||||
if (ride->var_1AD == 0)
|
||||
ride->var_1AD -= 16;
|
||||
ride->not_fixed_timeout++;
|
||||
// When there has been a full 255 timeout ticks this
|
||||
// will force timeout ticks to keep issueing news every
|
||||
// 16 ticks. Note there is no reason to do this.
|
||||
if (ride->not_fixed_timeout == 0)
|
||||
ride->not_fixed_timeout -= 16;
|
||||
|
||||
if (
|
||||
!(ride->var_1AD & 15) &&
|
||||
!(ride->not_fixed_timeout & 15) &&
|
||||
ride->mechanic_status != RIDE_MECHANIC_STATUS_FIXING &&
|
||||
ride->mechanic_status != RIDE_MECHANIC_STATUS_4
|
||||
) {
|
||||
@@ -2639,19 +2642,19 @@ static void ride_music_update(int rideIndex)
|
||||
if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) {
|
||||
if (ride->breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) & 7))
|
||||
if (ride->var_1AC != 255)
|
||||
ride->var_1AC++;
|
||||
if (ride->breakdown_sound_modifier != 255)
|
||||
ride->breakdown_sound_modifier++;
|
||||
} else {
|
||||
if (
|
||||
(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) ||
|
||||
ride->breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE ||
|
||||
ride->breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE
|
||||
) {
|
||||
if (ride->var_1AC != 255)
|
||||
ride->var_1AC++;
|
||||
if (ride->breakdown_sound_modifier != 255)
|
||||
ride->breakdown_sound_modifier++;
|
||||
}
|
||||
|
||||
if (ride->var_1AC == 255) {
|
||||
if (ride->breakdown_sound_modifier == 255) {
|
||||
ride->music_tune_id = 255;
|
||||
return;
|
||||
}
|
||||
@@ -2675,7 +2678,7 @@ static void ride_music_update(int rideIndex)
|
||||
|
||||
// Alter sample rate for a power cut effect
|
||||
if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) {
|
||||
sampleRate = ride->var_1AC * 70;
|
||||
sampleRate = ride->breakdown_sound_modifier * 70;
|
||||
if (ride->breakdown_reason_pending != BREAKDOWN_CONTROL_FAILURE)
|
||||
sampleRate *= -1;
|
||||
sampleRate += 22050;
|
||||
@@ -5816,7 +5819,7 @@ foundRideEntry:
|
||||
|
||||
ride->status = RIDE_STATUS_CLOSED;
|
||||
ride->lifecycle_flags = 0;
|
||||
ride->var_1CA = 0;
|
||||
ride->vehicle_change_timeout = 0;
|
||||
ride->num_stations = 0;
|
||||
ride->num_vehicles = 1;
|
||||
ride->var_0CA = 32;
|
||||
@@ -7520,7 +7523,7 @@ void game_command_set_ride_vehicles(int *eax, int *ebx, int *ecx, int *edx, int
|
||||
|
||||
ride_clear_for_construction(rideIndex);
|
||||
ride_remove_peeps(rideIndex);
|
||||
ride->var_1CA = 100;
|
||||
ride->vehicle_change_timeout = 100;
|
||||
if (ride->type != RIDE_TYPE_ENTERPRISE) {
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
|
||||
+6
-4
@@ -295,8 +295,10 @@ typedef struct {
|
||||
uint8 var_1A3;
|
||||
uint32 no_primary_items_sold; // 0x1A4
|
||||
uint32 no_secondary_items_sold; // 0x1A8
|
||||
uint8 var_1AC;
|
||||
uint8 var_1AD;
|
||||
uint8 breakdown_sound_modifier; // 0x1AC
|
||||
// Used to oscilate the sound when ride breaks down.
|
||||
// 0 = no change, 255 = max change
|
||||
uint8 not_fixed_timeout; // 0x1AD
|
||||
uint8 last_crash_type; // 0x1AE
|
||||
uint8 connected_message_throttle; // 0x1AF
|
||||
money32 income_per_hour; // 0x1B0
|
||||
@@ -307,14 +309,14 @@ typedef struct {
|
||||
uint8 track_colour_supports[4]; // 0x1C4
|
||||
uint8 music; // 0x1C8
|
||||
uint8 entrance_style; // 0x1C9
|
||||
uint16 var_1CA;
|
||||
uint16 vehicle_change_timeout; // 0x1CA
|
||||
uint8 num_block_brakes; // 0x1CC
|
||||
uint8 lift_hill_speed; // 0x1CD
|
||||
uint16 guests_favourite; // 0x1CE
|
||||
uint32 lifecycle_flags; // 0x1D0
|
||||
uint8 vehicle_colours_extended[32]; // 0x1D4
|
||||
uint16 total_air_time; // 0x1F4
|
||||
uint8 var_1F6;
|
||||
uint8 current_test_station; // 0x1F6
|
||||
uint8 num_circuits; // 0x1F7
|
||||
sint16 cable_lift_x; // 0x1F8
|
||||
sint16 cable_lift_y; // 0x1FA
|
||||
|
||||
+8
-8
@@ -747,8 +747,8 @@ static void vehicle_update_measurements(rct_vehicle *vehicle)
|
||||
return;
|
||||
}
|
||||
|
||||
uint8 entrance = ride->var_1F6;
|
||||
if (ride->entrances[entrance] != 0xFFFF){
|
||||
uint8 stationId = ride->current_test_station;
|
||||
if (ride->entrances[stationId] != 0xFFFF){
|
||||
uint8 test_segment = ride->current_test_segment;
|
||||
|
||||
ride->var_0E1++;
|
||||
@@ -803,7 +803,7 @@ static void vehicle_update_measurements(rct_vehicle *vehicle)
|
||||
ride->var_11F = vehicle->track_z / 8;
|
||||
ride->var_10C = map_location;
|
||||
|
||||
if (ride->entrances[ride->var_1F6] == 0xFFFF)
|
||||
if (ride->entrances[ride->current_test_station] == 0xFFFF)
|
||||
return;
|
||||
|
||||
uint16 track_elem_type = vehicle->track_type / 4;
|
||||
@@ -988,7 +988,7 @@ static void vehicle_update_measurements(rct_vehicle *vehicle)
|
||||
|
||||
}
|
||||
|
||||
if (ride->entrances[ride->var_1F6] == 0xFFFF)
|
||||
if (ride->entrances[ride->current_test_station] == 0xFFFF)
|
||||
return;
|
||||
|
||||
sint16 x, y;
|
||||
@@ -2059,7 +2059,7 @@ void vehicle_test_reset(rct_vehicle* vehicle) {
|
||||
memset(&ride->length, 0, 4 * 4);
|
||||
memset(&ride->time, 0, 4 * 2);
|
||||
ride->total_air_time = 0;
|
||||
ride->var_1F6 = vehicle->current_station;
|
||||
ride->current_test_station = vehicle->current_station;
|
||||
window_invalidate_by_number(WC_RIDE, vehicle->ride);
|
||||
}
|
||||
|
||||
@@ -2190,7 +2190,7 @@ static void vehicle_update_departing(rct_vehicle* vehicle) {
|
||||
if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_TESTING) {
|
||||
if (ride->current_test_segment + 1 < ride->num_stations) {
|
||||
ride->current_test_segment++;
|
||||
ride->var_1F6 = vehicle->current_station;
|
||||
ride->current_test_station = vehicle->current_station;
|
||||
}
|
||||
else {
|
||||
vehicle_update_test_finish(vehicle);
|
||||
@@ -3104,7 +3104,7 @@ static void vehicle_update_travelling_cable_lift(rct_vehicle* vehicle) {
|
||||
if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_TESTING) {
|
||||
if (ride->current_test_segment + 1 < ride->num_stations) {
|
||||
ride->current_test_segment++;
|
||||
ride->var_1F6 = vehicle->current_station;
|
||||
ride->current_test_station = vehicle->current_station;
|
||||
}
|
||||
else {
|
||||
vehicle_update_test_finish(vehicle);
|
||||
@@ -3710,7 +3710,7 @@ static void vehicle_update_rotating(rct_vehicle* vehicle) {
|
||||
|
||||
sint32 var_4C = (sint16)vehicle->current_time;
|
||||
if (RCT2_GLOBAL(0x00F64E34, uint8) == BREAKDOWN_CONTROL_FAILURE) {
|
||||
var_4C += (ride->var_1AC >> 6) + 1;
|
||||
var_4C += (ride->breakdown_sound_modifier >> 6) + 1;
|
||||
}
|
||||
var_4C++;
|
||||
|
||||
|
||||
Reference in new issue
Block a user