Sprites can only be color variants when they aren't forced semitransparent

This commit is contained in:
Jeffrey Pfau 2013-10-15 02:09:23 -07:00
parent 1b54f50daa
commit 1b5dd352af
1 changed files with 2 additions and 2 deletions

View File

@ -1246,7 +1246,7 @@ static void _preprocessSprite(struct GBAVideoSoftwareRenderer* renderer, struct
inY = height - inY - 1; inY = height - inY - 1;
} }
unsigned charBase = BASE_TILE + sprite->tile * 0x20; 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 (!sprite->multipalette) {
if (flags & FLAG_OBJWIN) { if (flags & FLAG_OBJWIN) {
SPRITE_NORMAL_LOOP(16, OBJWIN); SPRITE_NORMAL_LOOP(16, OBJWIN);
@ -1283,7 +1283,7 @@ static void _preprocessTransformedSprite(struct GBAVideoSoftwareRenderer* render
int x = sprite->x; int x = sprite->x;
unsigned charBase = BASE_TILE + sprite->tile * 0x20; unsigned charBase = BASE_TILE + sprite->tile * 0x20;
struct GBAOAMMatrix* mat = &renderer->d.oam->mat[sprite->matIndex]; 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; int inY = y - sprite->y;
if (inY < 0) { if (inY < 0) {
inY += 256; inY += 256;