mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Clean up dead code in sprite rendering loop
This commit is contained in:
parent
b176516c36
commit
459eaefcfc
1
CHANGES
1
CHANGES
|
@ -56,6 +56,7 @@ Misc:
|
||||||
- Debugger: Make tracing compatible with breakpoints/watchpoints
|
- Debugger: Make tracing compatible with breakpoints/watchpoints
|
||||||
- Debugger: Print breakpoint/watchpoint number when inserting
|
- Debugger: Print breakpoint/watchpoint number when inserting
|
||||||
- Qt: Open a message box for Qt frontend errors
|
- Qt: Open a message box for Qt frontend errors
|
||||||
|
- GBA Video: Clean up dead code in sprite rendering loop
|
||||||
|
|
||||||
0.7.1: (2019-02-24)
|
0.7.1: (2019-02-24)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|
|
@ -62,25 +62,17 @@
|
||||||
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
||||||
tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \
|
tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \
|
||||||
current = renderer->spriteLayer[outX]; \
|
current = renderer->spriteLayer[outX]; \
|
||||||
if ((current & FLAG_ORDER_MASK) > flags) { \
|
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
|
||||||
if (tileData) { \
|
renderer->spriteLayer[outX] = palette[tileData] | flags; \
|
||||||
renderer->spriteLayer[outX] = palette[tileData] | flags; \
|
|
||||||
} else if (current != FLAG_UNWRITTEN) { \
|
|
||||||
renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SPRITE_DRAW_PIXEL_16_NORMAL_OBJWIN(localX) \
|
#define SPRITE_DRAW_PIXEL_16_NORMAL_OBJWIN(localX) \
|
||||||
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
||||||
tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \
|
tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \
|
||||||
current = renderer->spriteLayer[outX]; \
|
current = renderer->spriteLayer[outX]; \
|
||||||
if ((current & FLAG_ORDER_MASK) > flags) { \
|
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
|
||||||
if (tileData) { \
|
unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \
|
||||||
unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \
|
renderer->spriteLayer[outX] = color | flags; \
|
||||||
renderer->spriteLayer[outX] = color | flags; \
|
|
||||||
} else if (current != FLAG_UNWRITTEN) { \
|
|
||||||
renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SPRITE_DRAW_PIXEL_16_OBJWIN(localX) \
|
#define SPRITE_DRAW_PIXEL_16_OBJWIN(localX) \
|
||||||
|
@ -97,25 +89,17 @@
|
||||||
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
||||||
tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \
|
tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \
|
||||||
current = renderer->spriteLayer[outX]; \
|
current = renderer->spriteLayer[outX]; \
|
||||||
if ((current & FLAG_ORDER_MASK) > flags) { \
|
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
|
||||||
if (tileData) { \
|
renderer->spriteLayer[outX] = palette[tileData] | flags; \
|
||||||
renderer->spriteLayer[outX] = palette[tileData] | flags; \
|
|
||||||
} else if (current != FLAG_UNWRITTEN) { \
|
|
||||||
renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SPRITE_DRAW_PIXEL_256_NORMAL_OBJWIN(localX) \
|
#define SPRITE_DRAW_PIXEL_256_NORMAL_OBJWIN(localX) \
|
||||||
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
LOAD_16(tileData, ((yBase + charBase + xBase) & 0x7FFE), vramBase); \
|
||||||
tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \
|
tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \
|
||||||
current = renderer->spriteLayer[outX]; \
|
current = renderer->spriteLayer[outX]; \
|
||||||
if ((current & FLAG_ORDER_MASK) > flags) { \
|
if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \
|
||||||
if (tileData) { \
|
unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \
|
||||||
unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \
|
renderer->spriteLayer[outX] = color | flags; \
|
||||||
renderer->spriteLayer[outX] = color | flags; \
|
|
||||||
} else if (current != FLAG_UNWRITTEN) { \
|
|
||||||
renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SPRITE_DRAW_PIXEL_256_OBJWIN(localX) \
|
#define SPRITE_DRAW_PIXEL_256_OBJWIN(localX) \
|
||||||
|
|
Loading…
Reference in New Issue