Added czech translation by fri
[drnoksnes] / tile.cpp
index f516d44..d2198a9 100644 (file)
--- a/tile.cpp
+++ b/tile.cpp
 #include "gfx.h"
 #include "tile.h"
 
-#ifdef USE_GLIDE
-#include "3d.h"
-#endif
-
 #define TILE_PREAMBLE \
     uint8 *pCache; \
 \
@@ -609,10 +605,10 @@ INLINE void WRITE_4PIXELSx2x2 (uint32 Offset, uint8 *Pixels)
 #define FN(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.Pitch + N * 2] =  \
+           Screen [GFX.Pitch + N * 2 + 1] = (uint8) GFX.ScreenColors [Pixel]; \
+       Depth [N * 2] = Depth [N * 2 + 1] = Depth [GFX.Pitch + N * 2] = \
+           Depth [GFX.Pitch + N * 2 + 1] = GFX.Z2; \
     }
 
     FN(0)
@@ -631,10 +627,10 @@ INLINE void WRITE_4PIXELS_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels)
 #define FN(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.Pitch + N * 2] =  \
+           Screen [GFX.Pitch + N * 2 + 1] = (uint8) GFX.ScreenColors [Pixel]; \
+       Depth [N * 2] = Depth [N * 2 + 1] = Depth [GFX.Pitch + N * 2] = \
+           Depth [GFX.Pitch + N * 2 + 1] = GFX.Z2; \
     }
 
     FN(0)
@@ -808,10 +804,10 @@ INLINE void WRITE_4PIXELS16x2x2 (uint32 Offset, uint8 *Pixels)
 #define FN(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.Pitch >> 1) + N * 2] = \
+           Screen [(GFX.Pitch >> 1) + N * 2 + 1] = GFX.ScreenColors [Pixel]; \
+       Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.Pitch >> 1) + N * 2] = \
+           Depth [(GFX.Pitch >> 1) + N * 2 + 1] = GFX.Z2; \
     }
 
     FN(0)
@@ -830,10 +826,10 @@ INLINE void WRITE_4PIXELS16_FLIPPEDx2x2 (uint32 Offset, uint8 *Pixels)
 #define FN(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.Pitch >> 1) + N * 2] = \
+           Screen [(GFX.Pitch >> 1) + N * 2 + 1] = GFX.ScreenColors [Pixel]; \
+       Depth [N * 2] = Depth [N * 2 + 1] = Depth [(GFX.Pitch >> 1) + N * 2] = \
+           Depth [(GFX.Pitch >> 1) + N * 2 + 1] = GFX.Z2; \
     }
 
     FN(0)
@@ -1494,3 +1490,4 @@ void DrawHiResClippedTile16 (uint32 Tile, uint32 Offset,
     TILE_CLIP_PREAMBLE
     RENDER_CLIPPED_TILEHI(WRITE_4PIXELSHI16, WRITE_4PIXELSHI16_FLIPPED, 4)
 }
+