src/station_map.cpp
author KUDr
Sun, 18 Feb 2007 14:17:28 +0000
branchcpp_gui
changeset 6258 a2f86b8fd99b
parent 6156 5adeec1679a4
child 6307 f40e88cff863
child 6719 4cc327ad39d5
permissions -rw-r--r--
(svn r8801) [cpp_gui] -Codechange: few changes towards OO GUI:
-Window related AllocateXxx() functions turned into Window methods
-current Widget renamed to OldWidget
-Widget base class added (still not used)
-CompositeWidget added (also not used)
-Widget rectangle/point handling moved to new file: misc/rect.hpp
-18 new .cpp files added in new dir for several widget types (most of them not used yet)
/* $Id$ */

#include "stdafx.h"
#include "openttd.h"
#include "station_map.h"


StationType GetStationType(TileIndex t)
{
	assert(IsTileType(t, MP_STATION));
	if (IsRailwayStation(t)) return STATION_RAIL;
	if (IsAirport(t)) return STATION_AIRPORT;
	if (IsTruckStop(t)) return STATION_TRUCK;
	if (IsBusStop(t)) return STATION_BUS;
	if (IsOilRig(t)) return STATION_OILRIG;
	if (IsDock(t)) return STATION_DOCK;
	assert(IsBuoy(t));
	return STATION_BUOY;
}