Inline `MutableRange` creation and use into `VPC` (PCEHawk)

partially reverts c4fd79bf0
This commit is contained in:
YoshiRulz 2024-07-10 10:41:35 +10:00
parent ccfd702484
commit a004d2745b
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 1 additions and 3 deletions

View File

@ -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);