summaryrefslogtreecommitdiff
path: root/macros.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-07-24 15:56:31 +0000
committercelestar <celestar@openttd.org>2005-07-24 15:56:31 +0000
commit238e47cd42c009f2ab1359428788a65a26fafebb (patch)
treee02fce527cef08bc25354c995fecc8ddb0ab5318 /macros.h
parenta227065ab75d6cb9f449f2282315adc933450b49 (diff)
downloadopenttd-238e47cd42c009f2ab1359428788a65a26fafebb.tar.xz
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
by enums. There remains work in gfx.c to move the "transparency" and "recolor" bits around to make space for more sprites. However, 2800 additional sprites can now be loaded. There also remains cleanup and Doxygen work on many of the header files.
Diffstat (limited to 'macros.h')
-rw-r--r--macros.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/macros.h b/macros.h
index 28004d144..a335b05e3 100644
--- a/macros.h
+++ b/macros.h
@@ -60,8 +60,8 @@ static inline int64 BIGMULS(int32 a, int32 b) {
#define SETBITS(x,y) ((x) |= (y))
#define CLRBITS(x,y) ((x) &= ~(y))
-#define PLAYER_SPRITE_COLOR(owner) ((_player_colors[owner] << 16) + 0x3070000)
-#define SPRITE_PALETTE(x) ((x) + 0x8000)
+#define PLAYER_SPRITE_COLOR(owner) ( (_player_colors[owner] + 0x307) << PALETTE_SPRITE_START)
+#define SPRITE_PALETTE(x) ((x) | PALETTE_MODIFIER_COLOR)
extern const byte _ffb_64[128];
/* Returns the position of the first bit that is not zero, counted from the