From 37679bb44e94779d8ae9c4804030cc77ccfd3ccc Mon Sep 17 00:00:00 2001
From: Jaime Passos <lazymyuutsu@gmail.com>
Date: Wed, 11 Dec 2019 13:26:28 -0300
Subject: [PATCH] Organise

---
 src/f_wipe.c | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/src/f_wipe.c b/src/f_wipe.c
index fc6fc6b6d0..a83d104f24 100644
--- a/src/f_wipe.c
+++ b/src/f_wipe.c
@@ -553,32 +553,40 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
 			I_Sleep();
 		lastwipetic = nowtime;
 
-#ifdef HWRENDER
-		if (rendermode == render_opengl)
+		// Wipe styles
+		if (wipestyle == WIPESTYLE_COLORMAP)
 		{
-			// send in the wipe type and wipe frame because we need to cache the graphic
-			if (wipestyle == WIPESTYLE_COLORMAP)
+#ifdef HWRENDER
+			if (rendermode == render_opengl)
+			{
+				// send in the wipe type and wipe frame because we need to cache the graphic
 				HWR_DoTintedWipe(wipetype, wipeframe-1);
+			}
 			else
-				HWR_DoWipe(wipetype, wipeframe-1);
-		}
-		else
 #endif
-		{
-			if (wipestyle == WIPESTYLE_COLORMAP)
 			{
 				UINT8 *colormap = fadecolormap;
 				if (wipestyleflags & WSF_TOWHITE)
 					colormap += (FADECOLORMAPROWS * 256);
 				F_DoColormapWipe(fmask, colormap);
 			}
+
+			// Draw the title card above the wipe
+			F_WipeStageTitle();
+		}
+		else
+		{
+#ifdef HWRENDER
+			if (rendermode == render_opengl)
+			{
+				// send in the wipe type and wipe frame because we need to cache the graphic
+				HWR_DoWipe(wipetype, wipeframe-1);
+			}
 			else
+#endif
 				F_DoWipe(fmask);
 		}
 
-		if (wipestyle == WIPESTYLE_COLORMAP)
-			F_WipeStageTitle();
-
 		I_OsPolling();
 		I_UpdateNoBlit();
 
-- 
GitLab