|
static const SpriteGroup * | Resolve (const SpriteGroup *group, ResolverObject &object, bool top_level=true) |
| ResolverObject (re)entry point.
|
|
static bool | CanAllocateItem (size_t n=1) |
| Helper functions so we can use PoolItem::Function() instead of _poolitem_pool.Function()
|
|
static bool | CleaningPool () |
| Returns current state of pool cleaning - yes or no.
|
|
static bool | IsValidID (size_t index) |
| Tests whether given index can be used to get valid (non-nullptr) Titem.
|
|
static Titem * | Get (size_t index) |
| Returns Titem with given index.
|
|
static Titem * | GetIfValid (size_t index) |
| Returns Titem with given index.
|
|
static size_t | GetPoolSize () |
| Returns first unused index.
|
|
static size_t | GetNumItems () |
| Returns number of valid items in the pool.
|
|
static void | PostDestructor (size_t index) |
| Dummy function called after destructor of each member.
|
|
static Pool::IterateWrapper< Titem > | Iterate (size_t from=0) |
| Returns an iterable ensemble of all valid Titem.
|
|
|
typedef struct Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero > | Pool |
| Type of the pool this item is going to be part of.
|
|
Definition at line 57 of file newgrf_spritegroup.h.
◆ SpriteGroup()
SpriteGroup::SpriteGroup |
( |
SpriteGroupType |
type | ) |
|
|
inlineprotected |
◆ GetCallbackResult()
virtual uint16_t SpriteGroup::GetCallbackResult |
( |
| ) |
const |
|
inlinevirtual |
◆ GetNumResults()
virtual uint8_t SpriteGroup::GetNumResults |
( |
| ) |
const |
|
inlinevirtual |
◆ GetResult()
virtual SpriteID SpriteGroup::GetResult |
( |
| ) |
const |
|
inlinevirtual |
◆ Resolve() [1/2]
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.
- Parameters
-
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. |
- Returns
- the resolved group
Definition at line 34 of file newgrf_spritegroup.cpp.
References NewGRFProfiler::grffile, and Resolve().
◆ Resolve() [2/2]
Base sprite group resolver.
Reimplemented in RealSpriteGroup, DeterministicSpriteGroup, and RandomizedSpriteGroup.
Definition at line 61 of file newgrf_spritegroup.h.
Referenced by DoTriggerIndustryTile(), DrawNewHouseTileInGUI(), DrawNewObjectTile(), DrawNewObjectTileInGUI(), DrawRoadStopTile(), GetCanalSprite(), GetCustomCargoSprite(), GetCustomRailSprite(), GetCustomRoadSprite(), GetCustomSignalSprite(), GetCustomStationFoundationRelocation(), GetCustomStationRelocation(), IndustryProductionCallback(), ResolverObject::Resolve(), Resolve(), DeterministicSpriteGroup::Resolve(), RandomizedSpriteGroup::Resolve(), TriggerRoadStopRandomisation(), and TriggerStationRandomisation().
◆ nfo_line
uint32_t SpriteGroup::nfo_line |
◆ type
SpriteGroupType SpriteGroup::type |
The documentation for this struct was generated from the following files: