hwr2: fix DrawFill full screen special case

This commit is contained in:
Eidolon 2023-02-20 17:48:55 -06:00
parent 31ce947659
commit 158aaa6803
2 changed files with 21 additions and 13 deletions

View file

@ -1476,9 +1476,15 @@ void R_RenderPlayerView(void)
if (cv_homremoval.value && player == &players[displayplayers[0]])
{
if (cv_homremoval.value == 1)
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); // No HOM effect!
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 32+(timeinmap&15));
{
// Clear the software screen buffer to remove HOM
memset(screens[0], 31, vid.width * vid.height * vid.bpp);
}
else
{
//'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
memset(screens[0], 32+(timeinmap&15), vid.width * vid.height * vid.bpp);
}
}
else if (r_splitscreen == 2 && player == &players[displayplayers[2]])
{

View file

@ -1031,18 +1031,20 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
INT32 dupx = vid.dupx, dupy = vid.dupy;
if (x == 0 && y == 0 && w == BASEVIDWIDTH && h == BASEVIDHEIGHT)
{ // Clear the entire screen, from dest to deststop. Yes, this really works.
memset(screens[0], (c&255), vid.width * vid.height * vid.bpp);
return;
{
w = vid.width;
h = vid.height;
}
else
{
x *= dupx;
y *= dupy;
w *= dupx;
h *= dupy;
x *= dupx;
y *= dupy;
w *= dupx;
h *= dupy;
// Center it if necessary
V_AdjustXYWithSnap(&x, &y, c, dupx, dupy);
// Center it if necessary
V_AdjustXYWithSnap(&x, &y, c, dupx, dupy);
}
}
if (x >= vid.width || y >= vid.height)