all repos — mgba @ ec529a86c795b46f08d92f20cffed3920ce7b3c8

mGBA Game Boy Advance Emulator

GBA Video: Blended sprites should never have other effects applied
Jeffrey Pfau jeffrey@endrift.com
Fri, 15 May 2015 01:33:29 -0700
commit

ec529a86c795b46f08d92f20cffed3920ce7b3c8

parent

57ac3e6529d977f0bb011428cde5cbbd6bb1452b

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

jump to
M CHANGESCHANGES

@@ -23,6 +23,7 @@ - GBA Memory: Ensure changing the timing of a DMA reschedules it

- GBA Memory: Improve Thumb open bus behavior - VFS: Fix resource leaks if some allocations fail - Video: Fix an issue with very long filenames + - GBA Video: Blended sprites should never have other effects applied Misc: - Qt: Handle saving input settings better - Debugger: Free watchpoints in addition to breakpoints
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -1764,8 +1764,7 @@ x >>= 23;

uint16_t* vramBase = &renderer->d.vram[BASE_TILE >> 1]; unsigned charBase = GBAObjAttributesCGetTile(sprite->c) * 0x20; int variant = renderer->target1Obj && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); - if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT && renderer->target2Bd) { - // Hack: if a sprite is blended, then the variant palette is not used, but we don't know if it's blended in advance + if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) { variant = 0; } color_t* palette = &renderer->normalPalette[0x100];