Merge branch 'master' into jgrpp
# Conflicts: # src/3rdparty/squirrel/include/squirrel.h # src/blitter/32bpp_sse_func.hpp # src/bridge_map.h # src/clear_map.h # src/company_manager_face.h # src/console_func.h # src/core/bitmath_func.hpp # src/core/endian_func.hpp # src/core/random_func.hpp # src/depot_map.h # src/elrail_func.h # src/fontcache.h # src/industry_map.h # src/map_func.h # src/newgrf_spritegroup.h # src/object_map.h # src/rail.h # src/rail_map.h # src/road_func.h # src/road_map.h # src/saveload/saveload.h # src/saveload/saveload_error.hpp # src/settings_gui.cpp # src/sl/oldloader.h # src/sprite.h # src/spritecache.h # src/station_func.h # src/station_map.h # src/story_base.h # src/strings_func.h # src/tile_cmd.h # src/tile_map.h # src/tile_type.h # src/town.h # src/town_map.h # src/tree_map.h # src/tunnel_map.h # src/tunnelbridge_map.h # src/vehicle_func.h # src/viewport_func.h # src/void_map.h # src/water.h # src/water_map.h # src/widget_type.h
This commit is contained in:
@@ -22,7 +22,7 @@ static const TunnelID TUNNEL_ID_MAP_LOOKUP = 0xFFFF; ///< Sentinel ID value to s
|
||||
* @pre IsTileType(t, MP_TUNNELBRIDGE)
|
||||
* @return true if and only if this tile is a tunnel (entrance)
|
||||
*/
|
||||
static inline bool IsTunnel(TileIndex t)
|
||||
inline bool IsTunnel(TileIndex t)
|
||||
{
|
||||
dbg_assert_tile(IsTileType(t, MP_TUNNELBRIDGE), t);
|
||||
return !HasBit(_m[t].m5, 7);
|
||||
@@ -33,7 +33,7 @@ static inline bool IsTunnel(TileIndex t)
|
||||
* @param t the tile that might be a tunnel
|
||||
* @return true if and only if this tile is a tunnel (entrance)
|
||||
*/
|
||||
static inline bool IsTunnelTile(TileIndex t)
|
||||
inline bool IsTunnelTile(TileIndex t)
|
||||
{
|
||||
return IsTileType(t, MP_TUNNELBRIDGE) && IsTunnel(t);
|
||||
}
|
||||
@@ -44,7 +44,7 @@ static inline bool IsTunnelTile(TileIndex t)
|
||||
* @pre IsTunnelTile(t)
|
||||
* @return TunnelID
|
||||
*/
|
||||
static inline TunnelID GetTunnelIndex(TileIndex t)
|
||||
inline TunnelID GetTunnelIndex(TileIndex t)
|
||||
{
|
||||
extern TunnelID GetTunnelIndexByLookup(TileIndex t);
|
||||
|
||||
@@ -58,7 +58,7 @@ static inline TunnelID GetTunnelIndex(TileIndex t)
|
||||
* @param t the tile that might be a rail tunnel
|
||||
* @return true if it is a rail tunnel
|
||||
*/
|
||||
static inline bool IsRailTunnelTile(TileIndex t)
|
||||
inline bool IsRailTunnelTile(TileIndex t)
|
||||
{
|
||||
return IsTunnelTile(t) && (TransportType)GB(_m[t].m5, 2, 2) == TRANSPORT_RAIL;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ static inline bool IsRailTunnelTile(TileIndex t)
|
||||
* @param t the tile
|
||||
* @return reservation state
|
||||
*/
|
||||
static inline bool HasTunnelReservation(TileIndex t)
|
||||
inline bool HasTunnelReservation(TileIndex t)
|
||||
{
|
||||
dbg_assert_tile(IsRailTunnelTile(t), t);
|
||||
return HasBit(_m[t].m5, 4);
|
||||
@@ -81,7 +81,7 @@ static inline bool HasTunnelReservation(TileIndex t)
|
||||
* @param t the tile
|
||||
* @param b the reservation state
|
||||
*/
|
||||
static inline void SetTunnelReservation(TileIndex t, bool b)
|
||||
inline void SetTunnelReservation(TileIndex t, bool b)
|
||||
{
|
||||
dbg_assert_tile(IsRailTunnelTile(t), t);
|
||||
SB(_m[t].m5, 4, 1, b ? 1 : 0);
|
||||
@@ -105,7 +105,7 @@ bool IsTunnelInWay(TileIndex, int z, IsTunnelInWayFlags flags = ITIWF_NONE);
|
||||
* @param id the tunnel ID
|
||||
* @pre IsTunnelTile(t)
|
||||
*/
|
||||
static inline void SetTunnelIndex(TileIndex t, TunnelID id)
|
||||
inline void SetTunnelIndex(TileIndex t, TunnelID id)
|
||||
{
|
||||
dbg_assert_tile(IsTunnelTile(t), t);
|
||||
_m[t].m2 = (id >= TUNNEL_ID_MAP_LOOKUP) ? TUNNEL_ID_MAP_LOOKUP : id;
|
||||
@@ -113,7 +113,7 @@ static inline void SetTunnelIndex(TileIndex t, TunnelID id)
|
||||
|
||||
void SetTunnelSignalStyle(TileIndex t, TileIndex end, uint8 style);
|
||||
|
||||
static inline uint8 GetTunnelSignalStyle(TileIndex t)
|
||||
inline uint8 GetTunnelSignalStyle(TileIndex t)
|
||||
{
|
||||
if (likely(!HasBit(_m[t].m3, 7))) return 0;
|
||||
|
||||
@@ -129,7 +129,7 @@ static inline uint8 GetTunnelSignalStyle(TileIndex t)
|
||||
* @param d the direction facing out of the tunnel
|
||||
* @param r the road type used in the tunnel
|
||||
*/
|
||||
static inline void MakeRoadTunnel(TileIndex t, Owner o, TunnelID id, DiagDirection d, RoadType road_rt, RoadType tram_rt)
|
||||
inline void MakeRoadTunnel(TileIndex t, Owner o, TunnelID id, DiagDirection d, RoadType road_rt, RoadType tram_rt)
|
||||
{
|
||||
SetTileType(t, MP_TUNNELBRIDGE);
|
||||
SetTileOwner(t, o);
|
||||
@@ -153,7 +153,7 @@ static inline void MakeRoadTunnel(TileIndex t, Owner o, TunnelID id, DiagDirecti
|
||||
* @param d the direction facing out of the tunnel
|
||||
* @param r the rail type used in the tunnel
|
||||
*/
|
||||
static inline void MakeRailTunnel(TileIndex t, Owner o, TunnelID id, DiagDirection d, RailType r)
|
||||
inline void MakeRailTunnel(TileIndex t, Owner o, TunnelID id, DiagDirection d, RailType r)
|
||||
{
|
||||
SetTileType(t, MP_TUNNELBRIDGE);
|
||||
SetTileOwner(t, o);
|
||||
|
Reference in New Issue
Block a user