mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 10:02:27 +01:00
Further minor refactors
This commit is contained in:
@@ -750,7 +750,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
||||
// For each guest
|
||||
FOR_ALL_GUESTS (spriteIndex, peep)
|
||||
{
|
||||
sprite_set_flashing((rct_sprite*)peep, false);
|
||||
sprite_set_flashing(peep, false);
|
||||
if (peep->outside_of_park != 0)
|
||||
continue;
|
||||
if (_window_guest_list_selected_filter != -1)
|
||||
@@ -758,7 +758,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
||||
if (window_guest_list_is_peep_in_filter(peep))
|
||||
continue;
|
||||
gWindowMapFlashingFlags |= (1 << 0);
|
||||
sprite_set_flashing((rct_sprite*)peep, true);
|
||||
sprite_set_flashing(peep, true);
|
||||
}
|
||||
if (!guest_should_be_visible(peep))
|
||||
continue;
|
||||
|
||||
@@ -1063,7 +1063,7 @@ static void window_map_paint_peep_overlay(rct_drawpixelinfo* dpi)
|
||||
|
||||
int16_t colour = PALETTE_INDEX_20;
|
||||
|
||||
if (sprite_get_flashing((rct_sprite*)peep))
|
||||
if (sprite_get_flashing(peep))
|
||||
{
|
||||
if (peep->type == PEEP_TYPE_STAFF)
|
||||
{
|
||||
|
||||
@@ -319,11 +319,11 @@ void window_staff_list_update(rct_window* w)
|
||||
gWindowMapFlashingFlags |= (1 << 2);
|
||||
FOR_ALL_STAFF (spriteIndex, peep)
|
||||
{
|
||||
sprite_set_flashing((rct_sprite*)peep, false);
|
||||
sprite_set_flashing(peep, false);
|
||||
|
||||
if (peep->staff_type == _windowStaffListSelectedTab)
|
||||
{
|
||||
sprite_set_flashing((rct_sprite*)peep, true);
|
||||
sprite_set_flashing(peep, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ rct_sprite_checksum sprite_checksum()
|
||||
|
||||
#endif // DISABLE_NETWORK
|
||||
|
||||
static void sprite_reset(SpriteGeneric* sprite)
|
||||
static void sprite_reset(SpriteBase* sprite)
|
||||
{
|
||||
// Need to retain how the sprite is linked in lists
|
||||
uint8_t llto = sprite->linked_list_index;
|
||||
@@ -906,16 +906,16 @@ void sprite_position_tween_reset()
|
||||
}
|
||||
}
|
||||
|
||||
void sprite_set_flashing(rct_sprite* sprite, bool flashing)
|
||||
void sprite_set_flashing(SpriteBase* sprite, bool flashing)
|
||||
{
|
||||
assert(sprite->generic.sprite_index < MAX_SPRITES);
|
||||
_spriteFlashingList[sprite->generic.sprite_index] = flashing;
|
||||
assert(sprite->sprite_index < MAX_SPRITES);
|
||||
_spriteFlashingList[sprite->sprite_index] = flashing;
|
||||
}
|
||||
|
||||
bool sprite_get_flashing(rct_sprite* sprite)
|
||||
bool sprite_get_flashing(SpriteBase* sprite)
|
||||
{
|
||||
assert(sprite->generic.sprite_index < MAX_SPRITES);
|
||||
return _spriteFlashingList[sprite->generic.sprite_index];
|
||||
assert(sprite->sprite_index < MAX_SPRITES);
|
||||
return _spriteFlashingList[sprite->sprite_index];
|
||||
}
|
||||
|
||||
static rct_sprite* find_sprite_list_cycle(uint16_t sprite_idx)
|
||||
|
||||
@@ -243,8 +243,8 @@ void crash_splash_update(CrashSplashParticle* splash);
|
||||
|
||||
rct_sprite_checksum sprite_checksum();
|
||||
|
||||
void sprite_set_flashing(rct_sprite* sprite, bool flashing);
|
||||
bool sprite_get_flashing(rct_sprite* sprite);
|
||||
void sprite_set_flashing(SpriteBase* sprite, bool flashing);
|
||||
bool sprite_get_flashing(SpriteBase* sprite);
|
||||
int32_t check_for_sprite_list_cycles(bool fix);
|
||||
int32_t check_for_spatial_index_cycles(bool fix);
|
||||
int32_t fix_disjoint_sprites();
|
||||
|
||||
Reference in New Issue
Block a user