src/station_map.h
changeset 7157 270bc5b64e08
parent 6916 e87d54a598ea
child 7768 2060e8d65a72
equal deleted inserted replaced
7156:68de47bdcb80 7157:270bc5b64e08
     4 
     4 
     5 #ifndef STATION_MAP_H
     5 #ifndef STATION_MAP_H
     6 #define STATION_MAP_H
     6 #define STATION_MAP_H
     7 
     7 
     8 #include "rail_map.h"
     8 #include "rail_map.h"
       
     9 #include "road_map.h"
     9 #include "station.h"
    10 #include "station.h"
    10 
    11 
    11 typedef byte StationGfx;
    12 typedef byte StationGfx;
    12 
    13 
    13 static inline StationID GetStationIndex(TileIndex t)
    14 static inline StationID GetStationIndex(TileIndex t)
   307 {
   308 {
   308 	MakeStation(t, o, sid, section + a);
   309 	MakeStation(t, o, sid, section + a);
   309 	SetRailType(t, rt);
   310 	SetRailType(t, rt);
   310 }
   311 }
   311 
   312 
   312 static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, DiagDirection d)
   313 static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, RoadTypes rt, DiagDirection d)
   313 {
   314 {
   314 	MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d);
   315 	MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d);
   315 }
   316 	SetRoadTypes(t, rt);
   316 
   317 }
   317 static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, Axis a, bool on_town_road)
   318 
       
   319 static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, RoadTypes rt, Axis a, bool on_town_road)
   318 {
   320 {
   319 	MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE_EXT : GFX_TRUCK_BASE_EXT) + a);
   321 	MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE_EXT : GFX_TRUCK_BASE_EXT) + a);
   320 	SB(_m[t].m6, 3, 1, on_town_road);
   322 	SB(_m[t].m6, 3, 1, on_town_road);
       
   323 	SetRoadTypes(t, rt);
   321 }
   324 }
   322 
   325 
   323 static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section)
   326 static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section)
   324 {
   327 {
   325 	MakeStation(t, o, sid, section);
   328 	MakeStation(t, o, sid, section);