diff mm7_4.cpp @ 480:d4ea191229ff

BildingType
author Ritor1
date Tue, 26 Feb 2013 15:23:15 +0600
parents 77430756f06a
children 5b6e2021c6fe
line wrap: on
line diff
--- a/mm7_4.cpp	Tue Feb 26 12:01:54 2013 +0600
+++ b/mm7_4.cpp	Tue Feb 26 15:23:15 2013 +0600
@@ -9082,7 +9082,7 @@
   //v0 = pPlayers[uActiveCharacter];
   if ( in_current_bilding_type <= 0 )
     return;
-  if ( in_current_bilding_type <= 4 )
+  if ( in_current_bilding_type <= BildingType_AlchemistShop )
   {
     if ( dword_F8B19C != 2 )
     {
@@ -9116,7 +9116,7 @@
 		v7 =&pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v5];
     goto LABEL_15;
   }
-  if ( in_current_bilding_type <= 16 && dword_F8B19C == 18 )
+  if ( in_current_bilding_type <= BildingType_16 && dword_F8B19C == BildingType_18 )
   {
     v1 = pMouse->GetCursorPos(&a2);
     v2 = v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v16)->y];
@@ -9183,16 +9183,16 @@
   if ( in_current_bilding_type > 0 )
   {
     v0 = 3;
-    if ( in_current_bilding_type > 3 )
-    {
-      if ( in_current_bilding_type == 22 )
+    if ( in_current_bilding_type > BildingType_MagicShop )
+    {
+      if ( in_current_bilding_type == BildingType_Bank )
       {
         if ( !dword_F8B1E4 )
           return;
       }
       else
       {
-        if ( in_current_bilding_type != 23 )
+        if ( in_current_bilding_type != BildingType_Tample )
           return;
       }
       v1 = (unsigned int)window_SpeakInHouse->ptr_1C;
@@ -9637,7 +9637,7 @@
   strcpy(v22, v24);
   pParty->field_709 = 0;
   sub_44A56A();
-  PrepareHouse((HOUSE_TYPE)(int)window_SpeakInHouse->ptr_1C);
+  PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C);
   dword_F8B19C = 1;
 
   pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
@@ -13133,9 +13133,7 @@
     pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5);
     return result; // void func
   }
-  if ( !(unsigned __int16)_449B57_test_bit(
-                            (unsigned __int8 *)v1->field_152,
-                            word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) )
+  if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v1->field_152, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) )
   {
     v24 = pNPCTopics[171].pText;
     v25 = v31;
@@ -14210,7 +14208,7 @@
 }
 
 //----- (0044606A) --------------------------------------------------------
-void PrepareHouse(HOUSE_TYPE house)
+void PrepareHouse(HOUSE_ID house)
 {
   //unsigned int v1; // ebx@1
   //signed int v2; // esi@1
@@ -14333,9 +14331,9 @@
 
 
 //----- (0044622E) --------------------------------------------------------
-bool __fastcall EnterHouse(HOUSE_TYPE uHouseID)
-{
-  //enum HOUSE_TYPE v1; // edi@1
+bool __fastcall EnterHouse(HOUSE_ID uHouseID)
+{
+  //enum HOUSE_ID v1; // edi@1
   //int v2; // edi@5
   unsigned int uOpenTime; // eax@5
   int uCloseTime; // esi@5
@@ -14358,7 +14356,7 @@
   //const char *v22; // [sp-4h] [bp-40h]@33
   char pContainer[40]; // [sp+Ch] [bp-30h]@32
   unsigned int v24; // [sp+34h] [bp-8h]@5
-  //enum HOUSE_TYPE v25; // [sp+38h] [bp-4h]@1
+  //enum HOUSE_ID v25; // [sp+38h] [bp-4h]@1
 
   //v1 = uHouseID;
   //v25 = uHouseID;
@@ -14438,7 +14436,7 @@
     //uCurrentHouse_Animation = p2DEvents_minus1___02[v2];
     uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID;
     in_current_bilding_type = LOBYTE(pAnimatedRooms[uCurrentHouse_Animation].field_C);
-    if ( in_current_bilding_type == 20 && pParty->uFine )   // going 2 jail
+    if ( in_current_bilding_type == BildingType_20 && pParty->uFine )   // going 2 jail
     {
       uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID;
       //v25 = HOUSE_187;