From ac528411df2e42e066ab301517bd85743162f356 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 12 Jan 2008 14:10:35 +0000 Subject: (svn r11818) -Codechange: split player.h into smaller pieces. --- src/players.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/players.cpp') 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) { -- cgit v1.2.3-54-g00ecf