# transport_type.h

Go to the documentation of this file.

    00001 /* $Id$ */
    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
    00018 typedef uint16 UnitID;
    00019
    00021 enum TransportType {
    00022   /* These constants are for now linked to the representation of bridges
    00023    * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge.
    00024    * In an ideal world, these constants would be used everywhere when
    00025    * accessing tunnels and bridges. For now, you should just not change
    00026    * the values for road and rail.
    00027    */
    00028   TRANSPORT_BEGIN = 0,
    00029   TRANSPORT_RAIL = TRANSPORT_BEGIN,
    00030   TRANSPORT_ROAD,
    00031   TRANSPORT_WATER,
    00032   TRANSPORT_AIR,
    00033   TRANSPORT_END,
    00034   INVALID_TRANSPORT = 0xff,
    00035 };
    00037 template <> struct EnumPropsT<TransportType> : MakeEnumPropsT<TransportType, byte, TRANSPORT_BEGIN, TRANSPORT_END, INVALID_TRANSPORT, 2> {};
    00038
    00039 #endif /* TRANSPORT_TYPE_H */