mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
This commit is contained in:
@@ -265,7 +265,7 @@ void sub_6BD3A4()
|
||||
for (int i = 200; i < 204; i++)
|
||||
RCT2_ADDRESS(RCT2_ADDRESS_STAFF_MODE_ARRAY, uint8)[i] = STAFF_MODE_WALK;
|
||||
|
||||
sub_6C0C3F();
|
||||
staff_update_greyed_patrol_areas();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -573,7 +573,7 @@ void peep_sprite_remove(rct_peep* peep){
|
||||
|
||||
RCT2_ADDRESS(RCT2_ADDRESS_STAFF_MODE_ARRAY, uint8)[peep->staff_id] = 0;
|
||||
peep->type = 0xFF;
|
||||
sub_6C0C3F();
|
||||
staff_update_greyed_patrol_areas();
|
||||
peep->type = PEEP_TYPE_STAFF;
|
||||
|
||||
news_item_disable_news(NEWS_ITEM_PEEP, peep->sprite_index);
|
||||
|
||||
@@ -263,13 +263,13 @@ void game_command_set_staff_patrol(int *eax, int *ebx, int *ecx, int *edx, int *
|
||||
uint32 *patrolBits = (uint32*)(0x013B0E72 + patrolOffset + (base * 4));
|
||||
*patrolBits ^= mask;
|
||||
|
||||
int eax2 = 0;
|
||||
int ispatrolling = 0;
|
||||
for(int i = 0; i < 128; i++){
|
||||
eax2 |= *(uint32*)(0x013B0E72 + patrolOffset + (i * 4));
|
||||
ispatrolling |= *(uint32*)(0x013B0E72 + patrolOffset + (i * 4));
|
||||
}
|
||||
|
||||
RCT2_ADDRESS(RCT2_ADDRESS_STAFF_MODE_ARRAY, uint8)[peep->staff_id] &= ~2;
|
||||
if(eax2){
|
||||
if(ispatrolling){
|
||||
RCT2_ADDRESS(RCT2_ADDRESS_STAFF_MODE_ARRAY, uint8)[peep->staff_id] |= 2;
|
||||
}
|
||||
|
||||
@@ -278,6 +278,7 @@ void game_command_set_staff_patrol(int *eax, int *ebx, int *ecx, int *edx, int *
|
||||
map_invalidate_tile_full((x & 0x1F80) + (x2 * 32), (y & 0x1F80) + (y2 * 32));
|
||||
}
|
||||
}
|
||||
staff_update_greyed_patrol_areas();
|
||||
}
|
||||
*ebx = 0;
|
||||
}
|
||||
@@ -327,23 +328,27 @@ uint16 hire_new_staff_member(uint8 staffType)
|
||||
return edi;
|
||||
}
|
||||
|
||||
void sub_6C0C3F()
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006C0C3F
|
||||
*/
|
||||
void staff_update_greyed_patrol_areas()
|
||||
{
|
||||
register rct_peep* peep;
|
||||
rct_peep* peep;
|
||||
|
||||
for (register uint8 staff_type = 0; staff_type < STAFF_TYPE_COUNT; ++staff_type)
|
||||
for (int staff_type = 0; staff_type < STAFF_TYPE_COUNT; ++staff_type)
|
||||
{
|
||||
for (register uint8 i = 0; i < 128; ++i)
|
||||
RCT2_ADDRESS(0x13B0E72 + (staff_type + STAFF_MAX_COUNT) * 512, uint32)[i] = 0;
|
||||
for (int i = 0; i < 128; ++i)
|
||||
RCT2_ADDRESS(0x13B0E72 + ((staff_type + STAFF_MAX_COUNT) * 512), uint32)[i] = 0;
|
||||
|
||||
for (register uint16 sprite_index = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_START_PEEP, uint16); sprite_index != SPRITE_INDEX_NULL; sprite_index = peep->next)
|
||||
for (uint16 sprite_index = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_START_PEEP, uint16); sprite_index != SPRITE_INDEX_NULL; sprite_index = peep->next)
|
||||
{
|
||||
peep = GET_PEEP(sprite_index);
|
||||
|
||||
if (peep->type == PEEP_TYPE_STAFF && staff_type == peep->staff_type)
|
||||
{
|
||||
for (register uint8 i = 0; i < 128; ++i)
|
||||
RCT2_ADDRESS(0x13B0E72 + (staff_type + STAFF_MAX_COUNT) * 512, uint32)[i] |= RCT2_ADDRESS(0x13B0E72 + peep->staff_id * 512, uint32)[i];
|
||||
for (int i = 0; i < 128; ++i)
|
||||
RCT2_ADDRESS(0x13B0E72 + ((staff_type + STAFF_MAX_COUNT) * 512), uint32)[i] |= RCT2_ADDRESS(0x13B0E72 + (peep->staff_id * 512), uint32)[i];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ void game_command_fire_staff_member(int *eax, int *ebx, int *ecx, int *edx, int
|
||||
|
||||
void update_staff_colour(uint8 staffType, uint16 color);
|
||||
uint16 hire_new_staff_member(uint8 staffType);
|
||||
void sub_6C0C3F();
|
||||
void staff_update_greyed_patrol_areas();
|
||||
int mechanic_is_location_in_patrol(rct_peep *mechanic, int x, int y);
|
||||
void staff_reset_stats();
|
||||
|
||||
|
||||
@@ -573,19 +573,18 @@ void window_staff_overview_dropdown()
|
||||
|
||||
for (int i = 0; i < 128; i++)
|
||||
{
|
||||
RCT2_GLOBAL(0x13B0E72 + ebx + i * 4, uint32) = 0;
|
||||
RCT2_ADDRESS(0x13B0E72 + (peep->staff_id * 512), uint32)[i] = 0;
|
||||
}
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_STAFF_MODE_ARRAY + edi, uint16) &= 0xFD; // bug??
|
||||
RCT2_ADDRESS(RCT2_ADDRESS_STAFF_MODE_ARRAY, uint8)[peep->staff_id] &= ~2;
|
||||
|
||||
window_invalidate(w);
|
||||
//RCT2_CALLPROC_EBPSAFE(0x006C0C3F);
|
||||
sub_6C0C3F();
|
||||
gfx_invalidate_screen();
|
||||
staff_update_greyed_patrol_areas();
|
||||
}
|
||||
else {
|
||||
if (!tool_set(w, widgetIndex, 22)) {
|
||||
show_gridlines();
|
||||
RCT2_GLOBAL(0x009DEA50, sint16) = w->number;
|
||||
window_invalidate(w);
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user