shithub: choc

Download patch

ref: c184e89ab34af9ddc16d03765791e23e74bd823f
parent: 9dc7a7f5d543317b2fd7c63a4ca1c3d14eebf205
author: mfrancis95 <mikefrancis95@gmail.com>
date: Sun Jan 2 22:15:49 EST 2022

Remove unused frac, fracstep and totalwidth variables

--- a/src/doom/r_data.c
+++ b/src/doom/r_data.c
@@ -465,7 +465,6 @@
     
     int*		patchlookup;
     
-    int			totalwidth;
     int			nummappatches;
     int			offset;
     int			maxoff;
@@ -524,8 +523,6 @@
     texturewidthmask = Z_Malloc (numtextures * sizeof(*texturewidthmask), PU_STATIC, 0);
     textureheight = Z_Malloc (numtextures * sizeof(*textureheight), PU_STATIC, 0);
 
-    totalwidth = 0;
-    
     //	Really complex printing shit...
     temp1 = W_GetNumForName (DEH_String("S_START"));  // P_???????
     temp2 = W_GetNumForName (DEH_String("S_END")) - 1;
@@ -598,8 +595,6 @@
 
 	texturewidthmask[i] = j-1;
 	textureheight[i] = texture->height<<FRACBITS;
-		
-	totalwidth += texture->width;
     }
 
     Z_Free(patchlookup);
--- a/src/doom/r_draw.c
+++ b/src/doom/r_draw.c
@@ -284,8 +284,6 @@
 { 
     int			count; 
     pixel_t*		dest;
-    fixed_t		frac;
-    fixed_t		fracstep;	 
 
     // Adjust borders. Low... 
     if (!dc_yl) 
@@ -312,10 +310,6 @@
     
     dest = ylookup[dc_yl] + columnofs[dc_x];
 
-    // Looks familiar.
-    fracstep = dc_iscale; 
-    frac = dc_texturemid + (dc_yl-centery)*fracstep; 
-
     // Looks like an attempt at dithering,
     //  using the colormap #6 (of 0-31, a bit
     //  brighter than average).
@@ -332,8 +326,6 @@
 	    fuzzpos = 0;
 	
 	dest += SCREENWIDTH;
-
-	frac += fracstep; 
     } while (count--); 
 } 
 
@@ -344,8 +336,6 @@
     int			count; 
     pixel_t*		dest;
     pixel_t*		dest2;
-    fixed_t		frac;
-    fixed_t		fracstep;	 
     int x;
 
     // Adjust borders. Low... 
@@ -378,10 +368,6 @@
     dest = ylookup[dc_yl] + columnofs[x];
     dest2 = ylookup[dc_yl] + columnofs[x+1];
 
-    // Looks familiar.
-    fracstep = dc_iscale; 
-    frac = dc_texturemid + (dc_yl-centery)*fracstep; 
-
     // Looks like an attempt at dithering,
     //  using the colormap #6 (of 0-31, a bit
     //  brighter than average).
@@ -400,8 +386,6 @@
 	
 	dest += SCREENWIDTH;
 	dest2 += SCREENWIDTH;
-
-	frac += fracstep; 
     } while (count--); 
 } 
  
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -301,7 +301,6 @@
     int *maptex, *maptex2, *maptex1;
     char name[9], *names, *name_p;
     int *patchlookup;
-    int totalwidth;
     int nummappatches;
     int offset, maxoff, maxoff2;
     int numtextures1, numtextures2;
@@ -368,8 +367,6 @@
     texturewidthmask = Z_Malloc(numtextures * sizeof(int), PU_STATIC, 0);
     textureheight = Z_Malloc(numtextures * sizeof(fixed_t), PU_STATIC, 0);
 
-    totalwidth = 0;
-
     for (i = 0; i < numtextures; i++, directory++)
     {
 #ifdef __NEXT__
@@ -418,8 +415,6 @@
             j <<= 1;
         texturewidthmask[i] = j - 1;
         textureheight[i] = texture->height << FRACBITS;
-
-        totalwidth += texture->width;
     }
 
     Z_Free(patchlookup);
--- a/src/hexen/r_data.c
+++ b/src/hexen/r_data.c
@@ -295,7 +295,6 @@
     int *maptex, *maptex2, *maptex1;
     char name[9], *names, *name_p;
     int *patchlookup;
-    int totalwidth;
     int nummappatches;
     int offset, maxoff, maxoff2;
     int numtextures1, numtextures2;
@@ -345,8 +344,6 @@
     texturewidthmask = Z_Malloc(numtextures * sizeof(int), PU_STATIC, 0);
     textureheight = Z_Malloc(numtextures * sizeof(fixed_t), PU_STATIC, 0);
 
-    totalwidth = 0;
-
     for (i = 0; i < numtextures; i++, directory++)
     {
         if (i == numtextures1)
@@ -387,8 +384,6 @@
             j <<= 1;
         texturewidthmask[i] = j - 1;
         textureheight[i] = texture->height << FRACBITS;
-
-        totalwidth += texture->width;
     }
 
     Z_Free(patchlookup);
--- a/src/strife/r_data.c
+++ b/src/strife/r_data.c
@@ -461,7 +461,6 @@
     
     int*		patchlookup;
     
-    int			totalwidth;
     int			nummappatches;
     int			offset;
     int			maxoff;
@@ -519,8 +518,6 @@
     texturewidthmask = Z_Malloc (numtextures * sizeof(*texturewidthmask), PU_STATIC, 0);
     textureheight = Z_Malloc (numtextures * sizeof(*textureheight), PU_STATIC, 0);
 
-    totalwidth = 0;
-    
     //	Really complex printing shit...
     temp1 = W_GetNumForName (DEH_String("S_START"));  // P_???????
     temp2 = W_GetNumForName (DEH_String("S_END")) - 1;
@@ -600,8 +597,6 @@
 
         texturewidthmask[i] = j-1;
         textureheight[i] = texture->height<<FRACBITS;
-
-        totalwidth += texture->width;
     }
 
     Z_Free(patchlookup);