author | rubidium |
Sun, 20 May 2007 19:14:08 +0000 | |
changeset 7157 | 270bc5b64e08 |
parent 6985 | 6fd300b20503 |
permissions | -rw-r--r-- |
3334
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
1 |
/* $Id$ */ |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
2 |
|
6916
e87d54a598ea
(svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near
belugas
parents:
6156
diff
changeset
|
3 |
/** @file station_map.cpp */ |
e87d54a598ea
(svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near
belugas
parents:
6156
diff
changeset
|
4 |
|
3334
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
5 |
#include "stdafx.h" |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
6 |
#include "openttd.h" |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
7 |
#include "station_map.h" |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
8 |
|
6985
6fd300b20503
(svn r9670) -Documentation: add documentation to some the _map files.
rubidium
parents:
6916
diff
changeset
|
9 |
/** |
6fd300b20503
(svn r9670) -Documentation: add documentation to some the _map files.
rubidium
parents:
6916
diff
changeset
|
10 |
* Get the station type (rail, airport, truck etc) for the given tile. |
6fd300b20503
(svn r9670) -Documentation: add documentation to some the _map files.
rubidium
parents:
6916
diff
changeset
|
11 |
* @param t the tile to get the station type of. |
6fd300b20503
(svn r9670) -Documentation: add documentation to some the _map files.
rubidium
parents:
6916
diff
changeset
|
12 |
* @pre IsTileType(t, MP_STATION) |
6fd300b20503
(svn r9670) -Documentation: add documentation to some the _map files.
rubidium
parents:
6916
diff
changeset
|
13 |
* @return the station type of the given tile. |
6fd300b20503
(svn r9670) -Documentation: add documentation to some the _map files.
rubidium
parents:
6916
diff
changeset
|
14 |
*/ |
3334
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
15 |
StationType GetStationType(TileIndex t) |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
16 |
{ |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
17 |
assert(IsTileType(t, MP_STATION)); |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
18 |
if (IsRailwayStation(t)) return STATION_RAIL; |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
19 |
if (IsAirport(t)) return STATION_AIRPORT; |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
20 |
if (IsTruckStop(t)) return STATION_TRUCK; |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
21 |
if (IsBusStop(t)) return STATION_BUS; |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
22 |
if (IsOilRig(t)) return STATION_OILRIG; |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
23 |
if (IsDock(t)) return STATION_DOCK; |
6156
5adeec1679a4
(svn r8528) -Codechange: Rename IsBuoy_() to IsBuoy() now that the naming conflict no longer exists.
celestar
parents:
5835
diff
changeset
|
24 |
assert(IsBuoy(t)); |
3334
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
25 |
return STATION_BUOY; |
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff
changeset
|
26 |
} |