Merge commit 'f1dfa661a1898cde06a38ab4cb230c95912b245b' into jgrpp-beta

# Conflicts:
#	src/lang/estonian.txt
#	src/lang/hungarian.txt
#	src/network/core/game_info.cpp
#	src/network/core/game_info.h
#	src/network/core/packet.h
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/openttd.cpp
#	src/string_func.h
This commit is contained in:
Jonathan G Rennison
2021-09-18 22:10:04 +01:00
47 changed files with 525 additions and 350 deletions

View File

@@ -51,9 +51,9 @@ void ShowNewGRFError()
if (c->error == nullptr || (c->error->severity != STR_NEWGRF_ERROR_MSG_FATAL && c->error->severity != STR_NEWGRF_ERROR_MSG_ERROR)) continue;
SetDParam (0, c->error->message != STR_NULL ? c->error->message : STR_JUST_RAW_STRING);
SetDParamStr(1, c->error->custom_message.c_str());
SetDParamStr(1, c->error->custom_message);
SetDParamStr(2, c->filename);
SetDParamStr(3, c->error->data.c_str());
SetDParamStr(3, c->error->data);
for (uint i = 0; i < lengthof(c->error->param_value); i++) {
SetDParam(4 + i, c->error->param_value[i]);
}
@@ -70,9 +70,9 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint right, uint
{
if (c->error != nullptr) {
char message[512];
SetDParamStr(0, c->error->custom_message.c_str()); // is skipped by built-in messages
SetDParamStr(0, c->error->custom_message); // is skipped by built-in messages
SetDParamStr(1, c->filename);
SetDParamStr(2, c->error->data.c_str());
SetDParamStr(2, c->error->data);
for (uint i = 0; i < lengthof(c->error->param_value); i++) {
SetDParam(3 + i, c->error->param_value[i]);
}
@@ -752,7 +752,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
case WID_NS_PRESET_LIST: {
Dimension d = GetStringBoundingBox(STR_NUM_CUSTOM);
for (const auto &i : this->grf_presets) {
SetDParamStr(0, i.c_str());
SetDParamStr(0, i);
d = maxdim(d, GetStringBoundingBox(STR_JUST_RAW_STRING));
}
d.width += padding.width;
@@ -785,7 +785,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
SetDParam(0, STR_NUM_CUSTOM);
} else {
SetDParam(0, STR_JUST_RAW_STRING);
SetDParamStr(1, this->grf_presets[this->preset].c_str());
SetDParamStr(1, this->grf_presets[this->preset]);
}
break;
}