# HG changeset patch # User darkvater # Date 1105228789 0 # Node ID 291219080ca47658d3dc9d7e04c55db0d9cef48c # Parent 81cf624bbdc5d809d9d701d1e33d7d58537c30ac (svn r1437) -Fix: Safetileadd preprocessor magic is the same as for GCC and no longer extern diff -r 81cf624bbdc5 -r 291219080ca4 macros.h --- a/macros.h Sat Jan 08 20:55:21 2005 +0000 +++ b/macros.h Sat Jan 08 23:59:49 2005 +0000 @@ -81,16 +81,12 @@ #define TILE_ASSERT(x) assert( TILE_MASK(x) == (x) ); -extern uint SafeTileAdd(uint x, int add, const char *exp, const char *file, int line); +uint SafeTileAdd(uint x, int add, const char *exp, const char *file, int line); #if !defined(_DEBUG) # define TILE_ADD(x,y) ((x)+(y)) #else -# if defined(__GNUC__) -# define TILE_ADD(x,y) (SafeTileAdd((x),(y), #x ", " #y, __FILE__, __LINE__)) -# else -# define TILE_ADD(x,y) (SafeTileAdd((x),(y), #x ## ", " ## #y, __FILE__, __LINE__)) -# endif +# define TILE_ADD(x,y) (SafeTileAdd((x),(y), #x ", " #y, __FILE__, __LINE__)) #endif #define TILE_ADDXY(tile, x, y) TILE_ADD(tile, TILE_XY(x,y)) diff -r 81cf624bbdc5 -r 291219080ca4 misc.c --- a/misc.c Sat Jan 08 20:55:21 2005 +0000 +++ b/misc.c Sat Jan 08 23:59:49 2005 +0000 @@ -730,7 +730,7 @@ } -extern uint SafeTileAdd(uint tile, int add, const char *exp, const char *file, int line) +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);