(svn r1437) -Fix: Safetileadd preprocessor magic is the same as for GCC and no longer extern
authordarkvater
Sat, 08 Jan 2005 23:59:49 +0000
changeset 947 291219080ca4
parent 946 81cf624bbdc5
child 948 4b3f777634ab
(svn r1437) -Fix: Safetileadd preprocessor magic is the same as for GCC and no longer extern
macros.h
misc.c
--- 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))
--- 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);