1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

var_2A to outside_of_park

This commit is contained in:
Rune Laenen
2015-10-02 13:41:13 +02:00
parent 35dbf5adcf
commit 5d75fa4464
6 changed files with 31 additions and 31 deletions

View File

@@ -76,7 +76,7 @@ static int award_is_deserved_most_untidy(int awardType, int activeAwardTypes)
negativeCount = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->thoughts[0].var_2 > 5)
@@ -109,7 +109,7 @@ static int award_is_deserved_most_tidy(int awardType, int activeAwardTypes)
positiveCount = 0;
negativeCount = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->thoughts[0].var_2 > 5)
@@ -183,7 +183,7 @@ static int award_is_deserved_most_beautiful(int awardType, int activeAwardTypes)
positiveCount = 0;
negativeCount = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->thoughts[0].var_2 > 5)
@@ -227,7 +227,7 @@ static int award_is_deserved_safest(int awardType, int activeAwardTypes)
peepsWhoDislikeVandalism = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->thoughts[0].var_2 <= 5 && peep->thoughts[0].type == PEEP_THOUGHT_TYPE_VANDALISM)
peepsWhoDislikeVandalism++;
@@ -307,7 +307,7 @@ static int award_is_deserved_best_food(int awardType, int activeAwardTypes)
// Count hungry peeps
hungryPeeps = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->thoughts[0].var_2 <= 5 && peep->thoughts[0].type == PEEP_THOUGHT_TYPE_HUNGRY)
@@ -353,7 +353,7 @@ static int award_is_deserved_worst_food(int awardType, int activeAwardTypes)
// Count hungry peeps
hungryPeeps = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->thoughts[0].var_2 <= 5 && peep->thoughts[0].type == PEEP_THOUGHT_TYPE_HUNGRY)
@@ -388,7 +388,7 @@ static int award_is_deserved_best_restrooms(int awardType, int activeAwardTypes)
// Count number of guests who are thinking they need the restroom
guestsWhoNeedRestroom = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->thoughts[0].var_2 <= 5 && peep->thoughts[0].type == PEEP_THOUGHT_TYPE_BATHROOM)
@@ -517,7 +517,7 @@ static int award_is_deserved_most_confusing_layout(int awardType, int activeAwar
peepsCounted = 0;
peepsLost = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
peepsCounted++;

View File

@@ -305,7 +305,7 @@ static void sub_68F8CD(rct_peep *peep)
peep->thirst--;
}
if (peep->var_2A != 0) {
if (peep->outside_of_park != 0) {
return;
}
@@ -460,7 +460,7 @@ static void sub_68F41A(rct_peep *peep, int index)
}
if (peep->state == PEEP_STATE_WALKING &&
peep->var_2A == 0 &&
peep->outside_of_park == 0 &&
!(peep->flags & PEEP_FLAGS_LEAVING_PARK) &&
peep->no_of_rides == 0 &&
peep->guest_heading_to_ride_id == 0xFF){
@@ -486,7 +486,7 @@ static void sub_68F41A(rct_peep *peep, int index)
if ((index & 0x3FF) == (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) & 0x3FF)){
if (peep->var_2A == 0 &&
if (peep->outside_of_park == 0 &&
(peep->state == PEEP_STATE_WALKING || peep->state == PEEP_STATE_SITTING)){
uint8 num_thoughts = 0;
@@ -1265,7 +1265,7 @@ void peep_sprite_remove(rct_peep* peep){
*/
void peep_remove(rct_peep* peep){
if (peep->type == PEEP_TYPE_GUEST){
if (peep->var_2A == 0){
if (peep->outside_of_park == 0){
RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16)--;
RCT2_GLOBAL(RCT2_ADDRESS_BTM_TOOLBAR_DIRTY_FLAGS, uint16) |= BTM_TB_DIRTY_FLAG_PEEP_COUNT;
}
@@ -3630,7 +3630,7 @@ static void peep_update_leaving_park(rct_peep* peep){
return;
}
peep->var_2A = 1;
peep->outside_of_park = 1;
peep->destination_tolerence = 5;
RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16)--;
RCT2_GLOBAL(RCT2_ADDRESS_BTM_TOOLBAR_DIRTY_FLAGS, uint16) |= BTM_TB_DIRTY_FLAG_PEEP_COUNT;
@@ -3750,7 +3750,7 @@ static void peep_update_entering_park(rct_peep* peep){
peep->state = PEEP_STATE_FALLING;
peep_window_state_update(peep);
peep->var_2A = 0;
peep->outside_of_park = 0;
peep->time_in_park = RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_TICKS, uint32);
RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16)++;
RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_HEADING_FOR_PARK, uint16)--;
@@ -5024,7 +5024,7 @@ void peep_problem_warnings_update()
RCT2_GLOBAL(RCT2_ADDRESS_RIDE_COUNT, sint16) = ride_get_count(); // refactor this to somewhere else
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0 || peep->thoughts[0].var_2 > 5)
if (peep->outside_of_park != 0 || peep->thoughts[0].var_2 > 5)
continue;
switch (peep->thoughts[0].type) {
@@ -5232,7 +5232,7 @@ void peep_applause()
rct_peep* peep;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
// Release balloon
@@ -5269,7 +5269,7 @@ void peep_update_days_in_queue()
rct_peep *peep;
FOR_ALL_GUESTS(sprite_index, peep) {
if (peep->var_2A == 0 && peep->state == PEEP_STATE_QUEUING) {
if (peep->outside_of_park == 0 && peep->state == PEEP_STATE_QUEUING) {
if (peep->days_in_queue < 255) {
peep->days_in_queue += 1;
}
@@ -5292,7 +5292,7 @@ rct_peep *peep_generate(int x, int y, int z)
peep->sprite_identifier = 1;
peep->sprite_type = PEEP_SPRITE_TYPE_NORMAL;
peep->var_2A = 1;
peep->outside_of_park = 1;
peep->state = PEEP_STATE_FALLING;
peep->action = PEEP_ACTION_NONE_2;
peep->var_6D = 0;
@@ -6426,11 +6426,11 @@ static int peep_interact_with_path(rct_peep* peep, sint16 x, sint16 y, rct_map_e
sint16 z = map_element->base_height * 8;
if (!map_is_location_owned(x, y, z)){
if (peep->var_2A == 0)
if (peep->outside_of_park == 0)
return peep_return_to_center_of_tile(peep);
}
else{
if (peep->var_2A == 1)
if (peep->outside_of_park == 1)
return peep_return_to_center_of_tile(peep);
}
@@ -7214,7 +7214,7 @@ static int guest_path_finding(rct_peep* peep)
}
uint8 edges = path_get_permitted_edges(mapElement);
if (peep->var_2A == 0 && peep_heading_for_ride_or_park_exit(peep)) {
if (peep->outside_of_park == 0 && peep_heading_for_ride_or_park_exit(peep)) {
uint8 adjustedEdges = edges;
for (int chosenDirection = 0; chosenDirection < 4; chosenDirection++) {
// If there is no path in that direction try another
@@ -7249,7 +7249,7 @@ static int guest_path_finding(rct_peep* peep)
}
// loc_694F19:
if (peep->var_2A != 0){
if (peep->outside_of_park != 0){
switch (peep->state) {
case PEEP_STATE_ENTERING_PARK:
return guest_path_find_entering_park(peep, mapElement, edges);
@@ -7423,7 +7423,7 @@ static int sub_693C9E(rct_peep *peep)
}
if (x < 32 || y < 32 || x >= RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, uint16) || y >= RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, uint16)){
if (peep->var_2A == 1){
if (peep->outside_of_park == 1){
RCT2_GLOBAL(0x00F1EE18, uint16) |= (1 << 1);
}
return peep_return_to_center_of_tile(peep);

View File

@@ -402,7 +402,7 @@ typedef struct {
uint16 next_y; // 0x26
uint8 next_z; // 0x28
uint8 next_var_29; // 0x29
uint8 var_2A;
uint8 outside_of_park;
uint8 state; // 0x2B
uint8 sub_state; // 0x2C
uint8 sprite_type; // 0x2D

View File

@@ -135,7 +135,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx,
newPeep->action_sprite_type = 0;
newPeep->var_C4 = 0;
newPeep->type = PEEP_TYPE_STAFF;
newPeep->var_2A = 0;
newpeep->outside_of_park = 0;
newPeep->flags = 0;
newPeep->paid_to_enter = 0;
newPeep->paid_on_rides = 0;

View File

@@ -428,7 +428,7 @@ static void window_guest_list_scrollgetsize(rct_window *w, int scrollIndex, int
numGuests = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (_window_guest_list_selected_filter != -1)
if (window_guest_list_is_peep_in_filter(peep))
@@ -487,7 +487,7 @@ static void window_guest_list_scrollmousedown(rct_window *w, int scrollIndex, in
i = y / 10;
i += _window_guest_list_selected_page * 3173;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (_window_guest_list_selected_filter != -1)
if (window_guest_list_is_peep_in_filter(peep))
@@ -653,7 +653,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
// For each guest
FOR_ALL_GUESTS(spriteIndex, peep) {
peep->var_0C &= ~0x200;
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (_window_guest_list_selected_filter != -1) {
if (window_guest_list_is_peep_in_filter(peep))
@@ -837,12 +837,12 @@ static void window_guest_list_find_groups()
// Set all guests to unassigned
FOR_ALL_GUESTS(spriteIndex, peep)
if (peep->var_2A == 0)
if (peep->outside_of_park == 0)
peep->var_0C |= (1 << 8);
// For each guest / group
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0 || !(peep->var_0C & (1 << 8)))
if (peep->outside_of_park != 0 || !(peep->var_0C & (1 << 8)))
continue;
// New group, cap at 240 though

View File

@@ -187,7 +187,7 @@ int calculate_park_rating()
num_happy_peeps = 0;
_bp = 0;
FOR_ALL_GUESTS(spriteIndex, peep) {
if (peep->var_2A != 0)
if (peep->outside_of_park != 0)
continue;
if (peep->happiness > 128)
num_happy_peeps++;