summaryrefslogtreecommitdiff
path: root/player.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-09-15 12:27:00 +0000
committerpeter1138 <peter1138@openttd.org>2006-09-15 12:27:00 +0000
commite47dd91c8b133e548aa8f19e26c78818eaa433c5 (patch)
tree6be6ff0e643324d0e4e0cab08f87ce515f7152ca /player.h
parentd1508bbd6cbcf991fffe03d41918f177a6cec330 (diff)
downloadopenttd-e47dd91c8b133e548aa8f19e26c78818eaa433c5.tar.xz
(svn r6455) - Feature: Add 2cc (two company colours) livery schemes. This replaces the original colour selection window and bumps the saveload version. Liveries are supported for all vehicles, not just those with 2cc support. Thanks to lakie for GUI inspiration.
Diffstat (limited to 'player.h')
-rw-r--r--player.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/player.h b/player.h
index 55c13abce..55aec0ce9 100644
--- a/player.h
+++ b/player.h
@@ -7,6 +7,7 @@
#include "aystar.h"
#include "rail.h"
#include "engine.h"
+#include "livery.h"
typedef struct PlayerEconomyEntry {
int32 income;
@@ -161,6 +162,7 @@ typedef struct Player {
int64 money64; // internal 64-bit version of the money. the 32-bit field will be clamped to plus minus 2 billion
byte player_color;
+ Livery livery[LS_END];
byte player_money_fraction;
byte avail_railtypes;
byte block_preview;
@@ -312,4 +314,11 @@ static inline int32 AddEngineReplacementForPlayer(Player *p, EngineID old_engine
*/
static inline int32 RemoveEngineReplacementForPlayer(Player *p, EngineID engine, uint32 flags) {return RemoveEngineReplacement(&p->engine_renew_list, engine, flags); }
+/**
+ * Reset the livery schemes to the player's primary colour.
+ * This is used on loading games without livery information and on new player start up.
+ * @param p Player to reset.
+ */
+void ResetPlayerLivery(Player *p);
+
#endif /* PLAYER_H */