diff mm7_2.cpp @ 526:214d9d47cf1f

Chest working, but items are not laid correctly
author Gloval
date Sun, 03 Mar 2013 01:55:57 +0400
parents 61343380715b
children 3d2292597422 9d3d8091251b
line wrap: on
line diff
--- a/mm7_2.cpp	Sat Mar 02 15:38:49 2013 +0400
+++ b/mm7_2.cpp	Sun Mar 03 01:55:57 2013 +0400
@@ -3159,7 +3159,7 @@
   pDialogueWindow->Release();
   pDialogueWindow = GUIWindow::Create(0, 0, 640, 350, WINDOW_MainMenu, 0, 0);
   pBtn_ExitCancel = pDialogueWindow->CreateButton(471u, 445u, 169u, 35u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel"
-                 (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : 0), 0);
+                 (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0);
   pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0);
   pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0, 0x53u, 0, "", 0);
   pDialogueWindow->_41D08F(1, 1, 0, 2);
@@ -3301,7 +3301,7 @@
     pDialogueWindow->pControlsTail = 0;
     pDialogueWindow->uNumControls = 0;
     pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79],
-                   (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0);
+                   (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0);
     pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x55u, 0, "", 0);
     pDialogueWindow->CreateButton(0x1E0u, 0xBEu, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x56u, 0, "", 0);
     pDialogueWindow->CreateButton(0x1E0u, 0xDCu, 0x8Cu, 0x1Eu, 1, 0, 0x88u, 0x57u, 0, "", 0);
@@ -3685,7 +3685,7 @@
   pDialogueWindow = GUIWindow::Create(0, 0, 640, 345, WINDOW_MainMenu, 0, 0);
   pBtn_ExitCancel = pDialogueWindow->CreateButton( 471, 445,  169, 35, 1, 0,  0x71u,  0,  0,
                  pGlobalTXT_LocalizationStrings[74],  //"End Conversation"
-                 (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : NULL),
+                 (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : NULL),
                  0);
   return pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, 0x51u, 0, 0, "", 0);
 }
@@ -9330,26 +9330,18 @@
   const char **v4; // ebx@2
   unsigned int result; // eax@6
 
-  v2 = this;
   v3 = 1;
-  if ( (signed int)this->uNumMaps <= 1 )
-  {
-LABEL_6:
-    result = 0;
-  }
-  else
-  {
-    v4 = (const char **)&this->pInfos[1].pFilename;
-    while ( !*v4 || _strcmpi(*v4, Str2) )
+  if ( (signed int)uNumMaps <= 1 )
+     return 0;
+  
+    while ( !*this->pInfos[v3].pFilename || _strcmpi(this->pInfos[v3].pFilename, Str2) )
     {
       ++v3;
-      v4 += 17;
-      if ( (signed int)v3 >= (signed int)v2->uNumMaps )
-        goto LABEL_6;
-    }
-    result = v3;
-  }
-  return result;
+      if ( (signed int)v3 >= (signed int)uNumMaps )
+        return 0;
+    }
+    return v3;
+
 }
 
 //----- (004547E4) --------------------------------------------------------