aboutsummaryrefslogtreecommitdiff
path: root/source/tile.c
diff options
context:
space:
mode:
authorJoão Silva2017-08-14 06:03:05 +0100
committerJoão Silva2017-08-14 06:03:05 +0100
commit5e450063fbe25926ae50d569c285db428055318a (patch)
treed0dd772a589dbfa07bacd70207fc4db0f37d4109 /source/tile.c
parentfdaf2925f1353b07cd957ae47b0e6793648559be (diff)
downloadsnes9x2005-5e450063fbe25926ae50d569c285db428055318a.tar.gz
snes9x2005-5e450063fbe25926ae50d569c285db428055318a.tar.bz2
snes9x2005-5e450063fbe25926ae50d569c285db428055318a.zip
Deleted several unused variables, code and files.
Diffstat (limited to 'source/tile.c')
-rw-r--r--source/tile.c256
1 files changed, 99 insertions, 157 deletions
diff --git a/source/tile.c b/source/tile.c
index 7b78c27..e203ee1 100644
--- a/source/tile.c
+++ b/source/tile.c
@@ -27,42 +27,42 @@ static uint8_t ConvertTile(uint8_t* pCache, uint32_t TileAddr)
for (line = 8; line != 0; line--, tp += 2)
{
p1 = p2 = 0;
- if ((pix = *(tp + 0)))
+ if((pix = tp[0]))
{
p1 |= odd_high[0][pix >> 4];
p2 |= odd_low[0][pix & 0xf];
}
- if ((pix = *(tp + 1)))
+ if((pix = tp[1]))
{
p1 |= even_high[0][pix >> 4];
p2 |= even_low[0][pix & 0xf];
}
- if ((pix = *(tp + 16)))
+ if((pix = tp[16]))
{
p1 |= odd_high[1][pix >> 4];
p2 |= odd_low[1][pix & 0xf];
}
- if ((pix = *(tp + 17)))
+ if((pix = tp[17]))
{
p1 |= even_high[1][pix >> 4];
p2 |= even_low[1][pix & 0xf];
}
- if ((pix = *(tp + 32)))
+ if((pix = tp[32]))
{
p1 |= odd_high[2][pix >> 4];
p2 |= odd_low[2][pix & 0xf];
}
- if ((pix = *(tp + 33)))
+ if((pix = tp[33]))
{
p1 |= even_high[2][pix >> 4];
p2 |= even_low[2][pix & 0xf];
}
- if ((pix = *(tp + 48)))
+ if((pix = tp[48]))
{
p1 |= odd_high[3][pix >> 4];
p2 |= odd_low[3][pix & 0xf];
}
- if ((pix = *(tp + 49)))
+ if((pix = tp[49]))
{
p1 |= even_high[3][pix >> 4];
p2 |= even_low[3][pix & 0xf];
@@ -72,27 +72,26 @@ static uint8_t ConvertTile(uint8_t* pCache, uint32_t TileAddr)
non_zero |= p1 | p2;
}
break;
-
case 4:
for (line = 8; line != 0; line--, tp += 2)
{
p1 = p2 = 0;
- if ((pix = *(tp + 0)))
+ if((pix = tp[0]))
{
p1 |= odd_high[0][pix >> 4];
p2 |= odd_low[0][pix & 0xf];
}
- if ((pix = *(tp + 1)))
+ if((pix = tp[1]))
{
p1 |= even_high[0][pix >> 4];
p2 |= even_low[0][pix & 0xf];
}
- if ((pix = *(tp + 16)))
+ if((pix = tp[16]))
{
p1 |= odd_high[1][pix >> 4];
p2 |= odd_low[1][pix & 0xf];
}
- if ((pix = *(tp + 17)))
+ if((pix = tp[17]))
{
p1 |= even_high[1][pix >> 4];
p2 |= even_low[1][pix & 0xf];
@@ -102,17 +101,16 @@ static uint8_t ConvertTile(uint8_t* pCache, uint32_t TileAddr)
non_zero |= p1 | p2;
}
break;
-
case 2:
for (line = 8; line != 0; line--, tp += 2)
{
p1 = p2 = 0;
- if ((pix = *(tp + 0)))
+ if((pix = tp[0]))
{
p1 |= odd_high[0][pix >> 4];
p2 |= odd_low[0][pix & 0xf];
}
- if ((pix = *(tp + 1)))
+ if((pix = tp[1]))
{
p1 |= even_high[0][pix >> 4];
p2 |= even_low[0][pix & 0xf];
@@ -123,7 +121,7 @@ static uint8_t ConvertTile(uint8_t* pCache, uint32_t TileAddr)
}
break;
}
- return (non_zero ? true : BLANK_TILE);
+ return non_zero ? 1 : BLANK_TILE;
}
#define PLOT_PIXEL(screen, pixel) (pixel)
@@ -234,10 +232,8 @@ static void WRITE_4PIXELS16x2x2(int32_t Offset, uint8_t* Pixels, uint16_t* Scree
{
if (GFX.Z1 > Depth [N * 2] && (Pixel = Pixels[N]))
{
- Screen [N * 2] = Screen [N * 2 + 1] = Screen [(GFX.RealPitch >> 1) + N * 2] =
- Screen [(GFX.RealPitch >> 1) + N * 2 + 1] = ScreenColors [Pixel];
- Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.RealPitch >> 1) + N * 2] =
- Depth [(GFX.RealPitch >> 1) + N * 2 + 1] = GFX.Z2;
+ Screen [N * 2] = Screen [N * 2 + 1] = Screen [(GFX.RealPitch >> 1) + N * 2] = Screen [(GFX.RealPitch >> 1) + N * 2 + 1] = ScreenColors [Pixel];
+ Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.RealPitch >> 1) + N * 2] = Depth [(GFX.RealPitch >> 1) + N * 2 + 1] = GFX.Z2;
}
}
}
@@ -252,113 +248,93 @@ static void WRITE_4PIXELS16_FLIPPEDx2x2(int32_t Offset, uint8_t* Pixels, uint16_
{
if (GFX.Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N]))
{
- Screen [N * 2] = Screen [N * 2 + 1] = Screen [(GFX.RealPitch >> 1) + N * 2] =
- Screen [(GFX.RealPitch >> 1) + N * 2 + 1] = ScreenColors [Pixel];
- Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.RealPitch >> 1) + N * 2] =
- Depth [(GFX.RealPitch >> 1) + N * 2 + 1] = GFX.Z2;
+ Screen [N * 2] = Screen [N * 2 + 1] = Screen [(GFX.RealPitch >> 1) + N * 2] = Screen [(GFX.RealPitch >> 1) + N * 2 + 1] = ScreenColors [Pixel];
+ Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.RealPitch >> 1) + N * 2] = Depth [(GFX.RealPitch >> 1) + N * 2 + 1] = GFX.Z2;
}
}
}
void DrawTile16(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4)
+ RENDER_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4);
}
void DrawClippedTile16(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4);
}
void DrawTile16HalfWidth(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16_HALFWIDTH, WRITE_4PIXELS16_FLIPPED_HALFWIDTH, 2)
+ RENDER_TILE(WRITE_4PIXELS16_HALFWIDTH, WRITE_4PIXELS16_FLIPPED_HALFWIDTH, 2);
}
void DrawClippedTile16HalfWidth(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16_HALFWIDTH, WRITE_4PIXELS16_FLIPPED_HALFWIDTH, 2)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16_HALFWIDTH, WRITE_4PIXELS16_FLIPPED_HALFWIDTH, 2);
}
void DrawTile16x2(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8)
+ RENDER_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8);
}
void DrawClippedTile16x2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8);
}
-void DrawTile16x2x2(uint32_t Tile, int32_t Offset, uint32_t StartLine,
- uint32_t LineCount)
+void DrawTile16x2x2(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8)
+ RENDER_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8);
}
-void DrawClippedTile16x2x2(uint32_t Tile, int32_t Offset,
- uint32_t StartPixel, uint32_t Width,
- uint32_t StartLine, uint32_t LineCount)
+void DrawClippedTile16x2x2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8);
}
-void DrawLargePixel16(uint32_t Tile, int32_t Offset,
- uint32_t StartPixel, uint32_t Pixels,
- uint32_t StartLine, uint32_t LineCount)
+void DrawLargePixel16(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Pixels, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
-
+ TILE_PREAMBLE();
uint16_t* sp = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.DB + Offset;
uint16_t pixel;
-
- RENDER_TILE_LARGE(ScreenColors [pixel], PLOT_PIXEL)
+ RENDER_TILE_LARGE(ScreenColors [pixel], PLOT_PIXEL);
}
void DrawLargePixel16HalfWidth(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Pixels, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
-
+ TILE_PREAMBLE();
uint16_t* sp = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.DB + Offset;
uint16_t pixel;
-
- RENDER_TILE_LARGE_HALFWIDTH(ScreenColors [pixel], PLOT_PIXEL)
+ RENDER_TILE_LARGE_HALFWIDTH(ScreenColors [pixel], PLOT_PIXEL);
}
static void WRITE_4PIXELS16_ADD(int32_t Offset, uint8_t* Pixels, uint16_t* ScreenColors)
{
uint8_t Pixel, N;
-
uint16_t* Screen = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.ZBuffer + Offset;
uint8_t* SubDepth = GFX.SubZBuffer + Offset;
@@ -387,7 +363,6 @@ static void WRITE_4PIXELS16_ADD(int32_t Offset, uint8_t* Pixels, uint16_t* Scree
static void WRITE_4PIXELS16_FLIPPED_ADD(int32_t Offset, uint8_t* Pixels, uint16_t* ScreenColors)
{
uint8_t Pixel, N;
-
uint16_t* Screen = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.ZBuffer + Offset;
uint8_t* SubDepth = GFX.SubZBuffer + Offset;
@@ -433,8 +408,7 @@ static void WRITE_4PIXELS16_ADD1_2(int32_t Offset, uint8_t* Pixels, uint16_t* Sc
Screen [N] = COLOR_ADD(ScreenColors [Pixel], GFX.FixedColour);
break;
default:
- Screen [N] = (uint16_t)(COLOR_ADD1_2(ScreenColors [Pixel],
- Screen [GFX.Delta + N]));
+ Screen [N] = (uint16_t)(COLOR_ADD1_2(ScreenColors [Pixel], Screen [GFX.Delta + N]));
break;
}
Depth [N] = GFX.Z2;
@@ -462,8 +436,7 @@ static void WRITE_4PIXELS16_FLIPPED_ADD1_2(int32_t Offset, uint8_t* Pixels, uint
Screen [N] = COLOR_ADD(ScreenColors [Pixel], GFX.FixedColour);
break;
default:
- Screen [N] = (uint16_t)(COLOR_ADD1_2(ScreenColors [Pixel],
- Screen [GFX.Delta + N]));
+ Screen [N] = (uint16_t)(COLOR_ADD1_2(ScreenColors [Pixel], Screen [GFX.Delta + N]));
break;
}
Depth [N] = GFX.Z2;
@@ -575,8 +548,7 @@ static void WRITE_4PIXELS16_FLIPPED_SUB1_2(int32_t Offset, uint8_t* Pixels, uint
Screen [N] = (uint16_t) COLOR_SUB(ScreenColors [Pixel], GFX.FixedColour);
break;
default:
- Screen [N] = (uint16_t) COLOR_SUB1_2(ScreenColors [Pixel],
- Screen [GFX.Delta + N]);
+ Screen [N] = (uint16_t) COLOR_SUB1_2(ScreenColors [Pixel], Screen [GFX.Delta + N]);
break;
}
Depth [N] = GFX.Z2;
@@ -587,7 +559,7 @@ static void WRITE_4PIXELS16_FLIPPED_SUB1_2(int32_t Offset, uint8_t* Pixels, uint
void DrawTile16Add(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
uint8_t Pixel;
uint16_t* Screen = (uint16_t*) GFX.S + Offset;
@@ -598,8 +570,7 @@ void DrawTile16Add(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t L
{
case 0:
bp = pCache + StartLine;
- for (l = LineCount; l != 0;
- l--, bp += 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
+ for (l = LineCount; l != 0; l--, bp += 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
{
uint8_t N;
for (N = 0; N < 8; N++)
@@ -625,8 +596,7 @@ void DrawTile16Add(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t L
break;
case H_FLIP:
bp = pCache + StartLine;
- for (l = LineCount; l != 0;
- l--, bp += 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
+ for (l = LineCount; l != 0; l--, bp += 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
{
uint8_t N;
for (N = 0; N < 8; N++)
@@ -652,8 +622,7 @@ void DrawTile16Add(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t L
break;
case H_FLIP | V_FLIP:
bp = pCache + 56 - StartLine;
- for (l = LineCount; l != 0;
- l--, bp -= 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
+ for (l = LineCount; l != 0; l--, bp -= 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
{
uint8_t N;
for (N = 0; N < 8; N++)
@@ -679,8 +648,7 @@ void DrawTile16Add(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t L
break;
case V_FLIP:
bp = pCache + 56 - StartLine;
- for (l = LineCount; l != 0;
- l--, bp -= 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
+ for (l = LineCount; l != 0; l--, bp -= 8, Screen += GFX.PPL, Depth += GFX.PPL, SubDepth += GFX.PPL)
{
uint8_t N;
for (N = 0; N < 8; N++)
@@ -711,67 +679,55 @@ void DrawTile16Add(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t L
void DrawClippedTile16Add(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD, WRITE_4PIXELS16_FLIPPED_ADD, 4)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD, WRITE_4PIXELS16_FLIPPED_ADD, 4);
}
void DrawTile16Add1_2(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4)
+ RENDER_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4);
}
void DrawClippedTile16Add1_2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4);
}
void DrawTile16Sub(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4)
+ RENDER_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4);
}
-void DrawClippedTile16Sub(uint32_t Tile, int32_t Offset,
- uint32_t StartPixel, uint32_t Width,
- uint32_t StartLine, uint32_t LineCount)
+void DrawClippedTile16Sub(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4);
}
-void DrawTile16Sub1_2(uint32_t Tile, int32_t Offset, uint32_t StartLine,
- uint32_t LineCount)
+void DrawTile16Sub1_2(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4)
+ RENDER_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4);
}
-void DrawClippedTile16Sub1_2(uint32_t Tile, int32_t Offset,
- uint32_t StartPixel, uint32_t Width,
- uint32_t StartLine, uint32_t LineCount)
+void DrawClippedTile16Sub1_2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4);
}
static void WRITE_4PIXELS16_ADDF1_2(int32_t Offset, uint8_t* Pixels, uint16_t* ScreenColors)
@@ -852,78 +808,67 @@ static void WRITE_4PIXELS16_FLIPPED_SUBF1_2(int32_t Offset, uint8_t* Pixels, uin
void DrawTile16FixedAdd1_2(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16_ADDF1_2, WRITE_4PIXELS16_FLIPPED_ADDF1_2, 4)
+ RENDER_TILE(WRITE_4PIXELS16_ADDF1_2, WRITE_4PIXELS16_FLIPPED_ADDF1_2, 4);
}
void DrawClippedTile16FixedAdd1_2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADDF1_2,
- WRITE_4PIXELS16_FLIPPED_ADDF1_2, 4)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADDF1_2, WRITE_4PIXELS16_FLIPPED_ADDF1_2, 4);
}
void DrawTile16FixedSub1_2(uint32_t Tile, int32_t Offset, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- RENDER_TILE(WRITE_4PIXELS16_SUBF1_2, WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4)
+ RENDER_TILE(WRITE_4PIXELS16_SUBF1_2, WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4);
}
void DrawClippedTile16FixedSub1_2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Width, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
+ TILE_PREAMBLE();
uint8_t* bp;
-
- TILE_CLIP_PREAMBLE
- RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUBF1_2,
- WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4)
+ TILE_CLIP_PREAMBLE();
+ RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUBF1_2, WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4);
}
void DrawLargePixel16Add(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Pixels, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
-
+ TILE_PREAMBLE();
uint16_t* sp = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.ZBuffer + Offset;
uint16_t pixel;
#define LARGE_ADD_PIXEL(s, p) \
(Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \
- COLOR_ADD (p, *(s + GFX.Delta)) : \
- COLOR_ADD (p, GFX.FixedColour)) \
- : p)
+ COLOR_ADD (p, *(s + GFX.Delta)) : \
+ COLOR_ADD (p, GFX.FixedColour)) : p)
- RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_ADD_PIXEL)
+ RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_ADD_PIXEL);
}
void DrawLargePixel16Add1_2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Pixels, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
-
+ TILE_PREAMBLE();
uint16_t* sp = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.ZBuffer + Offset;
uint16_t pixel;
#define LARGE_ADD_PIXEL1_2(s, p) \
((uint16_t) (Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \
- COLOR_ADD1_2 (p, *(s + GFX.Delta)) : \
- COLOR_ADD (p, GFX.FixedColour)) \
- : p))
+ COLOR_ADD1_2 (p, *(s + GFX.Delta)) : \
+ COLOR_ADD (p, GFX.FixedColour)) : p))
- RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_ADD_PIXEL1_2)
+ RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_ADD_PIXEL1_2);
}
void DrawLargePixel16Sub(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Pixels, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
-
+ TILE_PREAMBLE();
uint16_t* sp = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.ZBuffer + Offset;
uint16_t pixel;
@@ -931,16 +876,14 @@ 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, GFX.FixedColour)) \
- : p)
+ COLOR_SUB (p, GFX.FixedColour)) : p)
- RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_SUB_PIXEL)
+ RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_SUB_PIXEL);
}
void DrawLargePixel16Sub1_2(uint32_t Tile, int32_t Offset, uint32_t StartPixel, uint32_t Pixels, uint32_t StartLine, uint32_t LineCount)
{
- TILE_PREAMBLE
-
+ TILE_PREAMBLE();
uint16_t* sp = (uint16_t*) GFX.S + Offset;
uint8_t* Depth = GFX.ZBuffer + Offset;
uint16_t pixel;
@@ -948,8 +891,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_SUB (p, GFX.FixedColour)) \
- : p)
+ COLOR_SUB (p, GFX.FixedColour)) : p)
- RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_SUB_PIXEL1_2)
+ RENDER_TILE_LARGE(ScreenColors [pixel], LARGE_SUB_PIXEL1_2);
}