author | belugas |
Thu, 10 Jan 2008 00:53:17 +0000 | |
changeset 8240 | 0a10b565233a |
parent 8237 | 6f925c9cf836 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
3 |
/** @file player.h */ |
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
4 |
|
0 | 5 |
#ifndef PLAYER_H |
6 |
#define PLAYER_H |
|
7 |
||
8236
8a5dd0b42e47
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8229
diff
changeset
|
8 |
#include "road_type.h" |
8a5dd0b42e47
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8229
diff
changeset
|
9 |
#include "rail_type.h" |
8140
0d0d8c94f84b
(svn r11702) -Codechange: move all date related stuff to date*.
rubidium
parents:
8121
diff
changeset
|
10 |
#include "date_type.h" |
2573
7a1e72905161
(svn r3110) Replace another 256 with TOTAL_NUM_ENGINES.
peter1138
parents:
2544
diff
changeset
|
11 |
#include "engine.h" |
4603
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
12 |
#include "livery.h" |
8212
cf3fce5c7464
(svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location.
rubidium
parents:
8140
diff
changeset
|
13 |
#include "autoreplace_type.h" |
8237
6f925c9cf836
(svn r11801) -Codechange: remove some unneeded includes from some header files.
rubidium
parents:
8236
diff
changeset
|
14 |
#include "economy_type.h" |
6f925c9cf836
(svn r11801) -Codechange: remove some unneeded includes from some header files.
rubidium
parents:
8236
diff
changeset
|
15 |
#include "tile_type.h" |
84
1e0721c29bad
(svn r85) -Add: initial commit of new AI (enable in Patch menu)
truelight
parents:
0
diff
changeset
|
16 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
17 |
struct PlayerEconomyEntry { |
6953
230d1e3ac86c
(svn r10208) -Codechange: replace int32 with Money where appropriate.
rubidium
parents:
6952
diff
changeset
|
18 |
Money income; |
230d1e3ac86c
(svn r10208) -Codechange: replace int32 with Money where appropriate.
rubidium
parents:
6952
diff
changeset
|
19 |
Money expenses; |
0 | 20 |
int32 delivered_cargo; |
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
21 |
int32 performance_history; ///< player score (scale 0-1000) |
6955
da3431cb25a9
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
rubidium
parents:
6953
diff
changeset
|
22 |
Money company_value; |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
23 |
}; |
0 | 24 |
|
6909
5cb622b3d46a
(svn r10158) -Codechange: port some changes from NoAI and FS#872 to make the loan commands a little better readable.
rubidium
parents:
6685
diff
changeset
|
25 |
/* The "steps" in loan size, in British Pounds! */ |
5cb622b3d46a
(svn r10158) -Codechange: port some changes from NoAI and FS#872 to make the loan commands a little better readable.
rubidium
parents:
6685
diff
changeset
|
26 |
enum { |
5cb622b3d46a
(svn r10158) -Codechange: port some changes from NoAI and FS#872 to make the loan commands a little better readable.
rubidium
parents:
6685
diff
changeset
|
27 |
LOAN_INTERVAL = 10000, |
5cb622b3d46a
(svn r10158) -Codechange: port some changes from NoAI and FS#872 to make the loan commands a little better readable.
rubidium
parents:
6685
diff
changeset
|
28 |
LOAN_INTERVAL_OLD_AI = 50000, |
5cb622b3d46a
(svn r10158) -Codechange: port some changes from NoAI and FS#872 to make the loan commands a little better readable.
rubidium
parents:
6685
diff
changeset
|
29 |
}; |
5cb622b3d46a
(svn r10158) -Codechange: port some changes from NoAI and FS#872 to make the loan commands a little better readable.
rubidium
parents:
6685
diff
changeset
|
30 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
31 |
struct Player { |
0 | 32 |
uint32 name_2; |
33 |
uint16 name_1; |
|
34 |
||
35 |
uint16 president_name_1; |
|
36 |
uint32 president_name_2; |
|
37 |
||
6190
01a2b579b668
(svn r8969) -Codechange: rework of the player face bits.
rubidium
parents:
5750
diff
changeset
|
38 |
PlayerFace face; |
0 | 39 |
|
6955
da3431cb25a9
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
rubidium
parents:
6953
diff
changeset
|
40 |
Money player_money; |
6953
230d1e3ac86c
(svn r10208) -Codechange: replace int32 with Money where appropriate.
rubidium
parents:
6952
diff
changeset
|
41 |
Money current_loan; |
0 | 42 |
|
43 |
byte player_color; |
|
4603
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
44 |
Livery livery[LS_END]; |
0 | 45 |
byte player_money_fraction; |
8236
8a5dd0b42e47
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8229
diff
changeset
|
46 |
RailTypes avail_railtypes; |
8a5dd0b42e47
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents:
8229
diff
changeset
|
47 |
RoadTypes avail_roadtypes; |
0 | 48 |
byte block_preview; |
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
49 |
PlayerByte index; |
0 | 50 |
|
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
51 |
uint16 cargo_types; ///< which cargo types were transported the last year |
0 | 52 |
|
53 |
TileIndex location_of_house; |
|
54 |
TileIndex last_build_coordinate; |
|
145 | 55 |
|
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
56 |
PlayerByte share_owners[4]; |
145 | 57 |
|
4326
2e2c9d21ed96
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
rubidium
parents:
4289
diff
changeset
|
58 |
Year inaugurated_year; |
0 | 59 |
byte num_valid_stat_ent; |
145 | 60 |
|
0 | 61 |
byte quarters_of_bankrupcy; |
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
62 |
byte bankrupt_asked; ///< which players were asked about buying it? |
0 | 63 |
int16 bankrupt_timeout; |
6953
230d1e3ac86c
(svn r10208) -Codechange: replace int32 with Money where appropriate.
rubidium
parents:
6952
diff
changeset
|
64 |
Money bankrupt_value; |
0 | 65 |
|
66 |
bool is_active; |
|
3345
0c5a7caf7f95
(svn r4129) - CodeChange: Add proper bool type for is_ai as well...it is a bool type.
Darkvater
parents:
3344
diff
changeset
|
67 |
bool is_ai; |
145 | 68 |
|
6955
da3431cb25a9
(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.
rubidium
parents:
6953
diff
changeset
|
69 |
Money yearly_expenses[3][13]; |
0 | 70 |
PlayerEconomyEntry cur_economy; |
71 |
PlayerEconomyEntry old_economy[24]; |
|
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
72 |
EngineRenewList engine_renew_list; ///< Defined later |
2293
b48192aec903
(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside
bjarni
parents:
2186
diff
changeset
|
73 |
bool engine_renew; |
2617
03120a0b1e39
(svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains
bjarni
parents:
2613
diff
changeset
|
74 |
bool renew_keep_length; |
2293
b48192aec903
(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside
bjarni
parents:
2186
diff
changeset
|
75 |
int16 engine_renew_months; |
b48192aec903
(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside
bjarni
parents:
2186
diff
changeset
|
76 |
uint32 engine_renew_money; |
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
77 |
uint16 num_engines[TOTAL_NUM_ENGINES]; ///< caches the number of engines of each type the player owns (no need to save this) |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
78 |
}; |
0 | 79 |
|
4428
6d9fab57f2af
(svn r6183) Move GetDrawStringPlayerColor() out of gfx.[ch]
tron
parents:
4344
diff
changeset
|
80 |
uint16 GetDrawStringPlayerColor(PlayerID player); |
6d9fab57f2af
(svn r6183) Move GetDrawStringPlayerColor() out of gfx.[ch]
tron
parents:
4344
diff
changeset
|
81 |
|
2436
7d5df545bd5d
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2425
diff
changeset
|
82 |
void ChangeOwnershipOfPlayerItems(PlayerID old_player, PlayerID new_player); |
4849
1c6f21eb97f2
(svn r6775) -Codechange: Use some more proper types, especially Owner and PlayerID as
Darkvater
parents:
4848
diff
changeset
|
83 |
void GetNameOfOwner(Owner owner, TileIndex tile); |
7318
632cd0497770
(svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
rubidium
parents:
7317
diff
changeset
|
84 |
Money CalculateCompanyValue(const Player *p); |
632cd0497770
(svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
rubidium
parents:
7317
diff
changeset
|
85 |
void InvalidatePlayerWindows(const Player *p); |
5376
204acb84473f
(svn r7561) -Fix (FS#431): core and (patches) GUI were not in-sync with respect to autorenew settings. This is only a temporary fix, as the definite fix needs to move the autorenew settings to a per-company settings window.
rubidium
parents:
5216
diff
changeset
|
86 |
void SetLocalPlayer(PlayerID new_player); |
2952 | 87 |
#define FOR_ALL_PLAYERS(p) for (p = _players; p != endof(_players); p++) |
0 | 88 |
|
7508
dc5d1757ba9f
(svn r11023) -Fix [FS#1150]: Switching players (using the cheat) crashed on Big Endian machines.
rubidium
parents:
7318
diff
changeset
|
89 |
VARDEF PlayerByte _local_player; |
dc5d1757ba9f
(svn r11023) -Fix [FS#1150]: Switching players (using the cheat) crashed on Big Endian machines.
rubidium
parents:
7318
diff
changeset
|
90 |
VARDEF PlayerByte _current_player; |
2154
f86c59e73a16
(svn r2664) Remove depedency on player.h from variables.h
tron
parents:
2147
diff
changeset
|
91 |
|
0 | 92 |
VARDEF Player _players[MAX_PLAYERS]; |
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
93 |
/* NOSAVE: can be determined from player structs */ |
2154
f86c59e73a16
(svn r2664) Remove depedency on player.h from variables.h
tron
parents:
2147
diff
changeset
|
94 |
VARDEF byte _player_colors[MAX_PLAYERS]; |
0 | 95 |
|
6247 | 96 |
static inline byte ActivePlayerCount() |
4824
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
97 |
{ |
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
98 |
const Player *p; |
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
99 |
byte count = 0; |
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
100 |
|
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
101 |
FOR_ALL_PLAYERS(p) { |
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
102 |
if (p->is_active) count++; |
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
103 |
} |
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
104 |
|
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
105 |
return count; |
c49e6ffcb89a
(svn r6748) -Codechange: Use already existing function to count active players.
Darkvater
parents:
4603
diff
changeset
|
106 |
} |
2944
2360b2da2bb0
(svn r3500) - Workaround the inaccurate count of spectators/companies that can happen in certain border-cases. For now just dynamically get this value when requested so it is always right. To do properly all player/client creation/destruction needs a hook for networking.
Darkvater
parents:
2848
diff
changeset
|
107 |
|
7318
632cd0497770
(svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
rubidium
parents:
7317
diff
changeset
|
108 |
static inline Player *GetPlayer(PlayerID i) |
1767
cda2e9ac430a
(svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number
tron
parents:
1576
diff
changeset
|
109 |
{ |
7954
57b51c69c072
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
skidd13
parents:
7928
diff
changeset
|
110 |
assert(IsInsideBS(i, PLAYER_FIRST, lengthof(_players))); |
2425
e755ee29133a
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
Darkvater
parents:
2293
diff
changeset
|
111 |
return &_players[i]; |
e755ee29133a
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
Darkvater
parents:
2293
diff
changeset
|
112 |
} |
e755ee29133a
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
Darkvater
parents:
2293
diff
changeset
|
113 |
|
6247 | 114 |
static inline bool IsLocalPlayer() |
2425
e755ee29133a
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
Darkvater
parents:
2293
diff
changeset
|
115 |
{ |
e755ee29133a
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
Darkvater
parents:
2293
diff
changeset
|
116 |
return _local_player == _current_player; |
1767
cda2e9ac430a
(svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number
tron
parents:
1576
diff
changeset
|
117 |
} |
cda2e9ac430a
(svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number
tron
parents:
1576
diff
changeset
|
118 |
|
4850
93095755db8c
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
Darkvater
parents:
4849
diff
changeset
|
119 |
static inline bool IsValidPlayer(PlayerID pi) |
93095755db8c
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
Darkvater
parents:
4849
diff
changeset
|
120 |
{ |
7954
57b51c69c072
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
skidd13
parents:
7928
diff
changeset
|
121 |
return IsInsideBS(pi, PLAYER_FIRST, MAX_PLAYERS); |
4850
93095755db8c
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
Darkvater
parents:
4849
diff
changeset
|
122 |
} |
93095755db8c
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
Darkvater
parents:
4849
diff
changeset
|
123 |
|
4845
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
124 |
static inline bool IsHumanPlayer(PlayerID pi) |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
125 |
{ |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
126 |
return !GetPlayer(pi)->is_ai; |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
127 |
} |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
128 |
|
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
129 |
static inline bool IsInteractivePlayer(PlayerID pi) |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
130 |
{ |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
131 |
return pi == _local_player; |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
132 |
} |
72bbb6e2694e
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
Darkvater
parents:
4824
diff
changeset
|
133 |
|
5750
5824ab1f36e2
(svn r8300) -Codechange: Add a prototype for DrawPlayerIcon to players.h and include that
maedhros
parents:
5729
diff
changeset
|
134 |
void DrawPlayerIcon(PlayerID p, int x, int y); |
5824ab1f36e2
(svn r8300) -Codechange: Add a prototype for DrawPlayerIcon to players.h and include that
maedhros
parents:
5729
diff
changeset
|
135 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
136 |
struct HighScore { |
983
4765bf636f6b
(svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
darkvater
parents:
826
diff
changeset
|
137 |
char company[100]; |
6352
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
138 |
StringID title; ///< NO_SAVE, has troubles with changing string-numbers. |
938ab8f48e5d
(svn r9391) -Documentation : correct Doxygen of comments and @file inclusion. Time for P and Q files
belugas
parents:
6248
diff
changeset
|
139 |
uint16 score; ///< do NOT change type, will break hs.dat |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
140 |
}; |
983
4765bf636f6b
(svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
darkvater
parents:
826
diff
changeset
|
141 |
|
998
c90459c24842
(svn r1496) -Fix: highscore no longer crashes in network games with a dedicated server. At the end of the game (can only be set by the server) the highscore is shown for the top5 companies of that game
darkvater
parents:
990
diff
changeset
|
142 |
VARDEF HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5 |
6247 | 143 |
void SaveToHighScore(); |
144 |
void LoadFromHighScore(); |
|
998
c90459c24842
(svn r1496) -Fix: highscore no longer crashes in network games with a dedicated server. At the end of the game (can only be set by the server) the highscore is shown for the top5 companies of that game
darkvater
parents:
990
diff
changeset
|
145 |
int8 SaveHighScoreValue(const Player *p); |
6247 | 146 |
int8 SaveHighScoreValueNetwork(); |
983
4765bf636f6b
(svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
darkvater
parents:
826
diff
changeset
|
147 |
|
4603
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
148 |
/** |
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
149 |
* Reset the livery schemes to the player's primary colour. |
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
150 |
* This is used on loading games without livery information and on new player start up. |
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
151 |
* @param p Player to reset. |
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
152 |
*/ |
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
153 |
void ResetPlayerLivery(Player *p); |
20c816f664de
(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.
peter1138
parents:
4574
diff
changeset
|
154 |
|
0 | 155 |
#endif /* PLAYER_H */ |