changeset 162:3a8e7802f241

Слияние
author Ritor1
date Wed, 13 Feb 2013 09:52:42 +0600
parents 49e74dee4eab (current diff) f4ebd13c2a8e (diff)
children a0e7ad5425d4
files mm7_2.cpp
diffstat 7 files changed, 54 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/GUIWindow.cpp	Wed Feb 13 09:52:33 2013 +0600
+++ b/GUIWindow.cpp	Wed Feb 13 09:52:42 2013 +0600
@@ -2027,7 +2027,7 @@
   }
   else
   {
-    if (eWindowType == WINDOW_1A)
+    if (eWindowType == WINDOW_Transition)
     {
       pMainScreenNum = pCurrentScreen;
       pCurrentScreen = SCREEN_INPUT_BLV;
@@ -2047,7 +2047,7 @@
       ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2u);// 
       return pWindow;
     }
-    if (eWindowType == WINDOW_1E)
+    if (eWindowType == WINDOW_Scroll)
       //goto LABEL_62;
     {
       pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0);
--- a/GUIWindow.h	Wed Feb 13 09:52:33 2013 +0600
+++ b/GUIWindow.h	Wed Feb 13 09:52:42 2013 +0600
@@ -38,20 +38,20 @@
   WINDOW_CharacterRecord = 0x4,
   WINDOW_Options = 0x6,
   WINDOW_Book = 0x9,
-  WINDOW_A = 0xA, //10,
-  WINDOW_C = 0xC, //12,
-  WINDOW_10 = 0x10, //16,
-  WINDOW_ChangeLocation = 0x11, //17,
-  WINDOW_SpellBook = 0x12, //18,
-  WINDOW_GreetingNPC = 0x13, //19,
+  WINDOW_A = 0xA,
+  WINDOW_QuickReference = 0xC,
+  WINDOW_Rest = 0x10,
+  WINDOW_ChangeLocation = 0x11,
+  WINDOW_SpellBook = 0x12,
+  WINDOW_GreetingNPC = 0x13,
   WINDOW_Chest = 0x14,
   WINDOW_17 = 0x17,
   WINDOW_MainMenu_Load = 0x18,
   WINDOW_HouseInterior = 0x19,
-  WINDOW_1A = 0x1A, //26,
-  WINDOW_1B = 0x1B, //27,
-  WINDOW_1E = 0x1E, //30,
-  WINDOW_1F = 0x1F, //31,
+  WINDOW_Transition = 0x1A,
+  WINDOW_1B = 0x1B,
+  WINDOW_Scroll = 0x1E,
+  WINDOW_1F = 0x1F,
   WINDOW_FinalWindow = 0x46,
   WINDOW_50 = 0x50,
   WINDOW_59 = 0x59,
--- a/Vis.cpp	Wed Feb 13 09:52:33 2013 +0600
+++ b/Vis.cpp	Wed Feb 13 09:52:42 2013 +0600
@@ -1410,8 +1410,9 @@
     memcpy(&v12, &v5[v8], sizeof(v12));
     memcpy(&v5[v8], v15, sizeof(v5[v8]));
     memcpy(v15, &v12, 0x20u);
-    SortVerticesByX(v5, uStart, v8 - 1);
-    SortVerticesByX(a2, v8 + 1, uEnd);
+    __debugbreak();
+    //SortVerticesByX(v5, uStart, v8 - 1);
+    //SortVerticesByX(a2, v8 + 1, uEnd);
   }
   return true;
 }
--- a/mm7_2.cpp	Wed Feb 13 09:52:33 2013 +0600
+++ b/mm7_2.cpp	Wed Feb 13 09:52:42 2013 +0600
@@ -14990,7 +14990,7 @@
 }
 
 //----- (00467FB6) --------------------------------------------------------
-char __cdecl sub_467FB6()
+char __cdecl CreateScrollWindow()
 {
   unsigned int v0; // eax@1
   char *v1; // ST18_4@3
--- a/mm7_3.cpp	Wed Feb 13 09:52:33 2013 +0600
+++ b/mm7_3.cpp	Wed Feb 13 09:52:42 2013 +0600
@@ -4138,10 +4138,6 @@
   }
 }
 
-
-
-
-
 //----- (0047531C) --------------------------------------------------------
 bool __fastcall sub_47531C(int a1, int *a2, int a3, int a4, int a5, int a6, int a7, int a8, BLVFace *a9, int a10)
 {
--- a/mm7_5.cpp	Wed Feb 13 09:52:33 2013 +0600
+++ b/mm7_5.cpp	Wed Feb 13 09:52:42 2013 +0600
@@ -13297,7 +13297,7 @@
 }
 
 //----- (00412B58) --------------------------------------------------------
