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:
Jonathan G Rennison
2024-01-07 15:00:16 +00:00
106 changed files with 1080 additions and 1080 deletions

View File

@@ -325,7 +325,7 @@ public:
* @param railtype the rail type which the information is requested for
* @return The pointer to the RailTypeInfo
*/
static inline const RailTypeInfo *GetRailTypeInfo(RailType railtype)
inline const RailTypeInfo *GetRailTypeInfo(RailType railtype)
{
extern RailTypeInfo _railtypes[RAILTYPE_END];
dbg_assert_msg(railtype < RAILTYPE_END, "%u", railtype);
@@ -340,7 +340,7 @@ static inline const RailTypeInfo *GetRailTypeInfo(RailType railtype)
* @param enginetype The RailType of the engine we are considering.
* @param tiletype The RailType of the tile we are considering.
*/
static inline bool IsCompatibleRail(RailType enginetype, RailType tiletype)
inline bool IsCompatibleRail(RailType enginetype, RailType tiletype)
{
return HasBit(GetRailTypeInfo(enginetype)->compatible_railtypes, tiletype);
}
@@ -353,7 +353,7 @@ static inline bool IsCompatibleRail(RailType enginetype, RailType tiletype)
* @param enginetype The RailType of the engine we are considering.
* @param tiletype The RailType of the tile we are considering.
*/
static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype)
inline bool HasPowerOnRail(RailType enginetype, RailType tiletype)
{
return HasBit(GetRailTypeInfo(enginetype)->powered_railtypes, tiletype);
}
@@ -363,7 +363,7 @@ static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype)
* @param rt The RailType to check.
* @return Whether level crossings are not allowed.
*/
static inline bool RailNoLevelCrossings(RailType rt)
inline bool RailNoLevelCrossings(RailType rt)
{
return HasBit(GetRailTypeInfo(rt)->flags, RTF_NO_LEVEL_CROSSING);
}
@@ -375,7 +375,7 @@ static inline bool RailNoLevelCrossings(RailType rt)
* @param def Default value to use if the rail type doesn't specify anything.
* @return True if 90 degree turns are disallowed between the two rail types.
*/
static inline bool Rail90DegTurnDisallowed(RailType rt1, RailType rt2, bool def = _settings_game.pf.forbid_90_deg)
inline bool Rail90DegTurnDisallowed(RailType rt1, RailType rt2, bool def = _settings_game.pf.forbid_90_deg)
{
if (rt1 == INVALID_RAILTYPE || rt2 == INVALID_RAILTYPE) return def;
@@ -388,17 +388,17 @@ static inline bool Rail90DegTurnDisallowed(RailType rt1, RailType rt2, bool def
return rt1_90deg || rt2_90deg;
}
static inline bool Rail90DegTurnDisallowedTilesFromDiagDir(TileIndex t1, TileIndex t2, DiagDirection t1_towards_t2, bool def = _settings_game.pf.forbid_90_deg)
inline bool Rail90DegTurnDisallowedTilesFromDiagDir(TileIndex t1, TileIndex t2, DiagDirection t1_towards_t2, bool def = _settings_game.pf.forbid_90_deg)
{
return Rail90DegTurnDisallowed(GetTileRailTypeByEntryDir(t1, ReverseDiagDir(t1_towards_t2)), GetTileRailTypeByEntryDir(t2, t1_towards_t2), def);
}
static inline bool Rail90DegTurnDisallowedAdjacentTiles(TileIndex t1, TileIndex t2, bool def = _settings_game.pf.forbid_90_deg)
inline bool Rail90DegTurnDisallowedAdjacentTiles(TileIndex t1, TileIndex t2, bool def = _settings_game.pf.forbid_90_deg)
{
return Rail90DegTurnDisallowedTilesFromDiagDir(t1, t2, DiagdirBetweenTiles(t1, t2));
}
static inline bool Rail90DegTurnDisallowedTilesFromTrackdir(TileIndex t1, TileIndex t2, Trackdir t1_td, bool def = _settings_game.pf.forbid_90_deg)
inline bool Rail90DegTurnDisallowedTilesFromTrackdir(TileIndex t1, TileIndex t2, Trackdir t1_td, bool def = _settings_game.pf.forbid_90_deg)
{
return Rail90DegTurnDisallowedTilesFromDiagDir(t1, t2, TrackdirToExitdir(t1_td));
}
@@ -408,7 +408,7 @@ static inline bool Rail90DegTurnDisallowedTilesFromTrackdir(TileIndex t1, TileIn
* @param railtype The railtype being built.
* @return The cost multiplier.
*/
static inline Money RailBuildCost(RailType railtype)
inline Money RailBuildCost(RailType railtype)
{
dbg_assert(railtype < RAILTYPE_END);
return (_price[PR_BUILD_RAIL] * GetRailTypeInfo(railtype)->cost_multiplier) >> 3;
@@ -419,7 +419,7 @@ static inline Money RailBuildCost(RailType railtype)
* @param railtype The railtype being removed.
* @return The cost.
*/
static inline Money RailClearCost(RailType railtype)
inline Money RailClearCost(RailType railtype)
{
/* Clearing rail in fact earns money, but if the build cost is set
* very low then a loophole exists where money can be made.
@@ -436,7 +436,7 @@ static inline Money RailClearCost(RailType railtype)
* @param to The railtype we are converting to
* @return Cost per TrackBit
*/
static inline Money RailConvertCost(RailType from, RailType to)
inline Money RailConvertCost(RailType from, RailType to)
{
/* Get the costs for removing and building anew
* A conversion can never be more costly */
@@ -463,7 +463,7 @@ static inline Money RailConvertCost(RailType from, RailType to)
* @param total_num Total number of track bits of all railtypes.
* @return Total cost.
*/
static inline Money RailMaintenanceCost(RailType railtype, uint32 num, uint32 total_num)
inline Money RailMaintenanceCost(RailType railtype, uint32_t num, uint32_t total_num)
{
dbg_assert(railtype < RAILTYPE_END);
return (_price[PR_INFRASTRUCTURE_RAIL] * GetRailTypeInfo(railtype)->maintenance_multiplier * num * (1 + IntSqrt(total_num))) >> 11; // 4 bits fraction for the multiplier and 7 bits scaling.
@@ -474,7 +474,7 @@ static inline Money RailMaintenanceCost(RailType railtype, uint32 num, uint32 to
* @param num Number of signals.
* @return Total cost.
*/
static inline Money SignalMaintenanceCost(uint32 num)
inline Money SignalMaintenanceCost(uint32_t num)
{
return (_price[PR_INFRASTRUCTURE_RAIL] * 15 * num * (1 + IntSqrt(num))) >> 8; // 1 bit fraction for the multiplier and 7 bits scaling.
}