mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Remove NUM_SPRITE_LISTS macro and replace with SPRITE_LIST_COUNT for consistency
This commit is contained in:
@@ -1245,7 +1245,7 @@ static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] cons
|
||||
}
|
||||
|
||||
int32_t spriteCount = 0;
|
||||
for (int32_t i = 1; i < NUM_SPRITE_LISTS; ++i)
|
||||
for (int32_t i = 1; i < SPRITE_LIST_COUNT; ++i)
|
||||
{
|
||||
spriteCount += gSpriteListCount[i];
|
||||
}
|
||||
|
||||
@@ -836,7 +836,7 @@ void S6Exporter::ExportSprites()
|
||||
ExportSprite(&_s6.sprites[i], get_sprite(i));
|
||||
}
|
||||
|
||||
for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++)
|
||||
for (int32_t i = 0; i < SPRITE_LIST_COUNT; i++)
|
||||
{
|
||||
_s6.sprite_lists_head[i] = gSpriteListHead[i];
|
||||
_s6.sprite_lists_count[i] = gSpriteListCount[i];
|
||||
|
||||
@@ -1106,7 +1106,7 @@ public:
|
||||
ImportSprite(dst, src);
|
||||
}
|
||||
|
||||
for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++)
|
||||
for (int32_t i = 0; i < SPRITE_LIST_COUNT; i++)
|
||||
{
|
||||
gSpriteListHead[i] = _s6.sprite_lists_head[i];
|
||||
gSpriteListCount[i] = _s6.sprite_lists_count[i];
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <cmath>
|
||||
#include <iterator>
|
||||
|
||||
uint16_t gSpriteListHead[6];
|
||||
uint16_t gSpriteListCount[6];
|
||||
uint16_t gSpriteListHead[SPRITE_LIST_COUNT];
|
||||
uint16_t gSpriteListCount[SPRITE_LIST_COUNT];
|
||||
static rct_sprite _spriteList[MAX_SPRITES];
|
||||
|
||||
static bool _spriteFlashingList[MAX_SPRITES];
|
||||
@@ -149,7 +149,7 @@ void reset_sprite_list()
|
||||
gSavedAge = 0;
|
||||
std::memset(_spriteList, 0, sizeof(_spriteList));
|
||||
|
||||
for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++)
|
||||
for (int32_t i = 0; i < SPRITE_LIST_COUNT; i++)
|
||||
{
|
||||
gSpriteListHead[i] = SPRITE_INDEX_NULL;
|
||||
gSpriteListCount[i] = 0;
|
||||
@@ -340,10 +340,6 @@ void sprite_clear_all_unused()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* rct2: 0x0069EC6B
|
||||
* bl: if bl & 2 > 0, the sprite ends up in the MISC linked list.
|
||||
*/
|
||||
static constexpr uint16_t MAX_MISC_SPRITES = 300;
|
||||
|
||||
rct_sprite* create_sprite(SPRITE_IDENTIFIER spriteIdentifier)
|
||||
@@ -993,7 +989,7 @@ static bool index_is_in_list(uint16_t index, enum SPRITE_LIST sl)
|
||||
|
||||
int32_t check_for_sprite_list_cycles(bool fix)
|
||||
{
|
||||
for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++)
|
||||
for (int32_t i = 0; i < SPRITE_LIST_COUNT; i++)
|
||||
{
|
||||
rct_sprite* cycle_start = find_sprite_list_cycle(gSpriteListHead[i]);
|
||||
if (cycle_start != nullptr)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#define SPRITE_INDEX_NULL 0xFFFF
|
||||
#define MAX_SPRITES 10000
|
||||
#define NUM_SPRITE_LISTS 6
|
||||
|
||||
enum SPRITE_IDENTIFIER
|
||||
{
|
||||
@@ -37,6 +36,7 @@ enum SPRITE_LIST
|
||||
SPRITE_LIST_MISC,
|
||||
SPRITE_LIST_LITTER,
|
||||
SPRITE_LIST_VEHICLE,
|
||||
SPRITE_LIST_COUNT,
|
||||
};
|
||||
|
||||
struct rct_litter : rct_sprite_common
|
||||
|
||||
Reference in New Issue
Block a user