diff options
author | tron <tron@openttd.org> | 2005-01-03 12:56:22 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-03 12:56:22 +0000 |
commit | 32bfe0dddde81d016cb8de15e6a41bca3506d7be (patch) | |
tree | 04b3f2dd580a9cd8387358c91a0cfcf95a525153 /station_cmd.c | |
parent | 4c14afba4eae4bbfe3d448eeaa072e11b326c78a (diff) | |
download | openttd-32bfe0dddde81d016cb8de15e6a41bca3506d7be.tar.xz |
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
While here replace one erroneous TILE_MAX_X with MapMaxY()
Diffstat (limited to 'station_cmd.c')
-rw-r--r-- | station_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/station_cmd.c b/station_cmd.c index c1f543814..88d4e47f0 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -414,10 +414,10 @@ void GetProductionAroundTiles(uint *produced, uint tile, int w, int h, int rad) // expand the region by 4 tiles on each side // while making sure that we remain inside the board. - x2 = min(x + w + rad, TILE_X_MAX+1); + x2 = min(x + w + rad, MapSizeX()); x1 = max(x-rad, 0); - y2 = min(y + h + rad, TILE_Y_MAX+1); + y2 = min(y + h + rad, MapSizeY()); y1 = max(y-rad, 0); assert(x1 < x2); @@ -462,8 +462,8 @@ void GetAcceptanceAroundTiles(uint *accepts, uint tile, int w, int h, int rad) // expand the region by 4 tiles on each side // while making sure that we remain inside the board. - x2 = min(x + w + rad, TILE_X_MAX+1); - y2 = min(y + h + rad, TILE_Y_MAX+1); + x2 = min(x + w + rad, MapSizeX()); + y2 = min(y + h + rad, MapSizeY()); x1 = max(x-rad, 0); y1 = max(y-rad, 0); |