|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
Common wrapper for all the different sprite group types. More...
#include <newgrf_spritegroup.h>
Public Member Functions | |
| virtual | ~SpriteGroup ()=default |
| Ensure the destructor of the sub classes are called as well. | |
Static Public Member Functions | |
| static ResolverResult | Resolve (const SpriteGroup *group, ResolverObject &object, bool top_level=true) |
| ResolverObject (re)entry point. | |
Data Fields | |
| uint32_t | nfo_line = 0 |
Protected Member Functions | |
| SpriteGroup (SpriteGroupID index) | |
| Create the SpriteGroup. | |
| virtual ResolverResult | Resolve (ResolverObject &object) const =0 |
| Resolves a callback or rerandomisation callback to a NewGRF. | |
Common wrapper for all the different sprite group types.
Definition at line 47 of file newgrf_spritegroup.h.
|
inlineprotected |
Create the SpriteGroup.
| index | Index of the sprite group within the pool. |
Definition at line 53 of file newgrf_spritegroup.h.
Referenced by Resolve(), SpecializedSpriteGroup< T >::SpecializedSpriteGroup(), and ~SpriteGroup().
|
static |
ResolverObject (re)entry point.
This cannot be made a call to a virtual function because virtual functions do not like nullptr and checking for nullptr everywhere is more cumbersome than this little helper function.
| group | the group to resolve for |
| object | information needed to resolve the group |
| top_level | true if this is a top-level SpriteGroup, false if used nested in another SpriteGroup. |
Definition at line 34 of file newgrf_spritegroup.cpp.
References NewGRFProfiler::grffile, Resolve(), and SpriteGroup().
|
protectedpure virtual |
Resolves a callback or rerandomisation callback to a NewGRF.
| object | Information needed to resolve the group. |
Implemented in CallbackResultSpriteGroup, DeterministicSpriteGroup, IndustryProductionSpriteGroup, RandomizedSpriteGroup, RealSpriteGroup, ResultSpriteGroup, and TileLayoutSpriteGroup.
Referenced by DeterministicSpriteGroup::Resolve(), RandomizedSpriteGroup::Resolve(), RealSpriteGroup::Resolve(), Resolve(), and ResolverObject::~ResolverObject().
| uint32_t SpriteGroup::nfo_line = 0 |
Definition at line 65 of file newgrf_spritegroup.h.