diff mm7_1.cpp @ 11:66319a734368

16.01.13(work)
author Ritor1
date Wed, 16 Jan 2013 17:31:56 +0600
parents 13da46a8d45d
children 0ea5768a2f0d
line wrap: on
line diff
--- a/mm7_1.cpp	Wed Jan 16 09:25:57 2013 +0600
+++ b/mm7_1.cpp	Wed Jan 16 17:31:56 2013 +0600
@@ -5025,7 +5025,7 @@
 
   pMouse->uPointingObjectID = 0;
   pMouse->GetClickPos(&pX, &pY);
-  if ( pX || (signed int)pX > 639 || pY || (signed int)pY > 479 )
+  if ( pX || (signed int)pX > 639 || pY || (signed int)pY > 479 )//( (pX & 0x80000000u) != 0 || (signed int)pX > 639 || (pY & 0x80000000u) != 0 || (signed int)pY > 479 )
     return;
   if ( !pCurrentScreen )
   {
@@ -5646,7 +5646,7 @@
 GUIWindow *GameUI_InitializeCharacterWindow(unsigned int _this)
 {
   unsigned int v1; // edi@1
-  GUIWindow *v2; // edi@3
+  GUIWindow *pWindow; // edi@3
 
   ++pIcons_LOD->uTexturePacksCount;
   v1 = _this;
@@ -5657,98 +5657,47 @@
   bRingsShownInCharScreen = 0;
   CharacterUI_LoadPaperdollTextures();
   pCurrentScreen = v1;
-  v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0);
-  pCharacterScreen_StatsBtn = v2->CreateButton(
-                                pViewport->uViewportX + 12,
-                                pViewport->uViewportY + 308,
+  pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0);
+  pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportX + 12, pViewport->uViewportY + 308,
                                 (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureWidth : 24),
                                 (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureHeight : 26),
-                                1,
-                                0,
-                                0x73u,
-                                0,
-                                0x53u,
-                                pGlobalTXT_LocalizationStrings[216],
+                                1, 0, 0x73u, 0, 0x53u, pGlobalTXT_LocalizationStrings[216],// Stats
                                 (Texture *)(papredoll_dbrds[10] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[10]] : 0),
-                                papredoll_dbrds[9] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[9]] : 0,
-                                0);
-  pCharacterScreen_SkillsBtn = v2->CreateButton(
-                                 pViewport->uViewportX + 102,
-                                 pViewport->uViewportY + 308,
+                                papredoll_dbrds[9] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[9]] : 0, 0);
+  pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportX + 102, pViewport->uViewportY + 308,
                                  (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureWidth : 24),
                                  (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureHeight : 26),
-                                 1,
-                                 0,
-                                 0x72u,
-                                 0,
-                                 0x4Bu,
-                                 pGlobalTXT_LocalizationStrings[205],
+                                 1, 0, 0x72u, 0, 0x4Bu, pGlobalTXT_LocalizationStrings[205],//Skills
                                  (Texture *)(papredoll_dbrds[8] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[8]] : 0),
-                                 papredoll_dbrds[7] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[7]] : 0,
-                                 0);
-  pCharacterScreen_InventoryBtn = v2->CreateButton(
-                                    pViewport->uViewportX + 192,
-                                    pViewport->uViewportY + 308,
+                                 papredoll_dbrds[7] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[7]] : 0, 0);
+  pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportX + 192, pViewport->uViewportY + 308,
                                     (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureWidth : 24),
                                     (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureHeight : 26),
-                                    1,
-                                    0,
-                                    0x74u,
-                                    0,
-                                    0x49u,
-                                    pGlobalTXT_LocalizationStrings[120],
+                                    1, 0, 0x74u, 0, 0x49u, pGlobalTXT_LocalizationStrings[120], //Inventory
                                     (Texture *)(papredoll_dbrds[6] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[6]] : 0),
-                                    papredoll_dbrds[5] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[5]] : 0,
-                                    0);
-  pCharacterScreen_AwardsBtn = v2->CreateButton(
-                                 pViewport->uViewportX + 282,
-                                 pViewport->uViewportY + 308,
+                                    papredoll_dbrds[5] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[5]] : 0, 0);
+  pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportX + 282, pViewport->uViewportY + 308,
                                  (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureWidth : 24),
                                  (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureHeight : 26),
