author | Tero Marttila <terom@fixme.fi> |
Sat, 19 Jul 2008 01:38:52 +0300 | |
changeset 11178 | aa617a8b4f34 |
parent 10429 | 1b99254f9607 |
permissions | -rw-r--r-- |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
1 |
/* $Id$ */ |
3ccd4ee0a2e2
(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:
diff
changeset
|
2 |
|
10429
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
8805
diff
changeset
|
3 |
/** @file livery.h Functions/types related to livery colours. */ |
6527
f584ab6d87f8
(svn r8987) -Cleanup: doxygen changes. Again. Mostly (still) @files missing tags and (more than just) a few comments style.
belugas
parents:
5838
diff
changeset
|
4 |
|
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
5 |
#ifndef LIVERY_H |
3ccd4ee0a2e2
(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:
diff
changeset
|
6 |
#define LIVERY_H |
3ccd4ee0a2e2
(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:
diff
changeset
|
7 |
|
8750
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
8 |
#include "player_type.h" |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
9 |
|
3ccd4ee0a2e2
(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:
diff
changeset
|
10 |
/* List of different livery schemes. */ |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6527
diff
changeset
|
11 |
enum LiveryScheme { |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
12 |
LS_BEGIN = 0, |
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
13 |
LS_DEFAULT = 0, |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
14 |
|
3ccd4ee0a2e2
(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:
diff
changeset
|
15 |
/* Rail vehicles */ |
3ccd4ee0a2e2
(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:
diff
changeset
|
16 |
LS_STEAM, |
3ccd4ee0a2e2
(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:
diff
changeset
|
17 |
LS_DIESEL, |
3ccd4ee0a2e2
(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:
diff
changeset
|
18 |
LS_ELECTRIC, |
3ccd4ee0a2e2
(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:
diff
changeset
|
19 |
LS_MONORAIL, |
3ccd4ee0a2e2
(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:
diff
changeset
|
20 |
LS_MAGLEV, |
3ccd4ee0a2e2
(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:
diff
changeset
|
21 |
LS_DMU, |
3ccd4ee0a2e2
(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:
diff
changeset
|
22 |
LS_EMU, |
4604
f99f5de6077a
(svn r6456) - Replace single colour scheme for passenger wagons with separate schemes for each of steam, diesel or electric engines. Savegames from the previous revision will not load.
peter1138
parents:
4603
diff
changeset
|
23 |
LS_PASSENGER_WAGON_STEAM, |
f99f5de6077a
(svn r6456) - Replace single colour scheme for passenger wagons with separate schemes for each of steam, diesel or electric engines. Savegames from the previous revision will not load.
peter1138
parents:
4603
diff
changeset
|
24 |
LS_PASSENGER_WAGON_DIESEL, |
f99f5de6077a
(svn r6456) - Replace single colour scheme for passenger wagons with separate schemes for each of steam, diesel or electric engines. Savegames from the previous revision will not load.
peter1138
parents:
4603
diff
changeset
|
25 |
LS_PASSENGER_WAGON_ELECTRIC, |
8805
7269d54ce5dc
(svn r11874) -Fix [FS#1655]: all wagons of maglev/monorail trains would get the livery colour of the engine instead of their wagon type.
rubidium
parents:
8750
diff
changeset
|
26 |
LS_PASSENGER_WAGON_MONORAIL, |
7269d54ce5dc
(svn r11874) -Fix [FS#1655]: all wagons of maglev/monorail trains would get the livery colour of the engine instead of their wagon type.
rubidium
parents:
8750
diff
changeset
|
27 |
LS_PASSENGER_WAGON_MAGLEV, |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
28 |
LS_FREIGHT_WAGON, |
3ccd4ee0a2e2
(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:
diff
changeset
|
29 |
|
3ccd4ee0a2e2
(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:
diff
changeset
|
30 |
/* Road vehicles */ |
3ccd4ee0a2e2
(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:
diff
changeset
|
31 |
LS_BUS, |
3ccd4ee0a2e2
(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:
diff
changeset
|
32 |
LS_TRUCK, |
3ccd4ee0a2e2
(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:
diff
changeset
|
33 |
|
3ccd4ee0a2e2
(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:
diff
changeset
|
34 |
/* Ships */ |
3ccd4ee0a2e2
(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:
diff
changeset
|
35 |
LS_PASSENGER_SHIP, |
3ccd4ee0a2e2
(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:
diff
changeset
|
36 |
LS_FREIGHT_SHIP, |
3ccd4ee0a2e2
(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:
diff
changeset
|
37 |
|
3ccd4ee0a2e2
(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:
diff
changeset
|
38 |
/* Aircraft */ |
3ccd4ee0a2e2
(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:
diff
changeset
|
39 |
LS_HELICOPTER, |
3ccd4ee0a2e2
(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:
diff
changeset
|
40 |
LS_SMALL_PLANE, |
3ccd4ee0a2e2
(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:
diff
changeset
|
41 |
LS_LARGE_PLANE, |
3ccd4ee0a2e2
(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:
diff
changeset
|
42 |
|
7220
a8d6abc0981f
(svn r9956) -Codechange: Add tram livery schemes
peter1138
parents:
6574
diff
changeset
|
43 |
/* Trams (appear on Road Vehicles tab) */ |
a8d6abc0981f
(svn r9956) -Codechange: Add tram livery schemes
peter1138
parents:
6574
diff
changeset
|
44 |
LS_PASSENGER_TRAM, |
a8d6abc0981f
(svn r9956) -Codechange: Add tram livery schemes
peter1138
parents:
6574
diff
changeset
|
45 |
LS_FREIGHT_TRAM, |
a8d6abc0981f
(svn r9956) -Codechange: Add tram livery schemes
peter1138
parents:
6574
diff
changeset
|
46 |
|
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
47 |
LS_END |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6527
diff
changeset
|
48 |
}; |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
49 |
|
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
50 |
DECLARE_POSTFIX_INCREMENT(LiveryScheme); |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
51 |
|
3ccd4ee0a2e2
(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:
diff
changeset
|
52 |
/* List of different livery classes, used only by the livery GUI. */ |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6527
diff
changeset
|
53 |
enum LiveryClass { |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
54 |
LC_OTHER, |
3ccd4ee0a2e2
(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:
diff
changeset
|
55 |
LC_RAIL, |
3ccd4ee0a2e2
(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:
diff
changeset
|
56 |
LC_ROAD, |
3ccd4ee0a2e2
(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:
diff
changeset
|
57 |
LC_SHIP, |
3ccd4ee0a2e2
(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:
diff
changeset
|
58 |
LC_AIRCRAFT, |
3ccd4ee0a2e2
(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:
diff
changeset
|
59 |
LC_END |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6527
diff
changeset
|
60 |
}; |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
61 |
|
3ccd4ee0a2e2
(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:
diff
changeset
|
62 |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6527
diff
changeset
|
63 |
struct Livery { |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
64 |
bool in_use; ///< Set if this livery should be used instead of the default livery. |
3ccd4ee0a2e2
(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:
diff
changeset
|
65 |
byte colour1; ///< First colour, for all vehicles. |
3ccd4ee0a2e2
(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:
diff
changeset
|
66 |
byte colour2; ///< Second colour, for vehicles with 2CC support. |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6527
diff
changeset
|
67 |
}; |
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
68 |
|
8750
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
69 |
/** |
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
70 |
* Reset the livery schemes to the player's primary colour. |
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
71 |
* This is used on loading games without livery information and on new player start up. |
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
72 |
* @param p Player to reset. |
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
73 |
*/ |
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
74 |
void ResetPlayerLivery(Player *p); |
fdd6054e7bae
(svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
8626
diff
changeset
|
75 |
|
4603
3ccd4ee0a2e2
(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:
diff
changeset
|
76 |
#endif /* LIVERY_H */ |