commodore64: fix sprite priority (no longer always in background)

This commit is contained in:
saxxonpike 2012-11-21 02:45:14 +00:00
parent 26f1a2e260
commit 381b064d2a
1 changed files with 10 additions and 4 deletions

View File

@ -1312,10 +1312,16 @@ namespace BizHawk.Emulation.Computers.Commodore64
if (borderOnMain || borderOnVertical) if (borderOnMain || borderOnVertical)
pixel = EC; pixel = EC;
else else
pixel = ( {
(spriteData == 0) || if ((spriteData == 0) || (spritePriority == true && plotterDataBuffer[plotterBufferIndex] >= 0x2))
((spriteData != 0) && (spritePriority = true) && (plotterDataBuffer[plotterBufferIndex] >= 0x2))) {
? plotterPixelBuffer[plotterBufferIndex] : spritePixel; pixel = plotterPixelBuffer[plotterBufferIndex];
}
else
{
pixel = spritePixel;
}
}
PipelineWritePixel(pixel); PipelineWritePixel(pixel);