From cea07d0125a4effc5012da231475cf03c7ec1ee7 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 29 May 2012 20:01:44 +0000 Subject: [PATCH] In CON showview, if drawing off-screen, clear the view with pal 0 and bail out. This fixes the glitches/corruption whereever showview is used from EVENT_DISPLAYROOMS while the scene is actually rendered to a tile instead of the frame buffer, for example because we have a tilted view or "pixel doubling" enabled. Fixing it for real (i.e. so that the showview actually completes) will require more effort. git-svn-id: https://svn.eduke32.com/eduke32@2706 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 2 ++ polymer/eduke32/source/gameexec.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 4a20b26ba..350eb015a 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -3743,6 +3743,8 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio) break; } + // NOTE: might be rendering off-screen here, so CON commands that draw stuff + // like showview must cope with that situation or bail out! if (apScriptGameEvent[EVENT_DISPLAYROOMS]) VM_OnEvent(EVENT_DISPLAYROOMS, g_player[screenpeek].ps->i, screenpeek, -1, 0); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 49a66d97a..590011e67 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2342,6 +2342,12 @@ nullquote: if (g_screenCapture) continue; + if (offscreenrendering) + { + clearview(0); + continue; + } + if (x1 > x2) swaplong(&x1,&x2); if (y1 > y2) swaplong(&y1,&y2);