From 381b064d2ae36a60adf75f2048b963711869b9f8 Mon Sep 17 00:00:00 2001 From: saxxonpike Date: Wed, 21 Nov 2012 02:45:14 +0000 Subject: [PATCH] commodore64: fix sprite priority (no longer always in background) --- .../Computers/Commodore64/VicIINewPipeline.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/BizHawk.Emulation/Computers/Commodore64/VicIINewPipeline.cs b/BizHawk.Emulation/Computers/Commodore64/VicIINewPipeline.cs index e6ea7e1554..a13f2ad1d3 100644 --- a/BizHawk.Emulation/Computers/Commodore64/VicIINewPipeline.cs +++ b/BizHawk.Emulation/Computers/Commodore64/VicIINewPipeline.cs @@ -1312,10 +1312,16 @@ namespace BizHawk.Emulation.Computers.Commodore64 if (borderOnMain || borderOnVertical) pixel = EC; else - pixel = ( - (spriteData == 0) || - ((spriteData != 0) && (spritePriority = true) && (plotterDataBuffer[plotterBufferIndex] >= 0x2))) - ? plotterPixelBuffer[plotterBufferIndex] : spritePixel; + { + if ((spriteData == 0) || (spritePriority == true && plotterDataBuffer[plotterBufferIndex] >= 0x2)) + { + pixel = plotterPixelBuffer[plotterBufferIndex]; + } + else + { + pixel = spritePixel; + } + } PipelineWritePixel(pixel);