Go to the documentation of this file.
10 #ifndef SPRITELOADER_HPP
11 #define SPRITELOADER_HPP
13 #include "../core/alloc_type.hpp"
14 #include "../core/enum_type.hpp"
15 #include "../gfx_type.h"
18 typedef void *AllocatorProc(
size_t size);
@ SCC_PAL
Sprite has palette data.
void AllocateData(ZoomLevel zoom, size_t size)
Allocate the sprite data of this sprite.
Interface for the loader of our sprites.
@ ZOOM_LVL_COUNT
Number of zoom levels.
ZoomLevel
All zoom levels we know.
virtual Sprite * Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator)=0
Convert a sprite from the loader to our own format.
SpriteLoader::CommonPixel * data
The sprite itself.
SpriteType type
The sprite type.
virtual uint GetSpriteAlignment()
Get the value which the height and width on a sprite have to be aligned by.
Definition of a common pixel in OpenTTD's realm.
int16 x_offs
The x-offset of where the sprite will be drawn.
Interface for something that can encode a sprite.
SpriteColourComponent colours
The colour components of the sprite with useful information.
virtual bool Is32BppSupported()=0
Can the sprite encoder make use of RGBA sprites?
uint16 width
Width of the sprite.
@ SCC_MASK
Mask of valid colour bits.
SpriteType
Types of sprites that might be loaded.
@ SCC_ALPHA
Sprite has alpha.
Structure for passing information from the sprite loader to the blitter.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
int16 y_offs
The y-offset of where the sprite will be drawn.
uint16 height
Height of the sprite.
Data structure describing a sprite.
SpriteColourComponent
The different colour components a sprite can have.