Merge branch 'master' into jgrpp

# Conflicts:
#	src/error.h
#	src/error_gui.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/misc_gui.cpp
#	src/newgrf_gui.cpp
#	src/news_gui.cpp
#	src/rail_cmd.cpp
#	src/saveload/gamelog_sl.cpp
#	src/script/api/script_text.cpp
#	src/script/script_instance.cpp
#	src/statusbar_gui.cpp
#	src/strings.cpp
#	src/strings_func.h
#	src/strings_internal.h
#	src/table/settings/gui_settings.ini
#	src/table/settings/linkgraph_settings.ini
#	src/textbuf_gui.h
This commit is contained in:
Jonathan G Rennison
2023-11-09 01:35:31 +00:00
130 changed files with 1460 additions and 1263 deletions

View File

@@ -986,7 +986,7 @@ static const NWidgetPart _nested_game_options_widgets[] = {
};
static WindowDesc _game_options_desc(
WDP_CENTER, "settings_game", 0, 0,
WDP_CENTER, nullptr, 0, 0,
WC_GAME_OPTIONS, WC_NONE,
0,
_nested_game_options_widgets, lengthof(_nested_game_options_widgets)
@@ -1473,9 +1473,8 @@ void SettingEntry::SetValueDParams(uint first_param, int32 value, std::unique_pt
double scale = std::exp2(((double)value) / 10);
int log = -std::min(0, (int)std::floor(std::log10(scale)) - 2);
int64 args_array[] = { value, (int64)(scale * std::pow(10.f, (float)log)), log };
StringParameters tmp_params(args_array);
GetStringWithArgs(tempdata->buffer, this->setting->str_val, &tmp_params, lastof(tempdata->buffer));
auto tmp_params = MakeParameters(value, (int64)(scale * std::pow(10.f, (float)log)), log);
GetStringWithArgs(tempdata->buffer, this->setting->str_val, tmp_params, lastof(tempdata->buffer));
SetDParam(first_param++, STR_JUST_RAW_STRING);
SetDParamStr(first_param++, tempdata->buffer);
} else {