|
OpenTTD Source 20260311-master-g511d3794ce
|
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) | |
| 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 |
Definition at line 49 of file newgrf_spritegroup.h.
|
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, and Resolve().
|
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 61 of file newgrf_spritegroup.h.