-void __cdecl sub_412B58()
+void __cdecl DrawSpellBookContent()
 {
   Player *v0; // ebx@1
   int v1; // ebp@1
@@ -13315,7 +13315,7 @@
   signed int v13; // ecx@18
   unsigned int v14; // esi@18
   unsigned int v15; // edi@18
-  Texture *v16; // eax@21
+  Texture *pPageTexture; // eax@21
   unsigned int v17; // [sp-Ch] [bp-2Ch]@8
   unsigned int v18; // [sp-Ch] [bp-2Ch]@15
   unsigned int v19; // [sp-8h] [bp-28h]@8
@@ -13399,7 +13399,7 @@
     {
       if ( v0->pNumSpellBookPage == v13 )
       {
-        v16 = pTextures_tabs[v13][1];
+        pPageTexture = pTextures_tabs[v13][1];
         switch ( v13 )
         {
           case 0:
@@ -13439,7 +13439,7 @@
       }
       else
       {
-        v16 = pTextures_tabs[v13][0];
+        pPageTexture = pTextures_tabs[v13][0];
         switch ( v13 )
         {
           case 0:
@@ -13485,7 +13485,7 @@
             break;
         }
       }
-      pRenderer->DrawTextureTransparent(v14, v15, v16);
+      pRenderer->DrawTextureTransparent(v14, v15, pPageTexture);
       v13 = v25;
     }
     a2.x += 2;
@@ -15091,15 +15091,15 @@
                 v38 = v37 - 2;
                 if ( v38 )//pWindowType > 105
                 {
-                  if ( v38 == 1 )//pWindowType == 106 (0x6A) WINDOW_VideoOptions
+                  if ( pWindowType == WINDOW_VideoOptions )
                     GameMenuUI_DrawVideoOptions();
                 }
-                else//pWindowType == 105 (0x69) WINDOW_KeyMappingOptions
+                else if ( pWindowType == WINDOW_KeyMappingOptions )
                 {
                   GameMenuUI_DrawKeyBindings();
                 }
               }
-              else//pWindowType == 103 (0x67) WINDOW_67
+              else//pWindowType == WINDOW_67
               {
                 pWindow->DrawMessageBox(0);
                 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
@@ -15149,7 +15149,7 @@
           pGUIWindow2->Release();
           continue;
         }
-        if ( pWindow->Hint != (char *)1 )//pWindowType == 97 (0x61) WINDOW_61
+        if ( pWindow->Hint != (char *)1 )//pWindowType == WINDOW_61
           pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
         v32 = pWindow->ptr_1C;
         pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 16));
@@ -15188,7 +15188,7 @@
         if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
           //goto LABEL_151;
         {
-         pMessageQueue_50CBD0->pMessages[pNumMessages].eType = (UIMessageType)113;
+         pMessageQueue_50CBD0->pMessages[pNumMessages].eType = (UIMessageType)113; //0x71
          pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
          *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
          ++pMessageQueue_50CBD0->uNumMessages;
@@ -15200,7 +15200,7 @@
       if ( v14 )//pWindowType > 80
       {
         v15 = v14 - 9;
-        if ( !v15 )//pWindowType == 89 (0x59) WINDOW_59
+        if ( pWindowType == WINDOW_59)
         {
           pWindow->DrawMessageBox(0);
           pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
@@ -15237,7 +15237,7 @@
           continue;
         }
         v16 = v15 - 1;
-        if ( !v16 )// pWindowType == 90 (0x5A) WINDOW_5A
+        if ( pWindowType == WINDOW_5A ) // Press buttons in title menu and in game, and escape in game
         {
           if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
@@ -15288,7 +15288,7 @@
           continue;
         }
         v17 = v16 - 1;
-        if ( !v17 )//pWindowType == 91 (0x5B) WINDOW_5B
+        if ( pWindowType == WINDOW_5B )//Change button in Character window
         {
           if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
@@ -15313,7 +15313,7 @@
           continue;
         }
         v18 = v17 - 1;
-        if ( !v18 )//pWindowType == 92 (0x5C) WINDOW_5C
+        if ( pWindowType == WINDOW_5C ) // Change page in AutonotesBook
         {
           if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
@@ -15333,7 +15333,7 @@
           continue;
         }
         v19 = v18 - 1;
-        if ( !v19 )//pWindowType == 93 (0x5D) WINDOW_5D
+        if ( pWindowType == WINDOW_5D )
         {
           if ( pWindow->Hint != (char *)1 )
             pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
@@ -15346,7 +15346,7 @@
           continue;
         }
       }
-      else//pWindowType == 80 (0x50) WINDOW_50
+      else if ( pWindowType == WINDOW_50 )
       {
         v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
         if ( ptr_507BD0->field_40 == 1 )
@@ -15389,7 +15389,7 @@
     }
     else
     {
-      if ( pWindowType == 70 ) // 0x46 WINDOW_FinalWindow
+      if ( pWindowType == WINDOW_FinalWindow )
       {
         sub_41420D_press_esc();
         continue;
@@ -15404,7 +15404,7 @@
             v13 = v12 - 4;
             if ( v13 )//pWindowType > 30
             {
-              if ( v13 == 1 ) //pWindowType == 31 (0x1F) WINDOW_1F
+              if ( pWindowType == WINDOW_1F)
               {
                 pRenderer->ClearZBuffer(0, 479);
                 draw_leather();
@@ -15414,12 +15414,12 @@
                   (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
               }
             }
-            else// pWindowType == 30 (0x1E) WINDOW_1E
-            {
-              sub_467FB6();
-            }
-          }
-          else //pWindowType == 26 (0x1A) WINDOW_1A
+            else if( pWindowType == WINDOW_Scroll)
+            {
+              CreateScrollWindow();
+            }
+          }
+          else if ( pWindowType == WINDOW_Transition )
           {
             TransitionUI_Draw();
           }
@@ -15439,12 +15439,12 @@
                 //if ( v9 == 1 ) //pWindowType == 24 (0x18) WINDOW_MainMenu_Load
                 //  sub_4606F7();
               }
-              else//pWindowType == 23 (0x17) WINDOW_17
+              else if ( pWindowType == WINDOW_17 )
               {
                 sub_4606FE();
               }
             }
