src/station_map.c
author rubidium
Tue, 02 Jan 2007 19:19:48 +0000
changeset 5475 2e6990a8c7c4
parent 3882 station_map.c@c2e3e12e71d6
permissions -rw-r--r--
(svn r7759) -Merge: makefile rewrite. This merge features:
- A proper ./configure, so everything needs to be configured only once, not for every make.
- Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies.
- A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC.
- Proper support for OSX universal binaries.
- Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files.
- Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files.

Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
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
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
     3
#include "stdafx.h"
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
     4
#include "openttd.h"
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
     5
#include "station_map.h"
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
     6
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
     7
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
     8
StationType GetStationType(TileIndex t)
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
     9
{
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    10
	assert(IsTileType(t, MP_STATION));
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    11
	if (IsRailwayStation(t)) return STATION_RAIL;
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    12
	if (IsAirport(t)) return STATION_AIRPORT;
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    13
	if (IsTruckStop(t)) return STATION_TRUCK;
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    14
	if (IsBusStop(t)) return STATION_BUS;
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    15
	if (IsOilRig(t)) return STATION_OILRIG;
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    16
	if (IsDock(t)) return STATION_DOCK;
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    17
	assert(IsBuoy_(t));
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    18
	return STATION_BUOY;
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
diff changeset
    19
}