Use reversed peep functions where required

This commit is contained in:
Duncan Frost 2014-11-05 16:45:42 +00:00
parent f85a2e8ad9
commit c1ef7ac61f
3 changed files with 15 additions and 15 deletions

View File

@ -266,7 +266,7 @@ void peep_remove(rct_peep* peep){
void peep_update_falling(rct_peep* peep){ void peep_update_falling(rct_peep* peep){
if (peep->var_71 == 11){ if (peep->var_71 == 11){
// Check to see if we are ready to drown. // Check to see if we are ready to drown.
int x, y; sint16 x, y;
sub_6939EB(&x, &y, peep); sub_6939EB(&x, &y, peep);
//RCT2_CALLPROC_X(0x6939EB, 0, 0, 0, 0, (int)peep, 0, 0); //RCT2_CALLPROC_X(0x6939EB, 0, 0, 0, 0, (int)peep, 0, 0);
if (peep->var_71 == 11) return; if (peep->var_71 == 11) return;
@ -428,7 +428,7 @@ void peep_update_sitting(rct_peep* peep){
} }
else if (peep->var_2C == 1){ else if (peep->var_2C == 1){
if (peep->var_71 < 0xFE){ if (peep->var_71 < 0xFE){
int x, y; sint16 x, y;
sub_6939EB(&x, &y, peep); sub_6939EB(&x, &y, peep);
//RCT2_CALLPROC_X(0x6939EB, 0, 0, 0, 0, (int)peep, 0, 0); //RCT2_CALLPROC_X(0x6939EB, 0, 0, 0, 0, (int)peep, 0, 0);
if (peep->var_71 != 0xFF) return; if (peep->var_71 != 0xFF) return;
@ -508,7 +508,7 @@ void peep_update_queuing(rct_peep* peep){
if (ride->status == RIDE_STATUS_CLOSED || ride->status == RIDE_STATUS_TESTING){ if (ride->status == RIDE_STATUS_CLOSED || ride->status == RIDE_STATUS_TESTING){
RCT2_CALLPROC_X(0x6966A9, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x6966A9, 0, 0, 0, 0, (int)peep, 0, 0);
peep_decrement_num_riders(peep); peep_decrement_num_riders(peep);
peep->state = 1; peep->state = PEEP_STATE_1;
peep_window_state_update(peep); peep_window_state_update(peep);
return; return;
} }
@ -528,7 +528,7 @@ void peep_update_queuing(rct_peep* peep){
RCT2_CALLPROC_X(0x6EC473, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x6EC473, 0, 0, 0, 0, (int)peep, 0, 0);
RCT2_CALLPROC_X(0x6966A9, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x6966A9, 0, 0, 0, 0, (int)peep, 0, 0);
peep_decrement_num_riders(peep); peep_decrement_num_riders(peep);
peep->state = 1; peep->state = PEEP_STATE_1;
peep_window_state_update(peep); peep_window_state_update(peep);
} }
@ -592,7 +592,7 @@ void peep_update_queuing(rct_peep* peep){
RCT2_CALLPROC_X(0x6EC473, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x6EC473, 0, 0, 0, 0, (int)peep, 0, 0);
RCT2_CALLPROC_X(0x6966A9, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x6966A9, 0, 0, 0, 0, (int)peep, 0, 0);
peep_decrement_num_riders(peep); peep_decrement_num_riders(peep);
peep->state = 1; peep->state = PEEP_STATE_1;
peep_window_state_update(peep); peep_window_state_update(peep);
} }
} }
@ -620,7 +620,7 @@ static void peep_update_entering_park(rct_peep* peep){
} }
return; return;
} }
int x = 0, ebx = 0, y = 0, edx = 0, ebp = 0, edi = 0; sint16 x = 0, y = 0;
if (sub_6939EB(&x, &y, peep)){ if (sub_6939EB(&x, &y, peep)){
RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0);
sub_69E9D3(x, y, peep->z, (rct_sprite*)peep); sub_69E9D3(x, y, peep->z, (rct_sprite*)peep);

View File

@ -667,7 +667,7 @@ static void ride_remove_peeps(int rideIndex)
if (peep->current_ride != rideIndex) if (peep->current_ride != rideIndex)
continue; continue;
RCT2_CALLPROC_X(0x0069A409, 0, 0, 0, 0, (int)peep, 0, 0); peep_decrement_num_riders(peep);
if (peep->state == PEEP_STATE_QUEUING_FRONT && peep->var_2C == 0) if (peep->state == PEEP_STATE_QUEUING_FRONT && peep->var_2C == 0)
RCT2_CALLPROC_X(0x006966A9, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x006966A9, 0, 0, 0, 0, (int)peep, 0, 0);
@ -687,7 +687,7 @@ static void ride_remove_peeps(int rideIndex)
} }
RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0);
peep->state = PEEP_STATE_0; peep->state = PEEP_STATE_FALLING;
RCT2_CALLPROC_X(0x00693BE5, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x00693BE5, 0, 0, 0, 0, (int)peep, 0, 0);
peep->happiness = min(peep->happiness, peep->happiness_growth_rate) / 2; peep->happiness = min(peep->happiness, peep->happiness_growth_rate) / 2;
@ -1539,9 +1539,9 @@ static void ride_call_mechanic(int rideIndex, rct_peep *mechanic, int forInspect
rct_ride *ride; rct_ride *ride;
ride = GET_RIDE(rideIndex); ride = GET_RIDE(rideIndex);
RCT2_CALLPROC_X(0x0069A409, 0, 0, 0, 0, (int)mechanic, 0, 0); peep_decrement_num_riders(mechanic);
mechanic->state = forInspection ? PEEP_STATE_HEADING_TO_INSPECTION : PEEP_STATE_ANSWERING; mechanic->state = forInspection ? PEEP_STATE_HEADING_TO_INSPECTION : PEEP_STATE_ANSWERING;
RCT2_CALLPROC_X(0x0069A42F, 0, 0, 0, 0, (int)mechanic, 0, 0); peep_window_state_update(mechanic);
mechanic->var_2C = 0; mechanic->var_2C = 0;
ride->mechanic_status = RIDE_MECHANIC_STATUS_HEADING; ride->mechanic_status = RIDE_MECHANIC_STATUS_HEADING;
ride->var_14D |= 0x20; ride->var_14D |= 0x20;

View File

@ -462,7 +462,7 @@ void window_staff_overview_mouseup()
sub_69E9D3( 0x8000, peep->y, peep->z, (rct_sprite*)peep); sub_69E9D3( 0x8000, peep->y, peep->z, (rct_sprite*)peep);
peep_decrement_num_riders(peep); peep_decrement_num_riders(peep);
peep->state = 9; peep->state = PEEP_STATE_PICKED;
peep_window_state_update(peep); peep_window_state_update(peep);
break; break;
case WIDX_FIRE: case WIDX_FIRE:
@ -1152,7 +1152,7 @@ void window_staff_overview_tool_down(){
sub_69E9D3(dest_x, dest_y, dest_z, (rct_sprite*)peep); sub_69E9D3(dest_x, dest_y, dest_z, (rct_sprite*)peep);
RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0);
peep_decrement_num_riders(peep); peep_decrement_num_riders(peep);
peep->state = 0; peep->state = PEEP_STATE_FALLING;
peep_window_state_update(peep); peep_window_state_update(peep);
peep->var_71 = 0xFF; peep->var_71 = 0xFF;
peep->var_6D = 0; peep->var_6D = 0;
@ -1189,9 +1189,9 @@ void window_staff_overview_tool_abort(){
RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0); RCT2_CALLPROC_X(0x006EC473, 0, 0, 0, 0, (int)peep, 0, 0);
if (peep->x != 0x8000){ if (peep->x != 0x8000){
RCT2_CALLPROC_X(0x0069A409, 0, 0, 0, 0, (int)peep, 0, 0); peep_decrement_num_riders(peep);
peep->state = 0; peep->state = PEEP_STATE_FALLING;
RCT2_CALLPROC_X(0x0069A42F, 0, 0, 0, 0, (int)peep, 0, 0); peep_window_state_update(peep);
peep->var_71 = 0xFF; peep->var_71 = 0xFF;
peep->var_6D = 0; peep->var_6D = 0;
peep->var_70 = 0; peep->var_70 = 0;