Improve some of the efficiency loss in F_DoWipe compared to K.S.'s 2.1 code by seperating out some of the loops.

This commit is contained in:
toaster 2021-11-28 20:18:41 +00:00
parent ba3e896655
commit 15741da0a4

View file

@ -299,16 +299,23 @@ static void F_DoWipe(fademask_t *fademask, lighttable_t *fadecolormap, boolean r
e = e_base + relativepos;
draw_rowstogo = draw_rowend - draw_rowstart;
while (draw_rowstogo--)
if (fadecolormap)
{
if (fadecolormap != NULL)
if (reverse)
s = e;
while (draw_rowstogo--)
*w++ = fadecolormap[ ( m << 8 ) + *s++ ];
}
else while (draw_rowstogo--)
{
/*if (fadecolormap != NULL)
{
if (reverse)
*w++ = fadecolormap[ ( m << 8 ) + *e++ ];
else
*w++ = fadecolormap[ ( m << 8 ) + *s++ ];
}
else
else*/
*w++ = transtbl[ ( *e++ << 8 ) + *s++ ];
}