changeset 67:476145dc3441

Слияние
author Ritor1
date Fri, 26 Oct 2012 23:22:41 +0600
parents 5ec98919c8fd (diff) 427b6c3b4e0f (current diff)
children efefae49c990 636f4dbd156d
files mm7_4.cpp mm7_5.cpp
diffstat 3 files changed, 86 insertions(+), 86 deletions(-) [+]
line wrap: on
line diff
--- a/GUIWindow.h	Fri Oct 26 03:43:05 2012 +0200
+++ b/GUIWindow.h	Fri Oct 26 23:22:41 2012 +0600
@@ -120,7 +120,7 @@
   UIMSG_PlayerCreationClickPlus = 0x3E,
   UIMSG_PlayerCreationClickMinus = 0x3F,
   UIMSG_PlayerCreationSelectActiveSkill = 0x40,
-  UIMSG_41 = 0x41,
+  UIMSG_PlayerCreationSelectClass = 0x41,
   UIMSG_PlayerCreationClickOK = 0x42,
   UIMSG_PlayerCreationClickReset = 0x43,
   UIMSG_PlayerCreationRemoveUpSkill = 0x4A,
--- a/Player.h	Fri Oct 26 03:43:05 2012 +0200
+++ b/Player.h	Fri Oct 26 23:22:41 2012 +0600
@@ -96,9 +96,9 @@
   PLAYER_CLASS_MONK = 0x8,
   PLAYER_CLASS_PALADIN = 0xC,
   PLAYER_CLASS_SHOOTER = 0x10,
-  PLAYER_CLASS_DRUID = 0x14,
+  PLAYER_CLASS_RANGER = 0x14,
   PLAYER_CLASS_CLERIC = 0x18,
-  PLAYER_CLASS_RANGER = 0x1C,
+  PLAYER_CLASS_DRUID = 0x1C,
   PLAYER_CLASS_SORCERER = 0x20,
 };
 
--- a/mm7_5.cpp	Fri Oct 26 03:43:05 2012 +0200
+++ b/mm7_5.cpp	Fri Oct 26 23:22:41 2012 +0600
@@ -3510,7 +3510,7 @@
         continue;
       }
 
-      if ( (signed int)pUIMessageType > 75 )
+      if ( (signed int)pUIMessageType > UIMSG_PlayerCreationRemoveDownSkill )
       {
         if ( pUIMessageType > UIMSG_A3 )
         {
@@ -3610,10 +3610,10 @@
             pCurrentScreen = 0;
             viewparams->bRedrawGameUI = 1;
           }
-          GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
+          GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
           if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
             continue;
-          pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
+          pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_CloseBook;
           goto LABEL_93;
         }
         if ( pUIMessageType == UIMSG_CloseBook )
@@ -3814,9 +3814,9 @@
             pSoundID = (SoundID)24;
             goto LABEL_40;
           }
