GBA Video: Force align 256-color tiles
Vicki Pfau vi@endrift.com
Wed, 11 Oct 2017 19:35:58 -0700
2 files changed,
5 insertions(+),
1 deletions(-)
M
src/gba/renderers/software-obj.c
→
src/gba/renderers/software-obj.c
@@ -148,7 +148,7 @@ }
int32_t x = (uint32_t) GBAObjAttributesBGetX(sprite->b) << 23; x >>= 23; uint16_t* vramBase = &renderer->d.vram[BASE_TILE >> 1]; - unsigned charBase = GBAObjAttributesCGetTile(sprite->c) * 0x20; + unsigned charBase = (GBAObjAttributesCGetTile(sprite->c) & ~GBAObjAttributesAGet256Color(sprite->a)) * 0x20; if (GBARegisterDISPCNTGetMode(renderer->dispcnt) >= 3 && GBAObjAttributesCGetTile(sprite->c) < 512) { return 0; }