diff GameUIs.cpp @ 163:62585ad07024

2.02.12
author Ritor1
date Mon, 03 Dec 2012 08:55:58 +0600
parents 062e8a8e09bc
children b7f43ecfb3a3
line wrap: on
line diff
--- a/GameUIs.cpp	Fri Nov 30 18:14:09 2012 +0600
+++ b/GameUIs.cpp	Mon Dec 03 08:55:58 2012 +0600
@@ -28,7 +28,7 @@
   //RGBTexture *pTex; // [sp+10h] [bp-254h]@12
   //SavegameHeader *Dest; // [sp+14h] [bp-250h]@12
   //const char *Str1; // [sp+18h] [bp-24Ch]@12
-  LODWriteableFile v15; // [sp+1Ch] [bp-248h]@1
+  LODWriteableFile pLODFile; // [sp+1Ch] [bp-248h]@1
   int v16; // [sp+260h] [bp-4h]@1
 
   uDialogueType_ = uDialogueType;
@@ -48,7 +48,7 @@
   if ( uDialogueType_ )
   {
     pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_loadsave != -1 ? &pIcons_LOD->pTextures[uTextureID_loadsave] : 0));
-    if ( pCurrentScreen == 11 )
+    if ( pCurrentScreen == 11 )//save or load
     {
       v1 = uTextureID_save_up;
       v2 = uTextureID_LS_saveU;
@@ -76,7 +76,7 @@
     dword_6A0C9C = 0;
     uLoadGameUI_SelectedSlot = 0;
   }
-  v15.AllocSubIndicesAndIO(0x12Cu, 0);
+  pLODFile.AllocSubIndicesAndIO(0x12C, 0);
   assert(sizeof(SavegameHeader) == 0x64);
   //v3 = 0;
   for (uint i = 0; i < uNumSavegameFiles; ++i)
@@ -93,13 +93,13 @@
       strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[72]); // "Empty"
       continue;
     }
-	v15.LoadFile(pTmpBuf, 1);
-    v4 = v15.FindContainer("header.bin", true);
+	pLODFile.LoadFile(pTmpBuf, 1);
+    v4 = pLODFile.FindContainer("header.bin", true);
     if ( v4 )
-      fread(&pSavegameHeader[i], 0x64u, 1u, v4);
+      fread(&pSavegameHeader[i], 0x64, 1, v4);
     if ( !_strcmpi(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[613]) )// "AutoSave.MM7"
       strcpy(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[16]);// "Autosave"
-	v5 = v15.FindContainer("image.pcx", true);
+	v5 = pLODFile.FindContainer("image.pcx", true);
     if ( !v5 )
     {
       pSavegameUsedSlots[i] = 0;
@@ -108,7 +108,7 @@
     else
     {
       pSavegameThumbnails[i].LoadFromFILE(v5, 0, true);
-      v15.CloseWriteFile();
+      pLODFile.CloseWriteFile();
       pSavegameUsedSlots[i] = 1;
     }
 //LABEL_23:
@@ -122,9 +122,9 @@
     //goto LABEL_22;
   }
 
-LABEL_24:
-  v15.FreeSubIndexAndIO();
-  if ( pCurrentScreen == 11 )
+//LABEL_24:
+  pLODFile.FreeSubIndexAndIO();
+  if ( pCurrentScreen == 11 ) // save/load screen
   {
     v6 = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE);
     v10 = (TEXTURE_TYPE)2;
@@ -153,10 +153,10 @@
                  (Texture *)(uTextureID_x_d != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_d] : 0), 0);
   ptr_69BD5C = pGUIWindow_CurrentMenu->CreateButton(215, 199, 17, 17, 1, 0, 0xA2, 0, 0, "",
                  (Texture *)(uTextureID_AR_UP_DN != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_AR_UP_DN] : 0), 0);
-  v7 = pGUIWindow_CurrentMenu->CreateButton(215, 0x143, 0x11, 0x11, 1, 0, 0xA3, uNumSavegameFiles, 0, "",
+  ptr_69BD58 = pGUIWindow_CurrentMenu->CreateButton(215, 0x143, 0x11, 0x11, 1, 0, 0xA3, uNumSavegameFiles, 0, "",
          (Texture *)(uTextureID_AR_DN_DN != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_AR_DN_DN] : 0), 0);
   v16 = -1;
-  ptr_69BD58 = v7;
+  //ptr_69BD58 = v7;
 }
 
 //----- (0045E93E) --------------------------------------------------------