-                                 1,
-                                 0,
-                                 0x75u,
-                                 0,
-                                 0x41u,
-                                 pGlobalTXT_LocalizationStrings[22],
+                                 1, 0, 0x75u, 0, 0x41u, pGlobalTXT_LocalizationStrings[22], //Awards
                                  (Texture *)(papredoll_dbrds[4] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[4]] : 0),
-                                 papredoll_dbrds[3] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[3]] : 0,
-                                 0);
-  pCharacterScreen_ExitBtn = v2->CreateButton(
-                 pViewport->uViewportX + 371,
-                 pViewport->uViewportY + 308,
+                                 papredoll_dbrds[3] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[3]] : 0, 0);
+  pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportX + 371, pViewport->uViewportY + 308,
                  (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureWidth : 24),
                  (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureHeight : 26),
-                 1,
-                 0,
-                 0xA8u,
-                 0,
-                 0,
-                 pGlobalTXT_LocalizationStrings[79],
+                 1, 0, 0xA8u, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit
                  (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0),
-                 papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0,
-                 0);
-  v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, 0x78u, 0, 0, "", 0);
-  pCharacterScreen_DetalizBtn = v2->CreateButton(
-                 0x258u,
-                 0x12Cu,
-                 0x1Eu,
-                 0x1Eu,
-                 1,
-                 0,
-                 0x55u,
-                 0,
-                 0,
-                 pGlobalTXT_LocalizationStrings[64],
-                 0);
-  pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, 0x85u, 0, 0, "", 0);
-  v2->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0);
-  v2->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0);
-  v2->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0);
-  v2->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0);
-  v2->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0);
+                 papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0, 0);
+  pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, 0x78u, 0, 0, "", 0);
+  pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 0x1Eu, 0x1Eu, 1, 0, 0x55u, 0, 0, pGlobalTXT_LocalizationStrings[64], 0);
+  pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, 0x85u, 0, 0, "", 0);
+  pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0);
+  pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0);
+  pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0);
+  pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0);
+  pWindow->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0);
   sub_419100();
-  return v2;
+  return pWindow;
 }
 
 
@@ -5923,9 +5872,15 @@
   {
     viewparams->bRedrawGameUI = 1;
     if ( uActiveCharacter != v1 )
-      goto LABEL_27;
+      //goto LABEL_27;
+    {
+      if ( pPlayers[v1]->uTimeToRecovery )
+        return;
+      uActiveCharacter = v1;
+      return;
+    }
     v5 = 7;
-LABEL_22:
+//LABEL_22:
     pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5);
     return;
   }
@@ -5933,24 +5888,28 @@
     return;
   if ( pCurrentScreen == 10 )
   {
-LABEL_23:
+//LABEL_23:
     viewparams->bRedrawGameUI = 1;
     if ( uActiveCharacter == v1 )
     {
       pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
       pCurrentScreen = 15;
-      goto LABEL_28;
-    }
-LABEL_27:
+      //goto LABEL_28;
+      uActiveCharacter = v1;
+      return;
+    }
+//LABEL_27:
     if ( pPlayers[v1]->uTimeToRecovery )
       return;
-    goto LABEL_28;
+    //goto LABEL_28;
+    uActiveCharacter = v1;
+    return;
   }
   if ( pCurrentScreen != 13 )
   {
     if ( pCurrentScreen == 14 )
     {
-LABEL_28:
+//LABEL_28:
       uActiveCharacter = v1;
       return;
     }
@@ -5962,18 +5921,37 @@
         sub_419100();
       return;
     }
-    goto LABEL_23;
+    //goto LABEL_23;
+    viewparams->bRedrawGameUI = 1;
+    if ( uActiveCharacter == v1 )
+    {
+      pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
+      pCurrentScreen = 15;
+      //goto LABEL_28;
+      uActiveCharacter = v1;
+      return;
+    }
+//LABEL_27:
+    if ( pPlayers[v1]->uTimeToRecovery )
+      return;
+    //goto LABEL_28;
+    uActiveCharacter = v1;
+    return;
   }
   if ( ptr_507BC0->field_40 == 1 )
     return;
   viewparams->bRedrawGameUI = 1;
   if ( uActiveCharacter != v1 )
-    goto LABEL_28;
+    //goto LABEL_28;
+    uActiveCharacter = v1;
+    return;
   if ( dword_F8B19C == 2 || dword_F8B19C == 6 )
   {
     pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
     v5 = 14;
-    goto LABEL_22;
+    //goto LABEL_22;
+    pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5);
+    return;
   }
 }
 // 4E28F8: using guessed type int pCurrentScreen;