Use MutableIntRange in RenderSpritesScanline
This commit is contained in:
parent
6b56a65d11
commit
c4fd79bf03
|
@ -357,15 +357,15 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
// clear inter-sprite priority buffer
|
||||
Array.Clear(InterSpritePriorityBuffer, 0, FrameWidth);
|
||||
|
||||
var testRange = new MutableIntRange(0, vdc.ActiveLine + 1);
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
int y = (vdc.SpriteAttributeTable[(i * 4) + 0] & 1023) - 64;
|
||||
int x = (vdc.SpriteAttributeTable[(i * 4) + 1] & 1023) - 32;
|
||||
ushort flags = vdc.SpriteAttributeTable[(i * 4) + 3];
|
||||
int height = heightTable[(flags >> 12) & 3];
|
||||
|
||||
if (y + height <= vdc.ActiveLine || y > vdc.ActiveLine)
|
||||
continue;
|
||||
byte height = heightTable[(flags >> 12) & 3];
|
||||
testRange.Min = vdc.ActiveLine - height;
|
||||
if (!testRange.StrictContains(y)) continue;
|
||||
|
||||
int patternNo = (((vdc.SpriteAttributeTable[(i * 4) + 2]) >> 1) & 0x1FF);
|
||||
int paletteBase = 256 + ((flags & 15) * 16);
|
||||
|
|
Loading…
Reference in New Issue