mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove Formatter::Common where not required (#12972)
* Remove Formatter::Common where not required * Remove common from Guest window where possible
This commit is contained in:
parent
a1222fa4ca
commit
4ec10837a6
|
@ -26,10 +26,9 @@ static void graph_draw_months_uint8_t(
|
|||
if (history[i] != 255 && yearOver32 % 4 == 0)
|
||||
{
|
||||
// Draw month text
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint32_t>(DateGameShortMonthNames[date_get_month((yearOver32 / 4) + MONTH_COUNT)]);
|
||||
gfx_draw_string_centred(
|
||||
dpi, STR_GRAPH_LABEL, screenCoords - ScreenCoordsXY{ 0, 10 }, COLOUR_BLACK, gCommonFormatArgs);
|
||||
gfx_draw_string_centred(dpi, STR_GRAPH_LABEL, screenCoords - ScreenCoordsXY{ 0, 10 }, COLOUR_BLACK, ft.Data());
|
||||
|
||||
// Draw month mark
|
||||
gfx_fill_rect(dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_10);
|
||||
|
|
|
@ -648,13 +648,13 @@ void CustomListView::PaintHeading(
|
|||
|
||||
if (sortOrder == ColumnSortOrder::Ascending)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_UP);
|
||||
DrawTextBasic(dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, COLOUR_BLACK, TextAlignment::RIGHT);
|
||||
}
|
||||
else if (sortOrder == ColumnSortOrder::Descending)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_DOWN);
|
||||
DrawTextBasic(dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, COLOUR_BLACK, TextAlignment::RIGHT);
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ void CustomListView::PaintCell(
|
|||
{
|
||||
rct_string_id stringId = isHighlighted ? STR_WINDOW_COLOUR_2_STRINGID : STR_BLACK_STRING;
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
ft.Add<const char*>(text);
|
||||
DrawTextEllipsised(dpi, pos, size.width, stringId, ft, COLOUR_BLACK);
|
||||
|
|
|
@ -220,15 +220,17 @@ static void window_about_openrct2_common_paint(rct_window* w, rct_drawpixelinfo*
|
|||
ScreenCoordsXY aboutOpenRCT2Coords(w->windowPos.x + aboutOpenRCT2.left + 45, y);
|
||||
ScreenCoordsXY aboutRCT2Coords(w->windowPos.x + aboutRCT2.left + 45, y);
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
ft.Add<rct_string_id>(STR_TITLE_SEQUENCE_OPENRCT2);
|
||||
gfx_draw_string_centred_wrapped(
|
||||
dpi, gCommonFormatArgs, aboutOpenRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, COLOUR_AQUAMARINE);
|
||||
|
||||
ft = Formatter::Common();
|
||||
ft.Add<rct_string_id>(STR_TITLE_SEQUENCE_RCT2);
|
||||
gfx_draw_string_centred_wrapped(
|
||||
dpi, gCommonFormatArgs, aboutRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, COLOUR_AQUAMARINE);
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_TITLE_SEQUENCE_OPENRCT2);
|
||||
gfx_draw_string_centred_wrapped(
|
||||
dpi, ft.Data(), aboutOpenRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, COLOUR_AQUAMARINE);
|
||||
}
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_TITLE_SEQUENCE_RCT2);
|
||||
gfx_draw_string_centred_wrapped(dpi, ft.Data(), aboutRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, COLOUR_AQUAMARINE);
|
||||
}
|
||||
}
|
||||
|
||||
static void window_about_openrct2_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
|
|
|
@ -1213,15 +1213,14 @@ static void window_cheats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
if (w->page == WINDOW_CHEATS_PAGE_MONEY)
|
||||
{
|
||||
uint8_t colour = w->colours[1];
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(_moneySpinnerValue);
|
||||
if (widget_is_disabled(w, WIDX_MONEY_SPINNER))
|
||||
{
|
||||
colour |= COLOUR_FLAG_INSET;
|
||||
}
|
||||
int32_t actual_month = _monthSpinnerValue - 1;
|
||||
gfx_draw_string_left(
|
||||
dpi, STR_BOTTOM_TOOLBAR_CASH, gCommonFormatArgs, colour, w->windowPos + ScreenCoordsXY{ X_LCOL, 93 });
|
||||
gfx_draw_string_left(dpi, STR_BOTTOM_TOOLBAR_CASH, ft.Data(), colour, w->windowPos + ScreenCoordsXY{ X_LCOL, 93 });
|
||||
gfx_draw_string_left(dpi, STR_YEAR, nullptr, COLOUR_BLACK, w->windowPos + ScreenCoordsXY{ X_LCOL, 198 });
|
||||
gfx_draw_string_left(dpi, STR_MONTH, nullptr, COLOUR_BLACK, w->windowPos + ScreenCoordsXY{ X_LCOL, 219 });
|
||||
gfx_draw_string_left(dpi, STR_DAY, nullptr, COLOUR_BLACK, w->windowPos + ScreenCoordsXY{ X_LCOL, 240 });
|
||||
|
|
|
@ -243,10 +243,10 @@ static void custom_currency_window_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
gfx_draw_string_left(dpi, STR_RATE, nullptr, w->colours[1], screenCoords);
|
||||
|
||||
int32_t baseExchange = CurrencyDescriptors[CURRENCY_POUNDS].rate;
|
||||
ft = Formatter::Common();
|
||||
ft = Formatter();
|
||||
ft.Add<int32_t>(baseExchange);
|
||||
gfx_draw_string_left(
|
||||
dpi, STR_CUSTOM_CURRENCY_EQUIVALENCY, gCommonFormatArgs, w->colours[1], screenCoords + ScreenCoordsXY{ 200, 0 });
|
||||
dpi, STR_CUSTOM_CURRENCY_EQUIVALENCY, ft.Data(), w->colours[1], screenCoords + ScreenCoordsXY{ 200, 0 });
|
||||
|
||||
screenCoords.y += 20;
|
||||
|
||||
|
|
|
@ -216,12 +216,12 @@ static void window_ride_demolish_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
if (ride != nullptr)
|
||||
{
|
||||
auto stringId = (gParkFlags & PARK_FLAGS_NO_MONEY) ? STR_DEMOLISH_RIDE_ID : STR_DEMOLISH_RIDE_ID_MONEY;
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ride->FormatNameTo(ft);
|
||||
ft.Add<money32>(_demolishRideCost);
|
||||
|
||||
ScreenCoordsXY stringCoords(w->windowPos.x + WW / 2, w->windowPos.y + (WH / 2) - 3);
|
||||
gfx_draw_string_centred_wrapped(dpi, gCommonFormatArgs, stringCoords, WW - 4, stringId, COLOUR_BLACK);
|
||||
gfx_draw_string_centred_wrapped(dpi, ft.Data(), stringCoords, WW - 4, stringId, COLOUR_BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,11 +233,11 @@ static void window_ride_refurbish_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
if (ride != nullptr)
|
||||
{
|
||||
auto stringId = (gParkFlags & PARK_FLAGS_NO_MONEY) ? STR_REFURBISH_RIDE_ID_NO_MONEY : STR_REFURBISH_RIDE_ID_MONEY;
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ride->FormatNameTo(ft);
|
||||
ft.Add<money32>(_demolishRideCost / 2);
|
||||
|
||||
ScreenCoordsXY stringCoords(w->windowPos.x + WW / 2, w->windowPos.y + (WH / 2) - 3);
|
||||
gfx_draw_string_centred_wrapped(dpi, gCommonFormatArgs, stringCoords, WW - 4, stringId, COLOUR_BLACK);
|
||||
gfx_draw_string_centred_wrapped(dpi, ft.Data(), stringCoords, WW - 4, stringId, COLOUR_BLACK);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1013,17 +1013,17 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
|||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
totalSelectable = 4;
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(numSelected);
|
||||
ft.Add<uint16_t>(totalSelectable);
|
||||
gfx_draw_string_left(dpi, STR_OBJECT_SELECTION_SELECTION_SIZE, gCommonFormatArgs, COLOUR_BLACK, screenPos);
|
||||
gfx_draw_string_left(dpi, STR_OBJECT_SELECTION_SELECTION_SIZE, ft.Data(), COLOUR_BLACK, screenPos);
|
||||
}
|
||||
|
||||
// Draw sort button text
|
||||
widget = &w->widgets[WIDX_LIST_SORT_TYPE];
|
||||
if (widget->type != WWT_EMPTY)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
auto stringId = _listSortType == RIDE_SORT_TYPE ? static_cast<rct_string_id>(_listSortDescending ? STR_DOWN : STR_UP)
|
||||
: STR_NONE;
|
||||
ft.Add<rct_string_id>(stringId);
|
||||
|
@ -1033,7 +1033,7 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
|||
widget = &w->widgets[WIDX_LIST_SORT_RIDE];
|
||||
if (widget->type != WWT_EMPTY)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
auto stringId = _listSortType == RIDE_SORT_RIDE ? static_cast<rct_string_id>(_listSortDescending ? STR_DOWN : STR_UP)
|
||||
: STR_NONE;
|
||||
ft.Add<rct_string_id>(stringId);
|
||||
|
@ -1063,7 +1063,7 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
|||
{
|
||||
auto screenPos = w->windowPos + ScreenCoordsXY{ widget->midX() + 1, widget->bottom + 3 };
|
||||
width = w->width - w->widgets[WIDX_LIST].right - 6;
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
ft.Add<const char*>(listItem->repositoryItem->Name.c_str());
|
||||
DrawTextEllipsised(dpi, screenPos, width, STR_WINDOW_COLOUR_2_STRINGID, ft, COLOUR_BLACK, TextAlignment::CENTRE);
|
||||
|
@ -1073,7 +1073,7 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
|||
auto description = object_get_description(_loadedObject);
|
||||
if (!description.empty())
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
ft.Add<const char*>(description.c_str());
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
|||
width = w->windowPos.x + w->width - screenPos.x - 4;
|
||||
|
||||
gfx_draw_string_left_wrapped(
|
||||
dpi, gCommonFormatArgs, screenPos + ScreenCoordsXY{ 0, 5 }, width, STR_WINDOW_COLOUR_2_STRINGID, COLOUR_BLACK);
|
||||
dpi, ft.Data(), screenPos + ScreenCoordsXY{ 0, 5 }, width, STR_WINDOW_COLOUR_2_STRINGID, COLOUR_BLACK);
|
||||
}
|
||||
|
||||
auto screenPos = w->windowPos + ScreenCoordsXY{ w->width - 5, w->height - (LIST_ROW_HEIGHT * 5) };
|
||||
|
@ -1103,7 +1103,7 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
|||
// Draw object dat name
|
||||
{
|
||||
const char* path = path_get_filename(listItem->repositoryItem->Path.c_str());
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
ft.Add<const char*>(path);
|
||||
DrawTextBasic(
|
||||
|
@ -1114,7 +1114,7 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
|||
|
||||
// Draw object author (will be blank space if no author in file or a non JSON object)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
std::string authorsString;
|
||||
for (size_t i = 0; i < listItem->repositoryItem->Authors.size(); i++)
|
||||
{
|
||||
|
@ -1199,7 +1199,7 @@ static void window_editor_object_selection_scrollpaint(rct_window* w, rct_drawpi
|
|||
// Draw ride type
|
||||
rct_string_id rideTypeStringId = get_ride_type_string_id(listItem.repositoryItem);
|
||||
safe_strcpy(buffer, language_get_string(rideTypeStringId), 256 - (buffer - bufferWithColour));
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(gCommonStringFormatBuffer);
|
||||
DrawTextEllipsised(dpi, screenCoords, width_limit - 15, STR_STRING, ft, colour);
|
||||
screenCoords.x = w->widgets[WIDX_LIST_SORT_RIDE].left - w->widgets[WIDX_LIST].left;
|
||||
|
@ -1214,7 +1214,7 @@ static void window_editor_object_selection_scrollpaint(rct_window* w, rct_drawpi
|
|||
|
||||
*buffer = 0;
|
||||
}
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(gCommonStringFormatBuffer);
|
||||
DrawTextEllipsised(dpi, screenCoords, width_limit, STR_STRING, ft, colour);
|
||||
}
|
||||
|
|
|
@ -920,7 +920,7 @@ static void window_editor_objective_options_main_paint(rct_window* w, rct_drawpi
|
|||
auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark();
|
||||
auto parkName = park.Name.c_str();
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
ft.Add<const char*>(parkName);
|
||||
DrawTextEllipsised(dpi, screenCoords, width, STR_WINDOW_PARK_NAME, ft, COLOUR_BLACK);
|
||||
|
@ -930,7 +930,7 @@ static void window_editor_objective_options_main_paint(rct_window* w, rct_drawpi
|
|||
screenCoords = w->windowPos + ScreenCoordsXY{ 8, w->widgets[WIDX_SCENARIO_NAME].top };
|
||||
width = w->widgets[WIDX_SCENARIO_NAME].left - 16;
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
ft.Add<const char*>(gS6Info.name);
|
||||
DrawTextEllipsised(dpi, screenCoords, width, STR_WINDOW_SCENARIO_NAME, ft, COLOUR_BLACK);
|
||||
|
@ -943,10 +943,10 @@ static void window_editor_objective_options_main_paint(rct_window* w, rct_drawpi
|
|||
screenCoords = w->windowPos + ScreenCoordsXY{ 16, w->widgets[WIDX_DETAILS].top + 10 };
|
||||
width = w->widgets[WIDX_DETAILS].left - 4;
|
||||
|
||||
ft = Formatter::Common();
|
||||
ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
ft.Add<const char*>(gS6Info.details);
|
||||
gfx_draw_string_left_wrapped(dpi, gCommonFormatArgs, screenCoords, width, STR_BLACK_STRING, COLOUR_BLACK);
|
||||
gfx_draw_string_left_wrapped(dpi, ft.Data(), screenCoords, width, STR_BLACK_STRING, COLOUR_BLACK);
|
||||
|
||||
// Scenario category label
|
||||
screenCoords = w->windowPos + ScreenCoordsXY{ 8, w->widgets[WIDX_CATEGORY].top };
|
||||
|
|
|
@ -693,10 +693,10 @@ static void window_finances_summary_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
// Loan and interest rate
|
||||
gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_LOAN, nullptr, COLOUR_BLACK, w->windowPos + ScreenCoordsXY{ 8, 279 });
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(gBankLoanInterestRate);
|
||||
gfx_draw_string_left(
|
||||
dpi, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, gCommonFormatArgs, COLOUR_BLACK, w->windowPos + ScreenCoordsXY{ 167, 279 });
|
||||
dpi, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, ft.Data(), COLOUR_BLACK, w->windowPos + ScreenCoordsXY{ 167, 279 });
|
||||
|
||||
// Current cash
|
||||
rct_string_id stringId = gCash >= 0 ? STR_CASH_LABEL : STR_CASH_NEGATIVE_LABEL;
|
||||
|
@ -706,10 +706,10 @@ static void window_finances_summary_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
if (gScenarioObjective.Type == OBJECTIVE_MONTHLY_FOOD_INCOME)
|
||||
{
|
||||
money32 lastMonthProfit = finance_get_last_month_shop_profit();
|
||||
ft = Formatter::Common();
|
||||
ft = Formatter();
|
||||
ft.Add<money32>(lastMonthProfit);
|
||||
gfx_draw_string_left(
|
||||
dpi, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, gCommonFormatArgs, COLOUR_BLACK,
|
||||
dpi, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, ft.Data(), COLOUR_BLACK,
|
||||
w->windowPos + ScreenCoordsXY{ 280, 279 });
|
||||
}
|
||||
else
|
||||
|
@ -752,7 +752,7 @@ static void window_finances_summary_scrollpaint(rct_window* w, rct_drawpixelinfo
|
|||
continue;
|
||||
|
||||
// Month heading
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_FINANCES_SUMMARY_MONTH_HEADING);
|
||||
ft.Add<uint16_t>(monthyear);
|
||||
DrawTextBasic(
|
||||
|
@ -1211,7 +1211,7 @@ static void window_finances_marketing_paint(rct_window* w, rct_drawpixelinfo* dp
|
|||
continue;
|
||||
|
||||
noCampaignsActive = 0;
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
|
||||
// Set special parameters
|
||||
switch (i)
|
||||
|
|
|
@ -425,14 +425,14 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo* dpi, r
|
|||
auto screenCoords = ScreenCoordsXY{ w->windowPos.x + widget.midX(),
|
||||
w->windowPos.y + widget.midY() - (line_height == 10 ? 5 : 6) };
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(gCash);
|
||||
gfx_draw_string_centred(
|
||||
dpi, (gCash < 0 ? STR_BOTTOM_TOOLBAR_CASH_NEGATIVE : STR_BOTTOM_TOOLBAR_CASH), screenCoords,
|
||||
(gHoverWidget.window_classification == WC_BOTTOM_TOOLBAR && gHoverWidget.widget_index == WIDX_MONEY
|
||||
? COLOUR_WHITE
|
||||
: NOT_TRANSLUCENT(w->colours[0])),
|
||||
gCommonFormatArgs);
|
||||
ft.Data());
|
||||
}
|
||||
|
||||
static constexpr const rct_string_id guestCountFormats[] = {
|
||||
|
@ -515,7 +515,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo* dpi,
|
|||
int32_t day = ((gDateMonthTicks * days_in_month[month]) >> 16) & 0xFF;
|
||||
|
||||
rct_string_id stringId = DateFormatStringFormatIds[gConfigGeneral.date_format];
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(DateDayNames[day]);
|
||||
ft.Add<int16_t>(month);
|
||||
ft.Add<int16_t>(year);
|
||||
|
@ -524,7 +524,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo* dpi,
|
|||
(gHoverWidget.window_classification == WC_BOTTOM_TOOLBAR && gHoverWidget.widget_index == WIDX_DATE
|
||||
? COLOUR_WHITE
|
||||
: NOT_TRANSLUCENT(w->colours[0])),
|
||||
gCommonFormatArgs);
|
||||
ft.Data());
|
||||
|
||||
// Figure out how much line height we have to work with.
|
||||
uint32_t line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM);
|
||||
|
@ -540,9 +540,9 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo* dpi,
|
|||
temperature = climate_celsius_to_fahrenheit(temperature);
|
||||
format = STR_FAHRENHEIT_VALUE;
|
||||
}
|
||||
ft = Formatter::Common();
|
||||
ft = Formatter();
|
||||
ft.Add<int16_t>(temperature);
|
||||
gfx_draw_string_left(dpi, format, gCommonFormatArgs, COLOUR_BLACK, screenCoords + ScreenCoordsXY{ 0, 6 });
|
||||
gfx_draw_string_left(dpi, format, ft.Data(), COLOUR_BLACK, screenCoords + ScreenCoordsXY{ 0, 6 });
|
||||
screenCoords.x += 30;
|
||||
|
||||
// Current weather
|
||||
|
|
|
@ -1121,16 +1121,19 @@ void window_guest_overview_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
return;
|
||||
}
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
peep->FormatActionTo(ft);
|
||||
rct_widget* widget = &w->widgets[WIDX_ACTION_LBL];
|
||||
auto screenPos = w->windowPos + ScreenCoordsXY{ widget->midX(), widget->top - 1 };
|
||||
int32_t width = widget->width();
|
||||
DrawTextEllipsised(dpi, screenPos, width, STR_BLACK_STRING, ft, COLOUR_BLACK, TextAlignment::CENTRE);
|
||||
|
||||
{
|
||||
auto ft = Formatter();
|
||||
peep->FormatActionTo(ft);
|
||||
int32_t width = widget->width();
|
||||
DrawTextEllipsised(dpi, screenPos, width, STR_BLACK_STRING, ft, COLOUR_BLACK, TextAlignment::CENTRE);
|
||||
}
|
||||
|
||||
// Draw the marquee thought
|
||||
widget = &w->widgets[WIDX_MARQUEE];
|
||||
width = widget->width() - 3;
|
||||
auto width = widget->width() - 3;
|
||||
int32_t left = widget->left + 2 + w->windowPos.x;
|
||||
int32_t top = widget->top + w->windowPos.y;
|
||||
int32_t height = widget->height();
|
||||
|
@ -1160,9 +1163,11 @@ void window_guest_overview_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
}
|
||||
|
||||
screenPos.x = widget->width() - w->list_information_type;
|
||||
ft = Formatter::Common();
|
||||
peep_thought_set_format_args(&peep->Thoughts[i], ft);
|
||||
DrawTextBasic(&dpi_marquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, COLOUR_BLACK);
|
||||
{
|
||||
auto ft = Formatter();
|
||||
peep_thought_set_format_args(&peep->Thoughts[i], ft);
|
||||
DrawTextBasic(&dpi_marquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, COLOUR_BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1457,7 +1462,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 4 };
|
||||
|
||||
// Happiness
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_HAPPINESS_LABEL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_HAPPINESS_LABEL, nullptr, COLOUR_BLACK, screenCoords);
|
||||
|
||||
int32_t happiness = peep->Happiness;
|
||||
if (happiness < 10)
|
||||
|
@ -1471,7 +1476,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
// Energy
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_ENERGY_LABEL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_ENERGY_LABEL, nullptr, COLOUR_BLACK, screenCoords);
|
||||
|
||||
int32_t energy = ((peep->Energy - PEEP_MIN_ENERGY) * 255) / (PEEP_MAX_ENERGY - PEEP_MIN_ENERGY);
|
||||
ebp = COLOUR_BRIGHT_GREEN;
|
||||
|
@ -1485,7 +1490,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
// Hunger
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_HUNGER_LABEL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_HUNGER_LABEL, nullptr, COLOUR_BLACK, screenCoords);
|
||||
|
||||
int32_t hunger = peep->Hunger;
|
||||
if (hunger > 190)
|
||||
|
@ -1507,7 +1512,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
// Thirst
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_THIRST_LABEL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_THIRST_LABEL, nullptr, COLOUR_BLACK, screenCoords);
|
||||
|
||||
int32_t thirst = peep->Thirst;
|
||||
if (thirst > 190)
|
||||
|
@ -1529,7 +1534,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
// Nausea
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_LABEL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_LABEL, nullptr, COLOUR_BLACK, screenCoords);
|
||||
|
||||
int32_t nausea = peep->Nausea - 32;
|
||||
|
||||
|
@ -1547,7 +1552,7 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
// Toilet
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_TOILET_LABEL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_TOILET_LABEL, nullptr, COLOUR_BLACK, screenCoords);
|
||||
|
||||
int32_t toilet = peep->Toilet - 32;
|
||||
if (toilet > 210)
|
||||
|
@ -1573,9 +1578,9 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
int32_t eax = gScenarioTicks;
|
||||
eax -= peep->TimeInPark;
|
||||
eax >>= 11;
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(eax & 0xFFFF);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_TIME_IN_PARK, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_TIME_IN_PARK, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
|
||||
screenCoords.y += LIST_ROW_HEIGHT + 9;
|
||||
|
@ -1588,36 +1593,40 @@ void window_guest_stats_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
|
||||
// Intensity
|
||||
auto ft = Formatter::Common();
|
||||
auto maxIntensity = peep->Intensity.GetMaximum();
|
||||
int32_t string_id = STR_GUEST_STAT_PREFERRED_INTESITY_BELOW;
|
||||
if (peep->Intensity.GetMinimum() != 0)
|
||||
{
|
||||
ft.Add<uint16_t>(peep->Intensity.GetMinimum());
|
||||
ft.Add<uint16_t>(maxIntensity);
|
||||
string_id = STR_GUEST_STAT_PREFERRED_INTESITY_BETWEEN;
|
||||
if (maxIntensity == 15)
|
||||
string_id = STR_GUEST_STAT_PREFERRED_INTESITY_ABOVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ft.Add<uint16_t>(maxIntensity);
|
||||
}
|
||||
auto ft = Formatter();
|
||||
auto maxIntensity = peep->Intensity.GetMaximum();
|
||||
int32_t string_id = STR_GUEST_STAT_PREFERRED_INTESITY_BELOW;
|
||||
if (peep->Intensity.GetMinimum() != 0)
|
||||
{
|
||||
ft.Add<uint16_t>(peep->Intensity.GetMinimum());
|
||||
ft.Add<uint16_t>(maxIntensity);
|
||||
string_id = STR_GUEST_STAT_PREFERRED_INTESITY_BETWEEN;
|
||||
if (maxIntensity == 15)
|
||||
string_id = STR_GUEST_STAT_PREFERRED_INTESITY_ABOVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ft.Add<uint16_t>(maxIntensity);
|
||||
}
|
||||
|
||||
gfx_draw_string_left(dpi, string_id, gCommonFormatArgs, COLOUR_BLACK, screenCoords + ScreenCoordsXY{ 4, 0 });
|
||||
gfx_draw_string_left(dpi, string_id, ft.Data(), COLOUR_BLACK, screenCoords + ScreenCoordsXY{ 4, 0 });
|
||||
}
|
||||
|
||||
// Nausea tolerance
|
||||
static constexpr const rct_string_id nauseaTolerances[] = {
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_NONE,
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_LOW,
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_AVERAGE,
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_HIGH,
|
||||
};
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
int32_t nausea_tolerance = peep->NauseaTolerance & 0x3;
|
||||
ft = Formatter::Common();
|
||||
ft.Add<rct_string_id>(nauseaTolerances[nausea_tolerance]);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_TOLERANCE, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
{
|
||||
static constexpr const rct_string_id nauseaTolerances[] = {
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_NONE,
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_LOW,
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_AVERAGE,
|
||||
STR_PEEP_STAT_NAUSEA_TOLERANCE_HIGH,
|
||||
};
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
int32_t nausea_tolerance = peep->NauseaTolerance & 0x3;
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(nauseaTolerances[nausea_tolerance]);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_TOLERANCE, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1765,7 +1774,7 @@ void window_guest_rides_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
screenCoords.y = w->windowPos.y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].bottom - 12;
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
auto ride = get_ride(peep->FavouriteRide);
|
||||
if (ride != nullptr)
|
||||
{
|
||||
|
@ -1801,9 +1810,9 @@ void window_guest_rides_scroll_paint(rct_window* w, rct_drawpixelinfo* dpi, int3
|
|||
auto ride = get_ride(w->list_item_positions[list_index]);
|
||||
if (ride != nullptr)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ride->FormatNameTo(ft);
|
||||
gfx_draw_string_left(dpi, stringId, gCommonFormatArgs, COLOUR_BLACK, { 0, y - 1 });
|
||||
gfx_draw_string_left(dpi, stringId, ft.Data(), COLOUR_BLACK, { 0, y - 1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1847,80 +1856,91 @@ void window_guest_finance_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].top + 4 };
|
||||
|
||||
// Cash in pocket
|
||||
auto ft = Formatter::Common();
|
||||
ft.Add<money32>(peep->CashInPocket);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_IN_POCKET, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(peep->CashInPocket);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_IN_POCKET, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
}
|
||||
|
||||
// Cash spent
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
ft = Formatter::Common();
|
||||
ft.Add<money32>(peep->CashSpent);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_SPENT, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(peep->CashSpent);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_SPENT, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
screenCoords.y += LIST_ROW_HEIGHT * 2;
|
||||
}
|
||||
|
||||
screenCoords.y += LIST_ROW_HEIGHT * 2;
|
||||
gfx_fill_rect_inset(
|
||||
dpi, screenCoords.x, screenCoords.y - 6, screenCoords.x + 179, screenCoords.y - 5, w->colours[1],
|
||||
INSET_RECT_FLAG_BORDER_INSET);
|
||||
|
||||
// Paid to enter
|
||||
ft = Formatter::Common();
|
||||
ft.Add<money32>(peep->PaidToEnter);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_ENTRANCE_FEE, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(peep->PaidToEnter);
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_ENTRANCE_FEE, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
}
|
||||
// Paid on rides
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
ft = Formatter::Common();
|
||||
ft.Add<money32>(peep->PaidOnRides);
|
||||
ft.Add<uint16_t>(peep->GuestNumRides);
|
||||
if (peep->GuestNumRides != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE_PLURAL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(peep->PaidOnRides);
|
||||
ft.Add<uint16_t>(peep->GuestNumRides);
|
||||
if (peep->GuestNumRides != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE_PLURAL, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
|
||||
// Paid on food
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
ft = Formatter::Common();
|
||||
ft.Add<money32>(peep->PaidOnFood);
|
||||
ft.Add<uint16_t>(peep->AmountOfFood);
|
||||
if (peep->AmountOfFood != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD_PLURAL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(peep->PaidOnFood);
|
||||
ft.Add<uint16_t>(peep->AmountOfFood);
|
||||
if (peep->AmountOfFood != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD_PLURAL, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
}
|
||||
|
||||
// Paid on drinks
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
ft = Formatter::Common();
|
||||
ft.Add<money32>(peep->PaidOnDrink);
|
||||
ft.Add<uint16_t>(peep->AmountOfDrinks);
|
||||
if (peep->AmountOfDrinks != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK_PLURAL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(peep->PaidOnDrink);
|
||||
ft.Add<uint16_t>(peep->AmountOfDrinks);
|
||||
if (peep->AmountOfDrinks != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK_PLURAL, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
|
||||
// Paid on souvenirs
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
ft = Formatter::Common();
|
||||
ft.Add<money32>(peep->PaidOnSouvenirs);
|
||||
ft.Add<uint16_t>(peep->AmountOfSouvenirs);
|
||||
if (peep->AmountOfSouvenirs != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR, gCommonFormatArgs, COLOUR_BLACK, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<money32>(peep->PaidOnSouvenirs);
|
||||
ft.Add<uint16_t>(peep->AmountOfSouvenirs);
|
||||
if (peep->AmountOfSouvenirs != 1)
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR, ft.Data(), COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1986,10 +2006,9 @@ void window_guest_thoughts_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
int32_t width = window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].right
|
||||
- window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].left - 8;
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
peep_thought_set_format_args(thought, ft);
|
||||
screenCoords.y += gfx_draw_string_left_wrapped(
|
||||
dpi, const_cast<unsigned char*>(ft.Data()), screenCoords, width, STR_BLACK_STRING, COLOUR_BLACK);
|
||||
screenCoords.y += gfx_draw_string_left_wrapped(dpi, ft.Data(), screenCoords, width, STR_BLACK_STRING, COLOUR_BLACK);
|
||||
|
||||
// If this is the last visible line end drawing.
|
||||
if (screenCoords.y > w->windowPos.y + window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].bottom - 32)
|
||||
|
@ -2020,13 +2039,13 @@ void window_guest_inventory_update(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item)
|
||||
static std::pair<rct_string_id, Formatter> window_guest_inventory_format_item(Peep* peep, int32_t item)
|
||||
{
|
||||
auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark();
|
||||
auto parkName = park.Name.c_str();
|
||||
|
||||
// Default arguments
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint32_t>(ShopItems[item].Image);
|
||||
ft.Add<rct_string_id>(ShopItems[item].Naming.Display);
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
|
@ -2126,7 +2145,7 @@ static rct_string_id window_guest_inventory_format_item(Peep* peep, int32_t item
|
|||
break;
|
||||
}
|
||||
|
||||
return STR_GUEST_ITEM_FORMAT;
|
||||
return std::make_pair(STR_GUEST_ITEM_FORMAT, ft);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2167,9 +2186,8 @@ void window_guest_inventory_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
if (!guest->HasItem(item))
|
||||
continue;
|
||||
|
||||
rct_string_id stringId = window_guest_inventory_format_item(guest, item);
|
||||
screenCoords.y += gfx_draw_string_left_wrapped(
|
||||
dpi, gCommonFormatArgs, screenCoords, itemNameWidth, stringId, COLOUR_BLACK);
|
||||
auto [stringId, ft] = window_guest_inventory_format_item(guest, item);
|
||||
screenCoords.y += gfx_draw_string_left_wrapped(dpi, ft.Data(), screenCoords, itemNameWidth, stringId, COLOUR_BLACK);
|
||||
numItems++;
|
||||
}
|
||||
|
||||
|
@ -2212,19 +2230,25 @@ void window_guest_debug_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
+ ScreenCoordsXY{ window_guest_debug_widgets[WIDX_PAGE_BACKGROUND].left + 4,
|
||||
window_guest_debug_widgets[WIDX_PAGE_BACKGROUND].top + 4 };
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint32_t>(peep->sprite_index);
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_SPRITE_INDEX, gCommonFormatArgs, 0, screenCoords);
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_SPRITE_INDEX, ft.Data(), 0, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
{
|
||||
int32_t args[] = { peep->x, peep->y, peep->z };
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_POSITION, args, 0, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(peep->x);
|
||||
ft.Add<int32_t>(peep->y);
|
||||
ft.Add<int32_t>(peep->z);
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_POSITION, ft.Data(), 0, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
{
|
||||
int32_t args[] = { peep->NextLoc.x, peep->NextLoc.y, peep->NextLoc.z };
|
||||
format_string(buffer, sizeof(buffer), STR_PEEP_DEBUG_NEXT, args);
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(peep->NextLoc.x);
|
||||
ft.Add<int32_t>(peep->NextLoc.y);
|
||||
ft.Add<int32_t>(peep->NextLoc.z);
|
||||
format_string(buffer, sizeof(buffer), STR_PEEP_DEBUG_NEXT, ft.Data());
|
||||
if (peep->GetNextIsSurface())
|
||||
{
|
||||
format_string(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SURFACE, nullptr);
|
||||
|
@ -2232,21 +2256,29 @@ void window_guest_debug_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
}
|
||||
if (peep->GetNextIsSloped())
|
||||
{
|
||||
int32_t args2[1] = { peep->GetNextDirection() };
|
||||
format_string(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SLOPE, args2);
|
||||
auto ft2 = Formatter();
|
||||
ft2.Add<int32_t>(peep->GetNextDirection());
|
||||
format_string(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SLOPE, ft2.Data());
|
||||
safe_strcat(buffer, buffer2, sizeof(buffer));
|
||||
}
|
||||
gfx_draw_string(dpi, buffer, 0, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
{
|
||||
int32_t args[] = { peep->DestinationX, peep->DestinationY, peep->DestinationTolerance };
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_DEST, args, 0, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(peep->DestinationX);
|
||||
ft.Add<int32_t>(peep->DestinationY);
|
||||
ft.Add<int32_t>(peep->DestinationTolerance);
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_DEST, ft.Data(), 0, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
{
|
||||
int32_t args[] = { peep->PathfindGoal.x, peep->PathfindGoal.y, peep->PathfindGoal.z, peep->PathfindGoal.direction };
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_PATHFIND_GOAL, args, 0, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(peep->PathfindGoal.x);
|
||||
ft.Add<int32_t>(peep->PathfindGoal.y);
|
||||
ft.Add<int32_t>(peep->PathfindGoal.z);
|
||||
ft.Add<int32_t>(peep->PathfindGoal.direction);
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_PATHFIND_GOAL, ft.Data(), 0, screenCoords);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_PATHFIND_HISTORY, nullptr, 0, screenCoords);
|
||||
|
@ -2255,8 +2287,12 @@ void window_guest_debug_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
screenCoords.x += 10;
|
||||
for (auto& point : peep->PathfindHistory)
|
||||
{
|
||||
int32_t args[] = { point.x, point.y, point.z, point.direction };
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM, args, 0, screenCoords);
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(point.x);
|
||||
ft.Add<int32_t>(point.y);
|
||||
ft.Add<int32_t>(point.z);
|
||||
ft.Add<int32_t>(point.direction);
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM, ft.Data(), 0, screenCoords);
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
}
|
||||
screenCoords.x -= 10;
|
||||
|
|
|
@ -734,10 +734,10 @@ static void window_guest_list_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
if (_window_guest_list_selected_tab == PAGE_INDIVIDUAL)
|
||||
{
|
||||
screenCoords = w->windowPos + ScreenCoordsXY{ 4, window_guest_list_widgets[WIDX_GUEST_LIST].bottom + 2 };
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(static_cast<int32_t>(GuestList.size()));
|
||||
gfx_draw_string_left(
|
||||
dpi, (GuestList.size() == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), gCommonFormatArgs,
|
||||
dpi, (GuestList.size() == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), ft.Data(),
|
||||
COLOUR_BLACK, screenCoords);
|
||||
}
|
||||
}
|
||||
|
@ -784,7 +784,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
{
|
||||
continue;
|
||||
}
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
peep->FormatNameTo(ft);
|
||||
DrawTextEllipsised(dpi, { 0, y }, 113, format, ft, COLOUR_BLACK);
|
||||
|
||||
|
@ -799,7 +799,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
gfx_draw_sprite(dpi, STR_ENTER_SELECTION_SIZE, { 112, y + 1 }, 0);
|
||||
|
||||
// Action
|
||||
ft = Formatter::Common();
|
||||
ft = Formatter();
|
||||
peep->FormatActionTo(ft);
|
||||
DrawTextEllipsised(dpi, { 133, y }, 314, format, ft, COLOUR_BLACK);
|
||||
break;
|
||||
|
@ -815,7 +815,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
if (thought->freshness > 5)
|
||||
break;
|
||||
|
||||
ft = Formatter::Common();
|
||||
ft = Formatter();
|
||||
peep_thought_set_format_args(&peep->Thoughts[j], ft);
|
||||
DrawTextEllipsised(dpi, { 118, y }, 329, format, ft, COLOUR_BLACK);
|
||||
break;
|
||||
|
@ -863,7 +863,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
DrawTextEllipsised(dpi, { 0, y }, 414, format, ft, COLOUR_BLACK);
|
||||
|
||||
// Draw guest count
|
||||
ft = Formatter::Common();
|
||||
ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_GUESTS_COUNT_COMMA_SEP);
|
||||
ft.Add<uint32_t>(numGuests);
|
||||
DrawTextBasic(dpi, { 326, y }, format, ft, COLOUR_BLACK, TextAlignment::RIGHT);
|
||||
|
|
|
@ -242,8 +242,7 @@ static void window_install_track_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
{
|
||||
// Scenery not available
|
||||
DrawTextEllipsised(
|
||||
dpi, screenPos, 308, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, Formatter::Common(), COLOUR_BLACK,
|
||||
TextAlignment::CENTRE);
|
||||
dpi, screenPos, 308, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, COLOUR_BLACK, TextAlignment::CENTRE);
|
||||
screenPos.y -= LIST_ROW_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
@ -253,9 +252,13 @@ static void window_install_track_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
// 0x006D3CF1 -- 0x006d3d71 missing
|
||||
|
||||
// Track design name & type
|
||||
auto trackName = _trackName.c_str();
|
||||
gfx_draw_string_left(dpi, STR_TRACK_DESIGN_NAME, &trackName, COLOUR_BLACK, screenPos - ScreenCoordsXY{ 1, 0 });
|
||||
screenPos.y += LIST_ROW_HEIGHT;
|
||||
{
|
||||
auto trackName = _trackName.c_str();
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(trackName);
|
||||
gfx_draw_string_left(dpi, STR_TRACK_DESIGN_NAME, ft.Data(), COLOUR_BLACK, screenPos - ScreenCoordsXY{ 1, 0 });
|
||||
screenPos.y += LIST_ROW_HEIGHT;
|
||||
}
|
||||
|
||||
RideNaming rideName;
|
||||
rct_string_id friendlyTrackName;
|
||||
|
|
|
@ -466,8 +466,6 @@ void game_fix_save_vars()
|
|||
peep->CurrentRide = RIDE_ID_NULL;
|
||||
continue;
|
||||
}
|
||||
auto ft = Formatter::Common();
|
||||
ft.Add<uint32_t>(peep->Id);
|
||||
auto curName = peep->GetName();
|
||||
log_warning(
|
||||
"Peep %u (%s) has invalid ride station = %u for ride %u.", peep->sprite_index, curName.c_str(), srcStation,
|
||||
|
|
|
@ -101,17 +101,16 @@ void banner_paint(paint_session* session, uint8_t direction, int32_t height, con
|
|||
|
||||
scrollingMode += direction;
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
banner->FormatTextTo(ft, /*addColour*/ true);
|
||||
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
{
|
||||
format_string_to_upper(
|
||||
gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
format_string_to_upper(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
else
|
||||
{
|
||||
format_string(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
format_string(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY;
|
||||
|
|
|
@ -161,10 +161,7 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
|
|||
if (!is_exit && !(tile_element->IsGhost()) && tile_element->AsEntrance()->GetRideIndex() != RIDE_ID_NULL
|
||||
&& stationObj->ScrollingMode != SCROLLING_MODE_NONE)
|
||||
{
|
||||
// clear next 8 bytes
|
||||
Formatter::Common().Add<uint32_t>(0).Add<uint32_t>(0);
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ft.Add<rct_string_id>(STR_RIDE_ENTRANCE_NAME);
|
||||
|
||||
if (ride->status == RIDE_STATUS_OPEN && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN))
|
||||
|
@ -179,11 +176,11 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
|
|||
utf8 entrance_string[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
{
|
||||
format_string_to_upper(entrance_string, sizeof(entrance_string), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
format_string_to_upper(entrance_string, sizeof(entrance_string), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
else
|
||||
{
|
||||
format_string(entrance_string, sizeof(entrance_string), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
format_string(entrance_string, sizeof(entrance_string), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY;
|
||||
|
@ -269,8 +266,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
|
|||
break;
|
||||
|
||||
{
|
||||
Formatter::Common().Add<uint32_t>(0).Add<uint32_t>(0);
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
|
||||
if (gParkFlags & PARK_FLAGS_PARK_OPEN)
|
||||
{
|
||||
|
@ -288,11 +284,11 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
|
|||
utf8 park_name[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
{
|
||||
format_string_to_upper(park_name, sizeof(park_name), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
format_string_to_upper(park_name, sizeof(park_name), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
else
|
||||
{
|
||||
format_string(park_name, sizeof(park_name), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
format_string(park_name, sizeof(park_name), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY;
|
||||
|
|
|
@ -301,7 +301,6 @@ void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t hei
|
|||
}
|
||||
// 6B8331:
|
||||
// Draw sign text:
|
||||
Formatter::Common().Add<uint32_t>(0).Add<uint32_t>(0);
|
||||
int32_t textColour = tileElement->AsLargeScenery()->GetSecondaryColour();
|
||||
if (dword_F4387C)
|
||||
{
|
||||
|
@ -311,10 +310,10 @@ void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t hei
|
|||
auto banner = tileElement->AsLargeScenery()->GetBanner();
|
||||
if (banner != nullptr)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
banner->FormatTextTo(ft);
|
||||
utf8 signString[256];
|
||||
format_string(signString, sizeof(signString), STR_STRINGID, gCommonFormatArgs);
|
||||
format_string(signString, sizeof(signString), STR_STRINGID, ft.Data());
|
||||
rct_large_scenery_text* text = entry->large_scenery.text;
|
||||
int32_t y_offset = (text->offset[(direction & 1)].y * 2);
|
||||
if (text->flags & LARGE_SCENERY_TEXT_FLAG_VERTICAL)
|
||||
|
@ -429,16 +428,16 @@ void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t hei
|
|||
auto banner = tileElement->AsLargeScenery()->GetBanner();
|
||||
if (banner != nullptr)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
banner->FormatTextTo(ft);
|
||||
utf8 signString[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
{
|
||||
format_string_to_upper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, gCommonFormatArgs);
|
||||
format_string_to_upper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data());
|
||||
}
|
||||
else
|
||||
{
|
||||
format_string(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, gCommonFormatArgs);
|
||||
format_string(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data());
|
||||
}
|
||||
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY;
|
||||
|
|
|
@ -447,11 +447,7 @@ static void sub_6A4101(
|
|||
uint16_t scrollingMode = railingEntry->scrolling_mode;
|
||||
scrollingMode += direction;
|
||||
|
||||
// This is required due to scrolling_test_setup doing a memcmp of another set
|
||||
// of args and see if it matches these args
|
||||
Formatter::Common().Add<uint32_t>(0).Add<uint32_t>(0);
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
|
||||
if (ride->status == RIDE_STATUS_OPEN && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN))
|
||||
{
|
||||
|
@ -465,12 +461,11 @@ static void sub_6A4101(
|
|||
if (gConfigGeneral.upper_case_banners)
|
||||
{
|
||||
format_string_to_upper(
|
||||
gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
else
|
||||
{
|
||||
format_string(
|
||||
gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, gCommonFormatArgs);
|
||||
format_string(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY;
|
||||
|
|
|
@ -434,16 +434,16 @@ void fence_paint(paint_session* session, uint8_t direction, int32_t height, cons
|
|||
auto banner = tile_element->AsWall()->GetBanner();
|
||||
if (banner != nullptr && !banner->IsNull())
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
banner->FormatTextTo(ft);
|
||||
utf8 signString[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
{
|
||||
format_string_to_upper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, gCommonFormatArgs);
|
||||
format_string_to_upper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data());
|
||||
}
|
||||
else
|
||||
{
|
||||
format_string(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, gCommonFormatArgs);
|
||||
format_string(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data());
|
||||
}
|
||||
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY;
|
||||
|
|
|
@ -1696,7 +1696,7 @@ loc_69B221:
|
|||
UpdateSpriteType();
|
||||
if (PeepFlags & PEEP_FLAGS_TRACKING)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
FormatNameTo(ft);
|
||||
ft.Add<rct_string_id>(ShopItems[shopItem].Naming.Indefinite);
|
||||
if (gConfigNotifications.guest_bought_item)
|
||||
|
@ -3730,7 +3730,7 @@ void Guest::UpdateRideAdvanceThroughEntrance()
|
|||
ride->current_issues |= RIDE_ISSUE_GUESTS_STUCK;
|
||||
ride->last_issue_time = gCurrentTicks;
|
||||
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.ride_warnings)
|
||||
{
|
||||
|
@ -3892,7 +3892,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride)
|
|||
|
||||
if (PeepFlags & PEEP_FLAGS_TRACKING)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
|
||||
|
@ -5009,7 +5009,7 @@ void Guest::UpdateRideLeaveExit()
|
|||
|
||||
if (ride != nullptr && (PeepFlags & PEEP_FLAGS_TRACKING))
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
|
||||
|
|
|
@ -862,7 +862,7 @@ void Peep::UpdateFalling()
|
|||
|
||||
if (gConfigNotifications.guest_died)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
FormatNameTo(ft);
|
||||
News::AddItemToQueue(News::ItemType::Blank, STR_NEWS_ITEM_GUEST_DROWNED, x | (y << 16), ft);
|
||||
}
|
||||
|
@ -2380,7 +2380,7 @@ static void peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin
|
|||
peep->TimeInQueue = 0;
|
||||
if (peep->PeepFlags & PEEP_FLAGS_TRACKING)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
peep->FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.guest_queuing_for_ride)
|
||||
|
@ -2443,7 +2443,7 @@ static void peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin
|
|||
peep->Var37 = 0;
|
||||
if (peep->PeepFlags & PEEP_FLAGS_TRACKING)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
peep->FormatNameTo(ft);
|
||||
if (gConfigNotifications.guest_left_park)
|
||||
{
|
||||
|
@ -2809,7 +2809,7 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords)
|
|||
peep->TimeInQueue = 0;
|
||||
if (peep->PeepFlags & PEEP_FLAGS_TRACKING)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
peep->FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.guest_queuing_for_ride)
|
||||
|
@ -2918,7 +2918,7 @@ static bool peep_interact_with_shop(Peep* peep, const CoordsXYE& coords)
|
|||
ride->cur_num_customers++;
|
||||
if (peep->PeepFlags & PEEP_FLAGS_TRACKING)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
auto ft = Formatter();
|
||||
peep->FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
rct_string_id string_id = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? STR_PEEP_TRACKING_PEEP_IS_IN_X
|
||||
|
|
Loading…
Reference in New Issue