OpenTTD Source 20250518-master-g1b0fd0e6fd
|
Interface for the loader of our sprites. More...
#include <spriteloader.hpp>
Data Structures | |
struct | CommonPixel |
Definition of a common pixel in OpenTTD's realm. More... | |
struct | Sprite |
Structure for passing information from the sprite loader to the blitter. More... | |
Public Types | |
using | SpriteCollection = SpriteCollMap< Sprite > |
Type defining a collection of sprites, one for each zoom level. | |
Public Member Functions | |
virtual ZoomLevels | LoadSprite (SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, ZoomLevels &avail_8bpp, ZoomLevels &avail_32bpp)=0 |
Load a sprite from the disk and return a sprite struct which is the same for all loaders. | |
Interface for the loader of our sprites.
Definition at line 44 of file spriteloader.hpp.
Type defining a collection of sprites, one for each zoom level.
Definition at line 83 of file spriteloader.hpp.
|
pure virtual |
Load a sprite from the disk and return a sprite struct which is the same for all loaders.
[out] | sprite | The sprites to fill with data. |
file | The file "descriptor" of the file we read from. | |
file_pos | The position within the file the image begins. | |
sprite_type | The type of sprite we're trying to load. | |
load_32bpp | True if 32bpp sprites should be loaded, false for a 8bpp sprite. | |
control_flags | Control flags, see SpriteCacheCtrlFlags. | |
[out] | avail_8bpp | Available 8bpp sprites. |
[out] | avail_32bpp | Available 32bpp sprites. |
Implemented in SpriteLoaderGrf, and SpriteLoaderMakeIndexed.
Referenced by SpriteLoaderMakeIndexed::LoadSprite().