diff --git a/cinema/gba/obj/fzc-obj-priority/baseline_0000.png b/cinema/gba/obj/fzc-obj-priority/baseline_0000.png new file mode 100644 index 000000000..154250618 Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/baseline_0000.png differ diff --git a/cinema/gba/obj/fzc-obj-priority/baseline_0001.png b/cinema/gba/obj/fzc-obj-priority/baseline_0001.png new file mode 100644 index 000000000..e17d09e38 Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/baseline_0001.png differ diff --git a/cinema/gba/obj/fzc-obj-priority/baseline_0002.png b/cinema/gba/obj/fzc-obj-priority/baseline_0002.png new file mode 100644 index 000000000..e17d09e38 Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/baseline_0002.png differ diff --git a/cinema/gba/obj/fzc-obj-priority/baseline_0003.png b/cinema/gba/obj/fzc-obj-priority/baseline_0003.png new file mode 100644 index 000000000..e17d09e38 Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/baseline_0003.png differ diff --git a/cinema/gba/obj/fzc-obj-priority/baseline_0004.png b/cinema/gba/obj/fzc-obj-priority/baseline_0004.png new file mode 100644 index 000000000..e17d09e38 Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/baseline_0004.png differ diff --git a/cinema/gba/obj/fzc-obj-priority/baseline_0005.png b/cinema/gba/obj/fzc-obj-priority/baseline_0005.png new file mode 100644 index 000000000..e17d09e38 Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/baseline_0005.png differ diff --git a/cinema/gba/obj/fzc-obj-priority/baseline_0006.png b/cinema/gba/obj/fzc-obj-priority/baseline_0006.png new file mode 100644 index 000000000..02d52196d Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/baseline_0006.png differ diff --git a/cinema/gba/obj/fzc-obj-priority/test.mvl b/cinema/gba/obj/fzc-obj-priority/test.mvl new file mode 100644 index 000000000..ae2a960bb Binary files /dev/null and b/cinema/gba/obj/fzc-obj-priority/test.mvl differ diff --git a/src/gba/renderers/software-obj.c b/src/gba/renderers/software-obj.c index de056596d..8e3e677e1 100644 --- a/src/gba/renderers/software-obj.c +++ b/src/gba/renderers/software-obj.c @@ -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; \ }