OpenTTD
|
Temporary data during loading of GRFs. More...
Data Structures | |
struct | SpriteSet |
Definition of a single Action1 spriteset. More... |
Public Member Functions | |
void | ClearDataForNextFile () |
Clear temporary data before processing the next file in the current loading stage. | |
void | AddSpriteSets (byte feature, SpriteID first_sprite, uint first_set, uint numsets, uint numents) |
Records new spritesets. | |
bool | HasValidSpriteSets (byte feature) const |
Check whether there are any valid spritesets for a feature. | |
bool | IsValidSpriteSet (byte feature, uint set) const |
Check whether a specific set is defined. | |
SpriteID | GetSprite (byte feature, uint set) const |
Returns the first sprite of a spriteset. | |
uint | GetNumEnts (byte feature, uint set) const |
Returns the number of sprites in a spriteset. |
Data Fields | |
GrfLoadingStage | stage |
Current loading stage. | |
SpriteID | spriteid |
First available SpriteID for loading realsprites. | |
uint | file_index |
File index of currently processed GRF file. | |
GRFFile * | grffile |
Currently processed GRF file. | |
GRFConfig * | grfconfig |
Config of the currently processed GRF file. | |
uint32 | nfo_line |
Currently processed pseudo sprite number in the GRF. | |
byte | grf_container_ver |
Container format of the current GRF file. | |
int | skip_sprites |
Number of psuedo sprites to skip before processing the next one. (-1 to skip to end of file) | |
SpriteGroup * | spritegroups [MAX_SPRITEGROUP+1] |
Private Attributes | |
std::map< uint, SpriteSet > | spritesets [GSF_END] |
Currently referenceable spritesets. |
Temporary data during loading of GRFs.
Definition at line 81 of file newgrf.cpp.
|
inline |
Records new spritesets.
feature | GrfSpecFeature the set is defined for. |
first_sprite | SpriteID of the first sprite in the set. |
first_set | First spriteset to define. |
numsets | Number of sets to define. |
numents | Number of sprites per set to define. |
Definition at line 131 of file newgrf.cpp.
References spritesets.
|
inline |
Returns the number of sprites in a spriteset.
feature | GrfSpecFeature to query. |
set | Set to query. |
Definition at line 184 of file newgrf.cpp.
References IsValidSpriteSet(), and spritesets.
Referenced by CreateGroupFromGroupID(), and ReadSpriteLayoutSprite().
|
inline |
Returns the first sprite of a spriteset.
feature | GrfSpecFeature to query. |
set | Set to query. |
Definition at line 172 of file newgrf.cpp.
References IsValidSpriteSet(), and spritesets.
Referenced by CreateGroupFromGroupID(), and ReadSpriteLayoutSprite().
|
inline |
Check whether there are any valid spritesets for a feature.
feature | GrfSpecFeature to check. |
Definition at line 147 of file newgrf.cpp.
References spritesets.
|
inline |
Check whether a specific set is defined.
feature | GrfSpecFeature to check. |
set | Set to check. |
Definition at line 160 of file newgrf.cpp.
References spritesets.
Referenced by CreateGroupFromGroupID(), GetNumEnts(), GetSprite(), and ReadSpriteLayoutSprite().