12 #ifndef SPRITELOADER_HPP 13 #define SPRITELOADER_HPP 15 #include "../core/alloc_type.hpp" 16 #include "../gfx_type.h"
static ReusableBuffer< SpriteLoader::CommonPixel > buffer[ZOOM_LVL_COUNT]
Allocated memory to pass sprite data around.
virtual uint8 LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type, bool load_32bpp)=0
Load a sprite from the disk and return a sprite struct which is the same for all loaders.
T * ZeroAllocate(size_t count)
Get buffer of at least count times T with zeroed memory.
void AllocateData(ZoomLevel zoom, size_t size)
Allocate the sprite data of this sprite.
Definition of a common pixel in OpenTTD's realm.
SpriteType type
The sprite type.
SpriteType
Types of sprites that might be loaded.
int16 x_offs
The x-offset of where the sprite will be drawn.
SpriteLoader::CommonPixel * data
The sprite itself.
Structure for passing information from the sprite loader to the blitter.
uint16 width
Width of the sprite.
ZoomLevel
All zoom levels we know.
uint16 height
Height of the sprite.
int16 y_offs
The y-offset of where the sprite will be drawn.
Interface for the loader of our sprites.