OpenTTD Source 20241224-master-gf74b0cf984
|
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 (uint8_t feature, SpriteID first_sprite, uint first_set, uint numsets, uint numents) |
Records new spritesets. | |
bool | HasValidSpriteSets (uint8_t feature) const |
Check whether there are any valid spritesets for a feature. | |
bool | IsValidSpriteSet (uint8_t feature, uint set) const |
Check whether a specific set is defined. | |
SpriteID | GetSprite (uint8_t feature, uint set) const |
Returns the first sprite of a spriteset. | |
uint | GetNumEnts (uint8_t 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) | |
const 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 89 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 138 of file newgrf.cpp.
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 118 of file newgrf.cpp.
Referenced by LoadNewGRF(), and LoadNewGRFFileFromFile().
|
inline |
Returns the number of sprites in a spriteset.
feature | GrfSpecFeature to query. |
set | Set to query. |
Definition at line 191 of file newgrf.cpp.
References IsValidSpriteSet().
Referenced by CreateGroupFromGroupID(), and ReadSpriteLayoutSprite().
|
inline |
Returns the first sprite of a spriteset.
feature | GrfSpecFeature to query. |
set | Set to query. |
Definition at line 179 of file newgrf.cpp.
References IsValidSpriteSet().
Referenced by CreateGroupFromGroupID(), and ReadSpriteLayoutSprite().
|
inline |
Check whether there are any valid spritesets for a feature.
feature | GrfSpecFeature to check. |
Definition at line 154 of file newgrf.cpp.
|
inline |
Check whether a specific set is defined.
feature | GrfSpecFeature to check. |
set | Set to check. |
Definition at line 167 of file newgrf.cpp.
Referenced by CreateGroupFromGroupID(), GetNumEnts(), GetSprite(), and ReadSpriteLayoutSprite().
SpriteFile* GrfProcessingState::file |
File of currently processed GRF file.
Definition at line 106 of file newgrf.cpp.
Referenced by DefineGotoLabel(), ImportGRFSound(), LoadFontGlyph(), LoadGRFSound(), and LoadNewGRFFileFromFile().
GRFConfig* GrfProcessingState::grfconfig |
Config of the currently processed GRF file.
Definition at line 108 of file newgrf.cpp.
Referenced by ChangeGRFBlitter(), ChangeGRFDescription(), ChangeGRFMinVersion(), ChangeGRFName(), ChangeGRFNumUsedParams(), ChangeGRFPalette(), ChangeGRFParamDefault(), ChangeGRFParamDescription(), ChangeGRFParamName(), ChangeGRFParamValueNames(), ChangeGRFURL(), ChangeGRFVersion(), DisableGrf(), DisableStaticNewGRFInfluencingNonStaticNewGRFs(), GetGlobalVariable(), GrfMsgI(), GRFUnsafe(), HandleParameterInfo(), LoadNewGRFFileFromFile(), and ParamSet().
GRFFile* GrfProcessingState::grffile |
Currently processed GRF file.
Definition at line 107 of file newgrf.cpp.
Referenced by AddStringForMapping(), AircraftVehicleChangeInfo(), AirportChangeInfo(), BridgeChangeInfo(), BuildCargoTranslationMap(), CanalChangeInfo(), CargoChangeInfo(), DefineGotoLabel(), DisableGrf(), FeatureTownName(), GetCurrentGRFOverride(), GetGlobalVariable(), GlobalVarChangeInfo(), IndustriesChangeInfo(), IndustrytilesChangeInfo(), InitNewGRFFile(), IsGRMReservedSprite(), LoadNewGRF(), LoadNewGRFFile(), LoadTranslationTable(), ObjectChangeInfo(), ParamSet(), RailTypeChangeInfo(), RailVehicleChangeInfo(), ResetNewGRF(), RoadTypeChangeInfo(), RoadVehicleChangeInfo(), ShipVehicleChangeInfo(), SoundEffectChangeInfo(), StationChangeInfo(), TownHouseChangeInfo(), TranslateGRFStrings(), and TranslateRefitMask().
uint32_t GrfProcessingState::nfo_line |
Currently processed pseudo sprite number in the GRF.
Definition at line 109 of file newgrf.cpp.
Referenced by DefineGotoLabel(), DisableGrf(), GrfMsgI(), LoadFontGlyph(), LoadNewGRFFileFromFile(), and ParamSet().
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 112 of file newgrf.cpp.
Referenced by DisableGrf(), GRFUnsafe(), LoadNewGRFFileFromFile(), ParamSet(), ReadSpriteLayout(), SkipAct12(), and StationChangeInfo().
const SpriteGroup* GrfProcessingState::spritegroups[MAX_SPRITEGROUP+1] |
Definition at line 115 of file newgrf.cpp.
SpriteID GrfProcessingState::spriteid |
First available SpriteID for loading realsprites.
Definition at line 103 of file newgrf.cpp.
Referenced by CreateGroupFromGroupID(), LoadFontGlyph(), LoadNewGRF(), and ParamSet().
|
private |
Currently referenceable spritesets.
Definition at line 98 of file newgrf.cpp.
GrfLoadingStage GrfProcessingState::stage |
Current loading stage.
Definition at line 102 of file newgrf.cpp.
Referenced by LoadNewGRF(), and ParamSet().