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

@@ -6354,6 +6354,19 @@ static void SkipAct5(ByteReader *buf)
*/
bool GetGlobalVariable(byte param, uint32 *value, const GRFFile *grffile)
{
if (_sprite_group_resolve_check_veh_check) {
switch (param) {
case 0x00:
case 0x02:
case 0x09:
case 0x0A:
case 0x20:
case 0x23:
_sprite_group_resolve_check_veh_check = false;
break;
}
}
switch (param) {
case 0x00: // current date
*value = max(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0);