Inline `MutableRange` creation and use into `VPC` (PCEHawk)
partially reverts c4fd79bf0
This commit is contained in:
parent
ccfd702484
commit
a004d2745b
|
@ -355,15 +355,13 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
// clear inter-sprite priority buffer
|
||||
Array.Clear(InterSpritePriorityBuffer, 0, FrameWidth);
|
||||
|
||||
var testRange = 0.MutableRangeTo(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];
|
||||
byte height = heightTable[(flags >> 12) & 3];
|
||||
testRange.Start = vdc.ActiveLine - height;
|
||||
if (!y.StrictlyBoundedBy(testRange)) continue;
|
||||
if (y + height <= vdc.ActiveLine || vdc.ActiveLine < y) continue;
|
||||
|
||||
int patternNo = (((vdc.SpriteAttributeTable[(i * 4) + 2]) >> 1) & 0x1FF);
|
||||
int paletteBase = 256 + ((flags & 15) * 16);
|
||||
|
|
Loading…
Reference in New Issue