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

@@ -143,7 +143,7 @@ struct EnginePreviewWindow : Window {
};
static WindowDesc _engine_preview_desc(
WDP_CENTER, "engine_preview", 0, 0,
WDP_CENTER, nullptr, 0, 0,
WC_ENGINE_PREVIEW, WC_NONE,
WDF_CONSTRUCTION,
_nested_engine_preview_widgets, lengthof(_nested_engine_preview_widgets)
@@ -173,22 +173,20 @@ static StringID GetEngineInfoCapacityString(EngineID engine)
CargoArray cap = GetCapacityOfArticulatedParts(engine);
if (cap.GetSum<uint>() == 0) {
/* no cargo at all */
int64 args_array[] = { CT_INVALID, 0 };
StringParameters tmp_params(args_array);
GetStringWithArgs(buffer, STR_JUST_CARGO, &tmp_params, lastof(buffer));
auto tmp_params = MakeParameters(CT_INVALID, 0);
GetStringWithArgs(buffer, STR_JUST_CARGO, tmp_params, lastof(buffer));
} else {
char *b = buffer;
for (uint i = 0; i < NUM_CARGO; i++) {
if (cap[i] == 0) continue;
if (b != buffer) {
StringParameters tmp_params(nullptr, 0, nullptr);
b = GetStringWithArgs(b, STR_COMMA_SEPARATOR, &tmp_params, lastof(buffer));
auto tmp_params = MakeParameters();
b = GetStringWithArgs(b, STR_COMMA_SEPARATOR, tmp_params, lastof(buffer));
}
int64 args_array[] = { i, cap[i] };
StringParameters tmp_params(args_array);
b = GetStringWithArgs(b, STR_JUST_CARGO, &tmp_params, lastof(buffer));
auto tmp_params = MakeParameters(i, cap[i]);
b = GetStringWithArgs(b, STR_JUST_CARGO, tmp_params, lastof(buffer));
}
}