Changeset - r12597:caf31ff34da7
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-08-03 09:10:28
rubidium@openttd.org
(svn r17050) -Codechange: replace custom implementation of TILE_LOOP with TILE_LOOP.
1 file changed with 3 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/newgrf_station.cpp
Show inline comments
 
@@ -817,14 +817,10 @@ void DeallocateSpecFromStation(BaseStati
 

	
 
	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 */
0 comments (0 inline, 0 general)