Changeset - r23668:3775f9f7b899
[Not reviewed]
master
0 2 0
Charles Pigott - 5 years ago 2019-04-22 06:22:06
charlespigott@googlemail.com
Codechange: Remove SpriteTypeByte type
2 files changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/gfx_type.h
Show inline comments
 
@@ -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
src/spritecache.cpp
Show inline comments
 
@@ -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.
 
};
0 comments (0 inline, 0 general)