all repos — mgba @ a80175e689bd30109e6db062b8d3968824febab7

mGBA Game Boy Advance Emulator

Fix sprite variant condition
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 May 2013 23:56:59 -0700
commit

a80175e689bd30109e6db062b8d3968824febab7

parent

3b3f55b14ca62e1892f6fd51d30b9bd8daad3ad8

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

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

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

inY = height - inY - 1; } unsigned charBase = BASE_TILE + sprite->tile * 0x20; - int variant = renderer->blendEffect == BLEND_NONE || renderer->blendEffect == BLEND_ALPHA || !renderer->target1Obj; + int variant = renderer->target1Obj && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); if (!sprite->multipalette) { if (!variant) { SPRITE_NORMAL_LOOP(16, NORMAL);

@@ -737,7 +737,7 @@ };

int x = sprite->x; unsigned charBase = BASE_TILE + sprite->tile * 0x20; struct GBAOAMMatrix* mat = &renderer->d.oam->mat[sprite->matIndex]; - int variant = renderer->blendEffect == BLEND_NONE || renderer->blendEffect == BLEND_ALPHA || !renderer->target1Obj; + int variant = renderer->target1Obj && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); if (!sprite->multipalette) { if (!variant) { SPRITE_TRANSFORMED_LOOP(16, NORMAL);