From 55e6b4f928656c23b1f8bb5cbb3763152213a0b0 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 9 Jan 2005 17:55:11 +0000 Subject: (svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and make the latter map size agnostic --- misc.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 81aa6601f..f439bad8b 100644 --- a/misc.c +++ b/misc.c @@ -730,27 +730,6 @@ int FindFirstBit(uint32 value) } -uint SafeTileAdd(uint tile, int add, const char *exp, const char *file, int line) -{ - uint x = TileX(tile) + (signed char)(add & 0xFF); - uint y = TileY(tile) + ((((0x8080 + add)>>8) & 0xFF) - 0x80); - - if (x >= MapSizeX() || y >= MapSizeY()) { - char buf[512]; - - sprintf(buf, "TILE_ADD(%s) when adding 0x%.4X and %d failed", exp, tile, add); -#if !defined(_DEBUG) || !defined(_MSC_VER) - fprintf(stderr, "%s:%d %s\n", file, line, buf); -#else - _assert(buf, (char*)file, line); -#endif - } - - assert(TILE_XY(x,y) == TILE_MASK(tile + add)); - - return TILE_XY(x,y); -} - static void Save_NAME() { int i; -- cgit v1.2.3-54-g00ecf