diff options
author | tron <tron@openttd.org> | 2004-12-03 07:43:00 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-03 07:43:00 +0000 |
commit | c00258237e0fd63d23fb2015c78c070b72b2e9d9 (patch) | |
tree | e39a57439be0a2878fec3147140ca4e16f6b00e6 /functions.h | |
parent | b7f0b278fbff5721557c2f7d06f0f1892ed7bd39 (diff) | |
download | openttd-c00258237e0fd63d23fb2015c78c070b72b2e9d9.tar.xz |
(svn r907) Sprinkle holy ANSI water:
- "inline" must before the return type (and after "static")
- Initialise all struct members, not just some of them
- Remove (one) spurious semicolon
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); |