move hom removal to D_Renderview
removes the hwr code dupe and moves this out of the splitscreen loop
This commit is contained in:
1 parent
5bf635e04c
commit
272cf81e4f
3 files changed
+33
-37
No files matched your search
@@ -327,6 +327,39 @@ static void D_Renderview(void)
|
||||
|
||||
R_ApplyLevelInterpolators(rendertimefrac);
|
||||
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
// if this is display player 1
|
||||
if (cv_homremoval.value)
|
||||
{
|
||||
if (cv_homremoval.value == 1)
|
||||
{
|
||||
// Clear the software screen buffer to remove HOM
|
||||
memset(vid.screens[0], 31, vid.width * vid.height);
|
||||
}
|
||||
else if (cv_homremoval.value == 2)
|
||||
{
|
||||
//'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
||||
memset(vid.screens[0], 32+(timeinmap&15), vid.width * vid.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
if (splitscreen == 2)
|
||||
{
|
||||
// V_DrawPatchFill, but for the fourth screen only
|
||||
patch_t *pat = W_CachePatchName("SRB2BACK", PU_CACHE);
|
||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
|
||||
|
||||
for (x = vid.width>>1; x < vid.width; x += pw)
|
||||
{
|
||||
for (y = vid.height>>1; y < vid.height; y += ph)
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART, pat);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
const boolean issplitscreen = (i > 0);
|
||||
|
||||
@@ -5606,20 +5606,6 @@ static void HWR_RenderFrame(player_t *player, boolean skybox)
|
||||
gl_viewwindowx += gl_viewwidth;
|
||||
}
|
||||
|
||||
if (splitscreen == 2 && player == &players[displayplayers[2]])
|
||||
{
|
||||
// V_DrawPatchFill, but for the fourth screen only
|
||||
patch_t *gpatch = W_CachePatchName("SRB2BACK", PU_PATCH);
|
||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||
INT32 x, y, pw = (gpatch->width * dupz), ph = (gpatch->height * dupz);
|
||||
|
||||
for (x = vid.width >> 1; x < vid.width; x += pw)
|
||||
{
|
||||
for (y = vid.height >> 1; y < vid.height; y += ph)
|
||||
HWR_DrawStretchyFixedPatch(gpatch, (x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, FRACUNIT, V_NOSCALESTART, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// check for new console commands.
|
||||
NetUpdate();
|
||||
|
||||
|
||||
@@ -1360,29 +1360,6 @@ void R_RenderPlayerView(player_t *player)
|
||||
const boolean skybox = (skyboxmo[0] && cv_skybox.value);
|
||||
UINT8 i;
|
||||
|
||||
// if this is display player 1
|
||||
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, 128+(timeinmap&15));
|
||||
}
|
||||
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
else if (splitscreen == 2 && player == &players[displayplayers[2]])
|
||||
{
|
||||
// V_DrawPatchFill, but for the fourth screen only
|
||||
patch_t *pat = static_cast<patch_t*>(W_CachePatchName("SRB2BACK", PU_CACHE));
|
||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
|
||||
|
||||
for (x = vid.width>>1; x < vid.width; x += pw)
|
||||
{
|
||||
for (y = vid.height>>1; y < vid.height; y += ph)
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART, pat);
|
||||
}
|
||||
}
|
||||
|
||||
// load previous saved value of skyVisible for the player
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user