diff options
author | rubidium <rubidium@openttd.org> | 2009-07-26 21:50:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-26 21:50:30 +0000 |
commit | 2ec12a3f587f4271a2d8ba5e22af233e1094e321 (patch) | |
tree | 114688ff4bf43f5c94891a3fa67b5b172d187323 /src/water_cmd.cpp | |
parent | 47a37b6093c3bb93dba81e4d3440c4098699a849 (diff) | |
download | openttd-2ec12a3f587f4271a2d8ba5e22af233e1094e321.tar.xz |
(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
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index f236219e5..33c53fff3 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -307,7 +307,7 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 /* Outside the editor you can only drag canals, and not areas */ if (_game_mode != GM_EDITOR && (sx != x && sy != y)) return CMD_ERROR; - BEGIN_TILE_LOOP(tile, size_x, size_y, TileXY(sx, sy)) { + TILE_LOOP(tile, size_x, size_y, TileXY(sx, sy)) { CommandCost ret; Slope slope = GetTileSlope(tile, NULL); @@ -335,7 +335,7 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 } cost.AddCost(_price.clear_water); - } END_TILE_LOOP(tile, size_x, size_y, 0); + } if (cost.GetCost() == 0) { return_cmd_error(STR_ERROR_ALREADY_BUILT); @@ -749,11 +749,11 @@ static void FloodVehicles(TileIndex tile) if (!_settings_game.station.nonuniform_stations && IsTileType(tile, MP_STATION) && GetStationType(tile) == STATION_RAIL) { const Station *st = Station::GetByTile(tile); - BEGIN_TILE_LOOP(t, st->train_station.w, st->train_station.h, st->train_station.tile) + TILE_LOOP(t, st->train_station.w, st->train_station.h, st->train_station.tile) { if (st->TileBelongsToRailStation(t)) { FindVehicleOnPos(tile, &z, &FloodVehicleProc); } - END_TILE_LOOP(t, st->train_station.w, st->train_station.h, st->train_station.tile) + } return; } |