00001 /* $Id: transport_type.h 20632 2010-08-26 22:01:16Z 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 TRANSPORT_TYPE_H 00013 #define TRANSPORT_TYPE_H 00014 00015 #include "core/enum_type.hpp" 00016 00017 typedef uint16 UnitID; 00018 00020 enum TransportType { 00021 /* These constants are for now linked to the representation of bridges 00022 * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge. 00023 * In an ideal world, these constants would be used everywhere when 00024 * accessing tunnels and bridges. For now, you should just not change 00025 * the values for road and rail. 00026 */ 00027 TRANSPORT_BEGIN = 0, 00028 TRANSPORT_RAIL = TRANSPORT_BEGIN, 00029 TRANSPORT_ROAD, 00030 TRANSPORT_WATER, 00031 TRANSPORT_AIR, 00032 TRANSPORT_END, 00033 INVALID_TRANSPORT = 0xff, 00034 }; 00035 template <> struct EnumPropsT<TransportType> : MakeEnumPropsT<TransportType, byte, TRANSPORT_BEGIN, TRANSPORT_END, INVALID_TRANSPORT, 2> {}; 00036 00037 #endif /* TRANSPORT_TYPE_H */