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