OpenTTD Source 20250205-master-gfd85ab1e2c
|
Sprite loader for converting graphics coming from another source. More...
#include <makeindexed.h>
Public Member Functions | |
SpriteLoaderMakeIndexed (SpriteLoader &baseloader) | |
uint8_t | LoadSprite (SpriteLoader::SpriteCollection &sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, uint8_t control_flags, uint8_t &avail_8bpp, uint8_t &avail_32bpp) override |
Load a sprite from the disk and return a sprite struct which is the same for all loaders. | |
Private Attributes | |
SpriteLoader & | baseloader |
Additional Inherited Members | |
Public Types inherited from SpriteLoader | |
using | SpriteCollection = std::array< Sprite, ZOOM_LVL_END > |
Type defining a collection of sprites, one for each zoom level. | |
Sprite loader for converting graphics coming from another source.
Definition at line 16 of file makeindexed.h.
|
inline |
Definition at line 19 of file makeindexed.h.
|
overridevirtual |
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_slot | 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. |
Implements SpriteLoader.
Definition at line 51 of file makeindexed.cpp.
References Convert32bppTo8bpp(), HasBit(), SpriteLoader::LoadSprite(), ZOOM_LVL_BEGIN, and ZOOM_LVL_END.
Referenced by ReadSprite().
|
private |
Definition at line 17 of file makeindexed.h.