Merge branch 'master' into jgrpp

# Conflicts:
#	src/game/game_gui.cpp
#	src/graph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/newgrf.cpp
#	src/order_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_text.cpp
#	src/script/script_gui.cpp
#	src/settings_table.cpp
#	src/strings.cpp
#	src/table/settings/economy_settings.ini
#	src/table/settings/locale_settings.ini
#	src/timetable_gui.cpp
This commit is contained in:
Jonathan G Rennison
2023-04-10 15:11:53 +01:00
104 changed files with 527 additions and 293 deletions

View File

@@ -14,6 +14,7 @@
#include "string_type.h"
#include "gfx_type.h"
#include "core/bitmath_func.hpp"
#include "vehicle_type.h"
/**
* Extract the StringTab from a StringID.
@@ -175,8 +176,21 @@ char *GetStringWithArgs(char *buffr, StringID string, StringParameters *args, co
const char *GetStringPtr(StringID string);
uint32 GetStringGRFID(StringID string);
uint ConvertKmhishSpeedToDisplaySpeed(uint speed);
uint ConvertDisplaySpeedToKmhishSpeed(uint speed);
uint ConvertKmhishSpeedToDisplaySpeed(uint speed, VehicleType type);
uint ConvertDisplaySpeedToKmhishSpeed(uint speed, VehicleType type);
/**
* Pack velocity and vehicle type for use with SCC_VELOCITY string parameter.
* @param speed Display speed for parameter.
* @param type Type of vehicle for parameter.
* @return Bit-packed velocity and vehicle type, for use with SetDParam().
*/
static inline int64 PackVelocity(uint speed, VehicleType type)
{
/* Vehicle type is a byte, so packed into the top 8 bits of the 64-bit
* parameter, although only values from 0-3 are relevant. */
return speed | (static_cast<uint64>(type) << 56);
}
WChar GetDecimalSeparatorChar();