OpenTTD: src/livery.h Source File

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

livery.h
Go to the documentation of this file.
1 /* $Id: livery.h 22411 2011-05-02 17:42:12Z rubidium $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef LIVERY_H
13 #define LIVERY_H
14
15 #include "company_type.h"
16
17 static const byte LIT_NONE = 0;
18 static const byte LIT_COMPANY = 1;
19 static const byte LIT_ALL = 2;
20
22 enum LiveryScheme {
23 LS_BEGIN = 0,
24 LS_DEFAULT = 0,
25
26 /* Rail vehicles */
27 LS_STEAM,
28 LS_DIESEL,
29 LS_ELECTRIC,
30 LS_MONORAIL,
31 LS_MAGLEV,
32 LS_DMU,
33 LS_EMU,
34 LS_PASSENGER_WAGON_STEAM,
35 LS_PASSENGER_WAGON_DIESEL,
36 LS_PASSENGER_WAGON_ELECTRIC,
37 LS_PASSENGER_WAGON_MONORAIL,
38 LS_PASSENGER_WAGON_MAGLEV,
39 LS_FREIGHT_WAGON,
40
41 /* Road vehicles */
42 LS_BUS,
43 LS_TRUCK,
44
45 /* Ships */
46 LS_PASSENGER_SHIP,
47 LS_FREIGHT_SHIP,
48
49 /* Aircraft */
50 LS_HELICOPTER,
51 LS_SMALL_PLANE,
52 LS_LARGE_PLANE,
53
54 /* Trams (appear on Road Vehicles tab) */
55 LS_PASSENGER_TRAM,
56 LS_FREIGHT_TRAM,
57
58 LS_END
59 };
60
61 DECLARE_POSTFIX_INCREMENT(LiveryScheme)
63 template <> struct EnumPropsT<LiveryScheme> : MakeEnumPropsT<LiveryScheme, byte, LS_BEGIN, LS_END, LS_END, 8> {};
64
66 enum LiveryClass {
67 LC_OTHER,
68 LC_RAIL,
69 LC_ROAD,
70 LC_SHIP,
71 LC_AIRCRAFT,
72 LC_END
73 };
74
76 struct Livery {
77 bool in_use;
78 byte colour1;
79 byte colour2;
80 };
81
82 void ResetCompanyLivery(Company *c);
83
84 #endif /* LIVERY_H */