diff options
author | João Silva | 2017-08-26 00:26:09 +0100 |
---|---|---|
committer | João Silva | 2017-08-26 00:26:09 +0100 |
commit | 7becd31bfe9ba0cd77ed9dc034563e0ab513a8c9 (patch) | |
tree | 33e4229f9175a51e5fc309d05b5f83f3de19251f /source/tile.c | |
parent | 3013ee57130a36b8bd4c314c659c100c3885cd80 (diff) | |
download | snes9x2005-7becd31bfe9ba0cd77ed9dc034563e0ab513a8c9.tar.gz snes9x2005-7becd31bfe9ba0cd77ed9dc034563e0ab513a8c9.tar.bz2 snes9x2005-7becd31bfe9ba0cd77ed9dc034563e0ab513a8c9.zip |
Still cleaning things up...
Diffstat (limited to 'source/tile.c')
-rw-r--r-- | source/tile.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/tile.c b/source/tile.c index aa0cfaf..17a2934 100644 --- a/source/tile.c +++ b/source/tile.c @@ -779,9 +779,10 @@ static void WRITE_4PIXELS16_ADDF1_2(int32_t Offset, uint8_t* Pixels, uint16_t* S { if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) { - Screen [N] = ScreenColors [Pixel]; if (SubDepth [N] == 1) Screen [N] = (uint16_t)(COLOR_ADD1_2(ScreenColors [Pixel], GFX.FixedColour)); + else + Screen [N] = ScreenColors [Pixel]; Depth [N] = GFX.Z2; } } @@ -798,9 +799,10 @@ static void WRITE_4PIXELS16_FLIPPED_ADDF1_2(int32_t Offset, uint8_t* Pixels, uin { if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) { - Screen [N] = ScreenColors [Pixel]; if (SubDepth [N] == 1) Screen [N] = (uint16_t)(COLOR_ADD1_2(ScreenColors [Pixel], GFX.FixedColour)); + else + Screen [N] = ScreenColors [Pixel]; Depth [N] = GFX.Z2; } } @@ -817,9 +819,10 @@ static void WRITE_4PIXELS16_SUBF1_2(int32_t Offset, uint8_t* Pixels, uint16_t* S { if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) { - Screen [N] = ScreenColors [Pixel]; if (SubDepth [N] == 1) Screen [N] = (uint16_t) COLOR_SUB1_2(ScreenColors [Pixel], GFX.FixedColour); + else + Screen [N] = ScreenColors [Pixel]; Depth [N] = GFX.Z2; } } @@ -836,9 +839,10 @@ static void WRITE_4PIXELS16_FLIPPED_SUBF1_2(int32_t Offset, uint8_t* Pixels, uin { if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) { - Screen [N] = ScreenColors [Pixel]; if (SubDepth [N] == 1) Screen [N] = (uint16_t) COLOR_SUB1_2(ScreenColors [Pixel], GFX.FixedColour); + else + Screen [N] = ScreenColors [Pixel]; Depth [N] = GFX.Z2; } } @@ -924,7 +928,7 @@ void DrawLargePixel16Sub(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uin #define LARGE_SUB_PIXEL(s, p) \ (Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \ - COLOR_SUB (p, *(s + GFX.Delta)) : \ + COLOR_SUB (p, *(s + GFX.Delta)) : \ COLOR_SUB (p, GFX.FixedColour)) : p) RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_SUB_PIXEL); @@ -940,7 +944,7 @@ void DrawLargePixel16Sub1_2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, #define LARGE_SUB_PIXEL1_2(s, p) \ (Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \ - COLOR_SUB1_2 (p, *(s + GFX.Delta)) : \ + COLOR_SUB1_2 (p, *(s + GFX.Delta)) : \ COLOR_SUB (p, GFX.FixedColour)) : p) RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_SUB_PIXEL1_2); |