-          if ( pUIMessageType == UIMSG_41 )
-          {
-            (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(0);
+          if ( pUIMessageType == UIMSG_PlayerCreationSelectClass )
+          {
+            (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(uNum);
             goto LABEL_36;
           }
           if ( pUIMessageType == UIMSG_PlayerCreationClickOK )
@@ -14724,8 +14724,8 @@
 //----- (004156F0) --------------------------------------------------------
 void __cdecl GUI_UpdateWindows()
 {
-  GUIWindow *v0; // esi@4
-  unsigned int v1; // eax@4
+  GUIWindow *pWindow; // esi@4
+  unsigned int pWindowType; // eax@4
   int v2; // eax@10
   int v3; // eax@11
   int v4; // eax@12
@@ -14782,10 +14782,10 @@
   for ( i = 1; i <= uNumVisibleWindows; ++i )
   {
     //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]];
-    v0 = &pWindowList[pVisibleWindowsIdxs[i] - 1];
-    v1 = v0->eWindowType;
-
-    switch (v0->eWindowType)
+    pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1];
+    pWindowType = pWindow->eWindowType;
+
+    switch (pWindow->eWindowType)
     {
       case WINDOW_MainMenu_Load:
         GameUI_MainMenu_DrawLoad();
@@ -14793,15 +14793,15 @@
 
       case WINDOW_5E: // window that initiates savegame loading
       {
-        if (v0->Hint != (char *)1)
+        if (pWindow->Hint != (char *)1)
           pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-        auto v20 = (GUIButton *)v0->ptr_1C;
-        pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v20->pTextures[0]);
-        v21 = v0->Hint;
+        auto v20 = (GUIButton *)pWindow->ptr_1C;
+        pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v20->pTextures[0]);
+        v21 = pWindow->Hint;
         viewparams->bRedrawGameUI = 1;
         if ( v21 && v21 != (char *)1 )
           v20->DrawLabel(v21, pFontCreate, 0, 0);
-        v0->Release();
+        pWindow->Release();
         if (pCurrentScreen == 11)
           pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0);
         else
@@ -14811,22 +14811,22 @@
     }
 
 
-    if ( (signed int)v1 > 70 )
-    {
-      if ( (signed int)v1 > 95 )
-      {
-        v33 = v1 - 96;
+    if ( (signed int)pWindowType > 70 )
+    {
+      if ( (signed int)pWindowType > 95 )
+      {
+        v33 = pWindowType - 96;
         if ( !v33 )
         {
-          if ( v0->Hint != (char *)1 )
+          if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-          v42 = (GUIButton *)v0->ptr_1C;
-          pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v42->pTextures[0]);
-          v43 = v0->Hint;
+          v42 = (GUIButton *)pWindow->ptr_1C;
+          pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v42->pTextures[0]);
+          v43 = pWindow->Hint;
           viewparams->bRedrawGameUI = 1;
           if ( v43 && v43 != (char *)1 )
             v42->DrawLabel(v43, pFontCreate, 0, 0);
-          v0->Release();
+          pWindow->Release();
           if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
             continue;
           v41 = pMessageQueue_50CBD0->uNumMessages;
@@ -14863,13 +14863,13 @@
               }
               else
               {
-                v0->DrawMessageBox(0);
-                v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
-                v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
+                pWindow->DrawMessageBox(0);
+                pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
+                pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
                 if ( !pKeyActionMap->field_204 )
                 {
                   v51.Reset();
-                  v0->Release();
+                  pWindow->Release();
                   pEventTimer->Resume();
                   pCurrentScreen = 0;
                   viewparams->bRedrawGameUI = 1;
@@ -14883,9 +14883,9 @@
               }
               continue;
             }
-            v46 = (Texture *)*((_DWORD *)v0->ptr_1C + 15);
-            v45 = v0->uFrameY;
-            v44 = v0->uFrameX;
+            v46 = (Texture *)*((_DWORD *)pWindow->ptr_1C + 15);
+            v45 = pWindow->uFrameY;
+            v44 = pWindow->uFrameX;
 LABEL_18:
             pRenderer->DrawTextureIndexed(v44, v45, v46);
 LABEL_114:
@@ -14901,49 +14901,49 @@
           Dst.uHeight = 37;
           Dst.pParent = pButton_RestUI_WaitUntilDawn->pParent;
           pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-          pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, *((Texture **)v0->ptr_1C + 15));
+          pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15));
           viewparams->bRedrawGameUI = 1;
           Dst.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);
           Dst.pParent = 0;
           goto LABEL_134;
         }
-        if ( v0->Hint != (char *)1 )
+        if ( pWindow->Hint != (char *)1 )
           pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-        v32 = v0->ptr_1C;
-        pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 16));
+        v32 = pWindow->ptr_1C;
+        pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 16));
         goto LABEL_138;
       }
-      if ( v1 == 95 )
-      {
-        if ( v0->Hint != (char *)1 )
+      if ( pWindowType == 95 )
+      {
+        if ( pWindow->Hint != (char *)1 )
           pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-        v32 = v0->ptr_1C;
-        pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 15));
+        v32 = pWindow->ptr_1C;
+        pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 15));
 LABEL_138:
-        v40 = v0->Hint;
+        v40 = pWindow->Hint;
         viewparams->bRedrawGameUI = 1;
         if ( v40 && v40 != (char *)1 )
           ((GUIButton *)v32)->DrawLabel(v40, pFontCreate, 0, 0);
-        v0->Release();
+        pWindow->Release();
 LABEL_142:
         v41 = pMessageQueue_50CBD0->uNumMessages;
         if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
           goto LABEL_151;
         continue;
       }
