OpenTTD
livery.h
Go to the documentation of this file.
1 /* $Id$ */
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 
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 
63 template <> struct EnumPropsT<LiveryScheme> : MakeEnumPropsT<LiveryScheme, byte, LS_BEGIN, LS_END, LS_END, 8> {};
64 
67  LC_OTHER,
68  LC_RAIL,
69  LC_ROAD,
70  LC_SHIP,
71  LC_AIRCRAFT,
72  LC_GROUP_RAIL,
73  LC_GROUP_ROAD,
74  LC_GROUP_SHIP,
75  LC_GROUP_AIRCRAFT,
76  LC_END
77 };
78 
80 struct Livery {
81  byte in_use;
82  byte colour1;
83  byte colour2;
84 };
85 
87 
88 #endif /* LIVERY_H */
Helper template class that makes basic properties of given enumeration type visible from outsize...
Definition: enum_type.hpp:68
LiveryScheme
List of different livery schemes.
Definition: livery.h:22
static const byte LIT_COMPANY
Show the liveries of your own company.
Definition: livery.h:18
Informative template class exposing basic enumeration properties used by several other templates belo...
Definition: enum_type.hpp:54
void ResetCompanyLivery(Company *c)
Reset the livery schemes to the company&#39;s primary colour.
Information about a particular livery.
Definition: livery.h:80
static const byte LIT_ALL
Show the liveries of all companies.
Definition: livery.h:19
byte colour2
Second colour, for vehicles with 2CC support.
Definition: livery.h:83
LiveryClass
List of different livery classes, used only by the livery GUI.
Definition: livery.h:66
byte in_use
Bit 0 set if this livery should override the default livery first colour, Bit 1 for the second colour...
Definition: livery.h:81
Types related to companies.
static const byte LIT_NONE
Don&#39;t show the liveries at all.
Definition: livery.h:17
byte colour1
First colour, for all vehicles.
Definition: livery.h:82
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:18