|
OpenTTD Source 20260711-master-g3fb3006dff
|
Action 2 handling. More...
#include "core/pool_type.hpp"#include "town_type.h"#include "engine_type.h"#include "house_type.h"#include "industry_type.h"#include "newgrf_callbacks.h"#include "newgrf_generic.h"#include "newgrf_storage.h"#include "newgrf_commons.h"Go to the source code of this file.
Data Structures | |
| struct | SpriteGroup |
| Common wrapper for all the different sprite group types. More... | |
| struct | SpecializedSpriteGroup< T > |
| Class defining some overloaded accessors so we don't have to cast SpriteGroups that often. More... | |
| struct | RealSpriteGroup |
| 'Real' sprite groups contain a list of other result or callback sprite groups. More... | |
| struct | DeterministicSpriteGroupAdjust |
| struct | DeterministicSpriteGroupResult |
| struct | DeterministicSpriteGroupRange |
| struct | DeterministicSpriteGroup |
| struct | RandomizedSpriteGroup |
| struct | CallbackResultSpriteGroup |
| This contains a callback result. More... | |
| struct | ResultSpriteGroup |
| A result sprite group returns the first SpriteID and the number of sprites in the set. More... | |
| struct | TileLayoutSpriteGroup |
| Action 2 sprite layout for houses, industry tiles, objects and airport tiles. More... | |
| struct | IndustryProductionSpriteGroup |
| struct | ScopeResolver |
| Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope). More... | |
| struct | ResolverObject |
| Interface for #SpriteGroup-s to access the gamestate. More... | |
| struct | SpecializedResolverObject< RandomTriggers > |
| Specialization of ResolverObject with type-safe access to RandomTriggers. More... | |
Typedefs | |
| using | CallbackResult = uint16_t |
| using | ResolverResult = std::variant<std::monostate, CallbackResult, const ResultSpriteGroup *, const TileLayoutSpriteGroup *, const IndustryProductionSpriteGroup *> |
| Result of resolving sprite groups: | |
| using | SpriteGroupID = PoolID<uint32_t, struct SpriteGroupIDTag, 1U << 30, 0xFFFFFFFF> |
| using | SpriteGroupPool = Pool<SpriteGroup, SpriteGroupID, 1024, PoolType::Data> |
Enumerations | |
| enum class | VarSpriteGroupScope : uint8_t { Self , Parent , Relative , End } |
| Shared by deterministic and random groups. More... | |
| enum class | DeterministicSpriteGroupSize : uint8_t { Byte , Word , DWord } |
| Deterministic sprite group variable size. More... | |
| enum class | DeterministicSpriteGroupAdjustType : uint8_t { None , Div , Mod } |
| Deterministic sprite group adjust type. More... | |
| enum class | DeterministicSpriteGroupAdjustOperation : uint8_t { Add , Sub , SMin , SMax , UMin , UMax , SDiv , SMod , UDiv , UMod , Mul , And , Or , Xor , Sto , Rst , Stop , Ror , SCmp , UCmp , Shl , Shr , Sar } |
| Deterministic sprite group adjust operation. More... | |
| enum class | RandomizedSpriteGroupCompareMode : uint8_t { Any , All } |
| Randomized sprite group comparisation mode. More... | |
Variables | |
| SpriteGroupPool | _spritegroup_pool |
Action 2 handling.
Definition in file newgrf_spritegroup.h.
| using CallbackResult = uint16_t |
Definition at line 29 of file newgrf_spritegroup.h.
| using ResolverResult = std::variant<std::monostate, CallbackResult, const ResultSpriteGroup *, const TileLayoutSpriteGroup *, const IndustryProductionSpriteGroup *> |
Result of resolving sprite groups:
Definition at line 37 of file newgrf_spritegroup.h.
| using SpriteGroupID = PoolID<uint32_t, struct SpriteGroupIDTag, 1U << 30, 0xFFFFFFFF> |
Definition at line 42 of file newgrf_spritegroup.h.
| using SpriteGroupPool = Pool<SpriteGroup, SpriteGroupID, 1024, PoolType::Data> |
Definition at line 43 of file newgrf_spritegroup.h.
|
strong |
Deterministic sprite group adjust operation.
Definition at line 141 of file newgrf_spritegroup.h.
|
strong |
Deterministic sprite group adjust type.
| Enumerator | |
|---|---|
| None | No adjustment. |
| Div | Apply divide adjustment to value. |
| Mod | Apply modulus adjustment to value. |
Definition at line 134 of file newgrf_spritegroup.h.
|
strong |
Deterministic sprite group variable size.
| Enumerator | |
|---|---|
| Byte | Treat variable as a Byte. |
| Word | Treat variable as a Word. |
| DWord | Treat variable as a DWord. |
Definition at line 127 of file newgrf_spritegroup.h.
|
strong |
Randomized sprite group comparisation mode.
| Enumerator | |
|---|---|
| Any | Match if any bit is triggered. |
| All | Match if all bits are triggered. |
Definition at line 213 of file newgrf_spritegroup.h.
|
strong |
Shared by deterministic and random groups.
| Enumerator | |
|---|---|
| Self | Resolved object itself. |
| Parent | Related object of the resolved one. |
| Relative | Relative position (vehicles only). |
| End | End marker. |
Definition at line 118 of file newgrf_spritegroup.h.