transport_type.h

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

Generated on Wed Apr 21 20:31:56 2010 for OpenTTD by  doxygen 1.6.1