changeset 68:d7e3f844fc2e

inventory fixed
author zipi
date Sun, 27 Jan 2013 09:58:10 +0000
parents 3b4f8bd48e3b
children f12a7fd4d114
files mm7_1.cpp
diffstat 1 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_1.cpp	Fri Jan 25 16:48:21 2013 +0600
+++ b/mm7_1.cpp	Sun Jan 27 09:58:10 2013 +0000
@@ -814,9 +814,9 @@
   int v24; // [sp+20h] [bp-18h]@5
   ItemGen *pItem2; // [sp+24h] [bp-14h]@5
   int v26; // [sp+28h] [bp-10h]@3
-  signed int v27; // [sp+2Ch] [bp-Ch]@3
-  int a2a; // [sp+30h] [bp-8h]@5
-  int a3; // [sp+34h] [bp-4h]@5
+  unsigned int uCellID; // [sp+2Ch] [bp-Ch]@3
+  unsigned int uCellX; // [sp+30h] [bp-8h]@5
+  unsigned int uCellY; // [sp+34h] [bp-4h]@5
 
   v23 = pRenderer->pActiveZBuffer;
   pPlayer = pPlayers[uPlayerID];
@@ -828,16 +828,16 @@
     v4 = pIcons_LOD->LoadTexture("fr_strip", TEXTURE_16BIT_PALETTE);
     pRenderer->DrawTextureIndexed(8u, 0x131u, (Texture *)(v4 != -1 ? (int)&pIcons_LOD->pTextures[v4] : 0));
   }
-  v27 = 0;
+  uCellID = 0;
   v26 = (int)pPlayer->pInventoryIndices;
   do
   {
     if ( *(int *)v26 > 0 )
     {
       v24 = *(int *)v26 - 1;
-      a3 = 32 * v27 / 14 + 17;
+      uCellY = 32 * (uCellID / 14) + 17;
       pItem = &pPlayer->pInventoryItems[v24];
-      a2a = 32 * v27 % 14 + 14;
+      uCellX = 32 * (uCellID % 14) + 14;
       pItem2 = pItem;
       if ( pItem->uItemID )
       {
@@ -851,7 +851,7 @@
         if ( v10 < 14 )
           v11 = 14;
         if ( (v11 - 14) >> 5 == 0 && v8 < 32 )
-          a2a += (32 - v10) / 2;
+          uCellX += (32 - v10) / 2;
         v12 = v7->uTextureWidth;
         if ( v10 < 14 )
           v12 = 14;
@@ -862,27 +862,27 @@
         if ( v9 < 14 )
           v14 = 14;
         v16 = pItem->uAttributes;
-        v17 = a2a + ((v15 - v10) >> 1) + pSRZBufferLineOffsets[a3 + ((((v14 - 14) & 0xFFFFFFE0) - v9 + 32) >> 1)];
+        v17 = uCellX + ((v15 - v10) >> 1) + pSRZBufferLineOffsets[uCellY + ((((v14 - 14) & 0xFFFFFFE0) - v9 + 32) >> 1)];
         if ( !(v16 & 0xF0) )
         {
           if ( v16 & 1
             || pCurrentScreen != 13 )
           {
             if ( v16 & 2 )
-              pRenderer->_4A6776(a2a, a3, v7);
+              pRenderer->_4A6776(uCellX, uCellY, v7);
             else
-              pRenderer->DrawTextureTransparent(a2a, a3, v7);
+              pRenderer->DrawTextureTransparent(uCellX, uCellY, v7);
           }
           else
           {
-            pRenderer->DrawTransparentGreenShade(a2a, a3, v7);
+            pRenderer->DrawTransparentGreenShade(uCellX, uCellY, v7);
           }
           ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
           pPlayer = pPlayer2;
           //goto LABEL_34;
-          ++v27;
+          ++uCellID;
           v26 += 4;
-          break;
+          continue;
         }
         if ( (unsigned __int8)(v16 & 0xF0) != 16 )
         {
@@ -898,13 +898,13 @@
               ptr_50C9A4 = 0;
             }
             v19 = (double)GetTickCount() * 0.1;
-            pRenderer->_4A63E6(a2a, a3, v7, pTexture, (signed __int64)v19, 0, 255);
+            pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
             ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
             pPlayer = pPlayer2;
             //goto LABEL_34;
-            ++v27;
+            ++uCellID;
             v26 += 4;
-            break;
+            continue;
           }
           if ( (unsigned __int8)(v16 & 0xF0) == 64 )
           {
@@ -918,13 +918,13 @@
               ptr_50C9A4 = 0;
             }
             v19 = (double)GetTickCount() * 0.1;
-            pRenderer->_4A63E6(a2a, a3, v7, pTexture, (signed __int64)v19, 0, 255);
+            pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
             ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
             pPlayer = pPlayer2;
             //goto LABEL_34;
-            ++v27;
+            ++uCellID;
             v26 += 4;
-            break;
+            continue;
           }
           if ( (unsigned __int8)(v16 & 0xF0) == 128 )
           {
@@ -938,13 +938,13 @@
               ptr_50C9A4 = 0;
             }
             v19 = (double)GetTickCount() * 0.1;
-            pRenderer->_4A63E6(a2a, a3, v7, pTexture, (signed __int64)v19, 0, 255);
+            pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
             ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
             pPlayer = pPlayer2;
             //goto LABEL_34;
-            ++v27;
+            ++uCellID;
             v26 += 4;
-            break;
+            continue;
           }
         }
         v20 = "sptext01";
@@ -957,16 +957,16 @@
           ptr_50C9A4 = 0;
         }
         v19 = (double)GetTickCount() * 0.1;
-        pRenderer->_4A63E6(a2a, a3, v7, pTexture, (signed __int64)v19, 0, 255);
+        pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
         ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
         pPlayer = pPlayer2;
       }
     }
 //LABEL_34:
-    ++v27;
+    ++uCellID;
     v26 += 4;
   }
-  while ( v27 < 126 );
+  while ( uCellID < 126 );
 }
 // 4E28F8: using guessed type int pCurrentScreen;
 // 507958: using guessed type int uTextureID_507958;