From a27a225a81b58acb8443b576885e6bb713949e6d Mon Sep 17 00:00:00 2001
From: Jaime Passos <lazymyuutsu@gmail.com>
Date: Fri, 13 Dec 2019 19:02:36 -0300
Subject: [PATCH] Remove SPANDRAWFUNC_MMX, as it's not needed anymore.

---
 src/r_plane.c | 6 ------
 src/screen.c  | 4 +---
 src/screen.h  | 1 -
 3 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/r_plane.c b/src/r_plane.c
index 3745c28bec..1dd487b482 100644
--- a/src/r_plane.c
+++ b/src/r_plane.c
@@ -1008,8 +1008,6 @@ void R_DrawSinglePlane(visplane_t *pl)
 			R_CheckFlatLength(W_LumpLength(levelflat->u.flat.lumpnum));
 			// Raw flats always have dimensions that are powers-of-two numbers.
 			ds_powersoftwo = true;
-			if (spanfunc == spanfuncs[BASEDRAWFUNC])
-				spanfunc = spanfuncs[SPANDRAWFUNC_MMX];
 			break;
 		default:
 			switch (type)
@@ -1032,11 +1030,7 @@ void R_DrawSinglePlane(visplane_t *pl)
 			}
 			// Check if this texture or patch has power-of-two dimensions.
 			if (R_CheckPowersOfTwo())
-			{
 				R_CheckFlatLength(ds_flatwidth * ds_flatheight);
-				if (spanfunctype == BASEDRAWFUNC)
-					spanfunctype = SPANDRAWFUNC_MMX;
-			}
 	}
 
 	if (light >= LIGHTLEVELS)
diff --git a/src/screen.c b/src/screen.c
index 83421a1cc6..7a2e1a455d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -124,7 +124,6 @@ void SCR_SetMode(void)
 		spanfuncs[SPANDRAWFUNC_SPLAT] = R_DrawSplat_8;
 		spanfuncs[SPANDRAWFUNC_TRANSSPLAT] = R_DrawTranslucentSplat_8;
 		spanfuncs[SPANDRAWFUNC_FOG] = R_DrawFogSpan_8;
-		spanfuncs[SPANDRAWFUNC_MMX] = spanfuncs[BASEDRAWFUNC];
 #ifndef NOWATER
 		spanfuncs[SPANDRAWFUNC_WATER] = R_DrawTranslucentWaterSpan_8;
 #endif
@@ -140,7 +139,6 @@ void SCR_SetMode(void)
 		spanfuncs_npo2[SPANDRAWFUNC_SPLAT] = R_DrawSplat_NPO2_8;
 		spanfuncs_npo2[SPANDRAWFUNC_TRANSSPLAT] = R_DrawTranslucentSplat_NPO2_8;
 		spanfuncs_npo2[SPANDRAWFUNC_FOG] = NULL; // Not needed
-		spanfuncs_npo2[SPANDRAWFUNC_MMX] = NULL; // Same
 #ifndef NOWATER
 		spanfuncs_npo2[SPANDRAWFUNC_WATER] = R_DrawTranslucentWaterSpan_NPO2_8;
 #endif
@@ -159,7 +157,7 @@ void SCR_SetMode(void)
 				//colfuncs[COLDRAWFUNC_SHADE] = R_DrawShadeColumn_8_ASM;
 				//colfuncs[COLDRAWFUNC_FUZZY] = R_DrawTranslucentColumn_8_ASM;
 				colfuncs[COLDRAWFUNC_TWOSMULTIPATCH] = R_Draw2sMultiPatchColumn_8_MMX;
-				spanfuncs[SPANDRAWFUNC_MMX] = R_DrawSpan_8_MMX;
+				spanfuncs[BASEDRAWFUNC] = R_DrawSpan_8_MMX;
 			}
 			else
 			{
diff --git a/src/screen.h b/src/screen.h
index 9a4d48dcfb..eb0042be65 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -133,7 +133,6 @@ extern void (*colfuncs[COLDRAWFUNC_MAX])(void);
 enum
 {
 	SPANDRAWFUNC_BASE = BASEDRAWFUNC,
-	SPANDRAWFUNC_MMX,
 	SPANDRAWFUNC_TRANS,
 	SPANDRAWFUNC_SPLAT,
 	SPANDRAWFUNC_TRANSSPLAT,
-- 
GitLab