(svn r4425) Fix bug introduced in r4411 : while IS_BYTE_INSIDE, max value is STRICKLY LESS THEN. This caused airports animations to stay unanimated. Industries were similarly affected.

Thanks to Richk67 for finding it.
Also, more Gfx define and use.
This commit is contained in:
belugas
2006-04-15 01:06:53 +00:00
parent 504f88902e
commit ea706f8ead
3 changed files with 19 additions and 7 deletions

View File

@@ -2091,7 +2091,7 @@ static void AnimateTile_Station(TileIndex tile)
// again hardcoded...was a quick hack
// turning radar / windsack on airport
if (IS_BYTE_INSIDE(gfx, GFX_RADAR_LARGE_FIRST, GFX_RADAR_LARGE_LAST)) {
if (IS_BYTE_INSIDE(gfx, GFX_RADAR_LARGE_FIRST, GFX_RADAR_LARGE_LAST+1)) {
if (_tick_counter & 3)
return;
@@ -2101,7 +2101,7 @@ static void AnimateTile_Station(TileIndex tile)
SetStationGfx(tile, gfx);
MarkTileDirtyByTile(tile);
//added - begin
} else if (IS_BYTE_INSIDE(gfx, GFX_RADAR_INTERNATIONAL_FIRST, GFX_RADAR_METROPOLITAN_LAST)) {
} else if (IS_BYTE_INSIDE(gfx, GFX_RADAR_INTERNATIONAL_FIRST, GFX_RADAR_METROPOLITAN_LAST+1)) {
if (_tick_counter & 3)
return;
@@ -2117,7 +2117,7 @@ static void AnimateTile_Station(TileIndex tile)
SetStationGfx(tile, gfx);
MarkTileDirtyByTile(tile);
//added - end
} else if (IS_BYTE_INSIDE(gfx, GFX_WINDSACK_FIRST, GFX_WINDSACK_LAST)) {
} else if (IS_BYTE_INSIDE(gfx, GFX_WINDSACK_FIRST, GFX_WINDSACK_LAST+1)) {
if (_tick_counter & 1)
return;