Mercurial > mm7
comparison UI/UIShops.cpp @ 1410:38df78aba732
deleted stru220.h and stru220 (bezier terrain stuff)
stru167 -> TrailParticle
stru167warp -> TrailParticleGenerator
author | Nomad |
---|---|
date | Fri, 26 Jul 2013 22:19:29 +0200 |
parents | c9e3b93ec570 |
children | 2423bc2af692 |
comparison
equal
deleted
inserted
replaced
1409:c9e3b93ec570 | 1410:38df78aba732 |
---|---|
232 if ( dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_STANDARD) | 232 if ( dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_STANDARD) |
233 pItemInShop = &pParty->SpecialItemsInShops[(int)v61][v60]; | 233 pItemInShop = &pParty->SpecialItemsInShops[(int)v61][v60]; |
234 if ( !v56 || !Str ) | 234 if ( !v56 || !Str ) |
235 { | 235 { |
236 v64 = pPlayer->SelectPhrasesTransaction(pItemInShop, BildingType_WeaponShop, v61, 2); | 236 v64 = pPlayer->SelectPhrasesTransaction(pItemInShop, BildingType_WeaponShop, v61, 2); |
237 v7 = BuilDialogueString((char *)pMerchantsBuyPhrases[v64], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 237 v7 = BuildDialogueString((char *)pMerchantsBuyPhrases[v64], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
238 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 238 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
239 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 239 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
240 } | 240 } |
241 else | 241 else |
242 { | 242 { |
243 v7 = BuilDialogueString(pGlobalTXT_LocalizationStrings[181], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 243 v7 = BuildDialogueString(pGlobalTXT_LocalizationStrings[181], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
244 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 244 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
245 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 245 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
246 } | 246 } |
247 } | 247 } |
248 } | 248 } |
266 pMouse->GetCursorPos(&v94)->x <= 13) || pMouse->GetCursorPos(&v90)->x >= 462 | 266 pMouse->GetCursorPos(&v94)->x <= 13) || pMouse->GetCursorPos(&v90)->x >= 462 |
267 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v106.x), !pNumActiveItem) ) | 267 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v106.x), !pNumActiveItem) ) |
268 return; | 268 return; |
269 v79 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; | 269 v79 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; |
270 v13 = pPlayer->SelectPhrasesTransaction(v79, BildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 3); | 270 v13 = pPlayer->SelectPhrasesTransaction(v79, BildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 3); |
271 v7 = BuilDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, v79, (char *)window_SpeakInHouse->ptr_1C, 3, 0); | 271 v7 = BuildDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, v79, (char *)window_SpeakInHouse->ptr_1C, 3, 0); |
272 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 272 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
273 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 273 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
274 break; | 274 break; |
275 } | 275 } |
276 | 276 |
287 return; | 287 return; |
288 v4 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; | 288 v4 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; |
289 if (!v4->Identified()) | 289 if (!v4->Identified()) |
290 { | 290 { |
291 v10 = pPlayer->SelectPhrasesTransaction(v4, BildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 4); | 291 v10 = pPlayer->SelectPhrasesTransaction(v4, BildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 4); |
292 v7 = BuilDialogueString((char *)pMerchantsIdentifyPhrases[v10], uActiveCharacter - 1, v4, (char *)window_SpeakInHouse->ptr_1C, 4, 0); | 292 v7 = BuildDialogueString((char *)pMerchantsIdentifyPhrases[v10], uActiveCharacter - 1, v4, (char *)window_SpeakInHouse->ptr_1C, 4, 0); |
293 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 293 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
294 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 294 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
295 } | 295 } |
296 else | 296 else |
297 { | 297 { |
298 v7 = BuilDialogueString("%24", uActiveCharacter - 1, v4, (char *)window_SpeakInHouse->ptr_1C, 4, 0); | 298 v7 = BuildDialogueString("%24", uActiveCharacter - 1, v4, (char *)window_SpeakInHouse->ptr_1C, 4, 0); |
299 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 299 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
300 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 300 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
301 } | 301 } |
302 break; | 302 break; |
303 } | 303 } |
314 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v106.x), !pNumActiveItem) | 314 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v106.x), !pNumActiveItem) |
315 || (!(pPlayer->pOwnItems[pNumActiveItem-1].uAttributes& 2)) ) | 315 || (!(pPlayer->pOwnItems[pNumActiveItem-1].uAttributes& 2)) ) |
316 return; | 316 return; |
317 v4 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; | 317 v4 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; |
318 v10 = pPlayer->SelectPhrasesTransaction(v4, BildingType_ArmorShop, (int)window_SpeakInHouse->ptr_1C, 5); | 318 v10 = pPlayer->SelectPhrasesTransaction(v4, BildingType_ArmorShop, (int)window_SpeakInHouse->ptr_1C, 5); |
319 v7 = BuilDialogueString((char *)pMerchantsRepairPhrases[v10], uActiveCharacter - 1, v4, (char *)window_SpeakInHouse->ptr_1C, 5, 0); | 319 v7 = BuildDialogueString((char *)pMerchantsRepairPhrases[v10], uActiveCharacter - 1, v4, (char *)window_SpeakInHouse->ptr_1C, 5, 0); |
320 pTextHeight = (174 - pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0)) / 2 + 138; | 320 pTextHeight = (174 - pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0)) / 2 + 138; |
321 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, pColorWhite, v7, 3); | 321 dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, pColorWhite, v7, 3); |
322 return; | 322 return; |
323 } | 323 } |
324 break; | 324 break; |
423 if ( dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_STANDARD) | 423 if ( dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_STANDARD) |
424 pItemInShop = &pParty->SpecialItemsInShops[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; | 424 pItemInShop = &pParty->SpecialItemsInShops[(int)v61][v60];//v63 = (ItemGen *)&pParty->field_C59C[v62 + 724]; |
425 if ( !v56 || !Str ) | 425 if ( !v56 || !Str ) |
426 { | 426 { |
427 v64 = pPlayer->SelectPhrasesTransaction(pItemInShop, BildingType_WeaponShop, v61, 2); | 427 v64 = pPlayer->SelectPhrasesTransaction(pItemInShop, BildingType_WeaponShop, v61, 2); |
428 v7 = BuilDialogueString((char *)pMerchantsBuyPhrases[v64], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 428 v7 = BuildDialogueString((char *)pMerchantsBuyPhrases[v64], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
429 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 429 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
430 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 430 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
431 } | 431 } |
432 else | 432 else |
433 { | 433 { |
434 v7 = BuilDialogueString(pGlobalTXT_LocalizationStrings[181], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 434 v7 = BuildDialogueString(pGlobalTXT_LocalizationStrings[181], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
435 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); | 435 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); |
436 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); | 436 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); |
437 } | 437 } |
438 } | 438 } |
439 } | 439 } |
762 selected_item = &pParty->StandartItemsInShops[window_SpeakInHouse->par1C][v74-1]; | 762 selected_item = &pParty->StandartItemsInShops[window_SpeakInHouse->par1C][v74-1]; |
763 if ( GetAsyncKeyState(17) == 0 || pPlayers[uActiveCharacter]->CanSteal() == 0) | 763 if ( GetAsyncKeyState(17) == 0 || pPlayers[uActiveCharacter]->CanSteal() == 0) |
764 v15 = (char *)pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(selected_item, BildingType_ArmorShop, window_SpeakInHouse->par1C, 2)]; | 764 v15 = (char *)pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(selected_item, BildingType_ArmorShop, window_SpeakInHouse->par1C, 2)]; |
765 else | 765 else |
766 v15 = pGlobalTXT_LocalizationStrings[181]; //"Steal %24" | 766 v15 = pGlobalTXT_LocalizationStrings[181]; //"Steal %24" |
767 v36 = BuilDialogueString(v15, uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 767 v36 = BuildDialogueString(v15, uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
768 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 768 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
769 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); | 769 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); |
770 return; | 770 return; |
771 } | 771 } |
772 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 772 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
834 selected_item = &pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][v74 - 1]; | 834 selected_item = &pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][v74 - 1]; |
835 if ( GetAsyncKeyState(17) == 0 || pPlayers[uActiveCharacter]->CanSteal() == 0 ) | 835 if ( GetAsyncKeyState(17) == 0 || pPlayers[uActiveCharacter]->CanSteal() == 0 ) |
836 v15 = (char *)pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(selected_item, BildingType_ArmorShop, window_SpeakInHouse->par1C, 2)]; | 836 v15 = (char *)pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(selected_item, BildingType_ArmorShop, window_SpeakInHouse->par1C, 2)]; |
837 else | 837 else |
838 v15 = pGlobalTXT_LocalizationStrings[181]; //"Steal %24" | 838 v15 = pGlobalTXT_LocalizationStrings[181]; //"Steal %24" |
839 v36 = BuilDialogueString(v15, uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 839 v36 = BuildDialogueString(v15, uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
840 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 840 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
841 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); | 841 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); |
842 return; | 842 return; |
843 } | 843 } |
844 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 844 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
895 || (v10 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&pItemCount), v11 = 0, !v10) ) | 895 || (v10 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&pItemCount), v11 = 0, !v10) ) |
896 return; | 896 return; |
897 v116 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItemList[v10 - 1]; | 897 v116 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItemList[v10 - 1]; |
898 v13 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v116, BildingType_ArmorShop, window_SpeakInHouse->par1C, 3); | 898 v13 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v116, BildingType_ArmorShop, window_SpeakInHouse->par1C, 3); |
899 v15 = (char *)pMerchantsSellPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v116, BildingType_ArmorShop, window_SpeakInHouse->par1C, 3)]; | 899 v15 = (char *)pMerchantsSellPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v116, BildingType_ArmorShop, window_SpeakInHouse->par1C, 3)]; |
900 v36 = BuilDialogueString(v15, uActiveCharacter - 1, v116, (char *) window_SpeakInHouse->par1C, 3, 0); | 900 v36 = BuildDialogueString(v15, uActiveCharacter - 1, v116, (char *) window_SpeakInHouse->par1C, 3, 0); |
901 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 901 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
902 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); | 902 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); |
903 return; | 903 return; |
904 } | 904 } |
905 break; | 905 break; |
925 else | 925 else |
926 { | 926 { |
927 v8 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v3, BildingType_ArmorShop, (int)window_SpeakInHouse->ptr_1C, 4); | 927 v8 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(v3, BildingType_ArmorShop, (int)window_SpeakInHouse->ptr_1C, 4); |
928 v5 = (char *)pMerchantsIdentifyPhrases[v8]; | 928 v5 = (char *)pMerchantsIdentifyPhrases[v8]; |
929 } | 929 } |
930 v6 = BuilDialogueString(v5, uActiveCharacter - 1, v3, (char *)window_SpeakInHouse->ptr_1C, 4, 0); | 930 v6 = BuildDialogueString(v5, uActiveCharacter - 1, v3, (char *)window_SpeakInHouse->ptr_1C, 4, 0); |
931 v115 = (174 - pFontArrus->CalcTextHeight(v6, &dialog_window, 0, 0)) / 2 + 138; | 931 v115 = (174 - pFontArrus->CalcTextHeight(v6, &dialog_window, 0, 0)) / 2 + 138; |
932 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v6, 3); | 932 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v6, 3); |
933 return; | 933 return; |
934 } | 934 } |
935 } | 935 } |
953 return; | 953 return; |
954 __debugbreak(); // warning C4700: uninitialized local variable 'v33' used | 954 __debugbreak(); // warning C4700: uninitialized local variable 'v33' used |
955 v116 = &pPlayers[uActiveCharacter]->pInventoryItemList[v33 - 1]; | 955 v116 = &pPlayers[uActiveCharacter]->pInventoryItemList[v33 - 1]; |
956 v35 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[v32 - 1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 5); | 956 v35 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[v32 - 1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 5); |
957 v15 = (char *)pMerchantsRepairPhrases[v35]; | 957 v15 = (char *)pMerchantsRepairPhrases[v35]; |
958 v36 = BuilDialogueString(v15, uActiveCharacter - 1, v116, (char *)window_SpeakInHouse->ptr_1C, 5, 0); | 958 v36 = BuildDialogueString(v15, uActiveCharacter - 1, v116, (char *)window_SpeakInHouse->ptr_1C, 5, 0); |
959 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 959 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
960 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); | 960 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); |
961 return; | 961 return; |
962 } | 962 } |
963 break; | 963 break; |
980 { | 980 { |
981 --pItemCount; | 981 --pItemCount; |
982 v97 = uActiveCharacter - 1; | 982 v97 = uActiveCharacter - 1; |
983 __debugbreak(); // warning C4700: uninitialized local variable 'v98' used | 983 __debugbreak(); // warning C4700: uninitialized local variable 'v98' used |
984 v99 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][v95-1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 2); | 984 v99 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][v95-1], BildingType_ArmorShop, window_SpeakInHouse->par1C, 2); |
985 v100 = BuilDialogueString((char *)pMerchantsBuyPhrases[v99], uActiveCharacter - 1, v98, (char *)window_SpeakInHouse->par1C, 2, 0); | 985 v100 = BuildDialogueString((char *)pMerchantsBuyPhrases[v99], uActiveCharacter - 1, v98, (char *)window_SpeakInHouse->par1C, 2, 0); |
986 v103 = pFontArrus->CalcTextHeight(v100, &dialog_window, 0, 0); | 986 v103 = pFontArrus->CalcTextHeight(v100, &dialog_window, 0, 0); |
987 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v103) / 2 + 138, pWhiteColor, v100, 3); | 987 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v103) / 2 + 138, pWhiteColor, v100, 3); |
988 } | 988 } |
989 v104 = 0; | 989 v104 = 0; |
990 v153 = 0; | 990 v153 = 0; |
1369 } | 1369 } |
1370 else | 1370 else |
1371 { | 1371 { |
1372 v38 = pGlobalTXT_LocalizationStrings[181]; | 1372 v38 = pGlobalTXT_LocalizationStrings[181]; |
1373 } | 1373 } |
1374 v21 = BuilDialogueString(v38, uActiveCharacter - 1, v70, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 1374 v21 = BuildDialogueString(v38, uActiveCharacter - 1, v70, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
1375 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); | 1375 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); |
1376 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); | 1376 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); |
1377 return ; | 1377 return ; |
1378 } | 1378 } |
1379 } | 1379 } |
1390 pMouse->GetCursorPos(&v102)->x <= 13) || pMouse->GetCursorPos(&v100)->x >= 462 | 1390 pMouse->GetCursorPos(&v102)->x <= 13) || pMouse->GetCursorPos(&v100)->x >= 462 |
1391 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v109), !pNumActiveItem) ) | 1391 || (pNumActiveItem = pPlayer->GetItemIDAtInventoryIndex((int *)&v109), !pNumActiveItem) ) |
1392 return; | 1392 return; |
1393 v87 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; | 1393 v87 = (ItemGen *)&pPlayer->pInventoryItemList[pNumActiveItem - 1]; |
1394 v45 = pPlayer->SelectPhrasesTransaction(v87, BildingType_AlchemistShop, (int)window_SpeakInHouse->ptr_1C, 3); | 1394 v45 = pPlayer->SelectPhrasesTransaction(v87, BildingType_AlchemistShop, (int)window_SpeakInHouse->ptr_1C, 3); |
1395 v21 = BuilDialogueString((char *)pMerchantsSellPhrases[v45], uActiveCharacter - 1, v87, (char *)window_SpeakInHouse->ptr_1C, 3, 0); | 1395 v21 = BuildDialogueString((char *)pMerchantsSellPhrases[v45], uActiveCharacter - 1, v87, (char *)window_SpeakInHouse->ptr_1C, 3, 0); |
1396 pTextHeight = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); | 1396 pTextHeight = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); |
1397 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v21, 3); | 1397 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v21, 3); |
1398 return; | 1398 return; |
1399 } | 1399 } |
1400 case HOUSE_DIALOGUE_SHOP_IDENTIFY: | 1400 case HOUSE_DIALOGUE_SHOP_IDENTIFY: |
1416 } | 1416 } |
1417 else | 1417 else |
1418 { | 1418 { |
1419 v38 = "%24"; | 1419 v38 = "%24"; |
1420 } | 1420 } |
1421 v21 = BuilDialogueString(v38, uActiveCharacter - 1, v37, (char *)window_SpeakInHouse->ptr_1C, 4, 0); | 1421 v21 = BuildDialogueString(v38, uActiveCharacter - 1, v37, (char *)window_SpeakInHouse->ptr_1C, 4, 0); |
1422 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); | 1422 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); |
1423 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); | 1423 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); |
1424 return; | 1424 return; |
1425 } | 1425 } |
1426 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: | 1426 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: |
1572 } | 1572 } |
1573 else | 1573 else |
1574 { | 1574 { |
1575 v38 = pGlobalTXT_LocalizationStrings[181]; | 1575 v38 = pGlobalTXT_LocalizationStrings[181]; |
1576 } | 1576 } |
1577 v21 = BuilDialogueString(v38, uActiveCharacter - 1, v70, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 1577 v21 = BuildDialogueString(v38, uActiveCharacter - 1, v70, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
1578 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); | 1578 v40 = pFontArrus->CalcTextHeight(v21, &dialog_window, 0, 0); |
1579 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); | 1579 dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); |
1580 return; | 1580 return; |
1581 } | 1581 } |
1582 } | 1582 } |
1948 else | 1948 else |
1949 { | 1949 { |
1950 v75 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 2); | 1950 v75 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 2); |
1951 v10 = (char *)pMerchantsBuyPhrases[v75]; | 1951 v10 = (char *)pMerchantsBuyPhrases[v75]; |
1952 } | 1952 } |
1953 v30 = BuilDialogueString(v10, uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 1953 v30 = BuildDialogueString(v10, uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
1954 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; | 1954 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; |
1955 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); | 1955 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); |
1956 return; | 1956 return; |
1957 } | 1957 } |
1958 } | 1958 } |
2079 else | 2079 else |
2080 { | 2080 { |
2081 v75 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 2); | 2081 v75 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 2); |
2082 v10 = (char *)pMerchantsBuyPhrases[v75]; | 2082 v10 = (char *)pMerchantsBuyPhrases[v75]; |
2083 } | 2083 } |
2084 v30 = BuilDialogueString(v10, uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 2084 v30 = BuildDialogueString(v10, uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
2085 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; | 2085 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; |
2086 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); | 2086 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); |
2087 return; | 2087 return; |
2088 } | 2088 } |
2089 } | 2089 } |
2141 || (result = (int)pMouse->GetCursorPos(&v101), *(int *)result >= 462) | 2141 || (result = (int)pMouse->GetCursorPos(&v101), *(int *)result >= 462) |
2142 || (result = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117), v3 = 0, !result) ) | 2142 || (result = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117), v3 = 0, !result) ) |
2143 return; | 2143 return; |
2144 item = &pPlayers[uActiveCharacter]->pInventoryItemList[result - 1]; | 2144 item = &pPlayers[uActiveCharacter]->pInventoryItemList[result - 1]; |
2145 v13 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 3); | 2145 v13 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 3); |
2146 v30 = BuilDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 3, 0); | 2146 v30 = BuildDialogueString((char *)pMerchantsSellPhrases[v13], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 3, 0); |
2147 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; | 2147 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; |
2148 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); | 2148 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); |
2149 return; | 2149 return; |
2150 } | 2150 } |
2151 if ( dialog_menu_id == HOUSE_DIALOGUE_SHOP_IDENTIFY) | 2151 if ( dialog_menu_id == HOUSE_DIALOGUE_SHOP_IDENTIFY) |
2167 if ( result ) | 2167 if ( result ) |
2168 { | 2168 { |
2169 item = &pPlayers[uActiveCharacter]->pInventoryItemList[result-1]; | 2169 item = &pPlayers[uActiveCharacter]->pInventoryItemList[result-1]; |
2170 if ( item->uAttributes & 1 ) | 2170 if ( item->uAttributes & 1 ) |
2171 { | 2171 { |
2172 v5 = BuilDialogueString("%24", uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0); | 2172 v5 = BuildDialogueString("%24", uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0); |
2173 v6 = (212 - pFontArrus->CalcTextHeight(v5, &dialog_window, 0, 0)) / 2 + 101; | 2173 v6 = (212 - pFontArrus->CalcTextHeight(v5, &dialog_window, 0, 0)) / 2 + 101; |
2174 dialog_window.DrawTitleText(pFontArrus, 0, v6, pWhiteColor, v5, 3); | 2174 dialog_window.DrawTitleText(pFontArrus, 0, v6, pWhiteColor, v5, 3); |
2175 return; | 2175 return; |
2176 } | 2176 } |
2177 v8 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 4); | 2177 v8 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 4); |
2178 v30 = BuilDialogueString((char *)pMerchantsIdentifyPhrases[v8], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0); | 2178 v30 = BuildDialogueString((char *)pMerchantsIdentifyPhrases[v8], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0); |
2179 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, 0, 0)) / 2 + 138; | 2179 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, 0, 0)) / 2 + 138; |
2180 dialog_window.DrawTitleText(pFontArrus, 0, v6, pWhiteColor, v30, 3); | 2180 dialog_window.DrawTitleText(pFontArrus, 0, v6, pWhiteColor, v30, 3); |
2181 return; | 2181 return; |
2182 } | 2182 } |
2183 } | 2183 } |
2200 // || (result *= 9, !(pPlayers[uActiveCharacter]->field_1F5[4 * result + 15] & 2)) ) | 2200 // || (result *= 9, !(pPlayers[uActiveCharacter]->field_1F5[4 * result + 15] & 2)) ) |
2201 || (!(pPlayers[uActiveCharacter]->pOwnItems[result-1].uAttributes& 2)) ) | 2201 || (!(pPlayers[uActiveCharacter]->pOwnItems[result-1].uAttributes& 2)) ) |
2202 return; | 2202 return; |
2203 item = &pPlayers[uActiveCharacter]->pInventoryItemList[result - 1]; | 2203 item = &pPlayers[uActiveCharacter]->pInventoryItemList[result - 1]; |
2204 v29 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[result - 1], BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 5); | 2204 v29 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(&pPlayers[uActiveCharacter]->pInventoryItemList[result - 1], BildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 5); |
2205 v30 = BuilDialogueString((char *)pMerchantsRepairPhrases[v29], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 5, 0); | 2205 v30 = BuildDialogueString((char *)pMerchantsRepairPhrases[v29], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 5, 0); |
2206 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; | 2206 v6 = (174 - pFontArrus->CalcTextHeight(v30, &dialog_window, v3, v3)) / 2 + 138; |
2207 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); | 2207 dialog_window.DrawTitleText(pFontArrus, v3, v6, pWhiteColor, v30, 3); |
2208 return; | 2208 return; |
2209 } | 2209 } |
2210 if ( dialog_menu_id == HOUSE_DIALOGUE_LEARN_SKILLS ) | 2210 if ( dialog_menu_id == HOUSE_DIALOGUE_LEARN_SKILLS ) |