2006-09-15 12:27:00 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file livery.h Functions/types related to livery colours. */
|
2007-03-03 04:04:22 +00:00
|
|
|
|
2006-09-15 12:27:00 +00:00
|
|
|
#ifndef LIVERY_H
|
|
|
|
#define LIVERY_H
|
|
|
|
|
2008-09-30 20:51:04 +00:00
|
|
|
#include "company_type.h"
|
2006-09-15 12:27:00 +00:00
|
|
|
|
|
|
|
/* List of different livery schemes. */
|
2007-03-07 12:11:48 +00:00
|
|
|
enum LiveryScheme {
|
2007-01-10 18:56:51 +00:00
|
|
|
LS_BEGIN = 0,
|
|
|
|
LS_DEFAULT = 0,
|
2006-09-15 12:27:00 +00:00
|
|
|
|
|
|
|
/* Rail vehicles */
|
|
|
|
LS_STEAM,
|
|
|
|
LS_DIESEL,
|
|
|
|
LS_ELECTRIC,
|
|
|
|
LS_MONORAIL,
|
|
|
|
LS_MAGLEV,
|
|
|
|
LS_DMU,
|
|
|
|
LS_EMU,
|
2006-09-15 17:36:54 +00:00
|
|
|
LS_PASSENGER_WAGON_STEAM,
|
|
|
|
LS_PASSENGER_WAGON_DIESEL,
|
|
|
|
LS_PASSENGER_WAGON_ELECTRIC,
|
2008-01-16 11:25:15 +00:00
|
|
|
LS_PASSENGER_WAGON_MONORAIL,
|
|
|
|
LS_PASSENGER_WAGON_MAGLEV,
|
2006-09-15 12:27:00 +00:00
|
|
|
LS_FREIGHT_WAGON,
|
|
|
|
|
|
|
|
/* Road vehicles */
|
|
|
|
LS_BUS,
|
|
|
|
LS_TRUCK,
|
|
|
|
|
|
|
|
/* Ships */
|
|
|
|
LS_PASSENGER_SHIP,
|
|
|
|
LS_FREIGHT_SHIP,
|
|
|
|
|
|
|
|
/* Aircraft */
|
|
|
|
LS_HELICOPTER,
|
|
|
|
LS_SMALL_PLANE,
|
|
|
|
LS_LARGE_PLANE,
|
|
|
|
|
2007-05-27 09:33:41 +00:00
|
|
|
/* Trams (appear on Road Vehicles tab) */
|
|
|
|
LS_PASSENGER_TRAM,
|
|
|
|
LS_FREIGHT_TRAM,
|
|
|
|
|
2006-09-15 12:27:00 +00:00
|
|
|
LS_END
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2006-09-15 12:27:00 +00:00
|
|
|
|
2007-01-10 18:56:51 +00:00
|
|
|
DECLARE_POSTFIX_INCREMENT(LiveryScheme);
|
2006-09-15 12:27:00 +00:00
|
|
|
|
|
|
|
/* List of different livery classes, used only by the livery GUI. */
|
2007-03-07 12:11:48 +00:00
|
|
|
enum LiveryClass {
|
2006-09-15 12:27:00 +00:00
|
|
|
LC_OTHER,
|
|
|
|
LC_RAIL,
|
|
|
|
LC_ROAD,
|
|
|
|
LC_SHIP,
|
|
|
|
LC_AIRCRAFT,
|
|
|
|
LC_END
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2006-09-15 12:27:00 +00:00
|
|
|
|
|
|
|
|
2007-03-07 12:11:48 +00:00
|
|
|
struct Livery {
|
2006-09-15 12:27:00 +00:00
|
|
|
bool in_use; ///< Set if this livery should be used instead of the default livery.
|
|
|
|
byte colour1; ///< First colour, for all vehicles.
|
|
|
|
byte colour2; ///< Second colour, for vehicles with 2CC support.
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2006-09-15 12:27:00 +00:00
|
|
|
|
2008-01-12 14:10:35 +00:00
|
|
|
/**
|
2008-09-30 20:39:50 +00:00
|
|
|
* Reset the livery schemes to the company's primary colour.
|
|
|
|
* This is used on loading games without livery information and on new company start up.
|
|
|
|
* @param c Company to reset.
|
2008-01-12 14:10:35 +00:00
|
|
|
*/
|
2008-09-30 20:39:50 +00:00
|
|
|
void ResetCompanyLivery(Company *c);
|
2008-01-12 14:10:35 +00:00
|
|
|
|
2006-09-15 12:27:00 +00:00
|
|
|
#endif /* LIVERY_H */
|