summaryrefslogtreecommitdiff
path: root/player.h
diff options
context:
space:
mode:
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 */