Fix highlight tinting in 32bpp-sse* blitters
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#ifndef BLITTER_32BPP_SSE_FUNC_HPP
|
||||
#define BLITTER_32BPP_SSE_FUNC_HPP
|
||||
|
||||
#include "../citymania/cm_colour.hpp"
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
@@ -404,6 +406,22 @@ 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);
|
||||
}
|
||||
} 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++;
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_CRASH_REMAP:
|
||||
for (uint x = (uint) bp->width; x > 0; x--) {
|
||||
if (src_mv->m == 0) {
|
||||
@@ -482,6 +500,12 @@ bm_normal:
|
||||
} else {
|
||||
Draw<BM_COLOUR_REMAP, RM_WITH_MARGIN, BT_NONE, true>(bp, zoom); return;
|
||||
}
|
||||
case CM_BM_TINT_REMAP:
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_REMAP_THRESHOLD) {
|
||||
Draw<CM_BM_TINT_REMAP, RM_WITH_SKIP, BT_NONE, true>(bp, zoom); return;
|
||||
} else {
|
||||
Draw<CM_BM_TINT_REMAP, RM_WITH_MARGIN, BT_NONE, true>(bp, zoom); return;
|
||||
}
|
||||
case BM_TRANSPARENT: Draw<BM_TRANSPARENT, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
case BM_TRANSPARENT_REMAP: Draw<BM_TRANSPARENT_REMAP, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
|
||||
Reference in New Issue
Block a user