26 extern uint _sprite_cache_size;
28 typedef void *AllocatorProc(
size_t size);
51 void GfxInitSpriteMem();
53 void IncreaseSpriteLRU();
57 bool LoadNextSprite(
int load_index, byte file_index, uint file_sprite_id, byte container_version);
SpriteType GetSpriteType(SpriteID sprite)
Get the sprite type of a given sprite.
uint GetSpriteCountForSlot(uint file_slot, SpriteID begin, SpriteID end)
Count the sprites which originate from a specific file slot in a range of SpriteIDs.
Data structure describing a sprite.
uint GetMaxSpriteID()
Get a reasonable (upper bound) estimate of the maximum SpriteID used in OpenTTD; there will be no spr...
bool LoadNextSprite(int load_index, byte file_index, uint file_sprite_id, byte container_version)
Load a real or recolour sprite.
int16 y_offs
Number of pixels to shift the sprite downwards.
void ReadGRFSpriteOffsets(byte container_version)
Parse the sprite section of GRFs.
SpriteType
Types of sprites that might be loaded.
void GfxClearSpriteCache()
Remove all encoded sprites from the sprite cache without discarding sprite location information...
size_t GetGRFSpriteOffset(uint32 id)
Get the file offset for a specific sprite in the sprite section of a GRF.
uint16 height
Height of the sprite.
uint16 width
Width of the sprite.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
int16 x_offs
Number of pixels to shift the sprite to the right.
void * GetRawSprite(SpriteID sprite, SpriteType type, AllocatorProc *allocator=NULL)
Reads a sprite (from disk or sprite cache).
uint GetOriginFileSlot(SpriteID sprite)
Get the (FIOS) file slot of a given sprite.
bool SkipSpriteData(byte type, uint16 num)
Skip the given amount of sprite graphics data.
Types related to the graphics and/or input devices.