From 1311db9ac929beb5e0f653e2ac155746d73ba6f6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 12 Jun 2020 20:52:01 +0200 Subject: [PATCH] - changed all places clearing the screen in 2D display code to use the 2D drawer's ClearScreen method. --- source/duke3d/src/anim.cpp | 2 +- source/duke3d/src/demo.cpp | 2 +- source/duke3d/src/gameexec.cpp | 2 +- source/duke3d/src/premap.cpp | 7 ++- source/duke3d/src/sbar.cpp | 4 +- source/duke3d/src/screens.cpp | 72 ++++++++++------------ source/exhumed/src/d_menu.cpp | 2 +- source/exhumed/src/exhumed.cpp | 2 +- source/exhumed/src/menu.cpp | 2 +- source/exhumed/src/view.cpp | 2 +- source/rr/src/anim.cpp | 2 +- source/rr/src/demo.cpp | 2 +- source/rr/src/game.cpp | 2 +- source/rr/src/gameexec.cpp | 2 +- source/rr/src/premap.cpp | 8 +-- source/rr/src/sbar.cpp | 2 +- source/rr/src/screens.cpp | 106 ++++++++++++++++----------------- 17 files changed, 107 insertions(+), 114 deletions(-) diff --git a/source/duke3d/src/anim.cpp b/source/duke3d/src/anim.cpp index 880813eef..2bbf0774a 100644 --- a/source/duke3d/src/anim.cpp +++ b/source/duke3d/src/anim.cpp @@ -471,7 +471,7 @@ int32_t Anim_Play(const char *fn) frametime = (int32_t)totalclock; - videoClearScreen(0); + twod->ClearScreen(); int32_t z; #if 0 // fixme: The math here doesn't look right - this better use a more robust fullscreen scaler later. diff --git a/source/duke3d/src/demo.cpp b/source/duke3d/src/demo.cpp index 23bee7997..17aa54e3d 100644 --- a/source/duke3d/src/demo.cpp +++ b/source/duke3d/src/demo.cpp @@ -373,7 +373,7 @@ static void Demo_DisplayProfStatus(void) return; lastpercent = percent; - videoClearScreen(0); + twod->ClearScreen(); snprintf(buf, sizeof(buf), "timing... %d/%d game tics (%d %%)", g_demo_cnt, g_demo_totalCnt, percent); gametext_center(60, buf); diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 1a534a5f1..64e515140 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -1203,7 +1203,7 @@ void Screen_Play(void) if (!G_FPSLimit()) continue; - videoClearScreen(0); + twod->ClearScreen(); if (VM_OnEventWithReturn(EVENT_SCREEN, -1, myconnectindex, inputState.CheckAllInput())) running = false; diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index 472a21cf8..78ea98bbe 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -330,7 +330,7 @@ static void G_DemoLoadScreen(const char *statustext, int const loadScreenTile, i { if (statustext == NULL) { - videoClearScreen(0L); + twod->ClearScreen(); // g_player[myconnectindex].ps->palette = palette; // G_FadePalette(0,0,0,0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 @@ -338,6 +338,7 @@ static void G_DemoLoadScreen(const char *statustext, int const loadScreenTile, i if ((unsigned)loadScreenTile < (MAXTILES<<1)) { + twod->ClearScreen(); rotatesprite_fs(320<<15, 200<<15, 65536L, 0, loadScreenTile, 0, 0, 2+8+64+BGSTRETCH); } else @@ -374,12 +375,12 @@ static void G_DoLoadScreen(const char *statustext, int percent) { ud.screen_size = 0; G_UpdateScreenArea(); - videoClearScreen(0L); + twod->ClearScreen(); } if ((unsigned)loadScreenTile < (MAXTILES<<1)) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(320<<15, 200<<15, 65536L, 0, loadScreenTile, 0, 0, 2+8+64+BGSTRETCH); } else diff --git a/source/duke3d/src/sbar.cpp b/source/duke3d/src/sbar.cpp index a3bd18e98..479bb4045 100644 --- a/source/duke3d/src/sbar.cpp +++ b/source/duke3d/src/sbar.cpp @@ -1022,8 +1022,6 @@ void G_DrawBackground(void) { int32_t x, y, x1, x2; - renderFlushPerms(); - int32_t y1=0, y2=ydim; if ((g_player[myconnectindex].ps->gm&MODE_GAME) == 0 && ud.recstat != 2) @@ -1032,7 +1030,7 @@ void G_DrawBackground(void) const int32_t fstilep = tilesiz[MENUTILE].x>=320 && tilesiz[MENUTILE].y==200; int32_t bgtile = (fstilep ? MENUTILE : BIGHOLE); - videoClearScreen(0); + twod->ClearScreen(); // when not rendering a game, fullscreen wipe // Gv_SetVar(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1); diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 46ab7287a..abf839488 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -1049,8 +1049,6 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t // STEP must evenly divide END-START Bassert(klabs(end-start)%step == 0); - videoClearScreen(0); - // (end-start)/step + 1 iterations do { @@ -1060,6 +1058,7 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t return; } + twod->ClearScreen(); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, tile, 0, 0, 2+8+64+BGSTRETCH, nullptr, basepal); G_FadePalette(r, g, b, start); start += step; @@ -1148,10 +1147,9 @@ void gameDisplay3DRScreen() } else { - videoClearScreen(0); + twod->ClearScreen(); fadepal(0, 0, 0, 0, 252, 28); - renderFlushPerms(); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, DREALMSPAL); videoNextPage(); fadepaltile(0, 0, 0, 252, 0, -28, DREALMS, DREALMSPAL); @@ -1161,7 +1159,7 @@ void gameDisplay3DRScreen() { if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, DREALMSPAL); gameHandleEvents(); videoNextPage(); @@ -1178,8 +1176,7 @@ void gameDisplayTitleScreen(void) int titlesound = 0; int32_t const logoflags = G_GetLogoFlags(); - videoClearScreen(0); - + twod->ClearScreen(); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, BETASCREEN, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, TITLEPAL); inputState.keyFlushChars(); fadepaltile(0, 0, 0, 252, 0, -28, BETASCREEN, TITLEPAL); @@ -1193,7 +1190,7 @@ void gameDisplayTitleScreen(void) { if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, BETASCREEN, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, TITLEPAL); if (logoflags & LOGO_DUKENUKEM) { @@ -1273,10 +1270,9 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); videoSetViewableArea(0, 0, xdim-1, ydim-1); - videoClearScreen(0L); + twod->ClearScreen(); G_FadePalette(0, 0, 0, 252); - renderFlushPerms(); videoNextPage(); Mus_Stop(); @@ -1301,7 +1297,7 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (logoflags & LOGO_STOPANIMSOUNDS) @@ -1323,14 +1319,14 @@ void G_DisplayLogo(void) { gameDisplay3DRScreen(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); } inputState.ClearAllInput(); } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (logoflags & LOGO_TITLESCREEN) @@ -1339,8 +1335,7 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); } - renderFlushPerms(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); @@ -1348,8 +1343,7 @@ void G_DisplayLogo(void) if ((G_GetLogoFlags() & LOGO_STOPMISCSOUNDS) == 0) S_PlaySound(NITEVISION_ONOFF, CHAN_AUTO, CHANF_UI); - //G_FadePalette(0,0,0,0); - videoClearScreen(0L); + twod->ClearScreen(); } #ifndef EDUKE32_STANDALONE @@ -1397,7 +1391,7 @@ static void G_BonusCutscenes(void) 350, 380, VICTORY1+8, 86, 59 // duplicate row to alleviate overflow in the for loop below "boss" }; - videoClearScreen(0L); + twod->ClearScreen(); rotatesprite_fs(0, 50 << 16, 65536L, 0, VICTORY1, 0, 0, 2 + 8 + 16 + 64 + 128 + BGSTRETCH, nullptr, ENDINGPAL); videoNextPage(); fadepal(0, 0, 0, 252, 0, -4); @@ -1409,7 +1403,7 @@ static void G_BonusCutscenes(void) { if (G_FPSLimit()) { - videoClearScreen(0L); + twod->ClearScreen(); rotatesprite_fs(0, 50<<16, 65536L, 0, VICTORY1, 0, 0, 2+8+16+64+128+BGSTRETCH, nullptr, ENDINGPAL); // boss @@ -1492,7 +1486,7 @@ static void G_BonusCutscenes(void) videoSetViewableArea(0, 0, xdim-1, ydim-1); Mus_Stop(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0 && !(G_GetLogoFlags() & LOGO_NOE2BONUSSCENE)) @@ -1500,7 +1494,7 @@ static void G_BonusCutscenes(void) fadepal(0, 0, 0, 252, 0, -4); Anim_Play("cineov2.anm"); inputState.ClearAllInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI); @@ -1526,7 +1520,7 @@ static void G_BonusCutscenes(void) videoSetViewableArea(0, 0, xdim-1, ydim-1); Mus_Stop(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0 && !(G_GetLogoFlags() & LOGO_NOE4BONUSSCENE)) @@ -1535,19 +1529,19 @@ static void G_BonusCutscenes(void) inputState.ClearAllInput(); int t = Anim_Play("vol4e1.anm"); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (t) goto end_vol4e; t = Anim_Play("vol4e2.anm"); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (t) goto end_vol4e; Anim_Play("vol4e3.anm"); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); } @@ -1566,7 +1560,7 @@ static void G_BonusCutscenes(void) G_FadePalette(0, 0, 0, 0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 // G_FadePalette(0,0,0,252); - videoClearScreen(0L); + twod->ClearScreen(); menutext_center(60, GStrings("Thanks to all our")); menutext_center(60+16, GStrings("fans for giving")); menutext_center(60+16+16, GStrings("us big heads.")); @@ -1584,7 +1578,7 @@ static void G_BonusCutscenes(void) goto VOL4_END; VOL4_DUKETEAM: - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); Anim_Play("DUKETEAM.ANM"); @@ -1592,7 +1586,7 @@ static void G_BonusCutscenes(void) inputState.ClearAllInput(); G_HandleEventsWhileNoInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); G_FadePalette(0, 0, 0, 252); @@ -1608,7 +1602,7 @@ static void G_BonusCutscenes(void) return; Mus_Stop(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0 && !(G_GetLogoFlags() & LOGO_NOE3BONUSSCENE)) { @@ -1618,7 +1612,7 @@ static void G_BonusCutscenes(void) ototalclock = totalclock+200; while (totalclock < ototalclock) gameHandleEvents(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); FX_StopAllSounds(); @@ -1661,7 +1655,7 @@ static void G_BonusCutscenes(void) S_ClearSoundLocks(); S_PlaySound(ENDSEQVOL3SND4, CHAN_AUTO, CHANF_UI); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); Anim_Play("DUKETEAM.ANM"); @@ -1669,7 +1663,7 @@ static void G_BonusCutscenes(void) inputState.ClearAllInput(); G_HandleEventsWhileNoInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); G_FadePalette(0, 0, 0, 252); } @@ -1678,7 +1672,7 @@ static void G_BonusCutscenes(void) FX_StopAllSounds(); S_ClearSoundLocks(); - videoClearScreen(0L); + twod->ClearScreen(); break; @@ -1691,7 +1685,7 @@ static void G_BonusCutscenes(void) Mus_Stop(); totalclocklock = totalclock = 0; - videoClearScreen(0L); + twod->ClearScreen(); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, FIREFLYGROWEFFECT, 0, 0, 2+8+64+BGSTRETCH); videoNextPage(); @@ -1707,7 +1701,7 @@ static void G_BonusCutscenes(void) { totalclocklock = totalclock; - videoClearScreen(0L); + twod->ClearScreen(); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, FIREFLYGROWEFFECT, 0, 0, 2+8+64+BGSTRETCH); videoNextPage(); } @@ -1877,7 +1871,7 @@ void G_BonusScreen(int32_t bonusonly) fadepal(0, 0, 0, 0, 252, 28); videoSetViewableArea(0, 0, xdim-1, ydim-1); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); renderFlushPerms(); @@ -1903,7 +1897,7 @@ void G_BonusScreen(int32_t bonusonly) if (g_mostConcurrentPlayers > 1 && (g_gametypeFlags[ud.coop]&GAMETYPE_SCORESHEET)) { - videoClearScreen(0); + twod->ClearScreen(); G_DisplayMPResultsScreen(); PlayBonusMusic(); @@ -1919,7 +1913,7 @@ void G_BonusScreen(int32_t bonusonly) if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); G_DisplayMPResultsScreen(); videoNextPage(); } @@ -1962,7 +1956,7 @@ void G_BonusScreen(int32_t bonusonly) { if (g_player[myconnectindex].ps->gm&MODE_EOL) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, BONUSSCREEN+gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH); if (totalclock >= 1000000000 && totalclock < 1000000320) diff --git a/source/exhumed/src/d_menu.cpp b/source/exhumed/src/d_menu.cpp index 9c6049c18..107852c59 100644 --- a/source/exhumed/src/d_menu.cpp +++ b/source/exhumed/src/d_menu.cpp @@ -53,7 +53,7 @@ int menu_Menu(int nVal) auto nLogoTile = EXHUMED ? kExhumedLogo : kPowerslaveLogo; int dword_9AB5F = ((int)totalclock / 16) & 3; - videoClearScreen(0); + twod->ClearScreen(); overwritesprite(160, 100, kSkullHead, 32, 3, kPalNormal); overwritesprite(161, 130, kSkullJaw, 32, 3, kPalNormal); diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index ecebaf455..1b4f0b80e 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -2740,7 +2740,7 @@ int myprintext(int x, int y, const char *str, int shade, int basepal) void EraseScreen(int nVal) { // There's no other values than 0 ever coming through here. - videoClearScreen(0); + twod->ClearScreen(); } void InitSpiritHead() diff --git a/source/exhumed/src/menu.cpp b/source/exhumed/src/menu.cpp index 9abdbbbe6..5bf472f2b 100644 --- a/source/exhumed/src/menu.cpp +++ b/source/exhumed/src/menu.cpp @@ -352,7 +352,7 @@ void menu_DoPlasma() } } - videoClearScreen(overscanindex); + twod->ClearScreen(); uint8_t* plasmapix = const_cast(tilePtr(nPlasmaTile)); diff --git a/source/exhumed/src/view.cpp b/source/exhumed/src/view.cpp index 32fe19ac4..65ac09792 100644 --- a/source/exhumed/src/view.cpp +++ b/source/exhumed/src/view.cpp @@ -588,7 +588,7 @@ void DrawView(int smoothRatio, bool sceneonly) } else { - videoClearScreen(overscanindex); + twod->ClearScreen(); DrawStatus(); } diff --git a/source/rr/src/anim.cpp b/source/rr/src/anim.cpp index 9ce4bab41..7e31a9d13 100644 --- a/source/rr/src/anim.cpp +++ b/source/rr/src/anim.cpp @@ -511,7 +511,7 @@ int32_t Anim_Play(const char *fn) frametime = (int32_t)totalclock; - videoClearScreen(0); + twod->ClearScreen(); int32_t z; #if 0 diff --git a/source/rr/src/demo.cpp b/source/rr/src/demo.cpp index 6edb09675..d778dd0aa 100644 --- a/source/rr/src/demo.cpp +++ b/source/rr/src/demo.cpp @@ -376,7 +376,7 @@ static void Demo_DisplayProfStatus(void) return; lastpercent = percent; - videoClearScreen(0); + twod->ClearScreen(); snprintf(buf, sizeof(buf), "timing... %d/%d game tics (%d %%)", g_demo_cnt, g_demo_totalCnt, percent); gametext_center(60, buf); diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index a638a4e40..640b7abf4 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -833,7 +833,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio) if (pub > 0 || videoGetRenderMode() >= REND_POLYMOST) // JBF 20040101: redraw background always { - videoClearScreen(0); + //videoClearScreen(0); #ifndef EDUKE32_TOUCH_DEVICES if (ud.screen_size >= 8) #endif diff --git a/source/rr/src/gameexec.cpp b/source/rr/src/gameexec.cpp index 165f7d37d..15895f6a9 100644 --- a/source/rr/src/gameexec.cpp +++ b/source/rr/src/gameexec.cpp @@ -1263,7 +1263,7 @@ void Screen_Play(void) if (!G_FPSLimit()) continue; - videoClearScreen(0); + twod->ClearScreen(); if (inputState.CheckAllInput()) running = 0; diff --git a/source/rr/src/premap.cpp b/source/rr/src/premap.cpp index e68857743..b53c4e453 100644 --- a/source/rr/src/premap.cpp +++ b/source/rr/src/premap.cpp @@ -489,11 +489,11 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent) i = ud.screen_size; ud.screen_size = 0; G_UpdateScreenArea(); - videoClearScreen(0L); + twod->ClearScreen(); } - videoClearScreen(0); - + twod->ClearScreen(); + int const loadScreenTile = VM_OnEventWithReturn(EVENT_GETLOADTILE, g_player[screenpeek].ps->i, screenpeek, DEER ? 7040 : LOADSCREEN); rotatesprite_fs(320<<15,200<<15,65536L,0,loadScreenTile,0,0,2+8+64+BGSTRETCH); @@ -544,7 +544,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent) { if (!statustext) { - videoClearScreen(0L); + twod->ClearScreen(); //g_player[myconnectindex].ps->palette = palette; //G_FadePalette(0,0,0,0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 diff --git a/source/rr/src/sbar.cpp b/source/rr/src/sbar.cpp index 42d408457..d69f64dc5 100644 --- a/source/rr/src/sbar.cpp +++ b/source/rr/src/sbar.cpp @@ -1438,7 +1438,7 @@ void G_DrawBackground(void) const int32_t fstilep = tilesiz[MENUTILE].x>=320 && tilesiz[MENUTILE].y==200; int32_t bgtile = (fstilep ? MENUTILE : (RRRA ? RRTILE7629 : BIGHOLE)); - videoClearScreen(0); + twod->ClearScreen(); // when not rendering a game, fullscreen wipe // Gv_SetVar(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1); diff --git a/source/rr/src/screens.cpp b/source/rr/src/screens.cpp index 7f205e0ee..5cc926276 100644 --- a/source/rr/src/screens.cpp +++ b/source/rr/src/screens.cpp @@ -1017,7 +1017,7 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t // STEP must evenly divide END-START Bassert(klabs(end-start)%step == 0); - videoClearScreen(0); + twod->ClearScreen(); // (end-start)/step + 1 iterations do @@ -1092,7 +1092,7 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); videoSetViewableArea(0, 0, xdim-1, ydim-1); - videoClearScreen(0L); + twod->ClearScreen(); G_FadePalette(0, 0, 0, 252); renderFlushPerms(); @@ -1106,7 +1106,7 @@ void G_DisplayLogo(void) { if (!inputState.CheckAllInput() && g_noLogoAnim == 0) { - videoClearScreen(0); + twod->ClearScreen(); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 fadepal(0, 0, 0, 0, 252, 28); @@ -1120,7 +1120,7 @@ void G_DisplayLogo(void) { if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 7106, 0, 0, 2 + 8 + 64 + BGSTRETCH); G_HandleAsync(); @@ -1136,22 +1136,22 @@ void G_DisplayLogo(void) fadepaltile(0, 0, 0, 0, 252, 4, 7106, BASEPAL); } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); inputState.ClearAllInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); - videoClearScreen(0); + twod->ClearScreen(); //g_player[myconnectindex].ps->palette = drealms; //G_FadePalette(0,0,0,252); if (!inputState.CheckAllInput() && g_noLogoAnim == 0) { - videoClearScreen(0); + twod->ClearScreen(); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 fadepal(0, 0, 0, 0, 252, 28); @@ -1165,7 +1165,7 @@ void G_DisplayLogo(void) { if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 7107, 0, 0, 2 + 8 + 64 + BGSTRETCH); G_HandleAsync(); @@ -1185,14 +1185,14 @@ void G_DisplayLogo(void) } renderFlushPerms(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); //g_player[myconnectindex].ps->palette = palette; P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 //G_FadePalette(0,0,0,0); - videoClearScreen(0L); + twod->ClearScreen(); g_noLogo = 1; // Play intro only once return; @@ -1209,7 +1209,7 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); FX_StopAllSounds(); S_ClearSoundLocks(); @@ -1222,7 +1222,7 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); FX_StopAllSounds(); S_ClearSoundLocks(); @@ -1235,7 +1235,7 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); FX_StopAllSounds(); S_ClearSoundLocks(); @@ -1245,7 +1245,7 @@ void G_DisplayLogo(void) S_PlaySound(NITEVISION_ONOFF, CHAN_AUTO, CHANF_UI); //G_FadePalette(0,0,0,0); - videoClearScreen(0L); + twod->ClearScreen(); return; } if (!g_noLogo && !userConfig.nologo /* && (!g_netServer && ud.multimode < 2) */) @@ -1260,7 +1260,7 @@ void G_DisplayLogo(void) inputState.ClearAllInput(); } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); FX_StopAllSounds(); S_ClearSoundLocks(); @@ -1283,7 +1283,7 @@ void G_DisplayLogo(void) } else { - videoClearScreen(0); + twod->ClearScreen(); fadepal(0, 0, 0, 0, 252, 28); renderFlushPerms(); @@ -1296,7 +1296,7 @@ void G_DisplayLogo(void) { if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH, nullptr, DREALMSPAL); G_HandleAsync(); videoNextPage(); @@ -1307,15 +1307,15 @@ void G_DisplayLogo(void) } } - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); inputState.ClearAllInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); - videoClearScreen(0); + twod->ClearScreen(); //g_player[myconnectindex].ps->palette = titlepal; renderFlushPerms(); @@ -1330,7 +1330,7 @@ void G_DisplayLogo(void) { if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, BETASCREEN, 0, 0, 2+8+64+BGSTRETCH, nullptr, TITLEPAL); if (totalclock > 120 && totalclock < (120+60)) @@ -1392,7 +1392,7 @@ void G_DisplayLogo(void) } renderFlushPerms(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); //g_player[myconnectindex].ps->palette = palette; @@ -1400,7 +1400,7 @@ void G_DisplayLogo(void) S_PlaySound(NITEVISION_ONOFF, CHAN_AUTO, CHANF_UI); //G_FadePalette(0,0,0,0); - videoClearScreen(0L); + twod->ClearScreen(); } void G_DoOrderScreen(void) @@ -1435,13 +1435,13 @@ static void G_BonusCutscenes(void) switch (ud.volume_number) { case 0: - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0) { Anim_Play("turdmov.anm"); inputState.ClearAllInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); } m_level_number = ud.level_number = 0; @@ -1460,13 +1460,13 @@ static void G_BonusCutscenes(void) S_ClearSoundLocks(); break; case 1: - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0) { Anim_Play("rr_outro.anm"); inputState.ClearAllInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); } g_lastLevel = 0; @@ -1507,7 +1507,7 @@ static void G_BonusCutscenes(void) 350, 380, VICTORY1+8, 86, 59 // duplicate row to alleviate overflow in the for loop below "boss" }; - videoClearScreen(0L); + twod->ClearScreen(); rotatesprite_fs(0, 50<<16, 65536L, 0, VICTORY1, 0, 0, 2+8+16+64+128+BGSTRETCH, nullptr, ENDINGPAL); videoNextPage(); fadepal(0, 0, 0, 252, 0, -4); @@ -1519,7 +1519,7 @@ static void G_BonusCutscenes(void) { if (G_FPSLimit()) { - videoClearScreen(0L); + twod->ClearScreen(); rotatesprite_fs(0, 50 << 16, 65536L, 0, VICTORY1, 0, 0, 2 + 8 + 16 + 64 + 128 + BGSTRETCH, nullptr, ENDINGPAL); // boss @@ -1596,7 +1596,7 @@ static void G_BonusCutscenes(void) videoSetViewableArea(0, 0, xdim-1, ydim-1); Mus_Stop(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0) @@ -1604,7 +1604,7 @@ static void G_BonusCutscenes(void) fadepal(0, 0, 0, 252, 0, -4); Anim_Play("cineov2.anm"); inputState.ClearAllInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI); @@ -1624,7 +1624,7 @@ static void G_BonusCutscenes(void) videoSetViewableArea(0, 0, xdim-1, ydim-1); Mus_Stop(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0) @@ -1633,19 +1633,19 @@ static void G_BonusCutscenes(void) inputState.ClearAllInput(); int t = Anim_Play("vol4e1.anm"); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (t) goto end_vol4e; t = Anim_Play("vol4e2.anm"); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (t) goto end_vol4e; Anim_Play("vol4e3.anm"); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); } @@ -1658,7 +1658,7 @@ static void G_BonusCutscenes(void) G_FadePalette(0, 0, 0, 0); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308 // G_FadePalette(0,0,0,252); - videoClearScreen(0L); + twod->ClearScreen(); menutext_center(60, GStrings("Thanks to all our")); menutext_center(60+16, GStrings("fans for giving")); menutext_center(60+16+16, GStrings("us big heads.")); @@ -1672,7 +1672,7 @@ static void G_BonusCutscenes(void) G_HandleEventsWhileNoInput(); fadepal(0, 0, 0, 0, 252, 12); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); Anim_Play("DUKETEAM.ANM"); @@ -1680,7 +1680,7 @@ static void G_BonusCutscenes(void) inputState.ClearAllInput(); G_HandleEventsWhileNoInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); G_FadePalette(0, 0, 0, 252); @@ -1692,7 +1692,7 @@ static void G_BonusCutscenes(void) case 2: Mus_Stop(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); if (adult_lockout == 0) { @@ -1702,7 +1702,7 @@ static void G_BonusCutscenes(void) ototalclock = totalclock+200; while (totalclock < ototalclock) G_HandleAsync(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); FX_StopAllSounds(); @@ -1738,7 +1738,7 @@ static void G_BonusCutscenes(void) S_ClearSoundLocks(); S_PlaySound(ENDSEQVOL3SND4, CHAN_AUTO, CHANF_UI); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); Anim_Play("DUKETEAM.ANM"); @@ -1746,7 +1746,7 @@ static void G_BonusCutscenes(void) inputState.ClearAllInput(); G_HandleEventsWhileNoInput(); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); G_FadePalette(0, 0, 0, 252); } @@ -1755,7 +1755,7 @@ static void G_BonusCutscenes(void) FX_StopAllSounds(); S_ClearSoundLocks(); - videoClearScreen(0L); + twod->ClearScreen(); break; } @@ -1907,7 +1907,7 @@ void G_BonusScreen(int32_t bonusonly) fadepal(0, 0, 0, 0, 252, RR ? 4 : 28); videoSetViewableArea(0, 0, xdim-1, ydim-1); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); renderFlushPerms(); @@ -1931,7 +1931,7 @@ void G_BonusScreen(int32_t bonusonly) if (g_mostConcurrentPlayers > 1 && (g_gametypeFlags[ud.coop]&GAMETYPE_SCORESHEET)) { - videoClearScreen(0); + twod->ClearScreen(); G_DisplayMPResultsScreen(); PlayBonusMusic(); @@ -1947,7 +1947,7 @@ void G_BonusScreen(int32_t bonusonly) if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); G_DisplayMPResultsScreen(); videoNextPage(); } @@ -2011,7 +2011,7 @@ void G_BonusScreen(int32_t bonusonly) { if (g_player[myconnectindex].ps->gm&MODE_EOL) { - videoClearScreen(0); + twod->ClearScreen(); rotatesprite_fs(160<<16, 100<<16, 65536L, 0, gfx_offset, 0, 0, 2+8+64+128+BGSTRETCH); if (totalclock >= 1000000000 && totalclock < 1000000320) @@ -2464,7 +2464,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) fadepal(0, 0, 0, 0, 252, 4); videoSetViewableArea(0, 0, xdim-1, ydim-1); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); renderFlushPerms(); @@ -2503,7 +2503,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) if (g_mostConcurrentPlayers > 1 && (g_gametypeFlags[ud.coop]&GAMETYPE_SCORESHEET)) { - videoClearScreen(0); + twod->ClearScreen(); G_DisplayMPResultsScreen(); PlayBonusMusic(); @@ -2519,7 +2519,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) if (G_FPSLimit()) { - videoClearScreen(0); + twod->ClearScreen(); G_DisplayMPResultsScreen(); videoNextPage(); } @@ -2570,7 +2570,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) { if (g_player[myconnectindex].ps->gm&MODE_EOL) { - videoClearScreen(0); + twod->ClearScreen(); if (showMap) G_ShowMapFrame(); else @@ -2802,7 +2802,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) if (ud.eog) { fadepal(0, 0, 0, 0, 252, 4); - videoClearScreen(0L); + twod->ClearScreen(); videoNextPage(); S_PlaySound(35, CHAN_AUTO, CHANF_UI); G_FadePalette(0, 0, 0, 0);