Merge pull request #51 from undisbeliever/fix-invisible-sprites

Fix invisible sprites
This commit is contained in:
NovaSquirrel 2021-10-26 12:44:06 -04:00 committed by GitHub
commit ab5b47c486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,8 +42,9 @@ struct SpriteInfo
return false;
}
uint8_t endY = (Y + (interlace ? (Height >> 1) : Height)) & 0xFF;
return (scanline >= Y && scanline < endY) || (endY < Y && scanline < endY);
uint16_t endY = (Y + (interlace ? (Height >> 1) : Height));
uint8_t endY_8 = endY & 0xFF;
return (scanline >= Y && scanline < endY) || (endY_8 < Y && scanline < endY_8);
}
};