diff GUIWindow.cpp @ 17:fe0d9a98213f

17.01.13 (fix Hint error)
author Ritor1
date Thu, 17 Jan 2013 16:24:25 +0600
parents 66319a734368
children 352b15291822
line wrap: on
line diff
--- a/GUIWindow.cpp	Thu Jan 17 09:24:40 2013 +0600
+++ b/GUIWindow.cpp	Thu Jan 17 16:24:25 2013 +0600
@@ -121,9 +121,9 @@
   {
     v9 = LODWORD(v18->uExpireTime);
     v10 = HIDWORD(v18->uExpireTime);
-    if ( (v10 & 0x80000000u) == 0 && ((signed int)v10 > 0 || v9) )
+    if ( (v10 & 0x80000000u) == 0 && ((signed int)v10 > 0 || v9) )//!!!
     {
-      v11 = __PAIR__(v10, v9) - pParty->uTimePlayed;
+      v11 = __PAIR__(v10, v9) - pParty->uTimePlayed;//!!!
       v12 = v20 * LOBYTE(v1->uFontHeight) + 40;
       v13 = *v16;
       ++v20;
@@ -950,7 +950,7 @@
                   v8 = v7 + 1;
                   if ( (signed int)v7 + 1 > 0 )
                   {
-                    memset32((void *)(4 * dword_506520 + 6043152), v24, v8);
+                    memset32((char *)&pStru179 + 4 * dword_506520 , v24, v8);
                     do
                     {
                       LODWORD(v7) = dword_506520++;
@@ -1947,66 +1947,66 @@
 //----- (0041D12F) --------------------------------------------------------
 GUIButton *GUIWindow::CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int a6, int a7, unsigned int uControlID, unsigned int uControlParam, unsigned __int8 uHotkey, const char *pName, Texture *pTextures, ...)
 {
-  GUIButton *v12; // esi@1
+  GUIButton *pButton; // esi@1
   unsigned int v13; // eax@1
   unsigned int v14; // ebx@4
   unsigned int v15; // eax@4
-  unsigned int v16; // ebx@4
+  unsigned int pTextureNum; // ebx@4
   unsigned int v17; // eax@4
   Texture *v18; // eax@4
   Texture **v19; // ecx@5
   Texture **v20; // edx@5
   GUIButton *v21; // eax@7
 
-  v12 = (GUIButton *)pAllocator->AllocNamedChunk(0, 0xBCu, "BUTTON");
-  v12->pParent = this;
-  v12->uX = uX + this->uFrameX;
+  pButton = (GUIButton *)pAllocator->AllocNamedChunk(0, 0xBCu, "BUTTON");
+  pButton->pParent = this;
+  pButton->uX = uX + this->uFrameX;
   v13 = uY + this->uFrameY;
-  v12->uHeight = uHeight;
-  v12->uY = v13;
-  v12->uWidth = uWidth;
+  pButton->uHeight = uHeight;
+  pButton->uY = v13;
+  pButton->uWidth = uWidth;
   if ( a6 == 2 && !uHeight )
-    v12->uHeight = uWidth;
-  v14 = v12->uX;
-  v12->uButtonType = a6;
+    pButton->uHeight = uWidth;
+  v14 = pButton->uX;
+  pButton->uButtonType = a6;
   v15 = v14 + uWidth - 1;
-  v16 = 0;
-  v12->uZ = v15;
-  v17 = v12->uY;
-  v12->field_2C = 0;
-  v12->uW = v17 + uHeight - 1;
-  v12->field_1C = a7;
-  v12->uControlID = uControlID;
-  v12->uControlParam = uControlParam;
-  v12->uHotkey = uHotkey;
+  pTextureNum = 0;
+  pButton->uZ = v15;
+  v17 = pButton->uY;
+  pButton->field_2C = 0;
+  pButton->uW = v17 + uHeight - 1;
+  pButton->field_1C = a7;
+  pButton->uControlID = uControlID;
+  pButton->uControlParam = uControlParam;
+  pButton->uHotkey = uHotkey;
   strlen(pName);
-  strcpy(v12->pButtonName, pName);
+  strcpy(pButton->pButtonName, pName);
   v18 = pTextures;
   if ( pTextures )
   {
     v19 = &pTextures;
-    v20 = v12->pTextures;
+    v20 = pButton->pTextures;
     do
     {
       ++v19;
       *v20 = v18;
-      ++v16;
+      ++pTextureNum;
       ++v20;
       v18 = *v19;
     }
     while ( *v19 );
   }
-  v12->uNumTextures = v16;
+  pButton->uNumTextures = pTextureNum;
   v21 = this->pControlsTail;
   if ( v21 )
-    v21->pNext = v12;
+    v21->pNext = pButton;
   else
-    this->pControlsHead = v12;
-  v12->pPrev = this->pControlsTail;
-  this->pControlsTail = v12;
-  v12->pNext = 0;
+    this->pControlsHead = pButton;
+  pButton->pPrev = this->pControlsTail;
+  this->pControlsTail = pButton;
+  pButton->pNext = 0;
   ++this->uNumControls;
-  return v12;
+  return pButton;
 }
 
 //----- (00459C2B) --------------------------------------------------------