1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Replace format_string(4) with OpenRCT2::FormatStringLegacy() (#19190)

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
Michael Steenbeek
2023-01-17 21:56:30 +01:00
committed by GitHub
parent d6f58c2f1f
commit 12874f2af7
32 changed files with 93 additions and 72 deletions

View File

@@ -38,6 +38,7 @@
#include "../interface/Chat.h"
#include "../interface/Colour.h"
#include "../interface/Window_internal.h"
#include "../localisation/Formatting.h"
#include "../localisation/Localisation.h"
#include "../management/Finance.h"
#include "../management/NewsItem.h"
@@ -169,7 +170,7 @@ static int32_t ConsoleCommandRides(InteractiveConsole& console, const arguments_
{
char mode_name[128] = { 0 };
StringId mode_string_id = RideModeNames[i];
format_string(mode_name, 128, mode_string_id, nullptr);
OpenRCT2::FormatStringLegacy(mode_name, 128, mode_string_id, nullptr);
console.WriteFormatLine("%02d - %s", i, mode_name);
}
}
@@ -476,7 +477,7 @@ static int32_t ConsoleCommandStaff(InteractiveConsole& console, const arguments_
{
char costume_name[128] = { 0 };
StringId costume = StaffCostumeNames[i];
format_string(costume_name, 128, STR_DROPDOWN_MENU_LABEL, &costume);
OpenRCT2::FormatStringLegacy(costume_name, 128, STR_DROPDOWN_MENU_LABEL, &costume);
// That's a terrible hack here. Costume names include inline sprites
// that don't work well with the console, so manually skip past them.
console.WriteFormatLine(" costume %i: %s", i, costume_name + 7);