summaryrefslogtreecommitdiff
path: root/src/station_map.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-04-06 07:46:15 +0100
committerMichael Lutz <michi@icosahedron.de>2019-05-01 21:36:27 +0200
commitc02ef3e4564b7b54d49f0827d2d7625cbc38f335 (patch)
tree1c0ee62b6ce55124b247daaafa42300bfaa932e7 /src/station_map.h
parent21edf67f89c60351d5a0d84625455aa296b6b950 (diff)
downloadopenttd-c02ef3e4564b7b54d49f0827d2d7625cbc38f335.tar.xz
Feature: Add NotRoadTypes (NRT)
Diffstat (limited to 'src/station_map.h')
-rw-r--r--src/station_map.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/station_map.h b/src/station_map.h
index e591787e3..35766ec69 100644
--- a/src/station_map.h
+++ b/src/station_map.h
@@ -17,6 +17,7 @@
#include "water_map.h"
#include "station_func.h"
#include "rail.h"
+#include "road.h"
typedef byte StationGfx; ///< Index of station graphics. @see _station_display_datas
@@ -583,15 +584,16 @@ static inline void MakeRailWaypoint(TileIndex t, Owner o, StationID sid, Axis a,
* @param o the owner of the roadstop
* @param sid the station to which this tile belongs
* @param rst the type of roadstop to make this tile
- * @param rt the roadtypes on this tile
+ * @param road_rt the road roadtype on this tile
+ * @param tram_rt the tram roadtype on this tile
* @param d the direction of the roadstop
*/
-static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt, DiagDirection d)
+static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadType road_rt, RoadType tram_rt, DiagDirection d)
{
MakeStation(t, o, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), d);
- SetRoadTypes(t, rt);
- SetRoadOwner(t, ROADTYPE_ROAD, o);
- SetRoadOwner(t, ROADTYPE_TRAM, o);
+ SetRoadTypes(t, road_rt, tram_rt);
+ SetRoadOwner(t, RTT_ROAD, o);
+ SetRoadOwner(t, RTT_TRAM, o);
}
/**
@@ -602,15 +604,16 @@ static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopTyp
* @param tram the owner of the tram
* @param sid the station to which this tile belongs
* @param rst the type of roadstop to make this tile
- * @param rt the roadtypes on this tile
+ * @param road_rt the road roadtype on this tile
+ * @param tram_rt the tram roadtype on this tile
* @param a the direction of the roadstop
*/
-static inline void MakeDriveThroughRoadStop(TileIndex t, Owner station, Owner road, Owner tram, StationID sid, RoadStopType rst, RoadTypes rt, Axis a)
+static inline void MakeDriveThroughRoadStop(TileIndex t, Owner station, Owner road, Owner tram, StationID sid, RoadStopType rst, RoadType road_rt, RoadType tram_rt, Axis a)
{
MakeStation(t, station, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a);
- SetRoadTypes(t, rt);
- SetRoadOwner(t, ROADTYPE_ROAD, road);
- SetRoadOwner(t, ROADTYPE_TRAM, tram);
+ SetRoadTypes(t, road_rt, tram_rt);
+ SetRoadOwner(t, RTT_ROAD, road);
+ SetRoadOwner(t, RTT_TRAM, tram);
}
/**