diff options
author | belugas <belugas@openttd.org> | 2006-03-24 18:16:39 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-03-24 18:16:39 +0000 |
commit | 26a5b628656eb0fb134553d14c6c884bc53eacf4 (patch) | |
tree | 0b28a6b60c9227ace9353683266a32927594287b /players.c | |
parent | 74853e619a34f481d141b586a5b2c94fe474b5a0 (diff) | |
download | openttd-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); } } } |