Fix #10490: Allow ships to exit depots if another is not moving at the exit point...
[openttd-github.git] / src / livery.h
blob302d40e4040ad9af39cef7e48bc22eb0ffcaea5e
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
8 /** @file livery.h Functions/types related to livery colours. */
10 #ifndef LIVERY_H
11 #define LIVERY_H
13 #include "company_type.h"
14 #include "gfx_type.h"
16 static const byte LIT_NONE = 0; ///< Don't show the liveries at all
17 static const byte LIT_COMPANY = 1; ///< Show the liveries of your own company
18 static const byte LIT_ALL = 2; ///< Show the liveries of all companies
20 /** List of different livery schemes. */
21 enum LiveryScheme : byte {
22 LS_BEGIN = 0,
23 LS_DEFAULT = 0,
25 /* Rail vehicles */
26 LS_STEAM,
27 LS_DIESEL,
28 LS_ELECTRIC,
29 LS_MONORAIL,
30 LS_MAGLEV,
31 LS_DMU,
32 LS_EMU,
33 LS_PASSENGER_WAGON_STEAM,
34 LS_PASSENGER_WAGON_DIESEL,
35 LS_PASSENGER_WAGON_ELECTRIC,
36 LS_PASSENGER_WAGON_MONORAIL,
37 LS_PASSENGER_WAGON_MAGLEV,
38 LS_FREIGHT_WAGON,
40 /* Road vehicles */
41 LS_BUS,
42 LS_TRUCK,
44 /* Ships */
45 LS_PASSENGER_SHIP,
46 LS_FREIGHT_SHIP,
48 /* Aircraft */
49 LS_HELICOPTER,
50 LS_SMALL_PLANE,
51 LS_LARGE_PLANE,
53 /* Trams (appear on Road Vehicles tab) */
54 LS_PASSENGER_TRAM,
55 LS_FREIGHT_TRAM,
57 LS_END
60 DECLARE_POSTFIX_INCREMENT(LiveryScheme)
62 /** List of different livery classes, used only by the livery GUI. */
63 enum LiveryClass : byte {
64 LC_OTHER,
65 LC_RAIL,
66 LC_ROAD,
67 LC_SHIP,
68 LC_AIRCRAFT,
69 LC_GROUP_RAIL,
70 LC_GROUP_ROAD,
71 LC_GROUP_SHIP,
72 LC_GROUP_AIRCRAFT,
73 LC_END
75 DECLARE_ENUM_AS_ADDABLE(LiveryClass)
77 /** Information about a particular livery. */
78 struct Livery {
79 byte in_use; ///< Bit 0 set if this livery should override the default livery first colour, Bit 1 for the second colour.
80 Colours colour1; ///< First colour, for all vehicles.
81 Colours colour2; ///< Second colour, for vehicles with 2CC support.
84 void ResetCompanyLivery(Company *c);
86 #endif /* LIVERY_H */