foxygit / doom Log in
commit c184e89ab34af9ddc16d03765791e23e74bd823f
Author:     mfrancis95 <mikefrancis95@gmail.com>
AuthorDate: Mon Jan 3 03:15:49 2022 -0500
Commit:     mfrancis95 <mikefrancis95@gmail.com>
CommitDate: Mon Jan 3 03:18:52 2022 -0500

    Remove unused frac, fracstep and totalwidth variables
---
 src/doom/r_data.c    |  5 -----
 src/doom/r_draw.c    | 16 ----------------
 src/heretic/r_data.c |  5 -----
 src/hexen/r_data.c   |  5 -----
 src/strife/r_data.c  |  5 -----
 5 files changed, 36 deletions(-)

diff --git a/src/doom/r_data.c b/src/doom/r_data.c
index ea380fb9..7f1bbbe0 100644
--- a/src/doom/r_data.c
+++ b/src/doom/r_data.c
@@ -465,7 +465,6 @@ void R_InitTextures (void)

     int*		patchlookup;

-    int			totalwidth;
     int			nummappatches;
     int			offset;
     int			maxoff;
@@ -524,8 +523,6 @@ void R_InitTextures (void)
     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 @@ void R_InitTextures (void)

 	texturewidthmask[i] = j-1;
 	textureheight[i] = texture->height<<FRACBITS;
-
-	totalwidth += texture->width;
     }

     Z_Free(patchlookup);
diff --git a/src/doom/r_draw.c b/src/doom/r_draw.c
index 43c4b4b8..4fc41b5d 100644
--- a/src/doom/r_draw.c
+++ b/src/doom/r_draw.c
@@ -284,8 +284,6 @@ void R_DrawFuzzColumn (void)
 {
     int			count;
     pixel_t*		dest;
-    fixed_t		frac;
-    fixed_t		fracstep;

     // Adjust borders. Low...
     if (!dc_yl)
@@ -312,10 +310,6 @@ void R_DrawFuzzColumn (void)

     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 @@ void R_DrawFuzzColumn (void)
 	    fuzzpos = 0;

 	dest += SCREENWIDTH;
-
-	frac += fracstep;
     } while (count--);
 }

@@ -344,8 +336,6 @@ void R_DrawFuzzColumnLow (void)
     int			count;
     pixel_t*		dest;
     pixel_t*		dest2;
-    fixed_t		frac;
-    fixed_t		fracstep;
     int x;

     // Adjust borders. Low...
@@ -378,10 +368,6 @@ void R_DrawFuzzColumnLow (void)
     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 @@ void R_DrawFuzzColumnLow (void)

 	dest += SCREENWIDTH;
 	dest2 += SCREENWIDTH;
-
-	frac += fracstep;
     } while (count--);
 }

diff --git a/src/heretic/r_data.c b/src/heretic/r_data.c
index 8970ad4b..a790935d 100644
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -301,7 +301,6 @@ void R_InitTextures(void)
     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 @@ void R_InitTextures(void)
     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 @@ void R_InitTextures(void)
             j <<= 1;
         texturewidthmask[i] = j - 1;
         textureheight[i] = texture->height << FRACBITS;
-
-        totalwidth += texture->width;
     }

     Z_Free(patchlookup);
diff --git a/src/hexen/r_data.c b/src/hexen/r_data.c
index 5f0df8ab..1c4ef7c3 100644
--- a/src/hexen/r_data.c
+++ b/src/hexen/r_data.c
@@ -295,7 +295,6 @@ void R_InitTextures(void)
     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 @@ void R_InitTextures(void)
     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 @@ void R_InitTextures(void)
             j <<= 1;
         texturewidthmask[i] = j - 1;
         textureheight[i] = texture->height << FRACBITS;
-
-        totalwidth += texture->width;
     }

     Z_Free(patchlookup);
diff --git a/src/strife/r_data.c b/src/strife/r_data.c
index 0fbb8ee1..e7d70e07 100644
--- a/src/strife/r_data.c
+++ b/src/strife/r_data.c
@@ -461,7 +461,6 @@ void R_InitTextures (void)

     int*		patchlookup;

-    int			totalwidth;
     int			nummappatches;
     int			offset;
     int			maxoff;
@@ -519,8 +518,6 @@ void R_InitTextures (void)
     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 @@ void R_InitTextures (void)

         texturewidthmask[i] = j-1;
         textureheight[i] = texture->height<<FRACBITS;
-
-        totalwidth += texture->width;
     }

     Z_Free(patchlookup);