mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Ignore patch X offset when drawing fonts
We don't typically use offsets for font graphics anyway. But I had to add offsets to the console font specifically, because the console doesn't render text with the normal drawing functions.
This commit is contained in:
parent
00643195a5
commit
f917fbd199
1 changed files with 3 additions and 1 deletions
|
|
@ -2702,9 +2702,11 @@ void V_DrawStringScaled(
|
||||||
c -= font->start;
|
c -= font->start;
|
||||||
if (V_CharacterValid(font, c) == true)
|
if (V_CharacterValid(font, c) == true)
|
||||||
{
|
{
|
||||||
|
// Remove offsets from patch
|
||||||
|
fixed_t patchxofs = SHORT (font->font[c]->leftoffset) * dupx * FRACUNIT;
|
||||||
cw = SHORT (font->font[c]->width) * dupx;
|
cw = SHORT (font->font[c]->width) * dupx;
|
||||||
cxoff = (*fontspec.dim_fn)(scale, fontspec.chw, hchw, dupx, &cw);
|
cxoff = (*fontspec.dim_fn)(scale, fontspec.chw, hchw, dupx, &cw);
|
||||||
V_DrawFixedPatch(cx + cxoff, cy + cyoff, scale,
|
V_DrawFixedPatch(cx + cxoff + patchxofs, cy + cyoff, scale,
|
||||||
flags, font->font[c], colormap);
|
flags, font->font[c], colormap);
|
||||||
cx += cw;
|
cx += cw;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue