(svn r26969) -Fix (r26869): black palette didn't work very well with unmasked 32bpp sprites

This commit is contained in:
rubidium
2014-10-06 18:45:51 +00:00
parent 485f60bb9f
commit eabb35a874
9 changed files with 82 additions and 3 deletions

View File

@@ -177,6 +177,15 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
}
break;
case BM_BLACK_REMAP:
do {
*dst = Colour(0, 0, 0);
dst++;
src_px++;
src_n++;
} while (--n != 0);
break;
case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
@@ -241,6 +250,7 @@ void Blitter_32bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode,
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP> (bp, zoom); return;
case BM_BLACK_REMAP: Draw<BM_BLACK_REMAP> (bp, zoom); return;
}
}