-#define RENDER_TILE_LARGE(PIXEL, FUNCTION) \
- if (!(Tile & (V_FLIP | H_FLIP))) \
- { \
- if ((pixel = *(pCache + StartLine + StartPixel))) \
- { \
- pixel = PIXEL; \
- for (l = LineCount; l != 0; l--, sp += gfx->PPL, Depth += gfx->PPL) \
- { \
- for (int z = Pixels - 1; z >= 0; z--) \
- if (gfx->Z1 > Depth [z]) \
- { \
- sp [z] = FUNCTION(sp + z, pixel); \
- Depth [z] = gfx->Z2; \
- }\
- } \
- } \
- } \
- else \
- if (!(Tile & V_FLIP)) \
- { \
- StartPixel = 7 - StartPixel; \
- if ((pixel = *(pCache + StartLine + StartPixel))) \
- { \
- pixel = PIXEL; \
- for (l = LineCount; l != 0; l--, sp += gfx->PPL, Depth += gfx->PPL) \
- { \
- for (int z = Pixels - 1; z >= 0; z--) \
- if (gfx->Z1 > Depth [z]) \
- { \
- sp [z] = FUNCTION(sp + z, pixel); \
- Depth [z] = gfx->Z2; \
- }\
- } \
- } \
- } \
- else \
- if (Tile & H_FLIP) \
- { \
- StartPixel = 7 - StartPixel; \
- if ((pixel = *(pCache + 56 - StartLine + StartPixel))) \
- { \
- pixel = PIXEL; \
- for (l = LineCount; l != 0; l--, sp += gfx->PPL, Depth += gfx->PPL) \
- { \
- for (int z = Pixels - 1; z >= 0; z--) \
- if (gfx->Z1 > Depth [z]) \
- { \
- sp [z] = FUNCTION(sp + z, pixel); \
- Depth [z] = gfx->Z2; \
- }\
- } \
- } \
- } \
- else \
- { \
- if ((pixel = *(pCache + 56 - StartLine + StartPixel))) \
- { \
- pixel = PIXEL; \
- for (l = LineCount; l != 0; l--, sp += gfx->PPL, Depth += gfx->PPL) \
- { \
- for (int z = Pixels - 1; z >= 0; z--) \
- if (gfx->Z1 > Depth [z]) \
- { \
- sp [z] = FUNCTION(sp + z, pixel); \
- Depth [z] = gfx->Z2; \
- }\
- } \
- } \
- }
-
-#define RENDER_TILEHI(NORMAL, FLIPPED, N) \
- if (!(Tile & (V_FLIP | H_FLIP))) \
- { \
- bp = pCache + StartLine; \
- for (l = LineCount; l != 0; l--, bp += 8, Offset += gfx->PPL) \
- { \
- /*if (*(uint32 *) bp)*/if (((uint32)bp[0])|((uint32)bp[2])|((uint32)bp[4])|((uint32)bp[6])) \
- NORMAL (Offset, bp); \
- } \
- } \
- else \
- if (!(Tile & V_FLIP)) \
- { \
- bp = pCache + StartLine; \
- for (l = LineCount; l != 0; l--, bp += 8, Offset += gfx->PPL) \
- { \
- /*if (*(uint32 *) (bp + 4))*/if (((uint32)bp[0])|((uint32)bp[2])|((uint32)bp[4])|((uint32)bp[6])) \
- FLIPPED (Offset, bp); \
- } \
- } \
- else \
- if (Tile & H_FLIP) \
- { \
- bp = pCache + 56 - StartLine; \
- for (l = LineCount; l != 0; l--, bp -= 8, Offset += gfx->PPL) \
- { \
- /*if (*(uint32 *) (bp + 4))*/if (((uint32)bp[0])|((uint32)bp[2])|((uint32)bp[4])|((uint32)bp[6])) \
- FLIPPED (Offset, bp); \
- } \
- } \
- else \
- { \
- bp = pCache + 56 - StartLine; \
- for (l = LineCount; l != 0; l--, bp -= 8, Offset += gfx->PPL) \
- { \
- /*if (*(uint32 *) bp)*/if (((uint32)bp[0])|((uint32)bp[2])|((uint32)bp[4])|((uint32)bp[6])) \
- NORMAL (Offset, bp); \
- } \
- }
-
-
-
-#define RENDER_CLIPPED_TILEHI(NORMAL, FLIPPED, N) \
- d1=(d1&0xFF)|((d1&0xFF0000)>>8)|((d2&0xFF)<<16)|((d2&0xFF0000)<<8);\
- if (!(Tile & (V_FLIP | H_FLIP))) \
- { \
- bp = pCache + StartLine; \
- for (l = LineCount; l != 0; l--, bp += 8, Offset += gfx->PPL) \
- { \
- /*if ((dd = (*(uint32 *) bp) & d1))*/if ((dd = (((((uint32)bp[6])<<24)|(((uint32)bp[4])<<16)|(((uint32)bp[2])<<8)|((uint32)bp[0]))&d1))) \
- NORMAL (Offset, (uint8 *) &dd); \
- } \
- } \
- else \
- if (!(Tile & V_FLIP)) \
- { \
- bp = pCache + StartLine; \
- SWAP_DWORD (d1); \
- /*SWAP_DWORD (d2);*/ \
- for (l = LineCount; l != 0; l--, bp += 8, Offset += gfx->PPL) \
- { \
- /*if ((dd = *(uint32 *) (bp + 4) & d1))*/if ((dd = (((((uint32)bp[6])<<24)|(((uint32)bp[4])<<16)|(((uint32)bp[2])<<8)|((uint32)bp[0]))&d1))) \
- FLIPPED (Offset, (uint8 *) &dd); \
- } \
- } \
- else \
- if (Tile & H_FLIP) \
- { \
- bp = pCache + 56 - StartLine; \
- SWAP_DWORD (d1); \
- /*SWAP_DWORD (d2);*/ \
- for (l = LineCount; l != 0; l--, bp -= 8, Offset += gfx->PPL) \
- { \
- /*if ((dd = *(uint32 *) (bp + 4) & d1))*/if ((dd = (((((uint32)bp[6])<<24)|(((uint32)bp[4])<<16)|(((uint32)bp[2])<<8)|((uint32)bp[0]))&d1))) \
- FLIPPED (Offset, (uint8 *) &dd); \
- } \
- } \
- else \
- { \
- bp = pCache + 56 - StartLine; \
- for (l = LineCount; l != 0; l--, bp -= 8, Offset += gfx->PPL) \
- { \
- /*if ((dd = (*(uint32 *) bp) & d1))*/ if ((dd = (((((uint32)bp[6])<<24)|(((uint32)bp[4])<<16)|(((uint32)bp[2])<<8)|((uint32)bp[0]))&d1))) \
- NORMAL (Offset, (uint8 *) &dd); \
- } \
- }
+void DrawClippedTile16Add1_2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+
+void DrawClippedTile16FixedAdd1_2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawTile16Sub (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+
+void DrawClippedTile16Sub (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawTile16Sub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+
+void DrawClippedTile16Sub1_2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawTile16FixedSub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+
+void DrawClippedTile16FixedSub1_2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawLargePixel16Add (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Pixels,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawLargePixel16Add1_2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Pixels,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawLargePixel16Sub (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Pixels,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawLargePixel16Sub1_2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Pixels,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawHiResClippedTile16 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+
+void DrawHiResTile16 (uint32 Tile, uint32 Offset,
+ uint32 StartLine, uint32 LineCount);