aboutsummaryrefslogtreecommitdiff
path: root/source/tile.c
diff options
context:
space:
mode:
authortwinaphex2014-10-31 06:17:30 +0100
committertwinaphex2014-10-31 06:17:30 +0100
commitf838ce071358e65162284e15e53124225718b316 (patch)
tree0b512ffc039118f4050381ee82f760ca3be25f70 /source/tile.c
parent4a587c43c72727e781356964da810bf20470b22b (diff)
downloadsnes9x2005-f838ce071358e65162284e15e53124225718b316.tar.gz
snes9x2005-f838ce071358e65162284e15e53124225718b316.tar.bz2
snes9x2005-f838ce071358e65162284e15e53124225718b316.zip
Refactor 'else ' conditional in WRITE_4PIXELS functions
Diffstat (limited to 'source/tile.c')
-rw-r--r--source/tile.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/tile.c b/source/tile.c
index 31c065a..d10acca 100644
--- a/source/tile.c
+++ b/source/tile.c
@@ -910,10 +910,9 @@ static void WRITE_4PIXELS16_ADDF1_2(int32 Offset, uint8* Pixels,
{
if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N]))
{
+ Screen [N] = ScreenColors [Pixel];
if (SubDepth [N] == 1)
Screen [N] = (uint16)(COLOR_ADD1_2(ScreenColors [Pixel], GFX.FixedColour));
- else
- Screen [N] = ScreenColors [Pixel];
Depth [N] = GFX.Z2;
}
}
@@ -931,10 +930,9 @@ static void WRITE_4PIXELS16_FLIPPED_ADDF1_2(int32 Offset, uint8* Pixels,
{
if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N]))
{
+ Screen [N] = ScreenColors [Pixel];
if (SubDepth [N] == 1)
Screen [N] = (uint16)(COLOR_ADD1_2(ScreenColors [Pixel], GFX.FixedColour));
- else
- Screen [N] = ScreenColors [Pixel];
Depth [N] = GFX.Z2;
}
}
@@ -952,10 +950,9 @@ static void WRITE_4PIXELS16_SUBF1_2(int32 Offset, uint8* Pixels,
{
if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N]))
{
+ Screen [N] = ScreenColors [Pixel];
if (SubDepth [N] == 1)
Screen [N] = (uint16) COLOR_SUB1_2(ScreenColors [Pixel], GFX.FixedColour);
- else
- Screen [N] = ScreenColors [Pixel];
Depth [N] = GFX.Z2;
}
}
@@ -973,10 +970,9 @@ static void WRITE_4PIXELS16_FLIPPED_SUBF1_2(int32 Offset, uint8* Pixels,
{
if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N]))
{
+ Screen [N] = ScreenColors [Pixel];
if (SubDepth [N] == 1)
Screen [N] = (uint16) COLOR_SUB1_2(ScreenColors [Pixel], GFX.FixedColour);
- else
- Screen [N] = ScreenColors [Pixel];
Depth [N] = GFX.Z2;
}
}