station_map.h
author belugas
Wed, 12 Apr 2006 18:10:54 +0000
changeset 3538 3eb71c726341
parent 3474 45ef140f0f34
child 3540 83bd858fe9fe
permissions -rw-r--r--
(svn r4399) CodeChange : Add and make use of [G|S]etIndustryAnimationLoop accessors.
3315
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
     1
/* $Id$ */
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
     2
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
     3
#ifndef STATION_MAP_H
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
     4
#define STATION_MAP_H
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
     5
3315
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
     6
#include "station.h"
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
     7
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
     8
static inline StationID GetStationIndex(TileIndex t)
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
     9
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
    10
	assert(IsTileType(t, MP_STATION));
3315
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
    11
	return (StationID)_m[t].m2;
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
    12
}
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
    13
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
    14
static inline Station* GetStationByTile(TileIndex t)
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
    15
{
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
    16
	return GetStation(GetStationIndex(t));
1f65f8260092 (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
tron
parents:
diff changeset
    17
}
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    18
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    19
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    20
enum {
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    21
	RAILWAY_BASE = 0x0,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    22
	AIRPORT_BASE = 0x8,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    23
	TRUCK_BASE = 0x43,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    24
	BUS_BASE = 0x47,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    25
	OILRIG_BASE = 0x4B,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    26
	DOCK_BASE = 0x4C,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    27
	DOCK_BASE_WATER_PART = 0x50,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    28
	BUOY_BASE = 0x52,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    29
	AIRPORT_BASE_EXTENDED = 0x53,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    30
3353
2f6e03bd3c29 (svn r4143) -[FS#86]: Fixed and obi-wan error in station_map.h that would lead to assertions in the airport handling (of international airports)
celestar
parents: 3338
diff changeset
    31
	BASE_END = 0x73
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    32
};
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    33
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    34
enum {
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    35
	RAILWAY_SIZE = AIRPORT_BASE - RAILWAY_BASE,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    36
	AIRPORT_SIZE = TRUCK_BASE - AIRPORT_BASE,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    37
	TRUCK_SIZE = BUS_BASE - TRUCK_BASE,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    38
	BUS_SIZE = OILRIG_BASE - BUS_BASE,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    39
	DOCK_SIZE_TOTAL = BUOY_BASE - DOCK_BASE,
3353
2f6e03bd3c29 (svn r4143) -[FS#86]: Fixed and obi-wan error in station_map.h that would lead to assertions in the airport handling (of international airports)
celestar
parents: 3338
diff changeset
    40
	AIRPORT_SIZE_EXTENDED = BASE_END - AIRPORT_BASE_EXTENDED
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    41
};
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    42
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    43
typedef enum HangarTiles {
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    44
	HANGAR_TILE_0 = 32,
3337
07e476ea35b5 (svn r4119) There's one more possible hangar tile. Check for this in IsHangar(), too
tron
parents: 3334
diff changeset
    45
	HANGAR_TILE_1 = 65,
07e476ea35b5 (svn r4119) There's one more possible hangar tile. Check for this in IsHangar(), too
tron
parents: 3334
diff changeset
    46
	HANGAR_TILE_2 = 86
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    47
} HangarTiles;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    48
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    49
typedef enum StationType {
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    50
	STATION_RAIL,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    51
	STATION_HANGAR,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    52
	STATION_AIRPORT,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    53
	STATION_TRUCK,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    54
	STATION_BUS,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    55
	STATION_OILRIG,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    56
	STATION_DOCK,
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    57
	STATION_BUOY
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    58
} StationType;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    59
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    60
StationType GetStationType(TileIndex);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    61
3360
edef9ad64773 (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
celestar
parents: 3353
diff changeset
    62
static inline RoadStopType GetRoadStopType(TileIndex t)
edef9ad64773 (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
celestar
parents: 3353
diff changeset
    63
{
edef9ad64773 (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
celestar
parents: 3353
diff changeset
    64
	assert(GetStationType(t) == STATION_TRUCK || GetStationType(t) == STATION_BUS);
edef9ad64773 (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
celestar
parents: 3353
diff changeset
    65
	return GetStationType(t) == STATION_TRUCK ? RS_TRUCK : RS_BUS;
edef9ad64773 (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
celestar
parents: 3353
diff changeset
    66
}
edef9ad64773 (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
celestar
parents: 3353
diff changeset
    67
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    68
static inline bool IsRailwayStation(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    69
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
    70
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    71
	return _m[t].m5 < RAILWAY_BASE + RAILWAY_SIZE;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    72
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    73
3442
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
    74
static inline bool IsRailwayStationTile(TileIndex t)
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
    75
{
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
    76
	return IsTileType(t, MP_STATION) && IsRailwayStation(t);
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
    77
}
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
    78
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    79
static inline bool IsHangar(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    80
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
    81
	assert(IsTileType(t, MP_STATION));
3337
07e476ea35b5 (svn r4119) There's one more possible hangar tile. Check for this in IsHangar(), too
tron
parents: 3334
diff changeset
    82
	return
07e476ea35b5 (svn r4119) There's one more possible hangar tile. Check for this in IsHangar(), too
tron
parents: 3334
diff changeset
    83
		_m[t].m5 == HANGAR_TILE_0 ||
07e476ea35b5 (svn r4119) There's one more possible hangar tile. Check for this in IsHangar(), too
tron
parents: 3334
diff changeset
    84
		_m[t].m5 == HANGAR_TILE_1 ||
07e476ea35b5 (svn r4119) There's one more possible hangar tile. Check for this in IsHangar(), too
tron
parents: 3334
diff changeset
    85
		_m[t].m5 == HANGAR_TILE_2;
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    86
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    87
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    88
static inline bool IsAirport(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    89
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
    90
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    91
	return
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    92
		IS_INT_INSIDE(_m[t].m5, AIRPORT_BASE, AIRPORT_BASE + AIRPORT_SIZE) ||
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    93
		IS_INT_INSIDE(_m[t].m5, AIRPORT_BASE_EXTENDED, AIRPORT_BASE_EXTENDED + AIRPORT_SIZE_EXTENDED);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    94
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    95
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    96
static inline bool IsTruckStop(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    97
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
    98
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
    99
	return IS_INT_INSIDE(_m[t].m5, TRUCK_BASE, TRUCK_BASE + TRUCK_SIZE);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   100
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   101
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   102
static inline bool IsBusStop(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   103
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
   104
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   105
	return IS_INT_INSIDE(_m[t].m5, BUS_BASE, BUS_BASE + BUS_SIZE);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   106
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   107
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   108
static inline bool IsRoadStop(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   109
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   110
	return IsTruckStop(t) || IsBusStop(t);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   111
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   112
3404
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   113
static inline bool IsRoadStopTile(TileIndex t)
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   114
{
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   115
	return IsTileType(t, MP_STATION) && IsRoadStop(t);
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   116
}
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   117
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   118
/**
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   119
 * Gets the direction the road stop entrance points towards.
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   120
 */
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   121
static inline DiagDirection GetRoadStopDir(TileIndex tile)
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   122
{
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   123
	assert(IsRoadStopTile(tile));
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   124
	return (_m[tile].m5 - TRUCK_BASE) & 3;
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   125
}
3ac4f7fedfb5 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency
celestar
parents: 3371
diff changeset
   126
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   127
static inline bool IsOilRig(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   128
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
   129
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   130
	return _m[t].m5 == OILRIG_BASE;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   131
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   132
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   133
static inline bool IsDock(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   134
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
   135
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   136
	return IS_INT_INSIDE(_m[t].m5, DOCK_BASE, DOCK_BASE + DOCK_SIZE_TOTAL);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   137
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   138
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   139
static inline bool IsBuoy_(TileIndex t) // XXX _ due to naming conflict
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   140
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
   141
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   142
	return _m[t].m5 == BUOY_BASE;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   143
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   144
3442
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
   145
static inline bool IsBuoyTile(TileIndex t)
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
   146
{
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
   147
	return IsTileType(t, MP_STATION) && IsBuoy_(t);
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
   148
}
c494e7246d7b (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h
celestar
parents: 3404
diff changeset
   149
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   150
3338
2c60ed0dcce3 (svn r4120) Use the new station functions where appropriate
tron
parents: 3337
diff changeset
   151
static inline bool IsHangarTile(TileIndex t)
2c60ed0dcce3 (svn r4120) Use the new station functions where appropriate
tron
parents: 3337
diff changeset
   152
{
2c60ed0dcce3 (svn r4120) Use the new station functions where appropriate
tron
parents: 3337
diff changeset
   153
	return IsTileType(t, MP_STATION) && IsHangar(t);
2c60ed0dcce3 (svn r4120) Use the new station functions where appropriate
tron
parents: 3337
diff changeset
   154
}
2c60ed0dcce3 (svn r4120) Use the new station functions where appropriate
tron
parents: 3337
diff changeset
   155
2c60ed0dcce3 (svn r4120) Use the new station functions where appropriate
tron
parents: 3337
diff changeset
   156
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   157
static inline Axis GetRailStationAxis(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   158
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   159
	assert(IsRailwayStation(t));
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   160
	return HASBIT(_m[t].m5, 0) ? AXIS_Y : AXIS_X;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   161
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   162
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   163
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   164
static inline Track GetRailStationTrack(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   165
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   166
	return GetRailStationAxis(t) == AXIS_X ? TRACK_X : TRACK_Y;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   167
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   168
3444
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   169
static inline bool IsCompatibleTrainStationTile(TileIndex t1, TileIndex t2)
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   170
{
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   171
	assert(IsRailwayStationTile(t2));
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   172
	return
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   173
		IsRailwayStationTile(t1) &&
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   174
		IsCompatibleRail(GetRailType(t1), GetRailType(t2)) &&
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   175
		GetRailStationAxis(t1) == GetRailStationAxis(t2);
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   176
}
d7f55b5e44b9 (svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
celestar
parents: 3443
diff changeset
   177
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   178
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   179
static inline DiagDirection GetDockDirection(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   180
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   181
	assert(IsTileType(t, MP_STATION));
3370
575f27ec6d14 (svn r4168) -Fix: Fixed a typo in previous commit
celestar
parents: 3369
diff changeset
   182
	assert(_m[t].m5 < DOCK_BASE_WATER_PART);
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   183
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   184
	return (DiagDirection)(_m[t].m5 - DOCK_BASE);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   185
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   186
3472
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   187
static inline TileIndexDiffC GetDockOffset(TileIndex t)
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   188
{
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   189
	static const TileIndexDiffC buoy_offset = {0, 0};
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   190
	static const TileIndexDiffC oilrig_offset = {2, 0};
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   191
	static const TileIndexDiffC dock_offset[DIAGDIR_END] = {
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   192
		{-2,  0},
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   193
		{ 0,  2},
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   194
		{ 2,  0},
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   195
		{ 0, -2},
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   196
	};
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   197
	assert(IsTileType(t, MP_STATION));
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   198
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   199
	if (IsBuoy_(t)) return buoy_offset;
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   200
	if (IsOilRig(t)) return oilrig_offset;
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   201
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   202
	assert(IsDock(t));
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   203
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   204
	return dock_offset[GetDockDirection(t)];
7ef2b2d6a632 (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup
celestar
parents: 3444
diff changeset
   205
}
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   206
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   207
static inline bool IsCustomStationSprite(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   208
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
   209
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   210
	return HASBIT(_m[t].m3, 4);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   211
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   212
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   213
static inline void SetCustomStationSprite(TileIndex t, byte sprite)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   214
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
   215
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   216
	SETBIT(_m[t].m3, 4);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   217
	_m[t].m4 = sprite;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   218
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   219
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   220
static inline uint GetCustomStationSprite(TileIndex t)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   221
{
3369
00c2ca209a89 (svn r4166) Sprinkle several map accessors with assert()s
tron
parents: 3360
diff changeset
   222
	assert(IsTileType(t, MP_STATION));
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   223
	return _m[t].m4;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   224
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   225
3474
45ef140f0f34 (svn r4319) -Codechange: Station map accessors
celestar
parents: 3472
diff changeset
   226
static inline byte GetStationGfx(TileIndex t)
45ef140f0f34 (svn r4319) -Codechange: Station map accessors
celestar
parents: 3472
diff changeset
   227
{
45ef140f0f34 (svn r4319) -Codechange: Station map accessors
celestar
parents: 3472
diff changeset
   228
	assert(IsTileType(t, MP_STATION));
45ef140f0f34 (svn r4319) -Codechange: Station map accessors
celestar
parents: 3472
diff changeset
   229
	return _m[t].m5;
45ef140f0f34 (svn r4319) -Codechange: Station map accessors
celestar
parents: 3472
diff changeset
   230
}
45ef140f0f34 (svn r4319) -Codechange: Station map accessors
celestar
parents: 3472
diff changeset
   231
3334
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   232
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   233
static inline void MakeStation(TileIndex t, Owner o, StationID sid, byte m5)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   234
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   235
	SetTileType(t, MP_STATION);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   236
	SetTileOwner(t, o);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   237
	_m[t].m2 = sid;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   238
	_m[t].m3 = 0;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   239
	_m[t].m4 = 0;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   240
	_m[t].m5 = m5;
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   241
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   242
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   243
static inline void MakeRailStation(TileIndex t, Owner o, StationID sid, Axis a, byte section, RailType rt)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   244
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   245
	MakeStation(t, o, sid, section + a);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   246
	SetRailType(t, rt);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   247
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   248
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   249
static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, DiagDirection d)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   250
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   251
	MakeStation(t, o, sid, (rst == RS_BUS ? BUS_BASE : TRUCK_BASE) + d);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   252
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   253
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   254
static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   255
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   256
	MakeStation(t, o, sid, section);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   257
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   258
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   259
static inline void MakeBuoy(TileIndex t, StationID sid)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   260
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   261
	MakeStation(t, OWNER_NONE, sid, BUOY_BASE);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   262
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   263
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   264
static inline void MakeDock(TileIndex t, Owner o, StationID sid, DiagDirection d)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   265
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   266
	MakeStation(t, o, sid, DOCK_BASE + d);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   267
	MakeStation(t + TileOffsByDir(d), o, sid, DOCK_BASE_WATER_PART + DiagDirToAxis(d));
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   268
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   269
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   270
static inline void MakeOilrig(TileIndex t, StationID sid)
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   271
{
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   272
	MakeStation(t, OWNER_NONE, sid, OILRIG_BASE);
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   273
}
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   274
b72ac8637a30 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3315
diff changeset
   275
#endif