diff GUIWindow.cpp @ 480:d4ea191229ff

BildingType
author Ritor1
date Tue, 26 Feb 2013 15:23:15 +0600
parents 7f1b00901cf7
children 5b6e2021c6fe
line wrap: on
line diff
--- a/GUIWindow.cpp	Tue Feb 26 12:01:54 2013 +0600
+++ b/GUIWindow.cpp	Tue Feb 26 15:23:15 2013 +0600
@@ -1070,9 +1070,9 @@
   v18.uFrameZ += 8;
   if ( !pDialogueNPCCount )
   {
-    if ( in_current_bilding_type == 31 )
+    if ( in_current_bilding_type == BildingType_Jail )
     {
-      sub_4B4F4F();
+      JailDialog();
       goto LABEL_58;
     }
     if ( ptr_F8B1E8 )
@@ -1151,73 +1151,62 @@
       //p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]);
       p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterTitle);
     v18.DrawTitleText(pFontCreate, 0x1E3u, 0x71u, v19, pTmpBuf, 3u);
-    if ( in_current_bilding_type <= 18 )
-    {
       switch ( in_current_bilding_type )
       {
-        case 18:
-          sub_4B6478();
-          break;
-        case 1:
+        case BildingType_WeaponShop:
           WeaponShopDialog();
           break;
-        case 2:
+        case BildingType_ArmorShop:
           ArmorShopDialog();
           break;
-        case 3:
+        case BildingType_MagicShop:
           MagicShopDialog();
           break;
-        case 4:
+        case BildingType_AlchemistShop:
           AlchemistDialog();
           break;
+        case BildingType_FireGuild:
+        case BildingType_AirGuild:
+        case BildingType_WaterGuild:
+        case BildingType_EarthGuild:
+        case BildingType_SpiritGuild:
+        case BildingType_MindGuild:
+        case BildingType_BodyGuild:
+        case BildingType_LightGuild:
+        case BildingType_Dark:
+        //case BildingType_14:
+        //case BildingType_15:
+        //case BildingType_16:
+          GuildDialog();
+          break;
+        case BildingType_18:
+          __debugbreak; //What over the dialog?
+          sub_4B6478();
+          break;
+        case BildingType_TownHall:
+          TownHallDialog();
+          break;
+        case BildingType_Tavern:
+          TavernDialog();
+          break;
+        case BildingType_Bank:
+          BankDialog();
+          break;
+        case BildingType_Tample:
+          TampleDialog();
+          break;
+        case BildingType_Stables:
+          TravelByTransport();
+          break;
+        case BildingType_Training:
+          TrainingDialog();
+          break;
+        case BildingType_Jail:
+          JailDialog();
+          break;
         default:
-          if ( in_current_bilding_type > 4 )
-          {
-            if ( in_current_bilding_type <= 16 )
-            {
-              GuildDialog();
-            }
-            else
-            {
-              if ( in_current_bilding_type == 17 )
-                sub_4B7911();
-            }
-          }
           break;
       }
-      goto LABEL_58;
-    }
-    switch ( in_current_bilding_type )
-    {
-      case 21:
-        TavernDialog();
-        break;
-      case 22:
-        _4B7D7E_bank();
-        break;
-      case 23:
-        TampleDialog();
-        break;
-      default:
-        if ( in_current_bilding_type <= 26 )
-          break;
-        if ( in_current_bilding_type <= 28 )
-        {
-          TravelByTransport();
-        }
-        else
-        {
-          if ( in_current_bilding_type != 30 )
-          {
-            if ( in_current_bilding_type != 31 )
-              break;
-            sub_4B4F4F();
-            goto LABEL_58;
-          }
-          TrainingDialog();
-        }
-        break;
-    }
   }
 LABEL_58:
   if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )