#include "gfx.h"
#include "apu.h"
#include "cheats.h"
-#include <stdint.h>
-//#include "asmmemfuncs.h"
+#include "tile.h"
+#include "misc.h"
#define USE_CRAZY_OPTS
-//misc.s
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern void memcpy16(unsigned short *dest, unsigned short *src, int count);
-extern void memcpy16bswap(unsigned short *dest, void *src, int count);
-extern void memcpy32(uint32_t *dest, uint32_t *src, int count);
-extern void memset32(uint32_t *dest, int c, int count);
-#ifdef __cplusplus
-}
-#endif
-
#define M7 19
#define M8 19
#define BLACK BUILD_PIXEL(0,0,0)
-void DrawTile (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-void DrawClippedTile (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-void DrawTilex2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-void DrawClippedTilex2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-void DrawTilex2x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-void DrawClippedTilex2x2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-void DrawLargePixel (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawTile16 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-void DrawClippedTile16 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-void DrawTile16x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-void DrawClippedTile16x2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-void DrawTile16x2x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-void DrawClippedTile16x2x2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-void DrawLargePixel16 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawTile16Add (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-
-void DrawClippedTile16Add (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawTile16Add1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-
-void DrawClippedTile16Add1_2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-
-void DrawClippedTile16FixedAdd1_2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawTile16Sub (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-
-void DrawClippedTile16Sub (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawTile16Sub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-
-void DrawClippedTile16Sub1_2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawTile16FixedSub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx);
-
-void DrawClippedTile16FixedSub1_2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawLargePixel16Add (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawLargePixel16Add1_2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawLargePixel16Sub (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawLargePixel16Sub1_2 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawHiResClippedTile16 (uint32 Tile, uint32 Offset,
- uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
-void DrawHiResTile16 (uint32 Tile, uint32 Offset,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx);
-
bool8_32 S9xGraphicsInit ()
{
register uint32 PixelOdd = 1;
PixelOdd <<= 2;
}
- GFX.RealPitch = GFX.Pitch2 = GFX.Pitch;
- GFX.ZPitch = GFX.Pitch;
- if (Settings.SixteenBit)
- GFX.ZPitch >>= 1;
- GFX.Delta = (GFX.SubScreen - GFX.Screen) >> 1;
- GFX.DepthDelta = GFX.SubZBuffer - GFX.ZBuffer;
- //GFX.InfoStringTimeout = 0;
- //GFX.InfoString = NULL;
+ GFX.InfoStringTimeout = 0;
+ GFX.InfoString = NULL;
PPU.BG_Forced = 0;
IPPU.OBJChanged = TRUE;
IPPU.DoubleWidthPixels = FALSE;
GFX.Pitch2 = GFX.Pitch = GFX.RealPitch;
GFX.PPL = GFX.PPLx2 >> 1;
- GFX.ZPitch = GFX.RealPitch;
- if (Settings.SixteenBit)
- GFX.ZPitch >>= 1;
PPU.RecomputeClipWindows = TRUE;
GFX.DepthDelta = GFX.SubZBuffer - GFX.ZBuffer;
GFX.Delta = (GFX.SubScreen - GFX.Screen) >> 1;
if (W > Width)
W = Width;
(*DrawClippedTilePtr) (Tile, O, Offset, W,
- TileLine, LineCount, &GFX);
+ TileLine, LineCount);
if (W >= Width)
continue;
for (int X = 0; X < Middle; X++, O += 8 * GFX.PixSize,
Tile += TileInc)
{
- (*DrawTilePtr) (Tile, O, TileLine, LineCount, &GFX);
+ (*DrawTilePtr) (Tile, O, TileLine, LineCount);
}
if (Offset)
{
(*DrawClippedTilePtr) (Tile, O, 0, Offset,
- TileLine, LineCount, &GFX);
+ TileLine, LineCount);
}
}
}
{
(*DrawLargePixelPtr) (Tile + 17 - (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
else
{
(*DrawLargePixelPtr) (Tile + 1 - (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
}
else
{
(*DrawLargePixelPtr) (Tile + 17 - (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
else
{
(*DrawLargePixelPtr) (Tile + 1 - (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
}
}
{
(*DrawLargePixelPtr) (Tile + 16 + (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
else
{
(*DrawLargePixelPtr) (Tile + (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
}
else
{
(*DrawLargePixelPtr) (Tile + 16 + (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
else
{
(*DrawLargePixelPtr) (Tile + (Quot & 1), s,
HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
}
}
}
else
(*DrawLargePixelPtr) (Tile, s, HPos & 7, PixWidth,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
}
}
GFX.Z1 = GFX.Z2 = depths [(Tile & 0x2000) >> 13];
if (BG.TileSize == 8)
- (*DrawClippedTilePtr) (Tile, s, Offset, Count, VirtAlign, Lines, &GFX);
+ (*DrawClippedTilePtr) (Tile, s, Offset, Count, VirtAlign, Lines);
else
{
if (!(Tile & (V_FLIP | H_FLIP)))
{
// Normal, unflipped
(*DrawClippedTilePtr) (Tile + t1 + (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
else
if (Tile & H_FLIP)
{
// H & V flip
(*DrawClippedTilePtr) (Tile + t2 + 1 - (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
else
{
// H flip only
(*DrawClippedTilePtr) (Tile + t1 + 1 - (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
}
else
{
// V flip only
(*DrawClippedTilePtr) (Tile + t2 + (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
}
{
// Normal, unflipped
(*DrawHiResClippedTilePtr) (Tile + (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
else
{
// H flip
(*DrawHiResClippedTilePtr) (Tile + 1 - (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
}
else
{
// Normal, unflipped
(*DrawHiResClippedTilePtr) (Tile + t1 + (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
else
if (Tile & H_FLIP)
{
// H & V flip
(*DrawHiResClippedTilePtr) (Tile + t2 + 1 - (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
else
{
// H flip only
(*DrawHiResClippedTilePtr) (Tile + t1 + 1 - (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
}
else
{
// V flip only
(*DrawHiResClippedTilePtr) (Tile + t2 + (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
}
{
// Normal, unflipped
(*DrawHiResTilePtr) (Tile + (Quot & 1),
- s, VirtAlign, Lines, &GFX);
+ s, VirtAlign, Lines);
}
else
{
// H flip
(*DrawHiResTilePtr) (Tile + 1 - (Quot & 1),
- s, VirtAlign, Lines, &GFX);
+ s, VirtAlign, Lines);
}
}
else
{
// Normal, unflipped
(*DrawHiResTilePtr) (Tile + t1 + (Quot & 1),
- s, VirtAlign, Lines, &GFX);
+ s, VirtAlign, Lines);
}
else
if (Tile & H_FLIP)
{
// H & V flip
(*DrawHiResTilePtr) (Tile + t2 + 1 - (Quot & 1),
- s, VirtAlign, Lines, &GFX);
+ s, VirtAlign, Lines);
}
else
{
// H flip only
(*DrawHiResTilePtr) (Tile + t1 + 1 - (Quot & 1),
- s, VirtAlign, Lines, &GFX);
+ s, VirtAlign, Lines);
}
}
else
{
// V flip only
(*DrawHiResTilePtr) (Tile + t2 + (Quot & 1),
- s, VirtAlign, Lines, &GFX);
+ s, VirtAlign, Lines);
}
}
{
// Normal, unflipped
(*DrawHiResClippedTilePtr) (Tile + (Quot & 1),
- s, 0, Count, VirtAlign, Lines, &GFX);
+ s, 0, Count, VirtAlign, Lines);
}
else
{
// H flip
(*DrawHiResClippedTilePtr) (Tile + 1 - (Quot & 1),
- s, 0, Count, VirtAlign, Lines, &GFX);
+ s, 0, Count, VirtAlign, Lines);
}
}
else
{
// Normal, unflipped
(*DrawHiResClippedTilePtr) (Tile + t1 + (Quot & 1),
- s, 0, Count, VirtAlign, Lines, &GFX);
+ s, 0, Count, VirtAlign, Lines);
}
else
if (Tile & H_FLIP)
{
// H & V flip
(*DrawHiResClippedTilePtr) (Tile + t2 + 1 - (Quot & 1),
- s, 0, Count, VirtAlign, Lines, &GFX);
+ s, 0, Count, VirtAlign, Lines);
}
else
{
// H flip only
(*DrawHiResClippedTilePtr) (Tile + t1 + 1 - (Quot & 1),
- s, 0, Count, VirtAlign, Lines, &GFX);
+ s, 0, Count, VirtAlign, Lines);
}
}
else
{
// V flip only
(*DrawHiResClippedTilePtr) (Tile + t2 + (Quot & 1),
- s, 0, Count, VirtAlign, Lines, &GFX);
+ s, 0, Count, VirtAlign, Lines);
}
}
}
if (BG.TileSize == 8)
{
(*DrawClippedTilePtr) (Tile, s, Offset, Count, VirtAlign,
- Lines, &GFX);
+ Lines);
}
else
{
{
// Normal, unflipped
(*DrawClippedTilePtr) (Tile + t1 + (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
else
if (Tile & H_FLIP)
{
// H & V flip
(*DrawClippedTilePtr) (Tile + t2 + 1 - (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
else
{
// H flip only
(*DrawClippedTilePtr) (Tile + t1 + 1 - (Quot & 1),
- s, Offset, Count, VirtAlign, Lines, &GFX);
+ s, Offset, Count, VirtAlign, Lines);
}
}
else
{
// V flip only
(*DrawClippedTilePtr) (Tile + t2 + (Quot & 1), s,
- Offset, Count, VirtAlign, Lines, &GFX);
+ Offset, Count, VirtAlign, Lines);
}
}
{
// Both horzontal & vertical flip
(*DrawTilePtr) (Tile + t2 + 1 - (Quot & 1), s,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
else
{
// Horizontal flip only
(*DrawTilePtr) (Tile + t1 + 1 - (Quot & 1), s,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
}
else
{
// Vertical flip only
(*DrawTilePtr) (Tile + t2 + (Quot & 1), s,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
else
{
// Normal unflipped
(*DrawTilePtr) (Tile + t1 + (Quot & 1), s,
- VirtAlign, Lines, &GFX);
+ VirtAlign, Lines);
}
}
}
else
{
- (*DrawTilePtr) (Tile, s, VirtAlign, Lines, &GFX);
+ (*DrawTilePtr) (Tile, s, VirtAlign, Lines);
}
if (BG.TileSize == 8)
if (BG.TileSize == 8)
(*DrawClippedTilePtr) (Tile, s, 0, Count, VirtAlign,
- Lines, &GFX);
+ Lines);
else
{
if (!(Tile & (V_FLIP | H_FLIP)))
{
// Normal, unflipped
(*DrawClippedTilePtr) (Tile + t1 + (Quot & 1), s, 0,
- Count, VirtAlign, Lines, &GFX);
+ Count, VirtAlign, Lines);
}
else
if (Tile & H_FLIP)
// H & V flip
(*DrawClippedTilePtr) (Tile + t2 + 1 - (Quot & 1),
s, 0, Count, VirtAlign,
- Lines, &GFX);
+ Lines);
}
else
{
// H flip only
(*DrawClippedTilePtr) (Tile + t1 + 1 - (Quot & 1),
s, 0, Count, VirtAlign,
- Lines, &GFX);
+ Lines);
}
}
else
// V flip only
(*DrawClippedTilePtr) (Tile + t2 + (Quot & 1),
s, 0, Count, VirtAlign,
- Lines, &GFX);
+ Lines);
}
}
}
for (register int x = 255; x >= 0; x--, p--, q -= 2)
*q = *(q + 1) = *p;
}
- GFX.Pitch = GFX.Pitch2 = GFX.RealPitch;
- GFX.PPL = GFX.Pitch >> 1;
- GFX.PPLx2 = GFX.Pitch;
- GFX.ZPitch = GFX.PPL;
}
else
#endif
#include "3d.h"
#endif
+#define TILE_PREAMBLE \
+ uint8 *pCache; \
+\
+ uint32 TileAddr = BG.TileAddress + ((Tile & 0x3ff) << BG.TileShift); \
+ if ((Tile & 0x1ff) >= 256) \
+ TileAddr += BG.NameSelect; \
+\
+ TileAddr &= 0xffff; \
+\
+ uint32 TileNumber; \
+ pCache = &BG.Buffer[(TileNumber = (TileAddr >> BG.TileShift)) << 6]; \
+\
+ if (!BG.Buffered [TileNumber]) \
+ BG.Buffered[TileNumber] = ConvertTile (pCache, TileAddr); \
+\
+ if (BG.Buffered [TileNumber] == BLANK_TILE) \
+ return; \
+\
+ register uint32 l; \
+ if (BG.DirectColourMode) \
+ { \
+ if (IPPU.DirectColourMapsNeedRebuild) \
+ S9xBuildDirectColourMaps (); \
+ GFX.ScreenColors = DirectColourMaps [(Tile >> 10) & BG.PaletteMask]; \
+ } \
+ else \
+ GFX.ScreenColors = &IPPU.ScreenColors [(((Tile >> 10) & BG.PaletteMask) << BG.PaletteShift) + BG.StartPalette];
+
+#define RENDER_TILE(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) \
+ NORMAL (Offset, bp); \
+ if (*(uint32 *) (bp + 4)) \
+ NORMAL (Offset + N, bp + 4); \
+ } \
+ } \
+ else \
+ if (!(Tile & V_FLIP)) \
+ { \
+ bp = pCache + StartLine; \
+ for (l = LineCount; l != 0; l--, bp += 8, Offset += GFX.PPL) \
+ { \
+ if (*(uint32 *) (bp + 4)) \
+ FLIPPED (Offset, bp + 4); \
+ if (*(uint32 *) bp) \
+ FLIPPED (Offset + N, 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)) \
+ FLIPPED (Offset, bp + 4); \
+ if (*(uint32 *) bp) \
+ FLIPPED (Offset + N, bp); \
+ } \
+ } \
+ else \
+ { \
+ bp = pCache + 56 - StartLine; \
+ for (l = LineCount; l != 0; l--, bp -= 8, Offset += GFX.PPL) \
+ { \
+ if (*(uint32 *) bp) \
+ NORMAL (Offset, bp); \
+ if (*(uint32 *) (bp + 4)) \
+ NORMAL (Offset + N, bp + 4); \
+ } \
+ }
+
+#define TILE_CLIP_PREAMBLE \
+ uint32 dd; \
+ uint32 d1; \
+ uint32 d2; \
+\
+ if (StartPixel < 4) \
+ { \
+ d1 = HeadMask [StartPixel]; \
+ if (StartPixel + Width < 4) \
+ d1 &= TailMask [StartPixel + Width]; \
+ } \
+ else \
+ d1 = 0; \
+\
+ if (StartPixel + Width > 4) \
+ { \
+ if (StartPixel > 4) \
+ d2 = HeadMask [StartPixel - 4]; \
+ else \
+ d2 = 0xffffffff; \
+\
+ d2 &= TailMask [(StartPixel + Width - 4)]; \
+ } \
+ else \
+ d2 = 0;
+
+
+#define RENDER_CLIPPED_TILE(NORMAL, FLIPPED, N) \
+ 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)) \
+ NORMAL (Offset, (uint8 *) &dd); \
+ if ((dd = (*(uint32 *) (bp + 4)) & d2)) \
+ NORMAL (Offset + N, (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)) \
+ FLIPPED (Offset, (uint8 *) &dd); \
+ if ((dd = *(uint32 *) bp & d2)) \
+ FLIPPED (Offset + N, (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)) \
+ FLIPPED (Offset, (uint8 *) &dd); \
+ if ((dd = *(uint32 *) bp & d2)) \
+ FLIPPED (Offset + N, (uint8 *) &dd); \
+ } \
+ } \
+ else \
+ { \
+ bp = pCache + 56 - StartLine; \
+ for (l = LineCount; l != 0; l--, bp -= 8, Offset += GFX.PPL) \
+ { \
+ if ((dd = (*(uint32 *) bp) & d1)) \
+ NORMAL (Offset, (uint8 *) &dd); \
+ if ((dd = (*(uint32 *) (bp + 4)) & d2)) \
+ NORMAL (Offset + N, (uint8 *) &dd); \
+ } \
+ }
+
+#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); \
+ } \
+ }
+
extern uint32 HeadMask [4];
extern uint32 TailMask [5];
return (non_zero ? TRUE : BLANK_TILE);
}
-INLINE void WRITE_4PIXELS (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS (uint32 Offset, uint8 *Pixels)
{
register uint8 Pixel;
- uint8 *Screen = gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint8 *Screen = GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
- Screen [N] = (uint8) gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = (uint8) GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS_FLIPPED (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS_FLIPPED (uint32 Offset, uint8 *Pixels)
{
register uint8 Pixel;
- uint8 *Screen = gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint8 *Screen = GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
- Screen [N] = (uint8) gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = (uint8) GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELSx2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELSx2 (uint32 Offset, uint8 *Pixels)
{
register uint8 Pixel;
- uint8 *Screen = gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint8 *Screen = GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [0] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [0] && (Pixel = Pixels[N])) \
{ \
- Screen [N * 2] = Screen [N * 2 + 1] = (uint8) gfx->ScreenColors [Pixel]; \
- Depth [N * 2] = Depth [N * 2 + 1] = gfx->Z2; \
+ Screen [N * 2] = Screen [N * 2 + 1] = (uint8) GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS_FLIPPEDx2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS_FLIPPEDx2 (uint32 Offset, uint8 *Pixels)
{
register uint8 Pixel;
- uint8 *Screen = gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint8 *Screen = GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N])) \
{ \
- Screen [N * 2] = Screen [N * 2 + 1] = (uint8) gfx->ScreenColors [Pixel]; \
- Depth [N * 2] = Depth [N * 2 + 1] = gfx->Z2; \
+ Screen [N * 2] = Screen [N * 2 + 1] = (uint8) GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELSx2x2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELSx2x2 (uint32 Offset, uint8 *Pixels)
{
register uint8 Pixel;
- uint8 *Screen = gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint8 *Screen = GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N * 2] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N * 2] && (Pixel = Pixels[N])) \
{ \
- Screen [N * 2] = Screen [N * 2 + 1] = Screen [gfx->RealPitch + N * 2] = \
- Screen [gfx->RealPitch + N * 2 + 1] = (uint8) gfx->ScreenColors [Pixel]; \
- Depth [N * 2] = Depth [N * 2 + 1] = Depth [gfx->RealPitch + N * 2] = \
- Depth [gfx->RealPitch + N * 2 + 1] = gfx->Z2; \
+ Screen [N * 2] = Screen [N * 2 + 1] = Screen [GFX.RealPitch + N * 2] = \
+ Screen [GFX.RealPitch + N * 2 + 1] = (uint8) GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = Depth [GFX.RealPitch + N * 2] = \
+ Depth [GFX.RealPitch + N * 2 + 1] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels)
{
register uint8 Pixel;
- uint8 *Screen = gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint8 *Screen = GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N])) \
{ \
- Screen [N * 2] = Screen [N * 2 + 1] = Screen [gfx->RealPitch + N * 2] = \
- Screen [gfx->RealPitch + N * 2 + 1] = (uint8) gfx->ScreenColors [Pixel]; \
- Depth [N * 2] = Depth [N * 2 + 1] = Depth [gfx->RealPitch + N * 2] = \
- Depth [gfx->RealPitch + N * 2 + 1] = gfx->Z2; \
+ Screen [N * 2] = Screen [N * 2 + 1] = Screen [GFX.RealPitch + N * 2] = \
+ Screen [GFX.RealPitch + N * 2 + 1] = (uint8) GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = Depth [GFX.RealPitch + N * 2] = \
+ Depth [GFX.RealPitch + N * 2 + 1] = GFX.Z2; \
}
FN(0)
#undef FN
}
-void DrawTile (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+void DrawTile(uint32 Tile, uint32 Offset, uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
RENDER_TILE(WRITE_4PIXELS, WRITE_4PIXELS_FLIPPED, 4)
}
-void DrawClippedTile (uint32 Tile, uint32 Offset,
+void DrawClippedTile(uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
RENDER_CLIPPED_TILE(WRITE_4PIXELS, WRITE_4PIXELS_FLIPPED, 4)
}
-void DrawTilex2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+void DrawTilex2 (uint32 Tile, uint32 Offset, uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
void DrawClippedTilex2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
}
void DrawTilex2x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
void DrawClippedTilex2x2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawLargePixel (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
- register uint8 *sp = gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ register uint8 *sp = GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
uint8 pixel;
#define PLOT_PIXEL(screen, pixel) (pixel)
- RENDER_TILE_LARGE (((uint8) gfx->ScreenColors [pixel]), PLOT_PIXEL)
+ RENDER_TILE_LARGE (((uint8) GFX.ScreenColors [pixel]), PLOT_PIXEL)
}
-INLINE void WRITE_4PIXELS16 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPED (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPED (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16x2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16x2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N * 2] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N * 2] && (Pixel = Pixels[N])) \
{ \
- Screen [N * 2] = Screen [N * 2 + 1] = gfx->ScreenColors [Pixel]; \
- Depth [N * 2] = Depth [N * 2 + 1] = gfx->Z2; \
+ Screen [N * 2] = Screen [N * 2 + 1] = GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPEDx2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPEDx2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N])) \
{ \
- Screen [N * 2] = Screen [N * 2 + 1] = gfx->ScreenColors [Pixel]; \
- Depth [N * 2] = Depth [N * 2 + 1] = gfx->Z2; \
+ Screen [N * 2] = Screen [N * 2 + 1] = GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16x2x2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16x2x2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N * 2] && (Pixel = Pixels[N])) \
+ 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] = gfx->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] = GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.RealPitch >> 1) + N * 2] = \
+ Depth [(GFX.RealPitch >> 1) + N * 2 + 1] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N * 2] && (Pixel = Pixels[3 - N])) \
+ 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] = gfx->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] = GFX.ScreenColors [Pixel]; \
+ Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.RealPitch >> 1) + N * 2] = \
+ Depth [(GFX.RealPitch >> 1) + N * 2 + 1] = GFX.Z2; \
}
FN(0)
}
void DrawTile16 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
}
void DrawTile16x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16x2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
}
void DrawTile16x2x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16x2x2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawLargePixel16 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
- register uint16 *sp = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->DB + Offset;
+ register uint16 *sp = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.DB + Offset;
uint16 pixel;
- RENDER_TILE_LARGE (gfx->ScreenColors [pixel], PLOT_PIXEL)
+ RENDER_TILE_LARGE (GFX.ScreenColors [pixel], PLOT_PIXEL)
}
-INLINE void WRITE_4PIXELS16_ADD (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_ADD (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = COLOR_ADD (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N]); \
+ Screen [N] = COLOR_ADD (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N]); \
else \
- Screen [N] = COLOR_ADD (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = COLOR_ADD (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPED_ADD (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPED_ADD (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = COLOR_ADD (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N]); \
+ Screen [N] = COLOR_ADD (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N]); \
else \
- Screen [N] = COLOR_ADD (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = COLOR_ADD (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_ADD1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_ADD1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = (uint16) (COLOR_ADD1_2 (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N])); \
+ Screen [N] = (uint16) (COLOR_ADD1_2 (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N])); \
else \
- Screen [N] = COLOR_ADD (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = COLOR_ADD (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPED_ADD1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPED_ADD1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = (uint16) (COLOR_ADD1_2 (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N])); \
+ Screen [N] = (uint16) (COLOR_ADD1_2 (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N])); \
else \
- Screen [N] = COLOR_ADD (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = COLOR_ADD (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_SUB (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_SUB (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = (uint16) COLOR_SUB (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N]); \
+ Screen [N] = (uint16) COLOR_SUB (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N]); \
else \
- Screen [N] = (uint16) COLOR_SUB (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = (uint16) COLOR_SUB (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPED_SUB (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPED_SUB (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = (uint16) COLOR_SUB (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N]); \
+ Screen [N] = (uint16) COLOR_SUB (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N]); \
else \
- Screen [N] = (uint16) COLOR_SUB (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = (uint16) COLOR_SUB (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_SUB1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_SUB1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = (uint16) COLOR_SUB1_2 (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N]); \
+ Screen [N] = (uint16) COLOR_SUB1_2 (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N]); \
else \
- Screen [N] = (uint16) COLOR_SUB (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = (uint16) COLOR_SUB (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPED_SUB1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPED_SUB1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
if (SubDepth [N]) \
{ \
if (SubDepth [N] != 1) \
- Screen [N] = (uint16) COLOR_SUB1_2 (gfx->ScreenColors [Pixel], \
- Screen [gfx->Delta + N]); \
+ Screen [N] = (uint16) COLOR_SUB1_2 (GFX.ScreenColors [Pixel], \
+ Screen [GFX.Delta + N]); \
else \
- Screen [N] = (uint16) COLOR_SUB (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = (uint16) COLOR_SUB (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
} \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
void DrawTile16Add (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16Add (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
}
void DrawTile16Add1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16Add1_2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
}
void DrawTile16Sub (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16Sub (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
}
void DrawTile16Sub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16Sub1_2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4)
}
-INLINE void WRITE_4PIXELS16_ADDF1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_ADDF1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
if (SubDepth [N] == 1) \
- Screen [N] = (uint16) (COLOR_ADD1_2 (gfx->ScreenColors [Pixel], \
- gfx->FixedColour)); \
+ Screen [N] = (uint16) (COLOR_ADD1_2 (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour)); \
else \
- Screen [N] = gfx->ScreenColors [Pixel];\
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel];\
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPED_ADDF1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPED_ADDF1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
if (SubDepth [N] == 1) \
- Screen [N] = (uint16) (COLOR_ADD1_2 (gfx->ScreenColors [Pixel], \
- gfx->FixedColour)); \
+ Screen [N] = (uint16) (COLOR_ADD1_2 (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour)); \
else \
- Screen [N] = gfx->ScreenColors [Pixel];\
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel];\
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_SUBF1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_SUBF1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) \
{ \
if (SubDepth [N] == 1) \
- Screen [N] = (uint16) COLOR_SUB1_2 (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = (uint16) COLOR_SUB1_2 (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
#undef FN
}
-INLINE void WRITE_4PIXELS16_FLIPPED_SUBF1_2 (uint32 Offset, uint8 *Pixels, struct SGFX * gfx)
+INLINE void WRITE_4PIXELS16_FLIPPED_SUBF1_2 (uint32 Offset, uint8 *Pixels)
{
register uint32 Pixel;
- uint16 *Screen = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
- uint8 *SubDepth = gfx->SubZBuffer + Offset;
+ uint16 *Screen = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
+ uint8 *SubDepth = GFX.SubZBuffer + Offset;
#define FN(N) \
- if (gfx->Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
+ if (GFX.Z1 > Depth [N] && (Pixel = Pixels[3 - N])) \
{ \
if (SubDepth [N] == 1) \
- Screen [N] = (uint16) COLOR_SUB1_2 (gfx->ScreenColors [Pixel], \
- gfx->FixedColour); \
+ Screen [N] = (uint16) COLOR_SUB1_2 (GFX.ScreenColors [Pixel], \
+ GFX.FixedColour); \
else \
- Screen [N] = gfx->ScreenColors [Pixel]; \
- Depth [N] = gfx->Z2; \
+ Screen [N] = GFX.ScreenColors [Pixel]; \
+ Depth [N] = GFX.Z2; \
}
FN(0)
}
void DrawTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16FixedAdd1_2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
}
void DrawTile16FixedSub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawClippedTile16FixedSub1_2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawLargePixel16Add (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
- register uint16 *sp = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
+ register uint16 *sp = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
register uint16 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)) \
+(Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \
+ COLOR_ADD (p, *(s + GFX.Delta)) : \
+ COLOR_ADD (p, GFX.FixedColour)) \
: p)
- RENDER_TILE_LARGE (gfx->ScreenColors [pixel], LARGE_ADD_PIXEL)
+ RENDER_TILE_LARGE (GFX.ScreenColors [pixel], LARGE_ADD_PIXEL)
}
void DrawLargePixel16Add1_2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
- register uint16 *sp = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
+ register uint16 *sp = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
register uint16 pixel;
#define LARGE_ADD_PIXEL1_2(s, p) \
-((uint16) (Depth [z + gfx->DepthDelta] ? (Depth [z + gfx->DepthDelta] != 1 ? \
- COLOR_ADD1_2 (p, *(s + gfx->Delta)) : \
- COLOR_ADD (p, gfx->FixedColour)) \
+((uint16) (Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \
+ COLOR_ADD1_2 (p, *(s + GFX.Delta)) : \
+ COLOR_ADD (p, GFX.FixedColour)) \
: p))
- RENDER_TILE_LARGE (gfx->ScreenColors [pixel], LARGE_ADD_PIXEL1_2)
+ RENDER_TILE_LARGE (GFX.ScreenColors [pixel], LARGE_ADD_PIXEL1_2)
}
void DrawLargePixel16Sub (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
- register uint16 *sp = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
+ register uint16 *sp = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
register uint16 pixel;
#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)) \
+(Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \
+ COLOR_SUB (p, *(s + GFX.Delta)) : \
+ COLOR_SUB (p, GFX.FixedColour)) \
: p)
- RENDER_TILE_LARGE (gfx->ScreenColors [pixel], LARGE_SUB_PIXEL)
+ RENDER_TILE_LARGE (GFX.ScreenColors [pixel], LARGE_SUB_PIXEL)
}
void DrawLargePixel16Sub1_2 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Pixels,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
- register uint16 *sp = (uint16 *) gfx->S + Offset;
- uint8 *Depth = gfx->ZBuffer + Offset;
+ register uint16 *sp = (uint16 *) GFX.S + Offset;
+ uint8 *Depth = GFX.ZBuffer + Offset;
uint16 pixel;
#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)) \
+(Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \
+ COLOR_SUB1_2 (p, *(s + GFX.Delta)) : \
+ COLOR_SUB (p, GFX.FixedColour)) \
: p)
- RENDER_TILE_LARGE (gfx->ScreenColors [pixel], LARGE_SUB_PIXEL1_2)
+ RENDER_TILE_LARGE (GFX.ScreenColors [pixel], LARGE_SUB_PIXEL1_2)
}
void DrawHiResTile16 (uint32 Tile, uint32 Offset, uint32 StartLine,
- uint32 LineCount, struct SGFX * gfx)
+ uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
void DrawHiResClippedTile16 (uint32 Tile, uint32 Offset,
uint32 StartPixel, uint32 Width,
- uint32 StartLine, uint32 LineCount, struct SGFX * gfx)
+ uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
register uint8 *bp;
#ifndef _TILE_H_
#define _TILE_H_
-#define TILE_PREAMBLE \
- uint8 *pCache; \
-\
- uint32 TileAddr = BG.TileAddress + ((Tile & 0x3ff) << BG.TileShift); \
- if ((Tile & 0x1ff) >= 256) \
- TileAddr += BG.NameSelect; \
-\
- TileAddr &= 0xffff; \
-\
- uint32 TileNumber; \
- pCache = &BG.Buffer[(TileNumber = (TileAddr >> BG.TileShift)) << 6]; \
-\
- if (!BG.Buffered [TileNumber]) \
- BG.Buffered[TileNumber] = ConvertTile (pCache, TileAddr); \
-\
- if (BG.Buffered [TileNumber] == BLANK_TILE) \
- return; \
-\
- register uint32 l; \
- if (BG.DirectColourMode) \
- { \
- if (IPPU.DirectColourMapsNeedRebuild) \
- S9xBuildDirectColourMaps (); \
- gfx->ScreenColors = DirectColourMaps [(Tile >> 10) & BG.PaletteMask]; \
- } \
- else \
- gfx->ScreenColors = &IPPU.ScreenColors [(((Tile >> 10) & BG.PaletteMask) << BG.PaletteShift) + BG.StartPalette];
+void DrawTile (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+void DrawClippedTile (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+void DrawTilex2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+void DrawClippedTilex2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+void DrawTilex2x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+void DrawClippedTilex2x2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+void DrawLargePixel (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Pixels,
+ uint32 StartLine, uint32 LineCount);
-#define RENDER_TILE(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) \
- NORMAL (Offset, bp, gfx); \
- if (*(uint32 *) (bp + 4)) \
- NORMAL (Offset + N, bp + 4, gfx); \
- } \
- } \
- else \
- if (!(Tile & V_FLIP)) \
- { \
- bp = pCache + StartLine; \
- for (l = LineCount; l != 0; l--, bp += 8, Offset += gfx->PPL) \
- { \
- if (*(uint32 *) (bp + 4)) \
- FLIPPED (Offset, bp + 4, gfx); \
- if (*(uint32 *) bp) \
- FLIPPED (Offset + N, bp, gfx); \
- } \
- } \
- else \
- if (Tile & H_FLIP) \
- { \
- bp = pCache + 56 - StartLine; \
- for (l = LineCount; l != 0; l--, bp -= 8, Offset += gfx->PPL) \
- { \
- if (*(uint32 *) (bp + 4)) \
- FLIPPED (Offset, bp + 4, gfx); \
- if (*(uint32 *) bp) \
- FLIPPED (Offset + N, bp, gfx); \
- } \
- } \
- else \
- { \
- bp = pCache + 56 - StartLine; \
- for (l = LineCount; l != 0; l--, bp -= 8, Offset += gfx->PPL) \
- { \
- if (*(uint32 *) bp) \
- NORMAL (Offset, bp, gfx); \
- if (*(uint32 *) (bp + 4)) \
- NORMAL (Offset + N, bp + 4, gfx); \
- } \
- }
+void DrawTile16 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+void DrawClippedTile16 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+void DrawTile16x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+void DrawClippedTile16x2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+void DrawTile16x2x2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+void DrawClippedTile16x2x2 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
+void DrawLargePixel16 (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Pixels,
+ uint32 StartLine, uint32 LineCount);
-#define TILE_CLIP_PREAMBLE \
- uint32 dd; \
- uint32 d1; \
- uint32 d2; \
-\
- if (StartPixel < 4) \
- { \
- d1 = HeadMask [StartPixel]; \
- if (StartPixel + Width < 4) \
- d1 &= TailMask [StartPixel + Width]; \
- } \
- else \
- d1 = 0; \
-\
- if (StartPixel + Width > 4) \
- { \
- if (StartPixel > 4) \
- d2 = HeadMask [StartPixel - 4]; \
- else \
- d2 = 0xffffffff; \
-\
- d2 &= TailMask [(StartPixel + Width - 4)]; \
- } \
- else \
- d2 = 0;
+void DrawTile16Add (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
+void DrawClippedTile16Add (uint32 Tile, uint32 Offset,
+ uint32 StartPixel, uint32 Width,
+ uint32 StartLine, uint32 LineCount);
-#define RENDER_CLIPPED_TILE(NORMAL, FLIPPED, N) \
- 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)) \
- NORMAL (Offset, (uint8 *) &dd, gfx); \
- if ((dd = (*(uint32 *) (bp + 4)) & d2)) \
- NORMAL (Offset + N, (uint8 *) &dd, gfx); \
- } \
- } \
- 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)) \
- FLIPPED (Offset, (uint8 *) &dd, gfx); \
- if ((dd = *(uint32 *) bp & d2)) \
- FLIPPED (Offset + N, (uint8 *) &dd, gfx); \
- } \
- } \
- 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)) \
- FLIPPED (Offset, (uint8 *) &dd, gfx); \
- if ((dd = *(uint32 *) bp & d2)) \
- FLIPPED (Offset + N, (uint8 *) &dd, gfx); \
- } \
- } \
- else \
- { \
- bp = pCache + 56 - StartLine; \
- for (l = LineCount; l != 0; l--, bp -= 8, Offset += gfx->PPL) \
- { \
- if ((dd = (*(uint32 *) bp) & d1)) \
- NORMAL (Offset, (uint8 *) &dd, gfx); \
- if ((dd = (*(uint32 *) (bp + 4)) & d2)) \
- NORMAL (Offset + N, (uint8 *) &dd, gfx); \
- } \
- }
+void DrawTile16Add1_2 (uint32 Tile, uint32 Offset, uint32 StartLine,
+ uint32 LineCount);
-#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);
#endif