mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Fix 256-color sprites in GL renderer
This commit is contained in:
parent
99d07c98c5
commit
cecf6adb2c
|
@ -1126,7 +1126,7 @@ void GBAVideoGLRendererDrawSprite(struct GBAVideoGLRenderer* renderer, struct GB
|
|||
|
||||
int align = GBAObjAttributesAIs256Color(sprite->a) && !GBARegisterDISPCNTIsObjCharacterMapping(renderer->dispcnt);
|
||||
unsigned charBase = (BASE_TILE >> 1) + (GBAObjAttributesCGetTile(sprite->c) & ~align) * 0x10;
|
||||
int stride = GBARegisterDISPCNTIsObjCharacterMapping(renderer->dispcnt) ? (width >> 3) : (0x40 >> !GBAObjAttributesAIs256Color(sprite->a));
|
||||
int stride = GBARegisterDISPCNTIsObjCharacterMapping(renderer->dispcnt) ? (width >> 3) : (0x20 >> GBAObjAttributesAGet256Color(sprite->a));
|
||||
|
||||
if (spriteY + height >= 256) {
|
||||
spriteY -= 256;
|
||||
|
|
Loading…
Reference in New Issue