diff mm7_2.cpp @ 747:585490c29945

House dialogue ids appended
author Nomad
date Fri, 22 Mar 2013 21:50:41 +0200
parents 9cc972ebd3cf
children daecb0225226
line wrap: on
line diff
--- a/mm7_2.cpp	Fri Mar 22 23:46:32 2013 +0600
+++ b/mm7_2.cpp	Fri Mar 22 21:50:41 2013 +0200
@@ -301,7 +301,7 @@
   pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0);
   pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0, 0x53u, 0, "", 0);
   pDialogueWindow->_41D08F(1, 1, 0, 2);
-  dialog_menu_id = -1;
+  dialog_menu_id = HOUSE_DIALOGUE_OTHER;
   v0 = (int)((char *)window_SpeakInHouse->ptr_1C - 102);
   if ( (signed __int64)__PAIR__(pParty->field_3C.field_0[2 * v0 + 1], pParty->field_3C.field_0[2 * v0]) < (signed __int64)pParty->uTimePlayed )
   {
@@ -949,7 +949,7 @@
 		  }
 	  }
 	//LABEL_11:
-	  dialog_menu_id = uMessageParam;
+	  dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam;
 	  if ( in_current_building_type < BildingType_19 )
 	  {
 		v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_building_type], TEXTURE_16BIT_PALETTE);
@@ -1524,7 +1524,7 @@
     case 102:
     case 103:
 		{
-        dialog_menu_id = uMessageParam;
+        dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam;
         break;
 		}
     case 104:
@@ -1537,7 +1537,7 @@
           ++pMessageQueue_50CBD0->uNumMessages;
         }*/
         pMessageQueue_50CBD0->AddMessage(UIMSG_PlayArcomage, 0, 0);
-        dialog_menu_id = 104;
+        dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT;
         break;
 		}
 	case 2:
@@ -1655,7 +1655,7 @@
 	case 4:
 	case 5:
 		{
-		dialog_menu_id = uMessageParam;
+		dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam;
 		sub_421B2C_PlaceInInventory_or_DropPickedItem();
 		break;
 		}
@@ -1943,7 +1943,7 @@
         if ( v0 == 3 || v0 == 5 || v0 == 4 )
         {
           UI_CreateEndConversationButton();
-          dialog_menu_id = 94;
+          dialog_menu_id = HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT;
           sub_4B3AD4(in_current_building_type);
         }
         else
@@ -1952,26 +1952,26 @@
           {
             pVideoPlayer->_4BF5B2();
 //LABEL_28:
-            dialog_menu_id = 1;
+            dialog_menu_id = HOUSE_DIALOGUE_MAIN;
             sub_4B3B42(in_current_building_type);
             return 1;
           }
           pVideoPlayer->_4BF5B2();
           UI_CreateEndConversationButton();
-          dialog_menu_id = 101;
+          dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN;
           sub_4B3A72(in_current_building_type);
         }
         return 1;
       }
       pVideoPlayer->_4BF5B2();
       UI_CreateEndConversationButton();
-	  dialog_menu_id = 1;
+	  dialog_menu_id = HOUSE_DIALOGUE_MAIN;
 	  sub_4B3B42(in_current_building_type);
 	  return 1;
     }
     pDialogueNPCCount = 0;
     pDialogueWindow->Release();
-    dialog_menu_id = 0;
+    dialog_menu_id = HOUSE_DIALOGUE_NULL;
     pDialogueWindow = 0;
     pIcons_LOD->_40F9C5();
     v1 = uNumDialogueNPCPortraits;
@@ -2108,15 +2108,16 @@
     pAudioPlayer->PlaySound(SOUND_27, v46, v47, v48, v49, v50, v52, v56);
     return;
   }
+
   switch(dialog_menu_id)
   {
-	case 94:
+	case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT:
 		{
 			pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
 			sub_421EA6_OnInventoryLeftClick();
 			break;
 		}
-	case 18:
+	case HOUSE_DIALOGUE_GULD_BUY_BOOKS:
 		{
 		v17 = pMouse->GetCursorPos(&v63);
 		v18 = pRenderer->pActiveZBuffer[v17->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v61)->y]] & 0xFFFF;
@@ -2165,7 +2166,8 @@
 		ShowStatusBarString(v9, v54);
 		break;
 		}
-	case 3:
+
+	case HOUSE_DIALOGUE_SHOP_SELL:
 		{
 		v14 = pMouse->GetCursorPos(&v71)->x - 14;
 		v79 = (v14 >> 5) + 14 * ((pMouse->GetCursorPos(&v69)->y - 17) >> 5);
@@ -2199,7 +2201,7 @@
 		break;
 		}
 
-	case 4:
+	case HOUSE_DIALOGUE_SHOP_IDENTIFY:
     {
       pMouse->GetCursorPos(&v62);
 		v10 = v62.x - 14;
@@ -2250,7 +2252,9 @@
 		}
 		break;
 		}
-	case 5:
+
+
+	case HOUSE_DIALOGUE_SHOP_REPAIR:
 		{
 		v1 = pMouse->GetCursorPos(&a2)->x - 14;
 		v79 = (v1 >> 5) + 14 * ((pMouse->GetCursorPos(&v70)->y - 17) >> 5);
@@ -2317,8 +2321,9 @@
 		}
 		break;
 		}
-	case 2:
-	case 95:
+
+	case HOUSE_DIALOGUE_SHOP_BUY_STANDARD:
+	case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL:
 		{
 	//LABEL_49:
 		v28 = pMouse->GetCursorPos(&v59);
@@ -2429,6 +2434,7 @@
 
 	default:
 		{
+          __debugbreak(); // please do record these dialogue ids to the HOUSE_DIALOGUE_MENU  enum
 		if( dialog_menu_id >= 36 && dialog_menu_id <= 72 )
 		{
 			v42 = dialog_menu_id - 36;