mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove reset_empty_sprites
Leave in sprite_clear_all_unused as the safer version
This commit is contained in:
parent
bed085d329
commit
029aea0fc2
|
@ -184,9 +184,7 @@ void S6Exporter::Export()
|
||||||
// Might as well reset them in here to zero out the space and improve
|
// Might as well reset them in here to zero out the space and improve
|
||||||
// compression ratios. Especially useful for multiplayer servers that
|
// compression ratios. Especially useful for multiplayer servers that
|
||||||
// use zlib on the sent stream.
|
// use zlib on the sent stream.
|
||||||
{
|
sprite_clear_all_unused();
|
||||||
reset_empty_sprites();
|
|
||||||
}
|
|
||||||
for (sint32 i = 0; i < MAX_SPRITES; i++)
|
for (sint32 i = 0; i < MAX_SPRITES; i++)
|
||||||
{
|
{
|
||||||
memcpy(&_s6.sprites[i], get_sprite(i), sizeof(rct_sprite));
|
memcpy(&_s6.sprites[i], get_sprite(i), sizeof(rct_sprite));
|
||||||
|
|
|
@ -296,22 +296,6 @@ void sprite_clear_all_unused()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resets all sprites in SPRITE_LIST_NULL list
|
|
||||||
void reset_empty_sprites()
|
|
||||||
{
|
|
||||||
uint16 spriteIndex;
|
|
||||||
spriteIndex = gSpriteListHead[SPRITE_LIST_NULL];
|
|
||||||
while (spriteIndex != SPRITE_INDEX_NULL)
|
|
||||||
{
|
|
||||||
rct_unk_sprite *sprite = &(get_sprite(spriteIndex))->unknown;
|
|
||||||
spriteIndex = sprite->next;
|
|
||||||
if (sprite->sprite_identifier == SPRITE_IDENTIFIER_NULL)
|
|
||||||
{
|
|
||||||
sprite_reset(sprite);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rct2: 0x0069EC6B
|
* rct2: 0x0069EC6B
|
||||||
* bl: if bl & 2 > 0, the sprite ends up in the MISC linked list.
|
* bl: if bl & 2 > 0, the sprite ends up in the MISC linked list.
|
||||||
|
|
|
@ -419,7 +419,6 @@ extern uint16 *gSpriteListCount;
|
||||||
extern uint16 gSpriteSpatialIndex[0x10001];
|
extern uint16 gSpriteSpatialIndex[0x10001];
|
||||||
|
|
||||||
rct_sprite *create_sprite(uint8 bl);
|
rct_sprite *create_sprite(uint8 bl);
|
||||||
void reset_empty_sprites();
|
|
||||||
void reset_sprite_list();
|
void reset_sprite_list();
|
||||||
void reset_sprite_spatial_index();
|
void reset_sprite_spatial_index();
|
||||||
void sprite_clear_all_unused();
|
void sprite_clear_all_unused();
|
||||||
|
|
Loading…
Reference in New Issue