From bd9db5726219392aa0b155642c6dcf7b6855ff55 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Sat, 5 May 2018 19:07:48 -0500 Subject: [PATCH] Test for transparency before dithering. --- fxinst.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fxinst.cpp b/fxinst.cpp index cc03c4be..22c2d456 100644 --- a/fxinst.cpp +++ b/fxinst.cpp @@ -906,14 +906,14 @@ static void fx_plot_2bit (void) return; #endif + if (!(GSU.vPlotOptionReg & 0x01) && !(COLR & 0xf)) + return; + if (GSU.vPlotOptionReg & 0x02) c = ((x ^ y) & 1) ? (uint8) (GSU.vColorReg >> 4) : (uint8) GSU.vColorReg; else c = (uint8) GSU.vColorReg; - if (!(GSU.vPlotOptionReg & 0x01) && !(c & 0xf)) - return; - a = GSU.apvScreen[y >> 3] + GSU.x[x >> 3] + ((y & 7) << 1); v = 128 >> (x & 7); @@ -970,14 +970,14 @@ static void fx_plot_4bit (void) return; #endif + if (!(GSU.vPlotOptionReg & 0x01) && !(COLR & 0xf)) + return; + if (GSU.vPlotOptionReg & 0x02) c = ((x ^ y) & 1) ? (uint8) (GSU.vColorReg >> 4) : (uint8) GSU.vColorReg; else c = (uint8) GSU.vColorReg; - if (!(GSU.vPlotOptionReg & 0x01) && !(c & 0xf)) - return; - a = GSU.apvScreen[y >> 3] + GSU.x[x >> 3] + ((y & 7) << 1); v = 128 >> (x & 7);