forked from mirror/OpenTTD
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
This commit is contained in:
@@ -46,13 +46,13 @@ uint GetMaxSpriteID();
|
||||
|
||||
static inline const Sprite *GetSprite(SpriteID sprite, SpriteType type)
|
||||
{
|
||||
assert(type != ST_RECOLOUR);
|
||||
assert(type != SpriteType::Recolour);
|
||||
return (Sprite*)GetRawSprite(sprite, type);
|
||||
}
|
||||
|
||||
static inline const byte *GetNonSprite(SpriteID sprite, SpriteType type)
|
||||
{
|
||||
assert(type == ST_RECOLOUR);
|
||||
assert(type == SpriteType::Recolour);
|
||||
return (byte*)GetRawSprite(sprite, type);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user