|
OpenTTD Source 20260505-master-g275ba48eea
|
Helper class to invoke a GrfChangeInfoHandler. More...
Public Types | |
| using | Invoker = ChangeInfoResult(*)(uint first, uint last, int prop, ByteReader &buf, GrfLoadingStage stage) |
| The function prototype for a change info handler. | |
Static Public Member Functions | |
| template<GrfSpecFeature TFeature> | |
| static ChangeInfoResult | Invoke (uint first, uint last, int prop, ByteReader &buf, GrfLoadingStage stage) |
| Invoke the change info handler for a specific feature. | |
| static ChangeInfoResult | Invoke (GrfSpecFeature feature, uint first, uint last, int prop, ByteReader &buf, GrfLoadingStage stage) |
| Invoke the change info handler for a specific feature. | |
Static Public Attributes | |
| static constexpr EnumIndexArray< Invoker, GrfSpecFeature, GrfSpecFeature::End > | funcs |
| List of invoke handlers for each feature. | |
Helper class to invoke a GrfChangeInfoHandler.
Definition at line 142 of file newgrf_act0.cpp.
| using InvokeGrfChangeInfoHandler::Invoker = ChangeInfoResult(*)(uint first, uint last, int prop, ByteReader &buf, GrfLoadingStage stage) |
The function prototype for a change info handler.
Definition at line 164 of file newgrf_act0.cpp.
|
inlinestatic |
Invoke the change info handler for a specific feature.
| feature | The feature. |
| first | The first id of the feature instance (engine, station, ...) to activate for. |
| last | The id to stop iterating at (exclusive). |
| prop | The property to activate for. |
| buf | The buffer containing the sprite data. |
| stage | The current loading stage. |
Definition at line 186 of file newgrf_act0.cpp.
References funcs, to_underlying(), and Unknown.
|
inlinestatic |
Invoke the change info handler for a specific feature.
| TFeature | The feature. |
| first | The first id of the feature instance (engine, station, ...) to activate for. |
| last | The id to stop iterating at (exclusive). |
| prop | The property to activate for. |
| buf | The buffer containing the sprite data. |
| stage | The current loading stage. |
Definition at line 154 of file newgrf_act0.cpp.
References GrfChangeInfoHandler< TFeature >::Activation(), Activation, GrfChangeInfoHandler< TFeature >::Reserve(), and Reserve.
|
staticconstexpr |
List of invoke handlers for each feature.
Definition at line 167 of file newgrf_act0.cpp.
Referenced by Invoke().