diff options
author | twinaphex | 2014-10-31 06:17:30 +0100 |
---|---|---|
committer | twinaphex | 2014-10-31 06:17:30 +0100 |
commit | f838ce071358e65162284e15e53124225718b316 (patch) | |
tree | 0b512ffc039118f4050381ee82f760ca3be25f70 | |
parent | 4a587c43c72727e781356964da810bf20470b22b (diff) | |
download | snesemu-f838ce071358e65162284e15e53124225718b316.tar.gz snesemu-f838ce071358e65162284e15e53124225718b316.tar.bz2 snesemu-f838ce071358e65162284e15e53124225718b316.zip |
Refactor 'else ' conditional in WRITE_4PIXELS functions
-rw-r--r-- | source/tile.c | 12 |
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; } } |