-            else//pWindowType == 20 (0x14) WINDOW_Chest
+            else if ( pWindowType == WINDOW_Chest )
             {
               if ( pCurrentScreen == SCREEN_CHEST )
               {
@@ -15463,7 +15463,7 @@
               }
             }
           }
-          else//pWindowType == 19 (0x13) WINDOW_GreetingNPC
+          else if (pWindowType == WINDOW_GreetingNPC )
           {
             DrawBranchlessDialogueUI();
           }
@@ -15500,9 +15500,9 @@
         }
         continue;
       }
-      if ( pWindowType == 18 ) //(0x12) WINDOW_SpellBook
-      {
-        sub_412B58();
+      if ( pWindowType == WINDOW_SpellBook )
+      {
+        DrawSpellBookContent();
       }
       else
       {
@@ -15514,15 +15514,15 @@
             v6 = v5 - 4;
             if ( v6 )//pWindowType > 16
             {
-              if ( v6 == 1 )//pWindowType == 17 (0x11) WINDOW_ChangeLocation
+              if ( pWindowType == WINDOW_ChangeLocation )
                 TravelUI_Draw();
             }
-            else//pWindowType == 16 (0x10) WINDOW_10
+            else if ( pWindowType == WINDOW_Rest )
             {
               RestUI_Draw();
             }
           }
-          else// pWindowType == 12 (0xC) WINDOW_C
+          else if (pWindowType == WINDOW_QuickReference )
           {
             QuickRefDraw();
           }
@@ -15539,15 +15539,15 @@
               v4 = v3 - 2;
               if ( v4 )//pWindowType > 6
               {
-                if ( v4 == 3 )//pWindowType == 9 (0x9) WINDOW_Book
+                if ( pWindowType == WINDOW_Book )
                   SellectDrawBook((unsigned int)pWindow->ptr_1C);
               }
-              else//pWindowType == 6 (0x6) WINDOW_Options
+              else if (pWindowType == WINDOW_Options)
               {
                 sub_414F82_DrawGameOptions();
               }
             }
-            else//pWindowType == 4 (0x4) WINDOW_CharacterRecord
+            else if (pWindowType == WINDOW_CharacterRecord)
             {
               CharacterUI_CharacterScreen_Draw(uActiveCharacter);
             }
--- a/mm7_data.h	Wed Feb 13 09:52:33 2013 +0600
+++ b/mm7_data.h	Wed Feb 13 09:52:42 2013 +0600
@@ -1835,7 +1835,7 @@
 void __cdecl InitializeBookFonts();
 void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer);
 void __cdecl sub_412AF9();
-void __cdecl sub_412B58();
+void __cdecl DrawSpellBookContent();
 char __cdecl DrawBook_History();
 void __cdecl DrawBook_Quests();
 void __cdecl DrawBook_Autonotes();
@@ -2143,7 +2143,7 @@
 void __thiscall sub_467E7F_EquipBody(unsigned int uEquipType); // idb
 void __fastcall sub_467F48(signed int a1);
 void __cdecl free_book_subwindow();
-char __cdecl sub_467FB6();
+char __cdecl CreateScrollWindow();
 void __cdecl OnPaperdollLeftClick();
 int __thiscall UnprojectX(int x);
 int __thiscall UnprojectY(int _this);