PPU: Fixed sprite display when vertical mirroring is enabled

This commit is contained in:
Sour 2019-02-24 10:02:22 -05:00
parent 21791170f4
commit 0431e1931d

View file

@ -160,8 +160,8 @@ void Ppu::EvaluateNextLineSprites()
uint8_t yOffset;
int rowOffset;
if(info.VerticalMirror) {
yOffset = (height - (_scanline + 1 - y)) & 0x07;
rowOffset = (height - (_scanline + 1 - y)) >> 3;
yOffset = (height - 1 - (_scanline + 1 - y)) & 0x07;
rowOffset = (height - 1 - (_scanline + 1 - y)) >> 3;
} else {
yOffset = (_scanline + 1 - y) & 0x07;
rowOffset = (_scanline + 1 - y) >> 3;