mirror of https://github.com/OpenRCT2/OpenRCT2.git
Clean/include peep/staff vars
This commit is contained in:
parent
e80bc86377
commit
51f4988e06
|
@ -748,7 +748,7 @@ static void sub_68F41A(rct_peep *peep, int index)
|
|||
|
||||
uint8 sprite_type = PEEP_SPRITE_TYPE_23;
|
||||
if (peep->state != PEEP_STATE_PATROLLING)
|
||||
sprite_type = PEEP_SPRITE_TYPE_3;
|
||||
sprite_type = PEEP_SPRITE_TYPE_SECURITY;
|
||||
|
||||
if (peep->sprite_type == sprite_type)
|
||||
return;
|
||||
|
@ -1757,7 +1757,7 @@ static void peep_update_falling(rct_peep* peep){
|
|||
if (peep->item_standard_flags & PEEP_ITEM_BALLOON) {
|
||||
peep->item_standard_flags &= ~PEEP_ITEM_BALLOON;
|
||||
|
||||
if (peep->sprite_type == 19 && peep->x != (sint16)0x8000) {
|
||||
if (peep->sprite_type == PEEP_SPRITE_TYPE_19 && peep->x != (sint16) 0x8000) {
|
||||
create_balloon(peep->x, peep->y, height, peep->balloon_colour, 0);
|
||||
peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY;
|
||||
peep_update_sprite_type(peep);
|
||||
|
@ -1893,7 +1893,7 @@ static void peep_update_sitting(rct_peep* peep){
|
|||
return;
|
||||
}
|
||||
|
||||
if (peep->sprite_type == 0x15){
|
||||
if (peep->sprite_type == PEEP_SPRITE_TYPE_UMBRELLA) {
|
||||
peep_try_get_up_from_sitting(peep);
|
||||
return;
|
||||
}
|
||||
|
@ -1916,7 +1916,7 @@ static void peep_update_sitting(rct_peep* peep){
|
|||
peep_try_get_up_from_sitting(peep);
|
||||
return;
|
||||
}
|
||||
if (peep->sprite_type == 0x13 || peep->sprite_type == 0x1E){
|
||||
if (peep->sprite_type == PEEP_SPRITE_TYPE_19 || peep->sprite_type == PEEP_SPRITE_TYPE_30) {
|
||||
peep_try_get_up_from_sitting(peep);
|
||||
return;
|
||||
}
|
||||
|
@ -4439,7 +4439,7 @@ static void peep_update_queuing(rct_peep* peep){
|
|||
|
||||
sub_693C9E(peep);
|
||||
if (peep->action < 0xFE)return;
|
||||
if (peep->sprite_type == 0){
|
||||
if (peep->sprite_type == PEEP_SPRITE_TYPE_NORMAL) {
|
||||
if (peep->time_in_queue >= 2000 && (0xFFFF & scenario_rand()) <= 119){
|
||||
// Eat Food/Look at watch
|
||||
peep->action = PEEP_ACTION_EAT_FOOD;
|
||||
|
|
|
@ -343,7 +343,20 @@ enum PEEP_ITEM {
|
|||
|
||||
enum PEEP_SPRITE_TYPE {
|
||||
PEEP_SPRITE_TYPE_NORMAL = 0,
|
||||
PEEP_SPRITE_TYPE_3 = 3,
|
||||
PEEP_SPRITE_TYPE_HANDYMAN = 1,
|
||||
PEEP_SPRITE_TYPE_MECHANIC = 2,
|
||||
PEEP_SPRITE_TYPE_SECURITY = 3,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_PANDA = 4,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_TIGER = 5,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_ELEPHANT = 6,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_ROMAN = 7,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_GORILLA = 8,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_SNOWMAN = 9,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_KNIGHT = 10,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_ASTRONAUT = 11,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_BANDIT = 12,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_SHERIFF = 13,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_PIRATE = 14,
|
||||
PEEP_SPRITE_TYPE_19 = 19,
|
||||
PEEP_SPRITE_TYPE_UMBRELLA = 21,
|
||||
PEEP_SPRITE_TYPE_23 = 23,
|
||||
|
@ -352,6 +365,7 @@ enum PEEP_SPRITE_TYPE {
|
|||
PEEP_SPRITE_TYPE_NAUSEOUS = 27,
|
||||
PEEP_SPRITE_TYPE_VERY_NAUSEOUS = 28,
|
||||
PEEP_SPRITE_TYPE_REQUIRE_BATHROOM = 29,
|
||||
PEEP_SPRITE_TYPE_30 = 30,
|
||||
PEEP_SPRITE_TYPE_WATCHING = 38
|
||||
};
|
||||
|
||||
|
|
|
@ -247,7 +247,15 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16
|
|||
STR_ENTERTAINER_X,
|
||||
};
|
||||
|
||||
uint8 sprite_type = RCT2_ADDRESS(0x009929FC, uint8)[staff_type];
|
||||
/* rct2: 0x009929FC */
|
||||
static const uint8 spriteTypes[] = {
|
||||
PEEP_SPRITE_TYPE_HANDYMAN,
|
||||
PEEP_SPRITE_TYPE_MECHANIC,
|
||||
PEEP_SPRITE_TYPE_SECURITY,
|
||||
PEEP_SPRITE_TYPE_ENTERTAINER_PANDA,
|
||||
};
|
||||
|
||||
uint8 sprite_type = spriteTypes[staff_type];
|
||||
newPeep->name_string_idx = staffNames[staff_type];
|
||||
newPeep->sprite_type = sprite_type;
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
window_draw_widgets(w, dpi);
|
||||
// Tab 1 image
|
||||
i = (_window_guest_list_selected_tab == 0 ? w->list_information_type & 0x0FFFFFFFC : 0);
|
||||
i += g_sprite_entries[0].sprite_image->base_image + 1;
|
||||
i += g_sprite_entries[PEEP_SPRITE_TYPE_NORMAL].sprite_image->base_image + 1;
|
||||
i |= 0xA1600000;
|
||||
gfx_draw_sprite(
|
||||
dpi,
|
||||
|
|
|
@ -2007,7 +2007,7 @@ static void window_park_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w)
|
|||
sprite_idx += (w->frame_no / 8) % 8;
|
||||
gfx_draw_sprite(dpi, sprite_idx, w->x + w->widgets[WIDX_TAB_3].left, w->y + w->widgets[WIDX_TAB_3].top, 0);
|
||||
|
||||
sprite_idx = g_sprite_entries[0].sprite_image->base_image + 1;
|
||||
sprite_idx = g_sprite_entries[PEEP_SPRITE_TYPE_NORMAL].sprite_image->base_image + 1;
|
||||
if (w->page == WINDOW_PARK_PAGE_GUESTS)
|
||||
sprite_idx += w->var_492 & 0xFFFFFFFC;
|
||||
|
||||
|
|
|
@ -1386,7 +1386,7 @@ static void window_ride_draw_tab_customer(rct_drawpixelinfo *dpi, rct_window *w)
|
|||
if (w->page == WINDOW_RIDE_PAGE_CUSTOMER)
|
||||
spriteIndex = w->var_492 & ~3;
|
||||
|
||||
spriteIndex += g_sprite_entries[0].sprite_image->base_image;
|
||||
spriteIndex += g_sprite_entries[PEEP_SPRITE_TYPE_NORMAL].sprite_image->base_image;
|
||||
spriteIndex += 1;
|
||||
spriteIndex |= 0xA9E00000;
|
||||
|
||||
|
|
|
@ -546,7 +546,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
// Handymen tab image
|
||||
i = (selectedTab == 0 ? (w->list_information_type & ~3) : 0);
|
||||
i += RCT2_ADDRESS(RCT2_GLOBAL(0x00982710, int), int)[0] + 1;
|
||||
i += g_sprite_entries[PEEP_SPRITE_TYPE_HANDYMAN].sprite_image->base_image + 1;
|
||||
i |= 0x20000000;
|
||||
i |= gStaffHandymanColour << 19;
|
||||
gfx_draw_sprite(
|
||||
|
@ -558,7 +558,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
// Mechanic tab image
|
||||
i = (selectedTab == 1 ? (w->list_information_type & ~3) : 0);
|
||||
i += RCT2_ADDRESS(RCT2_GLOBAL(0x00982718, int), int)[0] + 1;
|
||||
i += g_sprite_entries[PEEP_SPRITE_TYPE_MECHANIC].sprite_image->base_image + 1;
|
||||
i |= 0x20000000;
|
||||
i |= gStaffMechanicColour << 19;
|
||||
gfx_draw_sprite(
|
||||
|
@ -570,7 +570,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
// Security tab image
|
||||
i = (selectedTab == 2 ? (w->list_information_type & ~3) : 0);
|
||||
i += RCT2_ADDRESS(RCT2_GLOBAL(0x00982720, int), int)[0] + 1;
|
||||
i += g_sprite_entries[PEEP_SPRITE_TYPE_SECURITY].sprite_image->base_image + 1;
|
||||
i |= 0x20000000;
|
||||
i |= gStaffSecurityColour << 19;
|
||||
gfx_draw_sprite(
|
||||
|
@ -591,7 +591,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
)) {
|
||||
// Entertainers tab image
|
||||
i = (selectedTab == 3 ? (w->list_information_type & ~3) : 0);
|
||||
i += RCT2_ADDRESS(RCT2_GLOBAL(0x00982738, int), int)[0] + 1;
|
||||
i += g_sprite_entries[PEEP_SPRITE_TYPE_ENTERTAINER_ELEPHANT].sprite_image->base_image + 1;
|
||||
gfx_draw_sprite(&sprite_dpi, i, 0x0F, 0x17, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue