diff options
author | aliaspider | 2014-10-28 05:53:44 +0100 |
---|---|---|
committer | aliaspider | 2014-10-28 05:53:44 +0100 |
commit | 2b75359c7ea0485b509460ea81606ac8052a6333 (patch) | |
tree | 6f76359583ea548766e0c00e5f8066474d0f6a0b | |
parent | 9d034e0ae0f04082cb562a78c94a2a4edb12a6a5 (diff) | |
download | snes9x2005-2b75359c7ea0485b509460ea81606ac8052a6333.tar.gz snes9x2005-2b75359c7ea0485b509460ea81606ac8052a6333.tar.bz2 snes9x2005-2b75359c7ea0485b509460ea81606ac8052a6333.zip |
ugly 64-bit targets fix (cont.)
-rw-r--r-- | source/gfx.cpp | 75 | ||||
-rw-r--r-- | source/gfx.h | 6 | ||||
-rw-r--r-- | source/tile.cpp | 126 |
3 files changed, 103 insertions, 104 deletions
diff --git a/source/gfx.cpp b/source/gfx.cpp index 438e094..e9e2e7f 100644 --- a/source/gfx.cpp +++ b/source/gfx.cpp @@ -170,116 +170,116 @@ extern uint8 Mode7Depths [2]; #define BLACK BUILD_PIXEL(0,0,0) #ifndef FOREVER_16_BIT -void DrawTile (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile (uint32 Tile, uint32 Offset, +void DrawClippedTile (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTileHalfWidth (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTileHalfWidth (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTileHalfWidth (uint32 Tile, uint32 Offset, +void DrawClippedTileHalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTilex2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTilex2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTilex2 (uint32 Tile, uint32 Offset, +void DrawClippedTilex2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTilex2x2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTilex2x2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTilex2x2 (uint32 Tile, uint32 Offset, +void DrawClippedTilex2x2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawLargePixel (uint32 Tile, uint32 Offset, +void DrawLargePixel (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); -void DrawLargePixelHalfWidth (uint32 Tile, uint32 Offset, +void DrawLargePixelHalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); #endif -void DrawTile16 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16 (uint32 Tile, uint32 Offset, +void DrawClippedTile16 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16HalfWidth (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16HalfWidth (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16HalfWidth (uint32 Tile, uint32 Offset, +void DrawClippedTile16HalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16x2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16x2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16x2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16x2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16x2x2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16x2x2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16x2x2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16x2x2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawLargePixel16 (uint32 Tile, uint32 Offset, +void DrawLargePixel16 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); -void DrawLargePixel16HalfWidth (uint32 Tile, uint32 Offset, +void DrawLargePixel16HalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); -void DrawTile16Add (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Add (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16Add (uint32 Tile, uint32 Offset, +void DrawClippedTile16Add (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16Add1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Add1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16Add1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16Add1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16FixedAdd1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16FixedAdd1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16Sub (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Sub (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16Sub (uint32 Tile, uint32 Offset, +void DrawClippedTile16Sub (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16Sub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Sub1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16Sub1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16Sub1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawTile16FixedSub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16FixedSub1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -void DrawClippedTile16FixedSub1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16FixedSub1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -void DrawLargePixel16Add (uint32 Tile, uint32 Offset, +void DrawLargePixel16Add (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); -void DrawLargePixel16Add1_2 (uint32 Tile, uint32 Offset, +void DrawLargePixel16Add1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); -void DrawLargePixel16Sub (uint32 Tile, uint32 Offset, +void DrawLargePixel16Sub (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); -void DrawLargePixel16Sub1_2 (uint32 Tile, uint32 Offset, +void DrawLargePixel16Sub1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); @@ -2516,8 +2516,7 @@ static void DrawBackground (uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) uint32 Offset = (HPos & 7); Count = 8 - Offset; if (Count > Width) - Count = Width; -// if (s >= Offset * GFX.PixSize) + Count = Width; s -= Offset * GFX.PixSize; Tile = READ_2BYTES(t); GFX.Z1 = GFX.Z2 = depths [(Tile & 0x2000) >> 13]; diff --git a/source/gfx.h b/source/gfx.h index 590db7c..24364f8 100644 --- a/source/gfx.h +++ b/source/gfx.h @@ -312,12 +312,12 @@ inline uint16 COLOR_SUB(uint16 C1, uint16 C2) GFX.ZERO [(((C1) | RGB_HI_BITS_MASKx2) - \ ((C2) & RGB_REMOVE_LOW_BITS_MASK)) >> 1] -typedef void (*NormalTileRenderer) (uint32 Tile, uint32 Offset, +typedef void (*NormalTileRenderer) (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -typedef void (*ClippedTileRenderer) (uint32 Tile, uint32 Offset, +typedef void (*ClippedTileRenderer) (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount); -typedef void (*LargePixelRenderer) (uint32 Tile, uint32 Offset, +typedef void (*LargePixelRenderer) (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount); diff --git a/source/tile.cpp b/source/tile.cpp index f8c1400..332580a 100644 --- a/source/tile.cpp +++ b/source/tile.cpp @@ -218,7 +218,7 @@ static uint8 ConvertTile (uint8 *pCache, uint32 TileAddr) #define PLOT_PIXEL(screen, pixel) (pixel) #ifndef FOREVER_16_BIT -static void WRITE_4PIXELS (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -234,7 +234,7 @@ static void WRITE_4PIXELS (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) } } -static void WRITE_4PIXELS_FLIPPED (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS_FLIPPED (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -249,7 +249,7 @@ static void WRITE_4PIXELS_FLIPPED (uint32 Offset, uint8 *Pixels, uint16 *ScreenC } } } -static void WRITE_4PIXELS_HALFWIDTH (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS_HALFWIDTH (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -265,7 +265,7 @@ static void WRITE_4PIXELS_HALFWIDTH (uint32 Offset, uint8 *Pixels, uint16 *Scree } } -static void WRITE_4PIXELS_FLIPPED_HALFWIDTH (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS_FLIPPED_HALFWIDTH (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -281,7 +281,7 @@ static void WRITE_4PIXELS_FLIPPED_HALFWIDTH (uint32 Offset, uint8 *Pixels, uint1 } } -static void WRITE_4PIXELSx2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELSx2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -297,7 +297,7 @@ static void WRITE_4PIXELSx2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) } } -static void WRITE_4PIXELS_FLIPPEDx2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS_FLIPPEDx2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -313,7 +313,7 @@ static void WRITE_4PIXELS_FLIPPEDx2 (uint32 Offset, uint8 *Pixels, uint16 *Scree } } -static void WRITE_4PIXELSx2x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELSx2x2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -329,7 +329,7 @@ static void WRITE_4PIXELSx2x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColor } } -static void WRITE_4PIXELS_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS_FLIPPEDx2x2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint8 *Screen = GFX.S + Offset; @@ -345,7 +345,7 @@ static void WRITE_4PIXELS_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels, uint16 *Scr } } -void DrawTile (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -355,7 +355,7 @@ void DrawTile (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS, WRITE_4PIXELS_FLIPPED, 4) } -void DrawClippedTile (uint32 Tile, uint32 Offset, +void DrawClippedTile (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -366,7 +366,7 @@ void DrawClippedTile (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS, WRITE_4PIXELS_FLIPPED, 4) } -void DrawTileHalfWidth (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTileHalfWidth (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -376,7 +376,7 @@ void DrawTileHalfWidth (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS_HALFWIDTH, WRITE_4PIXELS_FLIPPED_HALFWIDTH, 2) } -void DrawClippedTileHalfWidth (uint32 Tile, uint32 Offset, +void DrawClippedTileHalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -387,7 +387,7 @@ void DrawClippedTileHalfWidth (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS_HALFWIDTH, WRITE_4PIXELS_FLIPPED_HALFWIDTH, 2) } -void DrawTilex2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTilex2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -397,7 +397,7 @@ void DrawTilex2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELSx2, WRITE_4PIXELS_FLIPPEDx2, 8) } -void DrawClippedTilex2 (uint32 Tile, uint32 Offset, +void DrawClippedTilex2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -408,7 +408,7 @@ void DrawClippedTilex2 (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELSx2, WRITE_4PIXELS_FLIPPEDx2, 8) } -void DrawTilex2x2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTilex2x2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -418,7 +418,7 @@ void DrawTilex2x2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELSx2x2, WRITE_4PIXELS_FLIPPEDx2x2, 8) } -void DrawClippedTilex2x2 (uint32 Tile, uint32 Offset, +void DrawClippedTilex2x2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -429,7 +429,7 @@ void DrawClippedTilex2x2 (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELSx2x2, WRITE_4PIXELS_FLIPPEDx2x2, 8) } -void DrawLargePixel (uint32 Tile, uint32 Offset, +void DrawLargePixel (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { @@ -442,7 +442,7 @@ void DrawLargePixel (uint32 Tile, uint32 Offset, RENDER_TILE_LARGE (((uint8) ScreenColors [pixel]), PLOT_PIXEL) } -void DrawLargePixelHalfWidth (uint32 Tile, uint32 Offset, +void DrawLargePixelHalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { @@ -488,7 +488,7 @@ static void WRITE_4PIXELS16_FLIPPED (int32 Offset, uint8 *Pixels, uint16 *Screen } } -static void WRITE_4PIXELS16_HALFWIDTH (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_HALFWIDTH (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -504,7 +504,7 @@ static void WRITE_4PIXELS16_HALFWIDTH (uint32 Offset, uint8 *Pixels, uint16 *Scr } } -static void WRITE_4PIXELS16_FLIPPED_HALFWIDTH (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED_HALFWIDTH (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -520,7 +520,7 @@ static void WRITE_4PIXELS16_FLIPPED_HALFWIDTH (uint32 Offset, uint8 *Pixels, uin } } -static void WRITE_4PIXELS16x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16x2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -536,7 +536,7 @@ static void WRITE_4PIXELS16x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColor } } -static void WRITE_4PIXELS16_FLIPPEDx2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPEDx2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -552,7 +552,7 @@ static void WRITE_4PIXELS16_FLIPPEDx2 (uint32 Offset, uint8 *Pixels, uint16 *Scr } } -static void WRITE_4PIXELS16x2x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16x2x2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -568,7 +568,7 @@ static void WRITE_4PIXELS16x2x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenCol } } -static void WRITE_4PIXELS16_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPEDx2x2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -584,7 +584,7 @@ static void WRITE_4PIXELS16_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels, uint16 *S } } -void DrawTile16 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -593,7 +593,7 @@ void DrawTile16 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4) } -void DrawClippedTile16 (uint32 Tile, uint32 Offset, +void DrawClippedTile16 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -604,7 +604,7 @@ void DrawClippedTile16 (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4) } -void DrawTile16HalfWidth (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16HalfWidth (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -613,7 +613,7 @@ void DrawTile16HalfWidth (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16_HALFWIDTH, WRITE_4PIXELS16_FLIPPED_HALFWIDTH, 2) } -void DrawClippedTile16HalfWidth (uint32 Tile, uint32 Offset, +void DrawClippedTile16HalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -624,7 +624,7 @@ void DrawClippedTile16HalfWidth (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16_HALFWIDTH, WRITE_4PIXELS16_FLIPPED_HALFWIDTH, 2) } -void DrawTile16x2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16x2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -633,7 +633,7 @@ void DrawTile16x2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8) } -void DrawClippedTile16x2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16x2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -644,7 +644,7 @@ void DrawClippedTile16x2 (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8) } -void DrawTile16x2x2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16x2x2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -653,7 +653,7 @@ void DrawTile16x2x2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8) } -void DrawClippedTile16x2x2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16x2x2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -664,7 +664,7 @@ void DrawClippedTile16x2x2 (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8) } -void DrawLargePixel16 (uint32 Tile, uint32 Offset, +void DrawLargePixel16 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { @@ -677,7 +677,7 @@ void DrawLargePixel16 (uint32 Tile, uint32 Offset, RENDER_TILE_LARGE (ScreenColors [pixel], PLOT_PIXEL) } -void DrawLargePixel16HalfWidth (uint32 Tile, uint32 Offset, +void DrawLargePixel16HalfWidth (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { @@ -690,7 +690,7 @@ void DrawLargePixel16HalfWidth (uint32 Tile, uint32 Offset, RENDER_TILE_LARGE_HALFWIDTH (ScreenColors [pixel], PLOT_PIXEL) } -static void WRITE_4PIXELS16_ADD (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_ADD (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -700,7 +700,7 @@ static void WRITE_4PIXELS16_ADD (uint32 Offset, uint8 *Pixels, uint16 *ScreenCol for (uint8 N = 0; N < 4; N++) { if (GFX.Z1 > Depth [N] && (Pixel = Pixels[N])) - { + { switch (SubDepth [N]) { case 0: @@ -718,7 +718,7 @@ static void WRITE_4PIXELS16_ADD (uint32 Offset, uint8 *Pixels, uint16 *ScreenCol } } -static void WRITE_4PIXELS16_FLIPPED_ADD (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED_ADD (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -746,7 +746,7 @@ static void WRITE_4PIXELS16_FLIPPED_ADD (uint32 Offset, uint8 *Pixels, uint16 *S } } -static void WRITE_4PIXELS16_ADD1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_ADD1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -774,7 +774,7 @@ static void WRITE_4PIXELS16_ADD1_2 (uint32 Offset, uint8 *Pixels, uint16 *Screen } } -static void WRITE_4PIXELS16_FLIPPED_ADD1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED_ADD1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -802,7 +802,7 @@ static void WRITE_4PIXELS16_FLIPPED_ADD1_2 (uint32 Offset, uint8 *Pixels, uint16 } } -static void WRITE_4PIXELS16_SUB (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_SUB (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -830,7 +830,7 @@ static void WRITE_4PIXELS16_SUB (uint32 Offset, uint8 *Pixels, uint16 *ScreenCol } } -static void WRITE_4PIXELS16_FLIPPED_SUB (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED_SUB (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -858,7 +858,7 @@ static void WRITE_4PIXELS16_FLIPPED_SUB (uint32 Offset, uint8 *Pixels, uint16 *S } } -static void WRITE_4PIXELS16_SUB1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_SUB1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -886,7 +886,7 @@ static void WRITE_4PIXELS16_SUB1_2 (uint32 Offset, uint8 *Pixels, uint16 *Screen } } -static void WRITE_4PIXELS16_FLIPPED_SUB1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED_SUB1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -915,7 +915,7 @@ static void WRITE_4PIXELS16_FLIPPED_SUB1_2 (uint32 Offset, uint8 *Pixels, uint16 } -void DrawTile16Add (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Add (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -1032,7 +1032,7 @@ void DrawTile16Add (uint32 Tile, uint32 Offset, uint32 StartLine, } } -void DrawClippedTile16Add (uint32 Tile, uint32 Offset, +void DrawClippedTile16Add (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -1043,7 +1043,7 @@ void DrawClippedTile16Add (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD, WRITE_4PIXELS16_FLIPPED_ADD, 4) } -void DrawTile16Add1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Add1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -1052,7 +1052,7 @@ void DrawTile16Add1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4) } -void DrawClippedTile16Add1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16Add1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -1063,7 +1063,7 @@ void DrawClippedTile16Add1_2 (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4) } -void DrawTile16Sub (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Sub (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -1072,7 +1072,7 @@ void DrawTile16Sub (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4) } -void DrawClippedTile16Sub (uint32 Tile, uint32 Offset, +void DrawClippedTile16Sub (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -1083,7 +1083,7 @@ void DrawClippedTile16Sub (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4) } -void DrawTile16Sub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16Sub1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -1092,7 +1092,7 @@ void DrawTile16Sub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4) } -void DrawClippedTile16Sub1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16Sub1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -1103,7 +1103,7 @@ void DrawClippedTile16Sub1_2 (uint32 Tile, uint32 Offset, RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4) } -static void WRITE_4PIXELS16_ADDF1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_ADDF1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -1123,7 +1123,7 @@ static void WRITE_4PIXELS16_ADDF1_2 (uint32 Offset, uint8 *Pixels, uint16 *Scree } } -static void WRITE_4PIXELS16_FLIPPED_ADDF1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED_ADDF1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -1143,7 +1143,7 @@ static void WRITE_4PIXELS16_FLIPPED_ADDF1_2 (uint32 Offset, uint8 *Pixels, uint1 } } -static void WRITE_4PIXELS16_SUBF1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_SUBF1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -1163,7 +1163,7 @@ static void WRITE_4PIXELS16_SUBF1_2 (uint32 Offset, uint8 *Pixels, uint16 *Scree } } -static void WRITE_4PIXELS16_FLIPPED_SUBF1_2 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED_SUBF1_2 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; @@ -1183,7 +1183,7 @@ static void WRITE_4PIXELS16_FLIPPED_SUBF1_2 (uint32 Offset, uint8 *Pixels, uint1 } } -void DrawTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16FixedAdd1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -1192,7 +1192,7 @@ void DrawTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16_ADDF1_2, WRITE_4PIXELS16_FLIPPED_ADDF1_2, 4) } -void DrawClippedTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16FixedAdd1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -1204,7 +1204,7 @@ void DrawClippedTile16FixedAdd1_2 (uint32 Tile, uint32 Offset, WRITE_4PIXELS16_FLIPPED_ADDF1_2, 4) } -void DrawTile16FixedSub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, +void DrawTile16FixedSub1_2 (uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE @@ -1213,7 +1213,7 @@ void DrawTile16FixedSub1_2 (uint32 Tile, uint32 Offset, uint32 StartLine, RENDER_TILE(WRITE_4PIXELS16_SUBF1_2, WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4) } -void DrawClippedTile16FixedSub1_2 (uint32 Tile, uint32 Offset, +void DrawClippedTile16FixedSub1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Width, uint32 StartLine, uint32 LineCount) { @@ -1225,7 +1225,7 @@ void DrawClippedTile16FixedSub1_2 (uint32 Tile, uint32 Offset, WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4) } -void DrawLargePixel16Add (uint32 Tile, uint32 Offset, +void DrawLargePixel16Add (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { @@ -1244,7 +1244,7 @@ void DrawLargePixel16Add (uint32 Tile, uint32 Offset, RENDER_TILE_LARGE (ScreenColors [pixel], LARGE_ADD_PIXEL) } -void DrawLargePixel16Add1_2 (uint32 Tile, uint32 Offset, +void DrawLargePixel16Add1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { @@ -1263,7 +1263,7 @@ void DrawLargePixel16Add1_2 (uint32 Tile, uint32 Offset, RENDER_TILE_LARGE (ScreenColors [pixel], LARGE_ADD_PIXEL1_2) } -void DrawLargePixel16Sub (uint32 Tile, uint32 Offset, +void DrawLargePixel16Sub (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { @@ -1282,7 +1282,7 @@ void DrawLargePixel16Sub (uint32 Tile, uint32 Offset, RENDER_TILE_LARGE (ScreenColors [pixel], LARGE_SUB_PIXEL) } -void DrawLargePixel16Sub1_2 (uint32 Tile, uint32 Offset, +void DrawLargePixel16Sub1_2 (uint32 Tile, int32 Offset, uint32 StartPixel, uint32 Pixels, uint32 StartLine, uint32 LineCount) { |