-      v14 = v1 - 80;
+      v14 = pWindowType - 80;
       if ( v14 )
       {
         v15 = v14 - 9;
         if ( !v15 )
         {
-          v0->DrawMessageBox(0);
-          v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
-          v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
+          pWindow->DrawMessageBox(0);
+          pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
+          pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
           if ( !pKeyActionMap->field_204 )
           {
             _this.Reset();
-            v0->Release();
+            pWindow->Release();
             pEventTimer->Resume();
             pCurrentScreen = 0;
             viewparams->bRedrawGameUI = 1;
@@ -14974,9 +14974,9 @@
         v16 = v15 - 1;
         if ( !v16 )
         {
-          if ( v0->Hint != (char *)1 )
+          if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-          v22 = (GUIButton *)v0->ptr_1C;
+          v22 = (GUIButton *)pWindow->ptr_1C;
           if ( (v22->uX & 0x80000000u) == 0 )
           {
             if ( (signed int)v22->uX <= 640 )
@@ -14992,7 +14992,7 @@
               }
             }
           }
-          v23 = v0->Hint;
+          v23 = pWindow->Hint;
           viewparams->bRedrawGameUI = 1;
           if ( v23 )
           {
@@ -15000,20 +15000,20 @@
             goto LABEL_82;
           }
 LABEL_134:
-          v28 = v0;
+          v28 = pWindow;
           goto LABEL_110;
         }
         v17 = v16 - 1;
         if ( !v17 )
         {
-          if ( v0->Hint != (char *)1 )
+          if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-          v22 = (GUIButton *)v0->ptr_1C;
+          v22 = (GUIButton *)pWindow->ptr_1C;
           v47 = v22->pTextures[1];
 LABEL_94:
-          pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v47);
+          pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v47);
 LABEL_80:
-          v23 = v0->Hint;
+          v23 = pWindow->Hint;
           viewparams->bRedrawGameUI = 1;
           if ( v23 )
           {
@@ -15027,18 +15027,18 @@
         v18 = v17 - 1;
         if ( !v18 )
         {
-          if ( v0->Hint != (char *)1 )
+          if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-          v22 = (GUIButton *)v0->ptr_1C;
-          pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, v22->pTextures[0]);
+          v22 = (GUIButton *)pWindow->ptr_1C;
+          pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, v22->pTextures[0]);
           goto LABEL_80;
         }
         v19 = v18 - 1;
         if ( !v19 )
         {
-          if ( v0->Hint != (char *)1 )
+          if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
-          pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v0->ptr_1C + 16));
+          pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 16));
           viewparams->bRedrawGameUI = 1;
           goto LABEL_134;
         }
@@ -15066,7 +15066,7 @@
         if ( ptr_507BD0->field_40 == 2 )
         {
           v29 = pMessageQueue_50CBD0->uNumMessages;
-          v0->field_40 = 0;
+          pWindow->field_40 = 0;
           if ( (signed int)v29 < 40 )
           {
             pMessageQueue_50CBD0->pMessages[v29].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C;
@@ -15081,7 +15081,7 @@
         }
         if ( ptr_507BD0->field_40 == 3 )
         {
-          v0->field_40 = 0;
+          pWindow->field_40 = 0;
           pEventTimer->Resume();
           v28 = ptr_507BD0;
 LABEL_110:
@@ -15092,16 +15092,16 @@
     }
     else
     {
-      if ( v1 == 70 )
+      if ( pWindowType == 70 )
       {
         sub_41420D_press_esc();
         continue;
       }
-      if ( (signed int)v1 > 18 )
-      {
-        if ( (signed int)v1 > 25 )
-        {
-          v12 = v1 - 26;
+      if ( (signed int)pWindowType > 18 )
+      {
+        if ( (signed int)pWindowType > 25 )
+        {
+          v12 = pWindowType - 26;
           if ( v12 )
           {
             v13 = v12 - 4;
@@ -15130,9 +15130,9 @@
           }
           continue;
         }
-        if ( v1 != 25 )
-        {
-          v7 = v1 - 19;
+        if ( pWindowType != 25 )
+        {
+          v7 = pWindowType - 19;
           if ( v7 )
           {
             v8 = v7 - 1;
@@ -15153,7 +15153,7 @@
             {
               if ( pCurrentScreen == 10 )
               {
-                Chest::DrawChestUI((unsigned int)v0->ptr_1C);
+                Chest::DrawChestUI((unsigned int)pWindow->ptr_1C);
               }
               else
               {
@@ -15197,15 +15197,15 @@
         }
         goto LABEL_142;
       }
-      if ( v1 == 18 )
+      if ( pWindowType == 18 )
       {
         sub_412B58();
       }
       else
       {
-        if ( (signed int)v1 > 10 )
-        {
-          v5 = v1 - 12;
+        if ( (signed int)pWindowType > 10 )
+        {
+          v5 = pWindowType - 12;
           if ( v5 )
           {
             v6 = v5 - 4;
@@ -15225,9 +15225,9 @@
           }
           continue;
         }
-        if ( v1 != 10 )
-        {
-          v2 = v1 - 3;
+        if ( pWindowType != 10 )
+        {
+          v2 = pWindowType - 3;
           if ( v2 )
           {
             v3 = v2 - 1;
@@ -15237,7 +15237,7 @@
               if ( v4 )
               {
                 if ( v4 == 3 )
-                  DrawSpellbook((unsigned int)v0->ptr_1C);
+                  DrawSpellbook((unsigned int)pWindow->ptr_1C);
               }
               else
               {