Mercurial > hg > openttd
changeset 12607:58a2a1840d79 draft
(svn r17050) -Codechange: replace custom implementation of TILE_LOOP with TILE_LOOP.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Mon, 03 Aug 2009 09:10:28 +0000 |
parents | d5e45bbaee7b |
children | e260c3e0576e |
files | src/newgrf_station.cpp |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -817,14 +817,10 @@ ETileArea area = ETileArea(st, INVALID_TILE, TA_WHOLE); /* Check all tiles over the station to check if the specindex is still in use */ - for (uint y = 0; y < area.h; y++) { - for (uint x = 0; x < area.w; x++) { - if (st->TileBelongsToRailStation(area.tile) && GetCustomStationSpecIndex(area.tile) == specindex) { - return; - } - area.tile += TileDiffXY(1, 0); + TILE_LOOP(tile, area.w, area.h, area.tile) { + if (st->TileBelongsToRailStation(tile) && GetCustomStationSpecIndex(tile) == specindex) { + return; } - area.tile += TileDiffXY(-area.w, 1); } /* This specindex is no longer in use, so deallocate it */