Commits

ecsv  committed db18ca8

Remove unused variables

  • Participants
  • Parent commits 9d71cc2

Comments (0)

Files changed (3)

File src/TexMod.h

 
 static void mod_tex_add_col (WORD *dst, int size, DWORD color)
 {
-    DWORD cr, cg, cb, ca;
+    DWORD cr, cg, cb;
     WORD col;
     BYTE a, r, g, b;
 
     cr = (color >> 12) & 0xF;
     cg = (color >> 8) & 0xF;
     cb = (color >> 4) & 0xF;
-    ca = color & 0xF;
 
     for (int i=0; i<size; i++)
     {
     WORD col;
     BYTE r, g, b;
     WORD a;
-    float percent, percent_i;
 
     cr = (float)((color >> 12) & 0xF)/16.0f;
     cg = (float)((color >> 8) & 0xF)/16.0f;
     {
         col = *dst;
         a = col & 0xF000;
-        percent = (a >> 12) / 15.0f;
-        percent_i = 1.0f - percent;
         r = (BYTE)(cr * ((col & 0x0F00) >> 8));
         g = (BYTE)(cg * ((col & 0x00F0) >> 4));
         b = (BYTE)(cb * (col & 0x000F));
         DWORD c;
         DWORD stride = info.strideInBytes>>1;
 
-        BOOL read_alpha = settings.fb_read_alpha;
-        if (settings.PM && rdp.frame_buffers[rdp.ci_count-1].status != ci_aux)
-          read_alpha = FALSE;
         for (int y=0; y<height; y++)
           {
         for (int x=0; x<width; x++)
           {
             c = ptr_src[int(x*scale_x) + int(y * scale_y) * stride];
-//          c = (c&0xFFC0) | ((c&0x001F) << 1) | 1;
-//          if (read_alpha && c == 1)
-//            c = 0;
             ptr_dst32[x + y * width] = c;
           }
           }
       {
         if (rdp.swap_ci_index < 0)
         {
-          rdp.texbufs[0].clear_allowed = rdp.texbufs[0].clear_allowed = TRUE;
+          rdp.texbufs[0].clear_allowed = TRUE;
+	  rdp.texbufs[0].clear_allowed = TRUE;
           OpenTextureBuffer(rdp.frame_buffers[rdp.main_ci_index]);
         }
       }

File src/ucode02.h

         int index_x = (rdp.cmd0 & 0x1F) >> 1;
         int index_y = index_x >> 2;
         index_x &= 3;
-        
-        float fpart = (float)fabs(rdp.combined[index_y][index_x] - (int)rdp.combined[index_y][index_x]);
+
         rdp.combined[index_y][index_x] = (short)(rdp.cmd1>>16);
-        
-        fpart = (float)fabs(rdp.combined[index_y][index_x+1] - (int)rdp.combined[index_y][index_x+1]);
         rdp.combined[index_y][index_x+1] = (short)(rdp.cmd1&0xFFFF);
       }