(svn r18718) -Codechange: make a wrapper macro for looping TileAreas

This commit is contained in:
rubidium
2010-01-04 18:30:10 +00:00
parent 87466a4ed0
commit 3e131e2fec
9 changed files with 23 additions and 13 deletions

View File

@@ -837,7 +837,7 @@ void DeallocateSpecFromStation(BaseStation *st, byte specindex)
ETileArea area = ETileArea(st, INVALID_TILE, TA_WHOLE);
/* Check all tiles over the station to check if the specindex is still in use */
TILE_LOOP(tile, area.w, area.h, area.tile) {
TILE_AREA_LOOP(tile, area) {
if (st->TileBelongsToRailStation(tile) && GetCustomStationSpecIndex(tile) == specindex) {
return;
}
@@ -1076,7 +1076,7 @@ void StationAnimationTrigger(const BaseStation *st, TileIndex tile, StatAnimTrig
ETileArea area = ETileArea(st, tile, tas[trigger]);
/* Check all tiles over the station to check if the specindex is still in use */
TILE_LOOP(tile, area.w, area.h, area.tile) {
TILE_AREA_LOOP(tile, area) {
if (st->TileBelongsToRailStation(tile)) {
const StationSpec *ss = GetStationSpec(tile);
if (ss != NULL && HasBit(ss->anim_triggers, trigger)) {