|
OpenTTD Source 20260206-master-g4d4e37dbf1
|
Temporary data during loading of GRFs. More...
#include <newgrf_internal.h>
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 (GrfSpecFeature feature, SpriteID first_sprite, uint first_set, uint numsets, uint numents) |
| Records new spritesets. | |
| bool | HasValidSpriteSets (GrfSpecFeature feature) const |
| Check whether there are any valid spritesets for a feature. | |
| bool | IsValidSpriteSet (GrfSpecFeature feature, uint set) const |
| Check whether a specific set is defined. | |
| SpriteID | GetSprite (GrfSpecFeature feature, uint set) const |
| Returns the first sprite of a spriteset. | |
| uint | GetNumEnts (GrfSpecFeature 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. | |
| SpriteFile * | file |
| File of currently processed GRF file. | |
| GRFFile * | grffile |
| Currently processed GRF file. | |
| GRFConfig * | grfconfig |
| Config of the currently processed GRF file. | |
| uint32_t | nfo_line |
| Currently processed pseudo sprite number in the GRF. | |
| int | skip_sprites |
| Number of pseudo sprites to skip before processing the next one. (-1 to skip to end of file). | |
| std::array< const SpriteGroup *, MAX_SPRITEGROUP+1 > | spritegroups {} |
Private Attributes | |
| std::map< uint, SpriteSet > | spritesets [GSF_END] |
| Currently referenceable spritesets. | |
Temporary data during loading of GRFs.
Definition at line 49 of file newgrf_internal.h.
|
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 98 of file newgrf_internal.h.
References GrfProcessingState::SpriteSet::num_sprites, and GrfProcessingState::SpriteSet::sprite.
|
inline |
Clear temporary data before processing the next file in the current loading stage.
Definition at line 78 of file newgrf_internal.h.
|
inline |
Returns the number of sprites in a spriteset.
| feature | GrfSpecFeature to query. |
| set | Set to query. |
Definition at line 151 of file newgrf_internal.h.
References IsValidSpriteSet().
|
inline |
Returns the first sprite of a spriteset.
| feature | GrfSpecFeature to query. |
| set | Set to query. |
Definition at line 139 of file newgrf_internal.h.
References IsValidSpriteSet().
|
inline |
Check whether there are any valid spritesets for a feature.
| feature | GrfSpecFeature to check. |
Definition at line 114 of file newgrf_internal.h.
|
inline |
Check whether a specific set is defined.
| feature | GrfSpecFeature to check. |
| set | Set to check. |
Definition at line 127 of file newgrf_internal.h.
Referenced by GetNumEnts(), and GetSprite().
| SpriteFile* GrfProcessingState::file |
File of currently processed GRF file.
Definition at line 66 of file newgrf_internal.h.
| GRFConfig* GrfProcessingState::grfconfig |
Config of the currently processed GRF file.
Definition at line 68 of file newgrf_internal.h.
| GRFFile* GrfProcessingState::grffile |
Currently processed GRF file.
Definition at line 67 of file newgrf_internal.h.
| uint32_t GrfProcessingState::nfo_line |
Currently processed pseudo sprite number in the GRF.
Definition at line 69 of file newgrf_internal.h.
| int GrfProcessingState::skip_sprites |
Number of pseudo sprites to skip before processing the next one. (-1 to skip to end of file).
Definition at line 72 of file newgrf_internal.h.
| std::array<const SpriteGroup *, MAX_SPRITEGROUP + 1> GrfProcessingState::spritegroups {} |
Definition at line 75 of file newgrf_internal.h.
| SpriteID GrfProcessingState::spriteid |
First available SpriteID for loading realsprites.
Definition at line 63 of file newgrf_internal.h.
|
private |
Currently referenceable spritesets.
Definition at line 58 of file newgrf_internal.h.
| GrfLoadingStage GrfProcessingState::stage |
Current loading stage.
Definition at line 62 of file newgrf_internal.h.