summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-03 18:59:58 +0000
committertron <tron@openttd.org>2005-01-03 18:59:58 +0000
commitc0702318d27d327e449b7f954dd15c0e46403f5c (patch)
tree294d2e8a0c3b227b0a8b5baf6e113d2043432d81 /misc.c
parentd382463f8afad00bc944c3057c2e9a0ac90e721c (diff)
downloadopenttd-c0702318d27d327e449b7f954dd15c0e46403f5c.tar.xz
(svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) instead of TILES_[XY]
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index b9f8e0dcf..2431b0028 100644
--- a/misc.c
+++ b/misc.c
@@ -740,7 +740,7 @@ extern uint SafeTileAdd(uint tile, int add, const char *exp, const char *file, i
int x = GET_TILE_X(tile) + (signed char)(add & 0xFF);
int y = GET_TILE_Y(tile) + ((((0x8080 + add)>>8) & 0xFF) - 0x80);
- if (x < 0 || y < 0 || x >= TILES_X || y >= TILES_Y) {
+ if (x < 0 || y < 0 || x >= MapSizeX() || y >= MapSizeY()) {
char buf[512];
sprintf(buf, "TILE_ADD(%s) when adding 0x%.4X and %d failed", exp, tile, add);