diff options
Diffstat (limited to 'functions.h')
-rw-r--r-- | functions.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/functions.h b/functions.h index a78b1f7ed..54c2904dc 100644 --- a/functions.h +++ b/functions.h @@ -37,13 +37,20 @@ enum { bool IsValidTile(uint tile); +static inline Point RemapCoords(int x, int y, int z) +{ #if !defined(NEW_ROTATION) -static Point FORCEINLINE RemapCoords(int x, int y, int z) { Point pt = { (y-x)*2, y + x -z }; return pt; } + Point pt = { (y - x) * 2, y + x - z }; #else -static Point FORCEINLINE RemapCoords(int x, int y, int z) { Point pt = { (x + y)*2, x - y -z }; return pt; } + Point pt = { (x + y) * 2, x - y - z }; #endif + return pt; +} -static Point FORCEINLINE RemapCoords2(int x, int y) { return RemapCoords(x, y, GetSlopeZ(x, y)); } +static inline Point RemapCoords2(int x, int y) +{ + return RemapCoords(x, y, GetSlopeZ(x, y)); +} /* game.c */ byte *GetString(byte *buffr, uint16 string); |