From c0702318d27d327e449b7f954dd15c0e46403f5c Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 3 Jan 2005 18:59:58 +0000 Subject: (svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) instead of TILES_[XY] --- water_cmd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'water_cmd.c') diff --git a/water_cmd.c b/water_cmd.c index 9815e3a6f..c75cfe2e4 100644 --- a/water_cmd.c +++ b/water_cmd.c @@ -579,8 +579,8 @@ void TileLoop_Water(uint tile) {TILE_XY(0,-1), TILE_XY(0,0), TILE_XY(1,0), TILE_XY(0,-1), TILE_XY(1,-1)}, }; - if ( IS_INT_INSIDE(GET_TILE_X(tile),1,TILES_X-3+1) && - IS_INT_INSIDE(GET_TILE_Y(tile),1,TILES_Y-3+1)) { + if (IS_INT_INSIDE(GET_TILE_X(tile), 1, MapSizeX() - 3 + 1) && + IS_INT_INSIDE(GET_TILE_Y(tile), 1, MapSizeY() - 3 + 1)) { for(i=0; i!=4; i++) TileLoopWaterHelper(tile, _tile_loop_offs_array[i]); } @@ -589,16 +589,16 @@ void TileLoop_Water(uint tile) _current_player = OWNER_NONE; // edges - if ( GET_TILE_X(tile)==0 && IS_INT_INSIDE(GET_TILE_Y(tile),1,TILES_Y-3+1)) //NE + if (GET_TILE_X(tile) == 0 && IS_INT_INSIDE(GET_TILE_Y(tile), 1, MapSizeY() - 3 + 1)) //NE TileLoopWaterHelper(tile, _tile_loop_offs_array[2]); - if ( GET_TILE_X(tile)==(TILES_X-2) && IS_INT_INSIDE(GET_TILE_Y(tile),1,TILES_Y-3+1)) //SW + if (GET_TILE_X(tile) == (MapSizeX() - 2) && IS_INT_INSIDE(GET_TILE_Y(tile), 1, MapSizeY() - 3 + 1)) //SW TileLoopWaterHelper(tile, _tile_loop_offs_array[0]); - if ( GET_TILE_Y(tile)==0 && IS_INT_INSIDE(GET_TILE_X(tile),1,TILES_X-3+1)) //NW + if (GET_TILE_Y(tile) == 0 && IS_INT_INSIDE(GET_TILE_X(tile), 1, MapSizeX() - 3 + 1)) //NW TileLoopWaterHelper(tile, _tile_loop_offs_array[1]); - if ( GET_TILE_Y(tile)==(TILES_Y-2) && IS_INT_INSIDE(GET_TILE_X(tile),1,TILES_X-3+1)) //SE + if (GET_TILE_Y(tile) == (MapSizeY() - 2) && IS_INT_INSIDE(GET_TILE_X(tile), 1, MapSizeX() - 3 + 1)) //SE TileLoopWaterHelper(tile, _tile_loop_offs_array[3]); } -- cgit v1.2.3-54-g00ecf