improve accuracy of off-screen calculation in patch drawing

Now Eviternity II st_bar works better with DRS.
This commit is contained in:
Roman Fomin 2023-12-26 12:31:35 +07:00
parent e49d3d8844
commit ea08151b83

View File

@ -513,7 +513,7 @@ void V_DrawPatchInt(int x, int y, patch_t *patch, boolean flipped,
else if (-x1 - 1 < maxw)
x1 = -x2lookup[-x1 - 1];
else // too far off-screen
x1 = -(video.width * (-x1 - 1) / maxw);
x1 = -(((-x1 - 1) * video.xscale) >> FRACBITS);
if (x2 < video.unscaledw)
x2 = x2lookup[x2];