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 && player == &players[displayplayers[0]])
{ {
if (cv_homremoval.value == 1) 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. // Clear the software screen buffer to remove HOM
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 32+(timeinmap&15)); 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]]) 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; INT32 dupx = vid.dupx, dupy = vid.dupy;
if (x == 0 && y == 0 && w == BASEVIDWIDTH && h == BASEVIDHEIGHT) 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); w = vid.width;
return; h = vid.height;
} }
else
{
x *= dupx;
y *= dupy;
w *= dupx;
h *= dupy;
x *= dupx; // Center it if necessary
y *= dupy; V_AdjustXYWithSnap(&x, &y, c, dupx, dupy);
w *= dupx; }
h *= dupy;
// Center it if necessary
V_AdjustXYWithSnap(&x, &y, c, dupx, dupy);
} }
if (x >= vid.width || y >= vid.height) if (x >= vid.width || y >= vid.height)