Add several NewGRF variables to vehicle image callback whitelist

Add vehicle flags to control cached image invalidation

Various refactorings
This commit is contained in:
Jonathan G Rennison
2020-08-25 01:26:44 +01:00
parent c82d372d54
commit 810bfd276e
45 changed files with 325 additions and 161 deletions

View File

@@ -230,7 +230,7 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte local_id, uint32 grfid,
}
/** Used by the resolver to get values for feature 0F deterministic spritegroups. */
/* virtual */ uint32 ObjectScopeResolver::GetVariable(byte variable, uint32 parameter, bool *available) const
/* virtual */ uint32 ObjectScopeResolver::GetVariable(byte variable, uint32 parameter, GetVariableExtra *extra) const
{
/* We get the town from the object, or we calculate the closest
* town if we need to when there's no object. */
@@ -337,7 +337,7 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte local_id, uint32 grfid,
unhandled:
DEBUG(grf, 1, "Unhandled object variable 0x%X", variable);
*available = false;
extra->available = false;
return UINT_MAX;
}