Mercurial > mm7
comparison UIHouses.cpp @ 747:585490c29945
House dialogue ids appended
author | Nomad |
---|---|
date | Fri, 22 Mar 2013 21:50:41 +0200 |
parents | 9cc972ebd3cf |
children | f39fbeb65b28 |
comparison
equal
deleted
inserted
replaced
746:852ec78d9548 | 747:585490c29945 |
---|---|
27 | 27 |
28 | 28 |
29 int uHouse_ExitPic; // weak | 29 int uHouse_ExitPic; // weak |
30 | 30 |
31 int dword_591080; // weak | 31 int dword_591080; // weak |
32 | |
33 int in_current_building_type; // 00F8B198 | |
34 HOUSE_DIALOGUE_MENU dialog_menu_id; // 00F8B19C | |
32 | 35 |
33 const stru159 pAnimatedRooms[196] = //0x4E5F70 | 36 const stru159 pAnimatedRooms[196] = //0x4E5F70 |
34 { | 37 { |
35 {"", 0x4, 0x1F4, 0, 0, 0}, | 38 {"", 0x4, 0x1F4, 0, 0, 0}, |
36 {"Human Armor01", 0x20, 0x2C0, 2, 58, 0}, | 39 {"Human Armor01", 0x20, 0x2C0, 2, 58, 0}, |
1034 if ( v7 <= 0 ) | 1037 if ( v7 <= 0 ) |
1035 { | 1038 { |
1036 v7 = 1; | 1039 v7 = 1; |
1037 v83 = 1; | 1040 v83 = 1; |
1038 } | 1041 } |
1042 | |
1039 switch(dialog_menu_id) | 1043 switch(dialog_menu_id) |
1040 { | 1044 { |
1041 case DIALOG_SHOP_MAIN: | 1045 case HOUSE_DIALOGUE_MAIN: |
1042 { | 1046 { |
1043 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 1047 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
1044 return; | 1048 return; |
1045 | 1049 |
1046 sprintf(Dest, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 2 ? pColorYellow : pColorWhite); | 1050 sprintf(Dest, "\f%05d", pDialogueWindow->pCurrentPosActiveItem == 2 ? pColorYellow : pColorWhite); |
1124 return; | 1128 return; |
1125 } | 1129 } |
1126 } | 1130 } |
1127 break; | 1131 break; |
1128 } | 1132 } |
1129 case DIALOG_SHOP_ARCOMAGE_102: | 1133 |
1130 { | 1134 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_102: |
1131 __debugbreak; | 1135 { |
1136 __debugbreak(); | |
1132 pOutString = pFontArrus; | 1137 pOutString = pFontArrus; |
1133 strcpy(pTmpBuf, pNPCTopics[354].pText); | 1138 strcpy(pTmpBuf, pNPCTopics[354].pText); |
1134 dialog_window.uFrameWidth = 460; | 1139 dialog_window.uFrameWidth = 460; |
1135 dialog_window.uFrameZ = 452; | 1140 dialog_window.uFrameZ = 452; |
1136 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0) + 7; | 1141 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0) + 7; |
1144 pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); | 1149 pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); |
1145 v63 = FitTextInAWindow(pTmpBuf, pOutString, &dialog_window, 0xCu, 0); | 1150 v63 = FitTextInAWindow(pTmpBuf, pOutString, &dialog_window, 0xCu, 0); |
1146 window_SpeakInHouse->DrawText(pOutString, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); | 1151 window_SpeakInHouse->DrawText(pOutString, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); |
1147 break; | 1152 break; |
1148 } | 1153 } |
1149 case DIALOG_SHOP_ARCOMAGE_103: | 1154 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_103: |
1150 { | 1155 { |
1151 __debugbreak; | 1156 __debugbreak(); |
1152 strcpy(pTmpBuf, pNPCTopics[(uint)window_SpeakInHouse->ptr_1C + 247].pText); | 1157 strcpy(pTmpBuf, pNPCTopics[(uint)window_SpeakInHouse->ptr_1C + 247].pText); |
1153 dialog_window.uFrameWidth = 460; | 1158 dialog_window.uFrameWidth = 460; |
1154 dialog_window.uFrameZ = 452; | 1159 dialog_window.uFrameZ = 452; |
1155 v61 = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0); | 1160 v61 = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0); |
1156 pTextHeight = v61 + 7; | 1161 pTextHeight = v61 + 7; |
1159 pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); | 1164 pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); |
1160 v63 = FitTextInAWindow(pTmpBuf, pFontArrus, &dialog_window, 0xCu, 0); | 1165 v63 = FitTextInAWindow(pTmpBuf, pFontArrus, &dialog_window, 0xCu, 0); |
1161 window_SpeakInHouse->DrawText(pFontArrus, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); | 1166 window_SpeakInHouse->DrawText(pFontArrus, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); |
1162 break; | 1167 break; |
1163 } | 1168 } |
1164 case DIALOG_SHOP_ARCOMAGE_RESULT: | 1169 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT: |
1165 { | 1170 { |
1166 if ( pArcomageGame->bGameInProgress == 1 ) | 1171 if ( pArcomageGame->bGameInProgress == 1 ) |
1167 return; | 1172 return; |
1168 if ( pArcomageGame->uGameResult ) | 1173 if ( pArcomageGame->uGameResult ) |
1169 { | 1174 { |
1179 strcpy(pTmpBuf, v72); | 1184 strcpy(pTmpBuf, v72); |
1180 v66 = (174 - pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 0, 0)) / 2 + 138; | 1185 v66 = (174 - pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 0, 0)) / 2 + 138; |
1181 dialog_window.DrawTitleText(pFontArrus, 0, v66, pColorYellow, pTmpBuf, 3); | 1186 dialog_window.DrawTitleText(pFontArrus, 0, v66, pColorYellow, pTmpBuf, 3); |
1182 break; | 1187 break; |
1183 } | 1188 } |
1184 case DIALOG_SHOP_REST: | 1189 |
1190 case HOUSE_DIALOGUE_TAVERN_REST: | |
1185 { | 1191 { |
1186 if ( pParty->uNumGold >= (unsigned int)pOutString ) | 1192 if ( pParty->uNumGold >= (unsigned int)pOutString ) |
1187 { | 1193 { |
1188 Party::TakeGold((unsigned int)pOutString); | 1194 Party::TakeGold((unsigned int)pOutString); |
1189 v27 = (int)window_SpeakInHouse->ptr_1C; | 1195 v27 = (int)window_SpeakInHouse->ptr_1C; |
1190 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); | 1196 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); |
1191 dialog_menu_id = 0; | 1197 dialog_menu_id = HOUSE_DIALOGUE_NULL; |
1192 sub_4BD8B5(); | 1198 sub_4BD8B5(); |
1193 sub_4B1D27(); | 1199 sub_4B1D27(); |
1194 pVideoPlayer->Unload(); | 1200 pVideoPlayer->Unload(); |
1195 window_SpeakInHouse->Release(); | 1201 window_SpeakInHouse->Release(); |
1196 window_SpeakInHouse = 0; | 1202 window_SpeakInHouse = 0; |
1205 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); | 1211 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); |
1206 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); | 1212 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); |
1207 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); | 1213 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); |
1208 break; | 1214 break; |
1209 } | 1215 } |
1210 case DIALOG_SHOP_SKILLS: | 1216 |
1217 case HOUSE_DIALOGUE_LEARN_SKILLS: | |
1211 { | 1218 { |
1212 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 1219 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
1213 return; | 1220 return; |
1214 v0 = 0; | 1221 v0 = 0; |
1215 v9 = (signed __int64)(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].flt_24 * 500.0); | 1222 v9 = (signed __int64)(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].flt_24 * 500.0); |
1278 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); | 1285 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); |
1279 pTextHeight = (174 - pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 0, 0)) / 2 + 138; | 1286 pTextHeight = (174 - pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 0, 0)) / 2 + 138; |
1280 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, pColorYellow, pTmpBuf, 3); | 1287 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, pColorYellow, pTmpBuf, 3); |
1281 return; | 1288 return; |
1282 } | 1289 } |
1283 case DIALOG_SHOP_BYE_FOOD: | 1290 |
1291 case HOUSE_DIALOGUE_TAVERN_BUY_FOOD: | |
1284 { | 1292 { |
1285 *(_QWORD *)Str = pParty->uNumFoodRations; | 1293 *(_QWORD *)Str = pParty->uNumFoodRations; |
1286 //if ( (double)pParty->uNumFoodRations >= p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C] ) | 1294 //if ( (double)pParty->uNumFoodRations >= p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C] ) |
1287 if ( (double)pParty->uNumFoodRations >= p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier ) | 1295 if ( (double)pParty->uNumFoodRations >= p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier ) |
1288 { | 1296 { |
1304 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); // "You don't have enough gold" | 1312 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); // "You don't have enough gold" |
1305 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); | 1313 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); |
1306 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); | 1314 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); |
1307 break; | 1315 break; |
1308 } | 1316 } |
1309 case DIALOG_SHOP_ARCOMAGE_MAIN: | 1317 |
1318 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN: | |
1310 { | 1319 { |
1311 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 1320 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
1312 { | 1321 { |
1313 v48 = 2; | 1322 v48 = 2; |
1314 pShopOptions[0] = pGlobalTXT_LocalizationStrings[620]; | 1323 pShopOptions[0] = pGlobalTXT_LocalizationStrings[620]; |
1464 dialog_window.uFrameX = 483; | 1473 dialog_window.uFrameX = 483; |
1465 dialog_window.uFrameWidth = 148; | 1474 dialog_window.uFrameWidth = 148; |
1466 dialog_window.uFrameZ = 334; | 1475 dialog_window.uFrameZ = 334; |
1467 pColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 1476 pColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
1468 pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); | 1477 pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); |
1478 | |
1469 switch(dialog_menu_id) | 1479 switch(dialog_menu_id) |
1470 { | 1480 { |
1471 case DIALOG_SHOP_MAIN: | 1481 case HOUSE_DIALOGUE_MAIN: |
1472 { | 1482 { |
1473 pNumActiveItem = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); | 1483 pNumActiveItem = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); |
1474 if ( pNumActiveItem ) | 1484 if ( pNumActiveItem ) |
1475 { | 1485 { |
1476 pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; | 1486 pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; |
1507 while ( pItemNum < pNumActiveItem ); | 1517 while ( pItemNum < pNumActiveItem ); |
1508 } | 1518 } |
1509 } | 1519 } |
1510 break; | 1520 break; |
1511 } | 1521 } |
1512 case DIALOG_SHOP_BUY_STANDART: | 1522 |
1523 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: | |
1513 { | 1524 { |
1514 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); | 1525 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); |
1515 v48 = 0; | 1526 v48 = 0; |
1516 pItemNum = 0; | 1527 pItemNum = 0; |
1517 v109 = 0; | 1528 v109 = 0; |
1594 pNumActiveItem = 0; //added | 1605 pNumActiveItem = 0; //added |
1595 } | 1606 } |
1596 } | 1607 } |
1597 break; | 1608 break; |
1598 } | 1609 } |
1599 case DIALOG_SHOP_SELL: | 1610 |
1611 case HOUSE_DIALOGUE_SHOP_SELL: | |
1600 { | 1612 { |
1601 draw_leather(); | 1613 draw_leather(); |
1602 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 1614 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
1603 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0); | 1615 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0); |
1604 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 1616 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
1612 v7 = BuilDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, v79, (char *)window_SpeakInHouse->ptr_1C, 3, 0); | 1624 v7 = BuilDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, v79, (char *)window_SpeakInHouse->ptr_1C, 3, 0); |
1613 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 1625 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
1614 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 1626 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
1615 break; | 1627 break; |
1616 } | 1628 } |
1617 case DIALOG_SHOP_IDENTIFY: | 1629 |
1630 case HOUSE_DIALOGUE_SHOP_IDENTIFY: | |
1618 { | 1631 { |
1619 draw_leather(); | 1632 draw_leather(); |
1620 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 1633 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
1621 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0); | 1634 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0); |
1622 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 1635 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
1639 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 1652 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
1640 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 1653 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
1641 } | 1654 } |
1642 break; | 1655 break; |
1643 } | 1656 } |
1644 case DIALOG_SHOP_REPAIR: | 1657 |
1658 case HOUSE_DIALOGUE_SHOP_REPAIR: | |
1645 { | 1659 { |
1646 draw_leather(); | 1660 draw_leather(); |
1647 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 1661 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
1648 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[198], 0); | 1662 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[198], 0); |
1649 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) | 1663 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) |
1659 pTextHeight = (174 - pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0)) / 2 + 138; | 1673 pTextHeight = (174 - pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0)) / 2 + 138; |
1660 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, pColorWhite, v7, 3); | 1674 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, pColorWhite, v7, 3); |
1661 return; | 1675 return; |
1662 } | 1676 } |
1663 break; | 1677 break; |
1664 case DIALOG_SHOP_DISPLAY_EQUIPMENT: | 1678 |
1679 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: | |
1665 { | 1680 { |
1666 draw_leather(); | 1681 draw_leather(); |
1667 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 1682 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
1668 pShopOptions[0] = pGlobalTXT_LocalizationStrings[200];//sell | 1683 pShopOptions[0] = pGlobalTXT_LocalizationStrings[200];//sell |
1669 pShopOptions[1] = pGlobalTXT_LocalizationStrings[113];//identify | 1684 pShopOptions[1] = pGlobalTXT_LocalizationStrings[113];//identify |
1697 } | 1712 } |
1698 while ( pItemNum < pNumActiveItem ); | 1713 while ( pItemNum < pNumActiveItem ); |
1699 } | 1714 } |
1700 break; | 1715 break; |
1701 } | 1716 } |
1702 case DIALOG_SHOP_BUY_SPECIAL: | 1717 |
1718 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: | |
1703 { | 1719 { |
1704 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); | 1720 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); |
1705 v109 = 0; | 1721 v109 = 0; |
1706 pItemNum = 0; | 1722 pItemNum = 0; |
1707 do | 1723 do |
1780 pNumActiveItem = 0; //added | 1796 pNumActiveItem = 0; //added |
1781 } | 1797 } |
1782 } | 1798 } |
1783 break; | 1799 break; |
1784 } | 1800 } |
1785 case DIALOG_SHOP_SKILLS: | 1801 |
1802 case HOUSE_DIALOGUE_LEARN_SKILLS: | |
1786 { | 1803 { |
1787 if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) | 1804 if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) |
1788 return; | 1805 return; |
1789 v0 = 0; | 1806 v0 = 0; |
1790 all_text_height = 0; | 1807 all_text_height = 0; |
1989 dialog_window.uFrameZ = 334; | 2006 dialog_window.uFrameZ = 334; |
1990 pColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 2007 pColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
1991 pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); | 2008 pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); |
1992 switch(dialog_menu_id) | 2009 switch(dialog_menu_id) |
1993 { | 2010 { |
1994 case DIALOG_SHOP_MAIN: | 2011 case HOUSE_DIALOGUE_MAIN: |
1995 { | 2012 { |
1996 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 2013 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
1997 { | 2014 { |
1998 pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; | 2015 pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; |
1999 pShopOptions[1] = pGlobalTXT_LocalizationStrings[152]; | 2016 pShopOptions[1] = pGlobalTXT_LocalizationStrings[152]; |
2030 while ( pItemNum < pNumActiveItem ); | 2047 while ( pItemNum < pNumActiveItem ); |
2031 } | 2048 } |
2032 } | 2049 } |
2033 return; | 2050 return; |
2034 } | 2051 } |
2035 case DIALOG_SHOP_BUY_STANDART: | 2052 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: |
2036 { | 2053 { |
2037 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); | 2054 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); |
2038 v114 = 0; | 2055 v114 = 0; |
2039 do | 2056 do |
2040 { | 2057 { |
2147 return ; | 2164 return ; |
2148 } | 2165 } |
2149 } | 2166 } |
2150 return; | 2167 return; |
2151 } | 2168 } |
2152 case DIALOG_SHOP_SELL: | 2169 case HOUSE_DIALOGUE_SHOP_SELL: |
2153 { | 2170 { |
2154 draw_leather(); | 2171 draw_leather(); |
2155 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 2172 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
2156 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0); | 2173 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0); |
2157 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 2174 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
2165 v21 = BuilDialogueString((char *)pMerchantsSellPhrases[v45], uActiveCharacter - 1, v87, (char *)window_SpeakInHouse->ptr_1C, 3, 0); | 2182 v21 = BuilDialogueString((char *)pMerchantsSellPhrases[v45], uActiveCharacter - 1, v87, (char *)window_SpeakInHouse->ptr_1C, 3, 0); |
2166 pTextHeight = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); | 2183 pTextHeight = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); |
2167 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v21, 3); | 2184 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v21, 3); |
2168 return; | 2185 return; |
2169 } | 2186 } |
2170 case DIALOG_SHOP_IDENTIFY: | 2187 case HOUSE_DIALOGUE_SHOP_IDENTIFY: |
2171 { | 2188 { |
2172 draw_leather(); | 2189 draw_leather(); |
2173 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 2190 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
2174 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0); | 2191 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0); |
2175 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 2192 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
2191 v21 = BuilDialogueString(v38, uActiveCharacter - 1, v37, (char *)window_SpeakInHouse->ptr_1C, 4, 0); | 2208 v21 = BuilDialogueString(v38, uActiveCharacter - 1, v37, (char *)window_SpeakInHouse->ptr_1C, 4, 0); |
2192 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); | 2209 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); |
2193 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); | 2210 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); |
2194 return; | 2211 return; |
2195 } | 2212 } |
2196 case DIALOG_SHOP_DISPLAY_EQUIPMENT: | 2213 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: |
2197 { | 2214 { |
2198 draw_leather(); | 2215 draw_leather(); |
2199 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 2216 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
2200 pShopOptions[0] = pGlobalTXT_LocalizationStrings[200]; | 2217 pShopOptions[0] = pGlobalTXT_LocalizationStrings[200]; |
2201 pShopOptions[1] = pGlobalTXT_LocalizationStrings[113]; | 2218 pShopOptions[1] = pGlobalTXT_LocalizationStrings[113]; |
2229 } | 2246 } |
2230 while ( pItemNum < pNumActiveItem ); | 2247 while ( pItemNum < pNumActiveItem ); |
2231 } | 2248 } |
2232 return; | 2249 return; |
2233 } | 2250 } |
2234 case DIALOG_SHOP_BUY_SPECIAL: | 2251 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: |
2235 { | 2252 { |
2236 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); | 2253 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); |
2237 v114 = 0; | 2254 v114 = 0; |
2238 do | 2255 do |
2239 { | 2256 { |
2350 return; | 2367 return; |
2351 } | 2368 } |
2352 } | 2369 } |
2353 return; | 2370 return; |
2354 } | 2371 } |
2355 case DIALOG_SHOP_SKILLS: | 2372 case HOUSE_DIALOGUE_LEARN_SKILLS: |
2356 { | 2373 { |
2357 if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) | 2374 if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) |
2358 return; | 2375 return; |
2359 all_text_height = 0; | 2376 all_text_height = 0; |
2360 v5 = (signed __int64)(p2DEvents[(signed int)window_SpeakInHouse->ptr_1C - 1].flt_24 * 500.0); | 2377 v5 = (signed __int64)(p2DEvents[(signed int)window_SpeakInHouse->ptr_1C - 1].flt_24 * 500.0); |
2609 dialog_window.uFrameZ = 334; | 2626 dialog_window.uFrameZ = 334; |
2610 m_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 2627 m_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
2611 hilight_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); | 2628 hilight_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); |
2612 switch (dialog_menu_id) | 2629 switch (dialog_menu_id) |
2613 { | 2630 { |
2614 case DIALOG_SHOP_MAIN: | 2631 case HOUSE_DIALOGUE_MAIN: |
2615 { | 2632 { |
2616 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 2633 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
2617 return; | 2634 return; |
2618 pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; //"Buy Standard" | 2635 pShopOptions[0] = pGlobalTXT_LocalizationStrings[134]; //"Buy Standard" |
2619 pShopOptions[1] = pGlobalTXT_LocalizationStrings[152]; //"Buy Special" | 2636 pShopOptions[1] = pGlobalTXT_LocalizationStrings[152]; //"Buy Special" |
2646 ++j; | 2663 ++j; |
2647 } | 2664 } |
2648 } | 2665 } |
2649 } | 2666 } |
2650 break; | 2667 break; |
2651 case DIALOG_SHOP_BUY_STANDART: | 2668 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: |
2652 { | 2669 { |
2653 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); | 2670 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); |
2654 textureW = 0; | 2671 textureW = 0; |
2655 v153 = 0; | 2672 v153 = 0; |
2656 for(int i=0; i<8; ++i) | 2673 for(int i=0; i<8; ++i) |
2726 } | 2743 } |
2727 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 2744 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
2728 return; | 2745 return; |
2729 } | 2746 } |
2730 break; | 2747 break; |
2731 case DIALOG_SHOP_SELL: | 2748 case HOUSE_DIALOGUE_SHOP_SELL: |
2732 { | 2749 { |
2733 draw_leather(); | 2750 draw_leather(); |
2734 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 2751 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
2735 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0);//"Select the Item to Sell" | 2752 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0);//"Select the Item to Sell" |
2736 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) | 2753 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) |
2748 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 2765 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
2749 dialog_window.DrawTitleText(pFontArrus, 0, v115, m_text_color, v36, 3); | 2766 dialog_window.DrawTitleText(pFontArrus, 0, v115, m_text_color, v36, 3); |
2750 return; | 2767 return; |
2751 } | 2768 } |
2752 break; | 2769 break; |
2753 case DIALOG_SHOP_IDENTIFY: | 2770 case HOUSE_DIALOGUE_SHOP_IDENTIFY: |
2754 { | 2771 { |
2755 draw_leather(); | 2772 draw_leather(); |
2756 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 2773 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
2757 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0); //"Select the Item to Identify" | 2774 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0); //"Select the Item to Identify" |
2758 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 2775 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
2792 } | 2809 } |
2793 } | 2810 } |
2794 } | 2811 } |
2795 } | 2812 } |
2796 break; | 2813 break; |
2797 case DIALOG_SHOP_REPAIR: | 2814 case HOUSE_DIALOGUE_SHOP_REPAIR: |
2798 { | 2815 { |
2799 draw_leather(); | 2816 draw_leather(); |
2800 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 2817 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
2801 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[198], 0); | 2818 DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[198], 0); |
2802 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) | 2819 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) |
2888 } | 2905 } |
2889 dialog_window.DrawCurrentTime(pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 2906 dialog_window.DrawCurrentTime(pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
2890 return; | 2907 return; |
2891 } | 2908 } |
2892 break; | 2909 break; |
2893 case DIALOG_SHOP_DISPLAY_EQUIPMENT: | 2910 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: |
2894 { | 2911 { |
2895 draw_leather(); | 2912 draw_leather(); |
2896 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 2913 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
2897 v79 = pShopOptions; | 2914 v79 = pShopOptions; |
2898 pShopOptions[0] = pGlobalTXT_LocalizationStrings[200]; //"Sell" | 2915 pShopOptions[0] = pGlobalTXT_LocalizationStrings[200]; //"Sell" |
2935 while ( (signed int)_this < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ); | 2952 while ( (signed int)_this < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ); |
2936 } | 2953 } |
2937 return; | 2954 return; |
2938 } | 2955 } |
2939 break; | 2956 break; |
2940 case DIALOG_SHOP_BUY_SPECIAL: | 2957 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: |
2941 { | 2958 { |
2942 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); | 2959 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); |
2943 v11 = 0; | 2960 v11 = 0; |
2944 v61 = 0; | 2961 v61 = 0; |
2945 v153 = 0; | 2962 v153 = 0; |
3025 } | 3042 } |
3026 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 3043 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
3027 return; | 3044 return; |
3028 } | 3045 } |
3029 break; | 3046 break; |
3030 case DIALOG_SHOP_SKILLS: | 3047 case HOUSE_DIALOGUE_LEARN_SKILLS: |
3031 { | 3048 { |
3032 if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 3049 if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
3033 return; | 3050 return; |
3034 v152 = 0; | 3051 v152 = 0; |
3035 v37 = pDialogueWindow; | 3052 v37 = pDialogueWindow; |