summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-05-09 08:25:31 +0000
committerrubidium <rubidium@openttd.org>2006-05-09 08:25:31 +0000
commite5bd292dabdf5bbf58e5ce83c13688bbe047a62a (patch)
tree765d216fd61a2487ac5b4e9ca1bf318934ceac3c
parent9b1bbf72ee7ebb545ba7dc0ea11a84fc18b11c45 (diff)
downloadopenttd-e5bd292dabdf5bbf58e5ce83c13688bbe047a62a.tar.xz
(svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency
-rw-r--r--ai/default/default.c8
-rw-r--r--ai/trolly/trolly.c4
-rw-r--r--elrail.c2
-rw-r--r--order_gui.c2
-rw-r--r--rail_cmd.c2
-rw-r--r--road_cmd.c70
-rw-r--r--road_gui.c2
-rw-r--r--road_map.c8
-rw-r--r--road_map.h38
-rw-r--r--roadveh_cmd.c6
-rw-r--r--tunnelbridge_cmd.c2
11 files changed, 72 insertions, 72 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index 3740ae046..c0d19adee 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -2546,7 +2546,7 @@ static int32 AiDoBuildDefaultRoadBlock(TileIndex tile, const AiDefaultBlockData
if (p->mode == 2) {
if (IsTileType(c, MP_STREET) &&
- GetRoadType(c) == ROAD_NORMAL &&
+ GetRoadTileType(c) == ROAD_TILE_NORMAL &&
(GetRoadBits(c) & p->attr) != 0) {
roadflag |= 2;
@@ -2588,7 +2588,7 @@ clear_town_stuff:;
if (GetTileSlope(c, NULL) != SLOPE_FLAT) return CMD_ERROR;
- if (!IsTileType(c, MP_STREET) || GetRoadType(c) != ROAD_NORMAL) {
+ if (!IsTileType(c, MP_STREET) || GetRoadTileType(c) != ROAD_TILE_NORMAL) {
ret = DoCommand(c, 0, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_LANDSCAPE_CLEAR);
if (CmdFailed(ret)) return CMD_ERROR;
}
@@ -2765,7 +2765,7 @@ static bool AiEnumFollowRoad(TileIndex tile, AiRoadEnum *a, int track, uint leng
if (dist <= a->best_dist) {
TileIndex tile2 = TILE_MASK(tile + TileOffsByDir(_dir_by_track[track]));
- if (IsTileType(tile2, MP_STREET) && GetRoadType(tile2) == ROAD_NORMAL) {
+ if (IsTileType(tile2, MP_STREET) && GetRoadTileType(tile2) == ROAD_TILE_NORMAL) {
a->best_dist = dist;
a->best_tile = tile;
a->best_track = track;
@@ -3653,7 +3653,7 @@ pos_3:
if (IsLevelCrossing(tile)) goto is_rail_crossing;
- if (GetRoadType(tile) == ROAD_DEPOT) {
+ if (GetRoadTileType(tile) == ROAD_TILE_DEPOT) {
DiagDirection dir;
// Check if there are any stations around.
diff --git a/ai/trolly/trolly.c b/ai/trolly/trolly.c
index 257990164..5e8334ba2 100644
--- a/ai/trolly/trolly.c
+++ b/ai/trolly/trolly.c
@@ -796,7 +796,7 @@ static void AiNew_State_FindDepot(Player *p)
TileIndex t = tile + TileOffsByDir(j);
if (IsTileType(t, MP_STREET) &&
- GetRoadType(t) == ROAD_DEPOT &&
+ GetRoadTileType(t) == ROAD_TILE_DEPOT &&
IsTileOwner(t, _current_player) &&
GetRoadDepotDirection(t) == ReverseDiagDir(j)) {
p->ainew.depot_tile = t;
@@ -1097,7 +1097,7 @@ static void AiNew_State_BuildDepot(Player *p)
int res = 0;
assert(p->ainew.state == AI_STATE_BUILD_DEPOT);
- if (IsTileType(p->ainew.depot_tile, MP_STREET) && GetRoadType(p->ainew.depot_tile) == ROAD_DEPOT) {
+ if (IsTileType(p->ainew.depot_tile, MP_STREET) && GetRoadTileType(p->ainew.depot_tile) == ROAD_TILE_DEPOT) {
if (IsTileOwner(p->ainew.depot_tile, _current_player)) {
// The depot is already builded!
p->ainew.state = AI_STATE_BUILD_VEHICLE;
diff --git a/elrail.c b/elrail.c
index c45c88379..eef7f2bac 100644
--- a/elrail.c
+++ b/elrail.c
@@ -105,7 +105,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
}
}
case MP_STREET:
- if (GetRoadType(t) != ROAD_CROSSING) return 0;
+ if (GetRoadTileType(t) != ROAD_TILE_CROSSING) return 0;
if (GetRailTypeCrossing(t) != RAILTYPE_ELECTRIC) return 0;
return GetCrossingRailBits(t);
case MP_STATION:
diff --git a/order_gui.c b/order_gui.c
index d81f260bb..a82ea2731 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -211,7 +211,7 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
break;
case MP_STREET:
- if (GetRoadType(tile) == ROAD_DEPOT && v->type == VEH_Road && IsTileOwner(tile, _local_player)) {
+ if (GetRoadTileType(tile) == ROAD_TILE_DEPOT && v->type == VEH_Road && IsTileOwner(tile, _local_player)) {
order.type = OT_GOTO_DEPOT;
order.flags = OF_PART_OF_ORDERS;
order.station = GetDepotByTile(tile)->index;
diff --git a/rail_cmd.c b/rail_cmd.c
index aa5f80368..773c981cd 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -288,7 +288,7 @@ int32 CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!EnsureNoVehicle(tile)) return CMD_ERROR;
- if (GetRoadType(tile) == ROAD_NORMAL && (
+ if (GetRoadTileType(tile) == ROAD_TILE_NORMAL && (
(track == TRACK_X && GetRoadBits(tile) == ROAD_Y) ||
(track == TRACK_Y && GetRoadBits(tile) == ROAD_X)
)) {
diff --git a/road_cmd.c b/road_cmd.c
index 6a7953e8a..e1d7a09a3 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -149,8 +149,8 @@ int32 CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
// removal allowance depends on difficulty setting
if (!CheckforTownRating(flags, t, ROAD_REMOVE)) return CMD_ERROR;
- switch (GetRoadType(tile)) {
- case ROAD_NORMAL: {
+ switch (GetRoadTileType(tile)) {
+ case ROAD_TILE_NORMAL: {
RoadBits present = GetRoadBits(tile);
RoadBits c = pieces;
@@ -178,7 +178,7 @@ int32 CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
return CountRoadBits(c) * _price.remove_road;
}
- case ROAD_CROSSING: {
+ case ROAD_TILE_CROSSING: {
if (pieces & ComplementRoadBits(GetCrossingRoadBits(tile))) {
return CMD_ERROR;
}
@@ -193,7 +193,7 @@ int32 CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
default:
- case ROAD_DEPOT:
+ case ROAD_TILE_DEPOT:
return CMD_ERROR;
}
@@ -288,8 +288,8 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
switch (GetTileType(tile)) {
case MP_STREET:
- switch (GetRoadType(tile)) {
- case ROAD_NORMAL:
+ switch (GetRoadTileType(tile)) {
+ case ROAD_TILE_NORMAL:
existing = GetRoadBits(tile);
if ((existing & pieces) == pieces) {
return_cmd_error(STR_1007_ALREADY_BUILT);
@@ -297,14 +297,14 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!EnsureNoVehicle(tile)) return CMD_ERROR;
break;
- case ROAD_CROSSING:
+ case ROAD_TILE_CROSSING:
if (pieces != GetCrossingRoadBits(tile)) { // XXX is this correct?
return_cmd_error(STR_1007_ALREADY_BUILT);
}
goto do_clear;
default:
- case ROAD_DEPOT:
+ case ROAD_TILE_DEPOT:
goto do_clear;
}
break;
@@ -604,8 +604,8 @@ static int32 RemoveRoadDepot(TileIndex tile, uint32 flags)
static int32 ClearTile_Road(TileIndex tile, byte flags)
{
- switch (GetRoadType(tile)) {
- case ROAD_NORMAL: {
+ switch (GetRoadTileType(tile)) {
+ case ROAD_TILE_NORMAL: {
RoadBits b = GetRoadBits(tile);
if (!((1 << b) & (M(1)|M(2)|M(4)|M(8))) &&
@@ -616,7 +616,7 @@ static int32 ClearTile_Road(TileIndex tile, byte flags)
return DoCommand(tile, b, 0, flags, CMD_REMOVE_ROAD);
}
- case ROAD_CROSSING: {
+ case ROAD_TILE_CROSSING: {
int32 ret;
if (flags & DC_AUTO) return_cmd_error(STR_1801_MUST_REMOVE_ROAD_FIRST);
@@ -631,7 +631,7 @@ static int32 ClearTile_Road(TileIndex tile, byte flags)
}
default:
- case ROAD_DEPOT:
+ case ROAD_TILE_DEPOT:
if (flags & DC_AUTO) {
return_cmd_error(STR_2004_BUILDING_MUST_BE_DEMOLISHED);
}
@@ -742,12 +742,12 @@ static void DrawTile_Road(TileInfo *ti)
{
PalSpriteID image;
- switch (GetRoadType(ti->tile)) {
- case ROAD_NORMAL:
+ switch (GetRoadTileType(ti->tile)) {
+ case ROAD_TILE_NORMAL:
DrawRoadBits(ti, GetRoadBits(ti->tile));
break;
- case ROAD_CROSSING: {
+ case ROAD_TILE_CROSSING: {
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
image = GetRailTypeInfo(GetRailTypeCrossing(ti->tile))->base_sprites.crossing;
@@ -769,7 +769,7 @@ static void DrawTile_Road(TileInfo *ti)
}
default:
- case ROAD_DEPOT: {
+ case ROAD_TILE_DEPOT: {
uint32 ormod;
PlayerID player;
const DrawRoadSeqStruct* drss;
@@ -829,7 +829,7 @@ static uint GetSlopeZ_Road(const TileInfo* ti)
uint z = ti->z;
if (tileh == SLOPE_FLAT) return z;
- if (GetRoadType(ti->tile) == ROAD_NORMAL) {
+ if (GetRoadTileType(ti->tile) == ROAD_TILE_NORMAL) {
uint f = GetRoadFoundation(tileh, GetRoadBits(ti->tile));
if (f != 0) {
@@ -845,7 +845,7 @@ static uint GetSlopeZ_Road(const TileInfo* ti)
static Slope GetSlopeTileh_Road(TileIndex tile, Slope tileh)
{
if (tileh == SLOPE_FLAT) return SLOPE_FLAT;
- if (GetRoadType(tile) == ROAD_NORMAL) {
+ if (GetRoadTileType(tile) == ROAD_TILE_NORMAL) {
uint f = GetRoadFoundation(tileh, GetRoadBits(tile));
if (f == 0) return tileh;
@@ -904,7 +904,7 @@ static void TileLoop_Road(TileIndex tile)
break;
}
- if (GetRoadType(tile) == ROAD_DEPOT) return;
+ if (GetRoadTileType(tile) == ROAD_TILE_DEPOT) return;
if (!HasRoadWorks(tile)) {
t = ClosestTownFromTile(tile, (uint)-1);
@@ -916,7 +916,7 @@ static void TileLoop_Road(TileIndex tile)
// Show an animation to indicate road work
if (t->road_build_months != 0 &&
!(DistanceManhattan(t->xy, tile) >= 8 && grp == 0) &&
- GetRoadType(tile) == ROAD_NORMAL && (GetRoadBits(tile) == ROAD_X || GetRoadBits(tile) == ROAD_Y)) {
+ GetRoadTileType(tile) == ROAD_TILE_NORMAL && (GetRoadBits(tile) == ROAD_X || GetRoadBits(tile) == ROAD_Y)) {
if (GetTileSlope(tile, NULL) == SLOPE_FLAT && EnsureNoVehicle(tile) && CHANCE16(1, 20)) {
StartRoadWorks(tile);
@@ -963,7 +963,7 @@ void ShowRoadDepotWindow(TileIndex tile);
static void ClickTile_Road(TileIndex tile)
{
- if (GetRoadType(tile) == ROAD_DEPOT) ShowRoadDepotWindow(tile);
+ if (GetRoadTileType(tile) == ROAD_TILE_DEPOT) ShowRoadDepotWindow(tile);
}
static const byte _road_trackbits[16] = {
@@ -978,11 +978,11 @@ static uint32 GetTileTrackStatus_Road(TileIndex tile, TransportType mode)
return GetCrossingRailBits(tile) * 0x101;
case TRANSPORT_ROAD:
- switch (GetRoadType(tile)) {
- case ROAD_NORMAL:
+ switch (GetRoadTileType(tile)) {
+ case ROAD_TILE_NORMAL:
return HasRoadWorks(tile) ? 0 : _road_trackbits[GetRoadBits(tile)] * 0x101;
- case ROAD_CROSSING: {
+ case ROAD_TILE_CROSSING: {
uint32 r = (GetCrossingRoadAxis(tile) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y) * 0x101;
if (IsCrossingBarred(tile)) r *= 0x10001;
@@ -990,7 +990,7 @@ static uint32 GetTileTrackStatus_Road(TileIndex tile, TransportType mode)
}
default:
- case ROAD_DEPOT:
+ case ROAD_TILE_DEPOT:
break;
}
break;
@@ -1014,9 +1014,9 @@ static const StringID _road_tile_strings[] = {
static void GetTileDesc_Road(TileIndex tile, TileDesc *td)
{
td->owner = GetTileOwner(tile);
- switch (GetRoadType(tile)) {
- case ROAD_CROSSING: td->str = STR_1818_ROAD_RAIL_LEVEL_CROSSING; break;
- case ROAD_DEPOT: td->str = STR_1817_ROAD_VEHICLE_DEPOT; break;
+ switch (GetRoadTileType(tile)) {
+ case ROAD_TILE_CROSSING: td->str = STR_1818_ROAD_RAIL_LEVEL_CROSSING; break;
+ case ROAD_TILE_DEPOT: td->str = STR_1817_ROAD_VEHICLE_DEPOT; break;
default: td->str = _road_tile_strings[GetGroundType(tile)]; break;
}
}
@@ -1027,8 +1027,8 @@ static const byte _roadveh_enter_depot_unk0[4] = {
static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
{
- switch (GetRoadType(tile)) {
- case ROAD_CROSSING:
+ switch (GetRoadTileType(tile)) {
+ case ROAD_TILE_CROSSING:
if (v->type == VEH_Train && !IsCrossingBarred(tile)) {
/* train crossing a road */
SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
@@ -1037,7 +1037,7 @@ static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
}
break;
- case ROAD_DEPOT:
+ case ROAD_TILE_DEPOT:
if (v->type == VEH_Road && v->u.road.frame == 11) {
if (_roadveh_enter_depot_unk0[GetRoadDepotDirection(tile)] == v->u.road.state) {
RoadVehEnterDepot(v);
@@ -1063,17 +1063,17 @@ static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID n
if (new_player != OWNER_SPECTATOR) {
SetTileOwner(tile, new_player);
} else {
- switch (GetRoadType(tile)) {
- case ROAD_NORMAL:
+ switch (GetRoadTileType(tile)) {
+ case ROAD_TILE_NORMAL:
SetTileOwner(tile, OWNER_NONE);
break;
- case ROAD_CROSSING:
+ case ROAD_TILE_CROSSING:
MakeRoadNormal(tile, GetCrossingRoadOwner(tile), GetCrossingRoadBits(tile), GetTownIndex(tile));
break;
default:
- case ROAD_DEPOT:
+ case ROAD_TILE_DEPOT:
DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
break;
}
diff --git a/road_gui.c b/road_gui.c
index 2f5d2514b..60c11f9e7 100644
--- a/road_gui.c
+++ b/road_gui.c
@@ -72,7 +72,7 @@ static void BuildRoadOutsideStation(TileIndex tile, DiagDirection direction)
{
tile += TileOffsByDir(direction);
// if there is a roadpiece just outside of the station entrance, build a connecting route
- if (IsTileType(tile, MP_STREET) && GetRoadType(tile) == ROAD_NORMAL) {
+ if (IsTileType(tile, MP_STREET) && GetRoadTileType(tile) == ROAD_TILE_NORMAL) {
DoCommandP(tile, DiagDirToRoadBits(ReverseDiagDir(direction)), 0, NULL, CMD_BUILD_ROAD);
}
}
diff --git a/road_map.c b/road_map.c
index 7e75d683f..2ae989280 100644
--- a/road_map.c
+++ b/road_map.c
@@ -14,11 +14,11 @@ RoadBits GetAnyRoadBits(TileIndex tile)
{
switch (GetTileType(tile)) {
case MP_STREET:
- switch (GetRoadType(tile)) {
+ switch (GetRoadTileType(tile)) {
default:
- case ROAD_NORMAL: return GetRoadBits(tile);
- case ROAD_CROSSING: return GetCrossingRoadBits(tile);
- case ROAD_DEPOT: return DiagDirToRoadBits(GetRoadDepotDirection(tile));
+ case ROAD_TILE_NORMAL: return GetRoadBits(tile);
+ case ROAD_TILE_CROSSING: return GetCrossingRoadBits(tile);
+ case ROAD_TILE_DEPOT: return DiagDirToRoadBits(GetRoadDepotDirection(tile));
}
case MP_STATION:
diff --git a/road_map.h b/road_map.h
index f623b227e..9ec47bbea 100644
--- a/road_map.h
+++ b/road_map.h
@@ -9,13 +9,13 @@
#include "tile.h"
-typedef enum RoadType {
- ROAD_NORMAL,
- ROAD_CROSSING,
- ROAD_DEPOT
-} RoadType;
+typedef enum RoadTileType {
+ ROAD_TILE_NORMAL,
+ ROAD_TILE_CROSSING,
+ ROAD_TILE_DEPOT
+} RoadTileType;
-static inline RoadType GetRoadType(TileIndex t)
+static inline RoadTileType GetRoadTileType(TileIndex t)
{
assert(IsTileType(t, MP_STREET));
return GB(_m[t].m5, 4, 4);
@@ -23,7 +23,7 @@ static inline RoadType GetRoadType(TileIndex t)
static inline bool IsLevelCrossing(TileIndex t)
{
- return GetRoadType(t) == ROAD_CROSSING;
+ return GetRoadTileType(t) == ROAD_TILE_CROSSING;
}
static inline bool IsLevelCrossingTile(TileIndex t)
@@ -33,20 +33,20 @@ static inline bool IsLevelCrossingTile(TileIndex t)
static inline RoadBits GetRoadBits(TileIndex t)
{
- assert(GetRoadType(t) == ROAD_NORMAL);
+ assert(GetRoadTileType(t) == ROAD_TILE_NORMAL);
return GB(_m[t].m5, 0, 4);
}
static inline void SetRoadBits(TileIndex t, RoadBits r)
{
- assert(GetRoadType(t) == ROAD_NORMAL); // XXX incomplete
+ assert(GetRoadTileType(t) == ROAD_TILE_NORMAL); // XXX incomplete
SB(_m[t].m5, 0, 4, r);
}
static inline Axis GetCrossingRoadAxis(TileIndex t)
{
- assert(GetRoadType(t) == ROAD_CROSSING);
+ assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
return (Axis)GB(_m[t].m5, 3, 1);
}
@@ -64,31 +64,31 @@ static inline TrackBits GetCrossingRailBits(TileIndex tile)
// TODO swap owner of road and rail
static inline Owner GetCrossingRoadOwner(TileIndex t)
{
- assert(GetRoadType(t) == ROAD_CROSSING);
+ assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
return (Owner)_m[t].m3;
}
static inline void SetCrossingRoadOwner(TileIndex t, Owner o)
{
- assert(GetRoadType(t) == ROAD_CROSSING);
+ assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
_m[t].m3 = o;
}
static inline void UnbarCrossing(TileIndex t)
{
- assert(GetRoadType(t) == ROAD_CROSSING);
+ assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
CLRBIT(_m[t].m5, 2);
}
static inline void BarCrossing(TileIndex t)
{
- assert(GetRoadType(t) == ROAD_CROSSING);
+ assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
SETBIT(_m[t].m5, 2);
}
static inline bool IsCrossingBarred(TileIndex t)
{
- assert(GetRoadType(t) == ROAD_CROSSING);
+ assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
return HASBIT(_m[t].m5, 2);
}
@@ -161,7 +161,7 @@ static inline bool HasPavement(TileIndex t)
static inline DiagDirection GetRoadDepotDirection(TileIndex t)
{
- assert(GetRoadType(t) == ROAD_DEPOT);
+ assert(GetRoadTileType(t) == ROAD_TILE_DEPOT);
return (DiagDirection)GB(_m[t].m5, 0, 2);
}
@@ -187,7 +187,7 @@ static inline void MakeRoadNormal(TileIndex t, Owner owner, RoadBits bits, uint
_m[t].m2 = town;
_m[t].m3 = 0;
_m[t].m4 = 0 << 7 | 0 << 4 | 0;
- _m[t].m5 = ROAD_NORMAL << 4 | bits;
+ _m[t].m5 = ROAD_TILE_NORMAL << 4 | bits;
}
@@ -198,7 +198,7 @@ static inline void MakeRoadCrossing(TileIndex t, Owner road, Owner rail, Axis ro
_m[t].m2 = town;
_m[t].m3 = road;
_m[t].m4 = 0 << 7 | 0 << 4 | rt;
- _m[t].m5 = ROAD_CROSSING << 4 | roaddir << 3 | 0 << 2;
+ _m[t].m5 = ROAD_TILE_CROSSING << 4 | roaddir << 3 | 0 << 2;
}
@@ -209,7 +209,7 @@ static inline void MakeRoadDepot(TileIndex t, Owner owner, DiagDirection dir)
_m[t].m2 = 0;
_m[t].m3 = 0;
_m[t].m4 = 0;
- _m[t].m5 = ROAD_DEPOT << 4 | dir;
+ _m[t].m5 = ROAD_TILE_DEPOT << 4 | dir;
}
#endif
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 64efce814..c9d1176f8 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -298,7 +298,7 @@ static bool EnumRoadSignalFindDepot(TileIndex tile, void* data, int track, uint
tile += TileOffsByDir(_road_pf_directions[track]);
if (IsTileType(tile, MP_STREET) &&
- GetRoadType(tile) == ROAD_DEPOT &&
+ GetRoadTileType(tile) == ROAD_TILE_DEPOT &&
IsTileOwner(tile, rfdd->owner) &&
length < rfdd->best_length) {
rfdd->best_length = length;
@@ -1003,7 +1003,7 @@ static int RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection enterdir
}
if (IsTileType(tile, MP_STREET)) {
- if (GetRoadType(tile) == ROAD_DEPOT && IsTileOwner(tile, v->owner)) {
+ if (GetRoadTileType(tile) == ROAD_TILE_DEPOT && IsTileOwner(tile, v->owner)) {
/* Road depot */
bitmask |= _road_veh_fp_ax_or[GetRoadDepotDirection(tile)];
}
@@ -1078,7 +1078,7 @@ static int RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection enterdir
DiagDirection dir;
if (IsTileType(desttile, MP_STREET)) {
- if (GetRoadType(desttile) == ROAD_DEPOT) {
+ if (GetRoadTileType(desttile) == ROAD_TILE_DEPOT) {
dir = GetRoadDepotDirection(desttile);
goto do_it;
}
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index d1815a7eb..3076cc236 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -344,7 +344,7 @@ int32 CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2)
break;
case MP_STREET:
- if (GetRoadType(tile) != ROAD_NORMAL ||
+ if (GetRoadTileType(tile) != ROAD_TILE_NORMAL ||
GetRoadBits(tile) != (direction == AXIS_X ? ROAD_Y : ROAD_X)) {
goto not_valid_below;
}