diff options
author | rubidium <rubidium@openttd.org> | 2014-10-06 18:45:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-10-06 18:45:51 +0000 |
commit | 9c31ffd893efd0310e1276d179150ba2e9c2c4aa (patch) | |
tree | 9a71a2e1445452b4d96fbfc548a535d94c83c30f /src/blitter/32bpp_anim.cpp | |
parent | e5a92d7093ff354cac1101354e5e89e584b24bb4 (diff) | |
download | openttd-9c31ffd893efd0310e1276d179150ba2e9c2c4aa.tar.xz |
(svn r26969) -Fix (r26869): black palette didn't work very well with unmasked 32bpp sprites
Diffstat (limited to 'src/blitter/32bpp_anim.cpp')
-rw-r--r-- | src/blitter/32bpp_anim.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index 6127ff3a0..353afa14a 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -175,6 +175,16 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel } break; + + case BM_BLACK_REMAP: + do { + *dst++ = Colour(0, 0, 0); + *anim++ = 0; + anim++; + dst++; + } 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: @@ -251,6 +261,7 @@ void Blitter_32bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomL 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; } } |