diff options
author | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
commit | 524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a (patch) | |
tree | 80b15078ff5a1c09815ccb23f4c9e7629774dae4 /players.c | |
parent | b34de09e627fc5f8d7579c96c8b4290593c1dd32 (diff) | |
download | openttd-524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a.tar.xz |
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
Diffstat (limited to 'players.c')
-rw-r--r-- | players.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -155,12 +155,12 @@ void DrawPlayerFace(uint32 face, int color, int x, int y) uint val = GB(face, 20, 8); if (!(flag&1)) { - DrawSprite(0x36B + ((val&3)*3>>2), x, y); - DrawSprite(0x36E + ((val>>2)&3), x, y); - DrawSprite(0x372 + ((val>>4)*6>>4), x, y); + DrawSprite(0x36B + (GB(val, 0, 2) * 3 >> 2), x, y); + DrawSprite(0x36E + (GB(val, 2, 2) * 4 >> 2), x, y); + DrawSprite(0x372 + (GB(val, 4, 4) * 6 >> 4), x, y); } else { - DrawSprite(0x378 + ((val&3)*3>>2), x, y); - DrawSprite(0x37B + ((val>>2)&3), x, y); + DrawSprite(0x378 + (GB(val, 0, 2) * 3 >> 2), x, y); + DrawSprite(0x37B + (GB(val, 2, 2) * 4 >> 2), x, y); val >>= 4; if (val < 3) { |