(svn r18718) -Codechange: make a wrapper macro for looping TileAreas
This commit is contained in:
@@ -347,6 +347,16 @@ uint DistanceFromEdge(TileIndex); ///< shortest distance from any edge of the ma
|
||||
for (uint var = tile, cur_h = (h); cur_h > 0; --cur_h, var += TileDiffXY(0, 1) - (w)) \
|
||||
for (uint cur_w = (w); cur_w > 0; --cur_w, var++)
|
||||
|
||||
/**
|
||||
* A loop which iterates over the tiles of a TileArea
|
||||
*
|
||||
* This macro starts 2 nested loops which iterates over a square of tiles.
|
||||
*
|
||||
* @param var The name of the variable which contains the current tile
|
||||
* @param ta The tile area to search over
|
||||
*/
|
||||
#define TILE_AREA_LOOP(var, ta) TILE_LOOP(var, ta.w, ta.h, ta.tile)
|
||||
|
||||
/**
|
||||
* Convert a DiagDirection to a TileIndexDiff
|
||||
*
|
||||
|
Reference in New Issue
Block a user