1
0
Fork 0

Fix #13854: 40bpp-anim blitter recolouring failed for 32bpp pixels without mask channel. (#14242)

pull/14244/head
frosch 2025-05-09 17:16:29 +02:00 committed by GitHub
parent a277cb2b4c
commit 228f9ca941
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -377,8 +377,11 @@ void Blitter_40bppAnim::DrawColourMappingRect(void *dst, int width, int height,
const uint8_t *remap = GetNonSprite(pal, SpriteType::Recolour) + 1;
do {
for (int i = 0; i != width; i++) {
if (*anim == 0) *udst = MakeGrey(*udst);
*anim = remap[*anim];
if (*anim == 0) {
*udst = MakeGrey(*udst);
} else {
*anim = remap[*anim];
}
udst++;
anim++;
}
@ -389,7 +392,7 @@ void Blitter_40bppAnim::DrawColourMappingRect(void *dst, int width, int height,
const uint8_t *remap = GetNonSprite(pal, SpriteType::Recolour) + 1;
do {
for (int i = 0; i != width; i++) {
*anim = remap[*anim];
if (*anim != 0) *anim = remap[*anim];
anim++;
}
anim = anim - width + _screen.pitch;