summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
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)
{