#include "gfx.h"
#include "tile.h"
-#ifdef USE_GLIDE
-#include "3d.h"
-#endif
-
#define TILE_PREAMBLE \
uint8 *pCache; \
\
#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)
#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)
#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)
#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)
TILE_CLIP_PREAMBLE
RENDER_CLIPPED_TILEHI(WRITE_4PIXELSHI16, WRITE_4PIXELSHI16_FLIPPED, 4)
}
+