GBA Video: Fix sprite priority regression (fixes #1419)

This commit is contained in:
Vicki Pfau 2019-05-24 20:48:36 -07:00
parent d1d33393cd
commit a33e9d375c
9 changed files with 4 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

View File

@ -80,7 +80,7 @@
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \
current = renderer->spriteLayer[outX]; \
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
if ((current & FLAG_ORDER_MASK) > flags && tileData) { \
renderer->spriteLayer[outX] = palette[tileData] | flags; \
}
@ -88,7 +88,7 @@
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \
current = renderer->spriteLayer[outX]; \
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
if ((current & FLAG_ORDER_MASK) > flags && tileData) { \
unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \
renderer->spriteLayer[outX] = color | flags; \
}
@ -107,7 +107,7 @@
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \
current = renderer->spriteLayer[outX]; \
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
if ((current & FLAG_ORDER_MASK) > flags && tileData) { \
renderer->spriteLayer[outX] = palette[tileData] | flags; \
}
@ -115,7 +115,7 @@
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \
current = renderer->spriteLayer[outX]; \
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
if ((current & FLAG_ORDER_MASK) > flags && tileData) { \
unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \
renderer->spriteLayer[outX] = color | flags; \
}