summaryrefslogtreecommitdiff
path: root/macros.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-03-24 18:16:39 +0000
committerbelugas <belugas@openttd.org>2006-03-24 18:16:39 +0000
commited86c3d818e8f61b2fe5cf7344a6db556ad87a34 (patch)
tree0b28a6b60c9227ace9353683266a32927594287b /macros.h
parentbdfe20ae739e5cacd5d8ee90b48d6467841293bc (diff)
downloadopenttd-ed86c3d818e8f61b2fe5cf7344a6db556ad87a34.tar.xz
(svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme
Diffstat (limited to 'macros.h')
-rw-r--r--macros.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/macros.h b/macros.h
index 7371d13fa..8f1064a0d 100644
--- a/macros.h
+++ b/macros.h
@@ -67,7 +67,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] + 0x307) << PALETTE_SPRITE_START)
+#define GENERAL_SPRITE_COLOR(color) ( (color + PALETTE_RECOLOR_START) << PALETTE_SPRITE_START)
+#define PLAYER_SPRITE_COLOR(owner) ( GENERAL_SPRITE_COLOR(_player_colors[owner]))
#define SPRITE_PALETTE(x) ((x) | PALETTE_MODIFIER_COLOR)
extern const byte _ffb_64[128];