diff --git a/src/peep/staff.c b/src/peep/staff.c index 28807aa125..6758a86d8d 100644 --- a/src/peep/staff.c +++ b/src/peep/staff.c @@ -29,6 +29,9 @@ #include "peep.h" #include "staff.h" +uint32 *gStaffPatrolAreas = (uint32*)0x013B0E72; +uint8 *gStaffModes = (uint8*)0x013CA672; + /** * * rct2: 0x006BD3A4 @@ -478,5 +481,5 @@ bool staff_is_patrol_area_set(int staffIndex, int x, int y) int peepOffset = staffIndex * 128; int offset = (x | y) >> 5; int bitIndex = (x | y) & 0x1F; - return RCT2_ADDRESS(RCT2_ADDRESS_STAFF_PATROL_AREAS, uint32)[peepOffset + offset] & (1 << bitIndex); + return gStaffPatrolAreas[peepOffset + offset] & (1 << bitIndex); } diff --git a/src/peep/staff.h b/src/peep/staff.h index 85d4813f2d..68b2b32321 100644 --- a/src/peep/staff.h +++ b/src/peep/staff.h @@ -49,6 +49,9 @@ enum STAFF_ORDERS{ STAFF_ORDERS_FIX_RIDES = (1 << 1) }; +extern uint32 *gStaffPatrolAreas; +extern uint8 *gStaffModes; + void game_command_update_staff_colour(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp); void game_command_hire_new_staff_member(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp); void game_command_set_staff_order(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp); diff --git a/src/windows/staff_list.c b/src/windows/staff_list.c index dd84e3799e..68c3b8134a 100644 --- a/src/windows/staff_list.c +++ b/src/windows/staff_list.c @@ -347,7 +347,7 @@ static void window_staff_list_tooldown(rct_window *w, int widgetIndex, int x, in continue; if (isPatrolAreaSet) { - if (!(RCT2_ADDRESS(RCT2_ADDRESS_STAFF_MODE_ARRAY, uint8)[peep->staff_id] & 2)) { + if (!(gStaffModes[peep->staff_id] & 2)) { continue; } if (!mechanic_is_location_in_patrol(peep, x, y)) {