all repos — mgba @ a1910206c0b620bec09e525c5fe763b563ed9220

mGBA Game Boy Advance Emulator

Support blending with sprites behind a background
Jeffrey Pfau jeffrey@endrift.com
Thu, 25 Apr 2013 02:08:12 -0700
commit

a1910206c0b620bec09e525c5fe763b563ed9220

parent

fefbf7a2963b17bf9ae8198bc194e375b44ee8e1

1 files changed, 3 insertions(+), 0 deletions(-)

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

@@ -317,6 +317,9 @@ if (renderer->flags[offset].target1 && flags.target2) {

renderer->row[offset] = _mix(renderer->bldb, renderer->d.palette[entry], renderer->blda, renderer->row[offset]); } renderer->flags[offset].finalized = 1; + } else if (renderer->flags[offset].isSprite && renderer->flags[offset].target2 && flags.target1) { + renderer->row[offset] = _mix(renderer->blda, renderer->d.palette[entry], renderer->bldb, renderer->row[offset]); + renderer->flags[offset].finalized = 1; } else { renderer->row[offset] = renderer->d.palette[entry]; renderer->flags[offset].target1 = flags.target1;