@@ -33,11 +33,11 @@ class SpriteLoader {
|
||||
public:
|
||||
/** Definition of a common pixel in OpenTTD's realm. */
|
||||
struct CommonPixel {
|
||||
uint8 r; ///< Red-channel
|
||||
uint8 g; ///< Green-channel
|
||||
uint8 b; ///< Blue-channel
|
||||
uint8 a; ///< Alpha-channel
|
||||
uint8 m; ///< Remap-channel
|
||||
uint8_t r; ///< Red-channel
|
||||
uint8_t g; ///< Green-channel
|
||||
uint8_t b; ///< Blue-channel
|
||||
uint8_t a; ///< Alpha-channel
|
||||
uint8_t m; ///< Remap-channel
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -47,10 +47,10 @@ public:
|
||||
* This to prevent thousands of malloc + frees just to load a sprite.
|
||||
*/
|
||||
struct Sprite {
|
||||
uint16 height; ///< Height of the sprite
|
||||
uint16 width; ///< Width of the sprite
|
||||
int16 x_offs; ///< The x-offset of where the sprite will be drawn
|
||||
int16 y_offs; ///< The y-offset of where the sprite will be drawn
|
||||
uint16_t height; ///< Height of the sprite
|
||||
uint16_t width; ///< Width of the sprite
|
||||
int16_t x_offs; ///< The x-offset of where the sprite will be drawn
|
||||
int16_t y_offs; ///< The y-offset of where the sprite will be drawn
|
||||
SpriteType type; ///< The sprite type
|
||||
SpriteColourComponent colours; ///< The colour components of the sprite with useful information.
|
||||
SpriteLoader::CommonPixel *data; ///< The sprite itself
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* @param control_flags Control flags, see SpriteCacheCtrlFlags.
|
||||
* @return Bit mask of the zoom levels successfully loaded or 0 if no sprite could be loaded.
|
||||
*/
|
||||
virtual uint8 LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint count, uint16 control_flags, uint8 zoom_levels) = 0;
|
||||
virtual uint8_t LoadSprite(SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint count, uint16_t control_flags, uint8_t zoom_levels) = 0;
|
||||
|
||||
virtual ~SpriteLoader() = default;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user