1
0
Fork 0

Codechange: strongly type SpriteGroupID

pull/13511/head
Rubidium 2025-02-01 00:14:23 +01:00 committed by rubidium42
parent f9f19de8c2
commit 5ca5790ac8
1 changed files with 2 additions and 2 deletions

View File

@ -44,13 +44,13 @@ enum SpriteGroupType : uint8_t {
}; };
struct SpriteGroup; struct SpriteGroup;
typedef uint32_t SpriteGroupID;
struct ResolverObject; struct ResolverObject;
/* SPRITE_WIDTH is 24. ECS has roughly 30 sprite groups per real sprite. /* SPRITE_WIDTH is 24. ECS has roughly 30 sprite groups per real sprite.
* Adding an 'extra' margin would be assuming 64 sprite groups per real * Adding an 'extra' margin would be assuming 64 sprite groups per real
* sprite. 64 = 2^6, so 2^30 should be enough (for now) */ * sprite. 64 = 2^6, so 2^30 should be enough (for now) */
using SpriteGroupPool = Pool<SpriteGroup, SpriteGroupID, 1024, 1U << 30, PoolType::Data>; using SpriteGroupID = PoolID<uint32_t, struct SpriteGroupIDTag, 1U << 30, 0xFFFFFFFF>;
using SpriteGroupPool = Pool<SpriteGroup, SpriteGroupID, 1024, SpriteGroupID::End().base(), PoolType::Data>;
extern SpriteGroupPool _spritegroup_pool; extern SpriteGroupPool _spritegroup_pool;
/* Common wrapper for all the different sprite group types */ /* Common wrapper for all the different sprite group types */