diff --git a/src/d_main.c b/src/d_main.c index e29c9722a..bd7019825 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -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); diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index d35c9d272..6438b7ab7 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -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)<(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++) {