mirror of https://github.com/OpenTTD/OpenTTD
Codechange: strongly type SpriteGroupID
parent
f9f19de8c2
commit
5ca5790ac8
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue