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

@@ -58,7 +58,7 @@ uint32 GetRelativePosition(TileIndex tile, TileIndex ind_tile)
return ((y & 0xF) << 20) | ((x & 0xF) << 16) | (y << 8) | x;
}
/* virtual */ uint32 IndustryTileScopeResolver::GetVariable(byte variable, uint32 parameter, bool *available) const
/* virtual */ uint32 IndustryTileScopeResolver::GetVariable(byte variable, uint32 parameter, GetVariableExtra *extra) const
{
switch (variable) {
/* Construction state of the tile: a value between 0 and 3 */
@@ -95,7 +95,7 @@ uint32 GetRelativePosition(TileIndex tile, TileIndex ind_tile)
DEBUG(grf, 1, "Unhandled industry tile variable 0x%X", variable);
*available = false;
extra->available = false;
return UINT_MAX;
}