diff mm7_2.cpp @ 473:7f1b00901cf7

Skill learning menu in shops
author Gloval
date Tue, 26 Feb 2013 02:09:56 +0400
parents c43f156a95c9
children 442afd6c34a4
line wrap: on
line diff
--- a/mm7_2.cpp	Mon Feb 25 23:33:15 2013 +0400
+++ b/mm7_2.cpp	Tue Feb 26 02:09:56 2013 +0400
@@ -3757,7 +3757,7 @@
   //v3 = dword_F8B198;
   if ( dword_F8B19C != 1 )
     goto LABEL_13;
-  if ( dword_F8B198 == 30 )
+  if ( in_current_bilding_type == 30 )
   {
     if ( uMessageParam == 17 )
     {
@@ -3778,9 +3778,9 @@
     goto LABEL_9;
   }
   v8 = window_SpeakInHouse;
-  if ( (dword_F8B198 == 27 || dword_F8B198 == 28)
+  if ( (in_current_bilding_type == 27 || in_current_bilding_type == 28)
     && (v1 = 0, *(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7))
-    || dword_F8B198 != 23 || uMessageParam != 10 )
+    || in_current_bilding_type != 23 || uMessageParam != 10 )
   {
 LABEL_9:
     pDialogueWindow->Release();
@@ -3801,34 +3801,34 @@
   }
 LABEL_11:
   dword_F8B19C = uMessageParam;
-  if ( dword_F8B198 < 19 )
-  {
-    v9 = pIcons_LOD->LoadTexture(off_4F03B8[dword_F8B198], TEXTURE_16BIT_PALETTE);
+  if ( in_current_bilding_type < 19 )
+  {
+    v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_bilding_type], TEXTURE_16BIT_PALETTE);
     //v3 = dword_F8B198;
     dword_F8B164 = &pIcons_LOD->pTextures[v9];
 LABEL_13:
     v8 = window_SpeakInHouse;
   }
-  if ( dword_F8B198 > 21 )
-  {
-    if ( dword_F8B198 == 22 )
+  if ( in_current_bilding_type > 21 )
+  {
+    if ( in_current_bilding_type == 22 )
     {
       if ( dword_F8B19C >= 7 && dword_F8B19C <= 8 )
         pKeyActionMap->EnterText(1, 10, v8);
       return;
     }
-    if ( dword_F8B198 != 23 && dword_F8B198 != 30 )
+    if ( in_current_bilding_type != 23 && in_current_bilding_type != 30 )
       return;
   }
   else
   {
-    if ( dword_F8B198 != 21 )
-    {
-      if ( dword_F8B198 <= (signed int)v1 )
+    if ( in_current_bilding_type != 21 )
+    {
+      if ( in_current_bilding_type <= (signed int)v1 )
         return;
-      if ( dword_F8B198 > 4 )
-      {
-        if ( dword_F8B198 <= 16 )
+      if ( in_current_bilding_type > 4 )
+      {
+        if ( in_current_bilding_type <= 16 )
         {
           if ( (signed __int64)__PAIR__(
                                  *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44472],
@@ -3864,7 +3864,7 @@
           }
           return;
         }
-        if ( dword_F8B198 != 17 )
+        if ( in_current_bilding_type != 17 )
           return;
         if ( uMessageParam == 99 )
         {
@@ -4080,12 +4080,12 @@
       case 96:
         pDialogueWindow->eWindowType = WINDOW_MainMenu;
         UI_CreateEndConversationButton();
-        sub_4B3703(dword_F8B198);
+        FillAviableSkillsToTeach(in_current_bilding_type);
         break;
       case 101:
         pDialogueWindow->eWindowType = WINDOW_MainMenu;
         UI_CreateEndConversationButton();
-        sub_4B3A72(dword_F8B198);
+        sub_4B3A72(in_current_bilding_type);
         break;
       case 102:
         dword_F8B19C = 102;
@@ -4150,7 +4150,7 @@
                   if ( pParty->uNumGold < v37 )
                   {
                     ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);
-                    if ( dword_F8B198 == 30 || dword_F8B198 == 21 )
+                    if ( in_current_bilding_type == 30 || in_current_bilding_type == 21 )
                       v39 = 4;
                     else
                       v39 = 2;
@@ -4172,7 +4172,7 @@
               {
                 pDialogueWindow->eWindowType = WINDOW_MainMenu;
                 UI_CreateEndConversationButton();
-                sub_4B3AD4(dword_F8B198);
+                sub_4B3AD4(in_current_bilding_type);
               }
             }
           }
@@ -4222,7 +4222,7 @@
       //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] );
       while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] );
     }
-    if ( dword_F8B198 == 1 )
+    if ( in_current_bilding_type == 1 )
     {
       v47 = v8->ptr_1C;
       v48 = 0;
@@ -4267,7 +4267,7 @@
       //while ( v43 < (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)v8->ptr_1C]] );
       while ( v43 < (unsigned __int8)uItemsAmountPerShopType[p2DEvents[(unsigned int)v8->ptr_1C - 1].uType] );
     }
-    if ( dword_F8B198 == 1 )
+    if ( in_current_bilding_type == 1 )
     {
       v52 = v8->ptr_1C;
       v53 = 0;
@@ -4336,7 +4336,7 @@
         {
           UI_CreateEndConversationButton();
           dword_F8B19C = 94;
-          sub_4B3AD4(dword_F8B198);
+          sub_4B3AD4(in_current_bilding_type);
         }
         else
         {
@@ -4345,13 +4345,13 @@
             pVideoPlayer->_4BF5B2();
 LABEL_28:
             dword_F8B19C = 1;
-            sub_4B3B42(dword_F8B198);
+            sub_4B3B42(in_current_bilding_type);
             return 1;
           }
           pVideoPlayer->_4BF5B2();
           UI_CreateEndConversationButton();
           dword_F8B19C = 101;
-          sub_4B3A72(dword_F8B198);
+          sub_4B3A72(in_current_bilding_type);
         }
         return 1;
       }
@@ -4514,7 +4514,7 @@
           {
             ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);// "You don't have enough gold"
             v13 = window_SpeakInHouse->ptr_1C;
-            if ( dword_F8B198 == 30 )
+            if ( in_current_bilding_type == 30 )
               v55 = 4;
             else
               v55 = 2;