Add NewGRF VarAction2 variable remapping infrastructure

This commit is contained in:
Jonathan G Rennison
2022-01-24 01:17:35 +00:00
parent e56fee612c
commit 33dc6c9688
34 changed files with 229 additions and 42 deletions

View File

@@ -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) {