diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index cc9641d8f..ca2d4ef9b 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "menu/menu.h" #include "mapinfo.h" #include "cmdlib.h" +#include "v_2ddrawer.h" BEGIN_DUKE_NS @@ -1287,25 +1288,25 @@ void G_PlayE4Cutscene(void) renderFlushPerms(); videoSetViewableArea(0, 0, xdim-1, ydim-1); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); if (Anim_Play("vol41a.anm")) goto end_vol4a; - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); if (Anim_Play("vol42a.anm")) goto end_vol4a; - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); Anim_Play("vol43a.anm"); end_vol4a: - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); FX_StopAllSounds(); diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 264412cd8..d8c01f9df 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -898,13 +898,8 @@ void G_DisplayRest(int32_t smoothratio) if (ud.overhead_on == 2) { - videoClearViewableArea(0L); -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST) - { - G_DrawBackground(); // Necessary GL fills the entire screen with black - } -#endif + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); + G_DrawBackground(); // Necessary GL fills the entire screen with black renderDrawMapView(cposx, cposy, pp->zoom, cang); } G_DrawOverheadMap(cposx, cposy, pp->zoom, cang); diff --git a/source/exhumed/src/map.cpp b/source/exhumed/src/map.cpp index d98ecd04d..672441173 100644 --- a/source/exhumed/src/map.cpp +++ b/source/exhumed/src/map.cpp @@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "engine.h" #include "exhumed.h" #include "view.h" +#include "v_2ddrawer.h" BEGIN_PS_NS @@ -621,7 +622,7 @@ void DrawMap() //drawoverheadmap(initx, inity, lMapZoom, inita); if (nMapMode == 2) { - videoClearViewableArea(blackcol); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); RefreshBackground(); renderDrawMapView(initx, inity, lMapZoom, inita); } diff --git a/source/exhumed/src/movie.cpp b/source/exhumed/src/movie.cpp index 75e60a5e2..b5bc80a77 100644 --- a/source/exhumed/src/movie.cpp +++ b/source/exhumed/src/movie.cpp @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "typedefs.h" #include "keyboard.h" #include "sound.h" +#include "v_2ddrawer.h" BEGIN_PS_NS @@ -256,7 +257,7 @@ void PlayMovie(const char* fileName) } } - videoClearViewableArea(blackcol); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); rotatesprite(160 << 16, 100 << 16, z, angle, kMovieTile, 0, 1, 2, 0, 0, xdim - 1, ydim - 1); if (bDoFade) { diff --git a/source/rr/src/premap.cpp b/source/rr/src/premap.cpp index a9146fd57..33ea91264 100644 --- a/source/rr/src/premap.cpp +++ b/source/rr/src/premap.cpp @@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "menu/menu.h" #include "mapinfo.h" #include "cmdlib.h" +#include "v_2ddrawer.h" BEGIN_RR_NS @@ -1906,23 +1907,23 @@ void G_NewGame(int volumeNum, int levelNum, int skillNum) renderFlushPerms(); videoSetViewableArea(0,0,xdim-1,ydim-1); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); int animReturn = Anim_Play("vol41a.anm"); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); if (animReturn) goto end_vol4a; animReturn = Anim_Play("vol42a.anm"); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); if (animReturn) goto end_vol4a; Anim_Play("vol43a.anm"); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); end_vol4a: diff --git a/source/rr/src/screens.cpp b/source/rr/src/screens.cpp index b6b7a1a3e..92ee6d1ef 100644 --- a/source/rr/src/screens.cpp +++ b/source/rr/src/screens.cpp @@ -928,7 +928,7 @@ void G_DisplayRest(int32_t smoothratio) if (ud.overhead_on == 2) { - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); renderDrawMapView(cposx, cposy, pp->zoom, cang); } G_DrawOverheadMap(cposx, cposy, pp->zoom, cang); @@ -1148,9 +1148,6 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t // (end-start)/step + 1 iterations do { -#ifdef __ANDROID__ //Needed for N7 2013 to stop corruption while fading video - videoClearViewableArea(0); -#endif if (inputState.GetKeyStatus(sc_Space)) { inputState.ClearKeyStatus(sc_Space); diff --git a/source/sw/src/anim.cpp b/source/sw/src/anim.cpp index efec7b446..770441575 100644 --- a/source/sw/src/anim.cpp +++ b/source/sw/src/anim.cpp @@ -43,7 +43,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "animlib.h" #include "anim.h" #include "../glbackend/glbackend.h" - +#include "v_2ddrawer.h" #include "common_game.h" @@ -327,7 +327,7 @@ playanm(short anim_num) ENDOFANIMLOOP: GLInterface.EnableNonTransparent255(false); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); videoSetPalette(0, BASEPAL, 2); diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index cf90b1a17..6dffcd7c6 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -57,6 +57,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "config.h" #include "menu/menu.h" #include "swcvar.h" +#include "v_2ddrawer.h" BEGIN_SW_NS @@ -2270,7 +2271,7 @@ drawscreen(PLAYERp pp) if (dimensionmode == 6) { - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); renderDrawMapView(tx, ty, zoom, tang); } diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 73b3c2d69..0e3c3ca3c 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -1468,7 +1468,7 @@ void LogoLevel(void) DSPRINTF(ds,"About to display 3drealms pic..."); MONO_PRINT(ds); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); rotatesprite(0, 0, RS_SCALE, 0, THREED_REALMS_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1); videoNextPage(); //FadeIn(0, 3); @@ -1492,7 +1492,7 @@ void LogoLevel(void) } } - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); videoSetPalette(0, BASEPAL, 2); @@ -1523,7 +1523,7 @@ void CreditsLevel(void) save = gs.BorderNum; ClearStartMost(); gs.BorderNum = save; - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); // Lo Wang feel like singing! @@ -1586,7 +1586,7 @@ void CreditsLevel(void) } // put up a blank screen while loading - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); ResetKeys(); Mus_Stop(); @@ -1624,7 +1624,7 @@ TitleLevel(void) tempbuf[i] = i; palookup[0] = tempbuf; - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); ready2send = 0; @@ -1681,22 +1681,19 @@ TitleLevel(void) void DrawMenuLevelScreen(void) { - renderFlushPerms(); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 20, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1); } void DrawStatScreen(void) { - renderFlushPerms(); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); rotatesprite(0, 0, RS_SCALE, 0, STAT_SCREEN_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1); } void DrawLoadLevelScreen(void) { - renderFlushPerms(); - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 20, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1); } @@ -1732,7 +1729,7 @@ void MenuLevel(void) DemoMode = FALSE; DemoPlaying = FALSE; - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); //FadeOut(0, 0); @@ -1843,7 +1840,7 @@ void MenuLevel(void) inputState.ClearKeysDown(); M_ClearMenus(); InMenuLevel = FALSE; - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); } @@ -2068,7 +2065,7 @@ void BonusScreen(PLAYERp pp) if (Level < 0) Level = 0; - videoClearViewableArea(0L); + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); videoNextPage(); inputState.ClearKeysDown(); @@ -2111,8 +2108,7 @@ void BonusScreen(PLAYERp pp) gStateControl(&State, &Tics); - videoClearViewableArea(0L); - + twod->AddColorOnlyQuad(0, 0, xdim, ydim, 0xff000000); rotatesprite(0, 0, RS_SCALE, 0, 5120, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1); if (UserMapName[0])