fix super-wide (1600px) status bar graphic alignment (#2142)

* fix super-wide (1600px) status bar graphic alignment

Fixes #2140

* use formula from Eternity Engine

* drop casts

* use DIV_ROUND_FLOOR()
This commit is contained in:
Fabian Greffrath 2025-01-16 06:15:46 +01:00 committed by GitHub
parent f9b9f23be7
commit 7346d178a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -402,7 +402,7 @@ static void DrawPatchInternal(int x, int y, patch_t *patch, boolean flipped)
}
else // too far off-screen
{
x1 = (x1 * video.xscale) >> FRACBITS;
x1 = -(DIV_ROUND_FLOOR(video.width * (-x1 - 1), video.unscaledw));
}
if (x2 < video.unscaledw)