summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-08-28 06:21:48 +0000
committertron <tron@openttd.org>2006-08-28 06:21:48 +0000
commit523519c8ec4db318d151051a9b6281767136f314 (patch)
treee401abd666512b3bae48f7f2f9aba66ba123e5cb /players.c
parent3c844b6391393762f6eb70eb91e17fcec1c1df1c (diff)
downloadopenttd-523519c8ec4db318d151051a9b6281767136f314.tar.xz
(svn r6183) Move GetDrawStringPlayerColor() out of gfx.[ch]
Diffstat (limited to 'players.c')
-rw-r--r--players.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/players.c b/players.c
index 041728e8a..90b041c89 100644
--- a/players.c
+++ b/players.c
@@ -27,6 +27,17 @@
#include "ai/ai.h"
#include "date.h"
+
+uint16 GetDrawStringPlayerColor(PlayerID player)
+{
+ /* Get the color for DrawString-subroutines which matches the color of the
+ * player
+ */
+ if (player == OWNER_SPECTATOR || player == OWNER_SPECTATOR - 1) return 1;
+ return (_color_list[_player_colors[player]].window_color_1b) | IS_PALETTE_COLOR;
+}
+
+
static const SpriteID cheeks_table[4] = {
0x325, 0x326,
0x390, 0x3B0,