summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-12 14:10:35 +0000
committerrubidium <rubidium@openttd.org>2008-01-12 14:10:35 +0000
commitac528411df2e42e066ab301517bd85743162f356 (patch)
treedd717901825d2b9701f42a6a4bedb895deb3017a /src/players.cpp
parentcbbc53e8f84067cae60c6f2e8e00682c968430a7 (diff)
downloadopenttd-ac528411df2e42e066ab301517bd85743162f356.tar.xz
(svn r11818) -Codechange: split player.h into smaller pieces.
Diffstat (limited to 'src/players.cpp')
-rw-r--r--src/players.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/players.cpp b/src/players.cpp
index 3945b2424..c2f587f9a 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -7,7 +7,8 @@
#include "engine.h"
#include "table/strings.h"
#include "table/sprites.h"
-#include "player.h"
+#include "player_func.h"
+#include "player_gui.h"
#include "town.h"
#include "station.h"
#include "news.h"
@@ -35,6 +36,14 @@
#include "road_func.h"
#include "rail.h"
+Player _players[MAX_PLAYERS];
+PlayerByte _local_player;
+PlayerByte _current_player;
+/* NOSAVE: can be determined from player structs */
+byte _player_colors[MAX_PLAYERS];
+PlayerFace _player_face; ///< for player face storage in openttd.cfg
+HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
+
/**
* Sets the local player and updates the patch settings that are set on a
* per-company (player) basis to reflect the core's state in the GUI.
@@ -58,6 +67,11 @@ void SetLocalPlayer(PlayerID new_player)
}
}
+bool IsHumanPlayer(PlayerID pi)
+{
+ return !GetPlayer(pi)->is_ai;
+}
+
uint16 GetDrawStringPlayerColor(PlayerID player)
{