celestar@3334: /* $Id$ */ celestar@3334: richk@6719: /** @file station_map.cpp */ richk@6719: celestar@3334: #include "stdafx.h" celestar@3334: #include "openttd.h" celestar@3334: #include "station_map.h" celestar@3334: richk@6719: /** richk@6719: * Get the station type (rail, airport, truck etc) for the given tile. richk@6719: * @param t the tile to get the station type of. richk@6719: * @pre IsTileType(t, MP_STATION) richk@6719: * @return the station type of the given tile. richk@6719: */ celestar@3334: StationType GetStationType(TileIndex t) celestar@3334: { celestar@3334: assert(IsTileType(t, MP_STATION)); celestar@3334: if (IsRailwayStation(t)) return STATION_RAIL; celestar@3334: if (IsAirport(t)) return STATION_AIRPORT; celestar@3334: if (IsTruckStop(t)) return STATION_TRUCK; celestar@3334: if (IsBusStop(t)) return STATION_BUS; celestar@3334: if (IsOilRig(t)) return STATION_OILRIG; celestar@3334: if (IsDock(t)) return STATION_DOCK; celestar@6156: assert(IsBuoy(t)); celestar@3334: return STATION_BUOY; celestar@3334: }