diff --git a/src/blitter/32bpp_anim_sse4.cpp b/src/blitter/32bpp_anim_sse4.cpp index 031f0cc985..96ffee8908 100644 --- a/src/blitter/32bpp_anim_sse4.cpp +++ b/src/blitter/32bpp_anim_sse4.cpp @@ -16,6 +16,8 @@ #include "32bpp_anim_sse4.hpp" #include "32bpp_sse_func.hpp" +#include "../citymania/cm_colour.hpp" + #include "../safeguards.h" /** Instantiation of the SSE4 32bpp blitter factory. */ @@ -332,6 +334,23 @@ bmcr_alpha_blend_single: } break; + case CM_BM_TINT_REMAP: + for (uint x = (uint) bp->width; x > 0; x--) { + if (src_mv->m == 0) { + if (src->a != 0) { + *dst = citymania::Remap32RGBA(src->r, src->g, src->b, src->a, *dst, remap); + *anim = 0; + } + } else { + uint r = remap[src_mv->m]; + if (r != 0) *dst = ComposeColourPANoCheck(this->AdjustBrightness(this->LookupColourInPalette(r), src_mv->v), src->a, *dst); + } + src_mv++; + dst++; + src++; + anim++; + } + break; case BM_CRASH_REMAP: for (uint x = (uint) bp->width; x > 0; x--) { @@ -429,6 +448,15 @@ bm_normal: else Draw(bp, zoom); } break; + case CM_BM_TINT_REMAP: + if (bp->skip_left != 0 || bp->width <= MARGIN_REMAP_THRESHOLD) { + if (sprite_flags & SF_NO_ANIM) Draw(bp, zoom); + else Draw(bp, zoom); + } else { + if (sprite_flags & SF_NO_ANIM) Draw(bp, zoom); + else Draw(bp, zoom); + } + break; case BM_TRANSPARENT: Draw(bp, zoom); return; case BM_TRANSPARENT_REMAP: Draw(bp, zoom); return; case BM_CRASH_REMAP: Draw(bp, zoom); return;