From b43e638d789e2fec8654c4583260117abc4d5c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sat, 22 Jun 2019 21:01:50 +0200 Subject: [PATCH] Fix teleport rendering --- programs/level.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/programs/level.c b/programs/level.c index 1214e64..925ae48 100644 --- a/programs/level.c +++ b/programs/level.c @@ -8,13 +8,11 @@ #include #include -//#define S3L_PRESET_HIGHEST_QUALITY - #define S3L_FLAT 0 #define S3L_STRICT_NEAR_CULLING 0 #define S3L_PERSPECTIVE_CORRECTION 2 #define S3L_SORT 0 -#define S3L_Z_BUFFER 2 +#define S3L_Z_BUFFER 1 #define S3L_PIXEL_FUNCTION drawPixel @@ -183,8 +181,8 @@ void draw() project3DPointToScreen(teleportPoint,scene.camera,&screenPoint); if (screenPoint.w > 0 && - screenPoint.x >= 0 && screenPoint.x <= S3L_RESOLUTION_X && - screenPoint.y >= 0 && screenPoint.y <= S3L_RESOLUTION_Y && + screenPoint.x >= 0 && screenPoint.x < S3L_RESOLUTION_X && + screenPoint.y >= 0 && screenPoint.y < S3L_RESOLUTION_Y && screenPoint.z < S3L_zBufferRead(screenPoint.x,screenPoint.y)) drawTeleport(screenPoint.x,screenPoint.y,screenPoint.w);