mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #3061 from kexplo/feature/fix-issue-2221
fix issue #2221
This commit is contained in:
commit
411e98b778
|
@ -58,6 +58,7 @@ Includes all git commit authors. Aliases are GitHub user names.
|
||||||
* Hielke Morsink (Broxzier)
|
* Hielke Morsink (Broxzier)
|
||||||
* Lucas Riutzel (jackinloadup)
|
* Lucas Riutzel (jackinloadup)
|
||||||
* Youngjae Yu (YJSoft)
|
* Youngjae Yu (YJSoft)
|
||||||
|
* Chanwoong Kim (kexplo)
|
||||||
|
|
||||||
## Toolchain
|
## Toolchain
|
||||||
* (Balletie) - OSX
|
* (Balletie) - OSX
|
||||||
|
|
|
@ -584,18 +584,14 @@ void draw_string_centred_raw(rct_drawpixelinfo *dpi, int x, int y, int numLines,
|
||||||
int width = gfx_get_string_width(text);
|
int width = gfx_get_string_width(text);
|
||||||
gfx_draw_string(dpi, text, 254, x - (width / 2), y);
|
gfx_draw_string(dpi, text, 254, x - (width / 2), y);
|
||||||
|
|
||||||
char c;
|
const utf8 *ch = text;
|
||||||
while ((c = *text++) != 0) {
|
const utf8 *nextCh = 0;
|
||||||
if (c >= 32) continue;
|
int codepoint = 0;
|
||||||
if (c <= 4) {
|
|
||||||
text++;
|
while ((codepoint = utf8_get_next(ch, (const utf8**)&nextCh)) != 0) {
|
||||||
continue;
|
ch = nextCh;
|
||||||
}
|
|
||||||
if (c <= 16) continue;
|
|
||||||
text += 2;
|
|
||||||
if (c <= 22) continue;
|
|
||||||
text += 2;
|
|
||||||
}
|
}
|
||||||
|
text = ch+1;
|
||||||
|
|
||||||
y += font_get_line_height(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16));
|
y += font_get_line_height(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue