diff options
-rw-r--r-- | source/gfx.h | 2 | ||||
-rw-r--r-- | source/tile.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/gfx.h b/source/gfx.h index 37a082e..590db7c 100644 --- a/source/gfx.h +++ b/source/gfx.h @@ -137,7 +137,9 @@ struct SGFX{ uint32 PPL; // Number of pixels on each of Screen buffer uint32 PPLx2; uint32 PixSize; + uint8 S_safety_margin[8]; uint8 *S; + uint8 DB_safety_margin[8]; uint8 *DB; uint32 DepthDelta; uint8 Z1; // Depth for comparison diff --git a/source/tile.cpp b/source/tile.cpp index 87d1fac..f8c1400 100644 --- a/source/tile.cpp +++ b/source/tile.cpp @@ -456,11 +456,11 @@ void DrawLargePixelHalfWidth (uint32 Tile, uint32 Offset, } #endif -static void WRITE_4PIXELS16 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; - uint16 *Screen = (uint16 *) GFX.S + Offset; - uint8 *Depth = GFX.DB + Offset; + uint16 *Screen = (uint16 *) GFX.S + Offset; + uint8 *Depth = GFX.DB + Offset; for (uint8 N = 0; N < 4; N++) { @@ -472,7 +472,7 @@ static void WRITE_4PIXELS16 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) } } -static void WRITE_4PIXELS16_FLIPPED (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; |