src/station_map.cpp
author KUDr
Sat, 10 Mar 2007 02:39:51 +0000
branchcpp_gui
changeset 6293 59b7305f9a8b
parent 6156 5adeec1679a4
child 6307 f40e88cff863
child 6719 4cc327ad39d5
permissions -rw-r--r--
(svn r9087) [cpp_gui] -Codechange: Window is now clipping its widgets in OnPaint()
-Add: ClipDrawContext class to simplify draw clipping
-Fix: ResizeBox now can't resize window to negative width/height
/* $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;
}