# livery.h

Go to the documentation of this file.

    00001 /* $Id: livery.h 20608 2010-08-24 00:03:26Z rubidium $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef LIVERY_H
    00013 #define LIVERY_H
    00014
    00015 #include "company_type.h"
    00016
    00017 static const byte LIT_NONE    = 0;
    00018 static const byte LIT_COMPANY = 1;
    00019 static const byte LIT_ALL     = 2;
    00020
    00021 /* List of different livery schemes. */
    00022 enum LiveryScheme {
    00023   LS_BEGIN = 0,
    00024   LS_DEFAULT = 0,
    00025
    00026   /* Rail vehicles */
    00027   LS_STEAM,
    00028   LS_DIESEL,
    00029   LS_ELECTRIC,
    00030   LS_MONORAIL,
    00031   LS_MAGLEV,
    00032   LS_DMU,
    00033   LS_EMU,
    00034   LS_PASSENGER_WAGON_STEAM,
    00035   LS_PASSENGER_WAGON_DIESEL,
    00036   LS_PASSENGER_WAGON_ELECTRIC,
    00037   LS_PASSENGER_WAGON_MONORAIL,
    00038   LS_PASSENGER_WAGON_MAGLEV,
    00039   LS_FREIGHT_WAGON,
    00040
    00041   /* Road vehicles */
    00042   LS_BUS,
    00043   LS_TRUCK,
    00044
    00045   /* Ships */
    00046   LS_PASSENGER_SHIP,
    00047   LS_FREIGHT_SHIP,
    00048
    00049   /* Aircraft */
    00050   LS_HELICOPTER,
    00051   LS_SMALL_PLANE,
    00052   LS_LARGE_PLANE,
    00053
    00054   /* Trams (appear on Road Vehicles tab) */
    00055   LS_PASSENGER_TRAM,
    00056   LS_FREIGHT_TRAM,
    00057
    00058   LS_END
    00059 };
    00060
    00061 DECLARE_POSTFIX_INCREMENT(LiveryScheme);
    00062 template <> struct EnumPropsT<LiveryScheme> : MakeEnumPropsT<LiveryScheme, byte, LS_BEGIN, LS_END, LS_END, 8> {};
    00063
    00064 /* List of different livery classes, used only by the livery GUI. */
    00065 enum LiveryClass {
    00066   LC_OTHER,
    00067   LC_RAIL,
    00068   LC_ROAD,
    00069   LC_SHIP,
    00070   LC_AIRCRAFT,
    00071   LC_END
    00072 };
    00073
    00074
    00075 struct Livery {
    00076   bool in_use;
    00077   byte colour1;
    00078   byte colour2;
    00079 };
    00080
    00086 void ResetCompanyLivery(Company *c);
    00087
    00088 #endif /* LIVERY_H */