Add NewGRF VarAction2 variable remapping infrastructure
This commit is contained in:
@@ -42,7 +42,7 @@ struct GenericScopeResolver : public ScopeResolver {
|
||||
{
|
||||
}
|
||||
|
||||
uint32 GetVariable(byte variable, uint32 parameter, GetVariableExtra *extra) const override;
|
||||
uint32 GetVariable(uint16 variable, uint32 parameter, GetVariableExtra *extra) const override;
|
||||
|
||||
private:
|
||||
bool ai_callback; ///< Callback comes from the AI.
|
||||
@@ -119,7 +119,7 @@ void AddGenericCallback(uint8 feature, const GRFFile *file, const SpriteGroup *g
|
||||
_gcl[feature].push_front(GenericCallback(file, group));
|
||||
}
|
||||
|
||||
/* virtual */ uint32 GenericScopeResolver::GetVariable(byte variable, uint32 parameter, GetVariableExtra *extra) const
|
||||
/* virtual */ uint32 GenericScopeResolver::GetVariable(uint16 variable, uint32 parameter, GetVariableExtra *extra) const
|
||||
{
|
||||
if (this->ai_callback) {
|
||||
switch (variable) {
|
||||
|
||||
Reference in New Issue
Block a user