src/station_map.h
branchcpp_gui
changeset 6268 4b5241e5dd10
parent 6254 abc6ad7c035c
child 6298 c30fe89622df
equal deleted inserted replaced
6267:7c8ec33959b1 6268:4b5241e5dd10
   167 {
   167 {
   168 	assert(IsDriveThroughStopTile(t));
   168 	assert(IsDriveThroughStopTile(t));
   169 	return HASBIT(_m[t].m6, 3);
   169 	return HASBIT(_m[t].m6, 3);
   170 }
   170 }
   171 
   171 
   172 static inline void SetStopBuiltOnTownRoad(TileIndex t)
       
   173 {
       
   174 	assert(IsDriveThroughStopTile(t));
       
   175 	SETBIT(_m[t].m6, 3);
       
   176 }
       
   177 
   172 
   178 /**
   173 /**
   179  * Gets the direction the road stop entrance points towards.
   174  * Gets the direction the road stop entrance points towards.
   180  */
   175  */
   181 static inline DiagDirection GetRoadStopDir(TileIndex t)
   176 static inline DiagDirection GetRoadStopDir(TileIndex t)
   310 {
   305 {
   311 	MakeStation(t, o, sid, section + a);
   306 	MakeStation(t, o, sid, section + a);
   312 	SetRailType(t, rt);
   307 	SetRailType(t, rt);
   313 }
   308 }
   314 
   309 
   315 static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, bool is_drive_through, DiagDirection d)
   310 static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, DiagDirection d)
   316 {
   311 {
   317 	if (is_drive_through) {
   312 	MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d);
   318 		MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE_EXT : GFX_TRUCK_BASE_EXT) + d);
   313 }
   319 	} else {
   314 
   320 		MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d);
   315 static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, Axis a, bool on_town_road)
   321 	}
   316 {
       
   317 	MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE_EXT : GFX_TRUCK_BASE_EXT) + a);
       
   318 	SB(_m[t].m6, 3, 1, on_town_road);
   322 }
   319 }
   323 
   320 
   324 static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section)
   321 static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section)
   325 {
   322 {
   326 	MakeStation(t, o, sid, section);
   323 	MakeStation(t, o, sid, section);