From ed141943e1391e4abc2949e5f01feaf6ad53145a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Dec 2016 14:39:15 +0100 Subject: [PATCH] - removed use of BestColor_MMX because there is no measurable improvement at all on a modern system. On top of that this function does not get called nearly often enough to justify the hassle. Like DoBlending this would require hundreds of calls per frame to make any impact that would be measurable. --- src/v_palette.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/v_palette.cpp b/src/v_palette.cpp index 49fbd6cb6..aa39ba791 100644 --- a/src/v_palette.cpp +++ b/src/v_palette.cpp @@ -106,20 +106,11 @@ CCMD (bumpgamma) /* Palette management stuff */ /****************************/ -extern "C" BYTE BestColor_MMX (DWORD rgb, const DWORD *pal); - int BestColor (const uint32 *pal_in, int r, int g, int b, int first, int num) { -#ifdef X86_ASM - if (CPU.bMMX) - { - int pre = 256 - num - first; - return BestColor_MMX (((first+pre)<<24)|(r<<16)|(g<<8)|b, pal_in-pre) - pre; - } -#endif const PalEntry *pal = (const PalEntry *)pal_in; int bestcolor = first; - int bestdist = 257*257+257*257+257*257; + int bestdist = 257 * 257 + 257 * 257 + 257 * 257; for (int color = first; color < num; color++) {