mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-02 12:24:15 +00:00
(svn r15804) -Fix (r15796): viewport strings weren't properly 'rendered'.
-Codechange: use the new string drawing API for the viewport.
This commit is contained in:
parent
e74dc1e1d6
commit
4eaf4e6182
@ -1457,8 +1457,13 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, const StringSpriteToDrawVect
|
||||
} else {
|
||||
colour = TC_BLACK;
|
||||
}
|
||||
|
||||
/* The maximum width of the string */
|
||||
int w = GB(ss->width, 0, 15);
|
||||
if (w == 0) w = UINT16_MAX;
|
||||
|
||||
DrawString(
|
||||
UnScaleByZoom(ss->x, zoom), UnScaleByZoom(ss->y, zoom) - (ss->width & 0x8000 ? 2 : 0),
|
||||
UnScaleByZoom(ss->x, zoom), UnScaleByZoom(ss->x, zoom) + w, UnScaleByZoom(ss->y, zoom) - (ss->width & 0x8000 ? 2 : 0),
|
||||
ss->string, colour
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user