summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-04-22 07:22:06 +0100
committerPeterN <peter@fuzzle.org>2019-04-29 17:40:22 +0100
commit10ba431d21f58c707398f95b99faf3c2aac77e77 (patch)
treed053b5fda196f8517d8aa253f4bf10b2dbdc97a0
parent119ea7a1959835f242daf988e5a0aabf7a2f41dd (diff)
downloadopenttd-10ba431d21f58c707398f95b99faf3c2aac77e77.tar.xz
Codechange: Remove SpriteTypeByte type
-rw-r--r--src/gfx_type.h2
-rw-r--r--src/spritecache.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/gfx_type.h b/src/gfx_type.h
index 7eeddb407..cc884b06d 100644
--- a/src/gfx_type.h
+++ b/src/gfx_type.h
@@ -294,7 +294,7 @@ enum PaletteType {
};
/** Types of sprites that might be loaded */
-enum SpriteType {
+enum SpriteType : byte {
ST_NORMAL = 0, ///< The most basic (normal) sprite
ST_MAPGEN = 1, ///< Special sprite for the map generator
ST_FONT = 2, ///< A sprite used for fonts
diff --git a/src/spritecache.cpp b/src/spritecache.cpp
index bed8c42e3..bcc004827 100644
--- a/src/spritecache.cpp
+++ b/src/spritecache.cpp
@@ -29,15 +29,13 @@
/* Default of 4MB spritecache */
uint _sprite_cache_size = 4;
-typedef SimpleTinyEnumT<SpriteType, byte> SpriteTypeByte;
-
struct SpriteCache {
void *ptr;
size_t file_pos;
uint32 id;
uint16 file_slot;
int16 lru;
- SpriteTypeByte type; ///< In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour sprite. If the recolour sprite gets into the cache it might be drawn as real sprite which causes enormous trouble.
+ SpriteType type; ///< In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour sprite. If the recolour sprite gets into the cache it might be drawn as real sprite which causes enormous trouble.
bool warned; ///< True iff the user has been warned about incorrect use of this sprite
byte container_ver; ///< Container version of the GRF the sprite is from.
};