summaryrefslogtreecommitdiff
path: root/players.c
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
commit26a5b628656eb0fb134553d14c6c884bc53eacf4 (patch)
tree0b28a6b60c9227ace9353683266a32927594287b /players.c
parent74853e619a34f481d141b586a5b2c94fe474b5a0 (diff)
downloadopenttd-26a5b628656eb0fb134553d14c6c884bc53eacf4.tar.xz
(svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme
Diffstat (limited to 'players.c')
-rw-r--r--players.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/players.c b/players.c
index 2a39ed685..45d27f82d 100644
--- a/players.c
+++ b/players.c
@@ -45,7 +45,7 @@ void DrawPlayerFace(uint32 face, int color, int x, int y)
flag |= 2;
/* draw the gradient */
- DrawSprite((color + 0x307) << PALETTE_SPRITE_START | PALETTE_MODIFIER_COLOR | SPR_GRADIENT, x, y);
+ DrawSprite(GENERAL_SPRITE_COLOR(color) | PALETTE_MODIFIER_COLOR | SPR_GRADIENT, x, y);
/* draw the cheeks */
DrawSprite(cheeks_table[flag&3], x, y);
@@ -74,15 +74,15 @@ void DrawPlayerFace(uint32 face, int color, int x, int y)
if (!(flag & 2)) {
if (!(flag & 1)) {
- DrawSprite(high+((val1 * 12 >> 4) + (0x32B | PALETTE_MODIFIER_COLOR)), x, y);
+ DrawSprite(high+((val1 * 12 >> 4) + SPRITE_PALETTE(0x32B)), x, y);
} else {
DrawSprite(high+(val1 + (0x337 | PALETTE_MODIFIER_COLOR)), x, y);
}
} else {
if (!(flag & 1)) {
- DrawSprite(high+((val1 * 11 >> 4) + (0x39A | PALETTE_MODIFIER_COLOR)), x, y);
+ DrawSprite(high+(val1 + SPRITE_PALETTE(0x337)), x, y);
} else {
- DrawSprite(high+(val1 + (0x3B8 | PALETTE_MODIFIER_COLOR)), x, y);
+ DrawSprite(high+(val1 + SPRITE_PALETTE(0x3B8)), x, y);
}
}
}