- 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.

This commit is contained in:
Christoph Oelckers 2016-12-07 14:39:15 +01:00
parent 5910067c44
commit ed141943e1

View file

@ -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++)
{