all repos — mgba @ 1b5dd352af1cc78e15188b0807cbe699cb0ec3e7

mGBA Game Boy Advance Emulator

Sprites can only be color variants when they aren't forced semitransparent
Jeffrey Pfau jeffrey@endrift.com
Tue, 15 Oct 2013 02:09:23 -0700
commit

1b5dd352af1cc78e15188b0807cbe699cb0ec3e7

parent

1b54f50daa2b2f59a1781ee677b444cbf6616737

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -1246,7 +1246,7 @@ if (sprite->vflip) {

inY = height - inY - 1; } unsigned charBase = BASE_TILE + sprite->tile * 0x20; - int variant = renderer->target1Obj && renderer->currentWindow.blendEnable && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); + int variant = renderer->target1Obj && renderer->currentWindow.blendEnable && sprite->mode != OBJ_MODE_SEMITRANSPARENT && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); if (!sprite->multipalette) { if (flags & FLAG_OBJWIN) { SPRITE_NORMAL_LOOP(16, OBJWIN);

@@ -1283,7 +1283,7 @@ flags |= FLAG_OBJWIN * (sprite->mode == OBJ_MODE_OBJWIN);

int x = sprite->x; unsigned charBase = BASE_TILE + sprite->tile * 0x20; struct GBAOAMMatrix* mat = &renderer->d.oam->mat[sprite->matIndex]; - int variant = renderer->target1Obj && renderer->currentWindow.blendEnable && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); + int variant = renderer->target1Obj && renderer->currentWindow.blendEnable && sprite->mode != OBJ_MODE_SEMITRANSPARENT && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); int inY = y - sprite->y; if (inY < 0) { inY += 256;