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 */ 7 8 /** @file livery.h Functions/types related to livery colours. */ 9 10 #ifndef LIVERY_H 11 #define LIVERY_H 12 13 #include "company_type.h" 14 15 static const byte LIT_NONE = 0; ///< Don't show the liveries at all 16 static const byte LIT_COMPANY = 1; ///< Show the liveries of your own company 17 static const byte LIT_ALL = 2; ///< Show the liveries of all companies 18 19 /** List of different livery schemes. */ 20 enum LiveryScheme { 21 LS_BEGIN = 0, 22 LS_DEFAULT = 0, 23 24 /* Rail vehicles */ 25 LS_STEAM, 26 LS_DIESEL, 27 LS_ELECTRIC, 28 LS_MONORAIL, 29 LS_MAGLEV, 30 LS_DMU, 31 LS_EMU, 32 LS_PASSENGER_WAGON_STEAM, 33 LS_PASSENGER_WAGON_DIESEL, 34 LS_PASSENGER_WAGON_ELECTRIC, 35 LS_PASSENGER_WAGON_MONORAIL, 36 LS_PASSENGER_WAGON_MAGLEV, 37 LS_FREIGHT_WAGON, 38 39 /* Road vehicles */ 40 LS_BUS, 41 LS_TRUCK, 42 43 /* Ships */ 44 LS_PASSENGER_SHIP, 45 LS_FREIGHT_SHIP, 46 47 /* Aircraft */ 48 LS_HELICOPTER, 49 LS_SMALL_PLANE, 50 LS_LARGE_PLANE, 51 52 /* Trams (appear on Road Vehicles tab) */ 53 LS_PASSENGER_TRAM, 54 LS_FREIGHT_TRAM, 55 56 LS_END 57 }; 58 59 DECLARE_POSTFIX_INCREMENT(LiveryScheme) 60 /** Helper information for extract tool. */ 61 template <> struct EnumPropsT<LiveryScheme> : MakeEnumPropsT<LiveryScheme, byte, LS_BEGIN, LS_END, LS_END, 8> {}; 62 63 /** List of different livery classes, used only by the livery GUI. */ 64 enum LiveryClass { 65 LC_OTHER, 66 LC_RAIL, 67 LC_ROAD, 68 LC_SHIP, 69 LC_AIRCRAFT, 70 LC_GROUP_RAIL, 71 LC_GROUP_ROAD, 72 LC_GROUP_SHIP, 73 LC_GROUP_AIRCRAFT, 74 LC_END 75 }; 76 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 byte colour1; ///< First colour, for all vehicles. 81 byte colour2; ///< Second colour, for vehicles with 2CC support. 82 }; 83 84 void ResetCompanyLivery(Company *c); 85 86 #endif /* LIVERY_H */ 87