Mercurial > hg > openttd
changeset 947:d75fac0ea123 draft
(svn r1437) -Fix: Safetileadd preprocessor magic is the same as for GCC and no longer extern
author | darkvater <darkvater@openttd.org> |
---|---|
date | Sat, 08 Jan 2005 23:59:49 +0000 |
parents | 45abacd24857 |
children | a28b2ff7514e |
files | macros.h misc.c |
diffstat | 2 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.h +++ b/macros.h @@ -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))
--- a/misc.c +++ b/misc.c @@ -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);