1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Reduce usage of gCurrentFontSpriteBase

This commit is contained in:
Gymnasiast
2021-02-27 17:43:23 +01:00
parent 3e536e2711
commit 826f6c7442
10 changed files with 24 additions and 38 deletions

View File

@@ -57,7 +57,6 @@ rct_window* window_error_open(rct_string_id title, rct_string_id message, const
rct_window* window_error_open(std::string_view title, std::string_view message)
{
int32_t numLines, width, height, maxY;
FontSpriteBase fontHeight;
rct_window* w;
window_close_by_class(WC_ERROR);
@@ -89,7 +88,7 @@ rct_window* window_error_open(std::string_view title, std::string_view message)
width = std::clamp(width, 64, 196);
gCurrentFontSpriteBase = FontSpriteBase::MEDIUM;
gfx_wrap_string(buffer.data(), width + 1, &numLines, &fontHeight);
gfx_wrap_string(buffer.data(), width + 1, &numLines);
_window_error_num_lines = numLines;
width = width + 3;