(svn r16966) -Codechange: BEGIN_TILE_LOOP and END_TILE_LOOP reworked into TILE_LOOP, which means no more duplication of parameters between BEGIN_TILE_LOOP and END_TILE_LOOP

This commit is contained in:
rubidium
2009-07-26 21:50:30 +00:00
parent 47a37b6093
commit 2ec12a3f58
13 changed files with 71 additions and 87 deletions

View File

@@ -389,7 +389,7 @@ bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigge
{
bool ret = true;
uint32 random = Random();
BEGIN_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
TILE_LOOP(tile, ind->width, ind->height, ind->xy) {
if (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == ind->index) {
if (StartStopIndustryTileAnimation(tile, iat, random)) {
SB(random, 0, 16, Random());
@@ -397,7 +397,7 @@ bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigge
ret = false;
}
}
END_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
}
return ret;
}
@@ -433,9 +433,9 @@ void TriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger)
void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger)
{
BEGIN_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
TILE_LOOP(tile, ind->width, ind->height, ind->xy) {
if (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == ind->index) {
DoTriggerIndustryTile(tile, trigger, ind);
}
END_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
}
}