shithub: qk1

Download patch

ref: 3e0fc93f076eb04054d1145808d22fa0423fcc02
parent: f97587132047afc1403bf225cebfe24ad3f97591
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon Jan 1 00:15:59 EST 2024

D_DrawZSpans: remove stuff that doesn't seem to do anything

--- a/d_scan.c
+++ b/d_scan.c
@@ -280,12 +280,10 @@
 void
 D_DrawZSpans(espan_t *pspan)
 {
-	int			count, spancount, izi, izistep;
+	int			count, izi, izistep;
 	uzint		*pz;
 	float		zi;
-	float		zistepu;
 
-	zistepu = dvars.zistepu * 16;
 	izistep = dvars.zistepu * 0x8000 * 0x10000;
 
 	do{
@@ -292,17 +290,10 @@
 		pz = dvars.zbuffer + pspan->v*dvars.width + pspan->u;
 		zi = dvars.ziorigin + pspan->v*dvars.zistepv + pspan->u*dvars.zistepu;
 		count = pspan->count;
-
+		izi = (int)(zi * 0x8000 * 0x10000);
 		do{
-			spancount = min(count, 16);
-			count -= spancount;
-
-			izi = (int)(zi * 0x8000 * 0x10000);
-			while(spancount-- > 0){
-				*pz++ = izi;
-				izi += izistep;
-			}
-			zi += zistepu;
-		}while(count > 0);
+			*pz++ = izi;
+			izi += izistep;
+		}while(--count > 0);
 	}while((pspan = pspan->pnext) != nil);
 }