src/tunnel_map.h
changeset 7157 270bc5b64e08
parent 7036 9f23930e7ded
child 7498 ce6588257e8d
equal deleted inserted replaced
7156:68de47bdcb80 7157:270bc5b64e08
     7 
     7 
     8 #include "direction.h"
     8 #include "direction.h"
     9 #include "macros.h"
     9 #include "macros.h"
    10 #include "map.h"
    10 #include "map.h"
    11 #include "rail.h"
    11 #include "rail.h"
       
    12 #include "road.h"
    12 
    13 
    13 /**
    14 /**
    14  * Is this a tunnel (entrance)?
    15  * Is this a tunnel (entrance)?
    15  * @param t the tile that might be a tunnel
    16  * @param t the tile that might be a tunnel
    16  * @pre IsTileType(t, MP_TUNNELBRIDGE)
    17  * @pre IsTileType(t, MP_TUNNELBRIDGE)
    91 /**
    92 /**
    92  * Makes a road tunnel entrance
    93  * Makes a road tunnel entrance
    93  * @param t the entrance of the tunnel
    94  * @param t the entrance of the tunnel
    94  * @param o the owner of the entrance
    95  * @param o the owner of the entrance
    95  * @param d the direction facing out of the tunnel
    96  * @param d the direction facing out of the tunnel
       
    97  * @param r the road type used in the tunnel
    96  */
    98  */
    97 static inline void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d)
    99 static inline void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d, RoadTypes r)
    98 {
   100 {
    99 	SetTileType(t, MP_TUNNELBRIDGE);
   101 	SetTileType(t, MP_TUNNELBRIDGE);
   100 	SetTileOwner(t, o);
   102 	SetTileOwner(t, o);
   101 	_m[t].m2 = 0;
   103 	_m[t].m2 = 0;
   102 	_m[t].m3 = 0;
   104 	_m[t].m3 = r;
   103 	_m[t].m4 = 0;
   105 	_m[t].m4 = 0;
   104 	_m[t].m5 = TRANSPORT_ROAD << 2 | d;
   106 	_m[t].m5 = TRANSPORT_ROAD << 2 | d;
   105 }
   107 }
   106 
   108 
   107 /**
   109 /**