OpenTTD Source 20241224-master-gf74b0cf984
SpriteCache Struct Reference

Data Fields

void * ptr
 
size_t file_pos
 
SpriteFilefile
 The file the sprite in this entry can be found in.
 
uint32_t length
 Length of sprite data.
 
uint32_t id
 
int16_t lru
 
SpriteType type
 In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour sprite. If the recolour sprite gets into the cache it might be drawn as real sprite which causes enormous trouble.
 
bool warned
 True iff the user has been warned about incorrect use of this sprite.
 
uint8_t control_flags
 Control flags, see SpriteCacheCtrlFlags.
 

Detailed Description

Definition at line 23 of file spritecache_internal.h.

Field Documentation

◆ control_flags

uint8_t SpriteCache::control_flags

Control flags, see SpriteCacheCtrlFlags.

Definition at line 32 of file spritecache_internal.h.

Referenced by LoadNextSprite(), and ReadSprite().

◆ file

SpriteFile* SpriteCache::file

The file the sprite in this entry can be found in.

Definition at line 26 of file spritecache_internal.h.

Referenced by GetOriginFile(), GetRawSprite(), GetSpriteCountForFile(), LoadNextSprite(), and ReadSprite().

◆ file_pos

size_t SpriteCache::file_pos

Definition at line 25 of file spritecache_internal.h.

◆ id

uint32_t SpriteCache::id

Definition at line 28 of file spritecache_internal.h.

◆ length

uint32_t SpriteCache::length

Length of sprite data.

Definition at line 27 of file spritecache_internal.h.

Referenced by GetRawSprite(), and LoadNextSprite().

◆ lru

int16_t SpriteCache::lru

Definition at line 29 of file spritecache_internal.h.

◆ ptr

void* SpriteCache::ptr

Definition at line 24 of file spritecache_internal.h.

◆ type

SpriteType SpriteCache::type

In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour sprite. If the recolour sprite gets into the cache it might be drawn as real sprite which causes enormous trouble.

Definition at line 30 of file spritecache_internal.h.

Referenced by GetRawSprite(), GetSpriteType(), GfxClearFontSpriteCache(), HandleInvalidSpriteRequest(), LoadNextSprite(), and ReadSprite().

◆ warned

bool SpriteCache::warned

True iff the user has been warned about incorrect use of this sprite.

Definition at line 31 of file spritecache_internal.h.

Referenced by HandleInvalidSpriteRequest(), and LoadNextSprite().


The documentation for this struct was generated from the following file: