depot_map.h

Go to the documentation of this file.
00001 /* $Id: depot_map.h 12754 2008-04-17 19:10:30Z rubidium $ */
00002 
00005 #ifndef DEPOT_MAP_H
00006 #define DEPOT_MAP_H
00007 
00008 #include "road_map.h"
00009 #include "rail_map.h"
00010 #include "water_map.h"
00011 #include "station_map.h"
00012 
00016 static inline bool IsDepotTypeTile(TileIndex tile, TransportType type)
00017 {
00018   switch (type) {
00019     default: NOT_REACHED();
00020     case TRANSPORT_RAIL:
00021       return IsRailDepotTile(tile);
00022 
00023     case TRANSPORT_ROAD:
00024       return IsRoadDepotTile(tile);
00025 
00026     case TRANSPORT_WATER:
00027       return IsShipDepotTile(tile);
00028   }
00029 }
00030 
00036 static inline bool IsDepotTile(TileIndex tile)
00037 {
00038   return IsRailDepotTile(tile) || IsRoadDepotTile(tile) || IsShipDepotTile(tile) || IsHangarTile(tile);
00039 }
00040 
00041 #endif /* DEPOT_MAP_H */

Generated on Wed Dec 23 20:12:47 2009 for OpenTTD by  doxygen 1.5.6