Functions to cache sprites in memory. More...
#include "gfx_type.h"Go to the source code of this file.
Data Structures | |
| struct | Sprite |
| Data structure describing a sprite. More... | |
Functions | |
| void * | GetRawSprite (SpriteID sprite, SpriteType type) |
| bool | SpriteExists (SpriteID sprite) |
| SpriteType | GetSpriteType (SpriteID sprite) |
| Get the sprite type of a given sprite. | |
| uint | GetOriginFileSlot (SpriteID sprite) |
| Get the (FIOS) file slot of a given sprite. | |
| uint | GetMaxSpriteID () |
| Get a reasonable (upper bound) estimate of the maximum SpriteID used in OpenTTD; there will be no sprites with a higher SpriteID, although there might be up to roughly a thousand unused SpriteIDs below this number. | |
| static const Sprite * | GetSprite (SpriteID sprite, SpriteType type) |
| static const byte * | GetNonSprite (SpriteID sprite, SpriteType type) |
| void | GfxInitSpriteMem () |
| void | IncreaseSpriteLRU () |
| bool | LoadNextSprite (int load_index, byte file_index, uint file_sprite_id) |
| bool | SkipSpriteData (byte type, uint16 num) |
| Skip the given amount of sprite graphics data. | |
| void | DupSprite (SpriteID old_spr, SpriteID new_spr) |
Variables | |
| uint | _sprite_cache_size |
Functions to cache sprites in memory.
Definition in file spritecache.h.
| uint GetMaxSpriteID | ( | ) |
Get a reasonable (upper bound) estimate of the maximum SpriteID used in OpenTTD; there will be no sprites with a higher SpriteID, although there might be up to roughly a thousand unused SpriteIDs below this number.
Definition at line 173 of file spritecache.cpp.
Referenced by SpriteAlignerWindow::OnClick(), and SpriteAlignerWindow::OnQueryTextFinished().
| uint GetOriginFileSlot | ( | SpriteID | sprite | ) |
Get the (FIOS) file slot of a given sprite.
| sprite | The sprite to look at. |
Definition at line 159 of file spritecache.cpp.
Referenced by SpriteAlignerWindow::SetStringParameters().
| SpriteType GetSpriteType | ( | SpriteID | sprite | ) |
Get the sprite type of a given sprite.
| sprite | The sprite to look at. |
Definition at line 148 of file spritecache.cpp.
References ST_INVALID, and SpriteCache::type.
Referenced by SpriteAlignerWindow::OnClick(), and SpriteAlignerWindow::OnQueryTextFinished().
| bool SkipSpriteData | ( | byte | type, | |
| uint16 | num | |||
| ) |
Skip the given amount of sprite graphics data.
| type | the type of sprite (compressed etc) | |
| num | the amount of sprites to skip |
Definition at line 90 of file spritecache.cpp.
Referenced by ReadSpriteHeaderSkipData().
1.6.1