comparison UI/UIShops.cpp @ 1529:61458df2cb4f

bountyHunting fix
author Ritor1
date Fri, 06 Sep 2013 16:42:23 +0600
parents 7ef4b64f6329
children 9f8b3e904e14
comparison
equal deleted inserted replaced
1526:f47eab1a70d8 1529:61458df2cb4f
68 POINT *v59; // esi@89 68 POINT *v59; // esi@89
69 LONG v60; // ecx@90 69 LONG v60; // ecx@90
70 int v61; // eax@90 70 int v61; // eax@90
71 int v62; // ecx@90 71 int v62; // ecx@90
72 ItemGen *pItemInShop; // esi@90 72 ItemGen *pItemInShop; // esi@90
73 int v64; // eax@95 73 //int v64; // eax@95
74 int all_text_height; // esi@96 74 int all_text_height; // esi@96
75 char **v66; // edi@96 75 char **v66; // edi@96
76 int v67; // eax@97 76 int v67; // eax@97
77 int v69; // edx@98 77 int v69; // edx@98
78 int v70; // edi@98 78 int v70; // edi@98
231 pItemInShop = (ItemGen *)&pParty->StandartItemsInShops[(int)v61][v60]; 231 pItemInShop = (ItemGen *)&pParty->StandartItemsInShops[(int)v61][v60];
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, BuildingType_WeaponShop, v61, 2); 236 v7 = BuildDialogueString((char *)pMerchantsBuyPhrases[pPlayer->SelectPhrasesTransaction(pItemInShop, BuildingType_WeaponShop, v61, 2)],
237 v7 = BuildDialogueString((char *)pMerchantsBuyPhrases[v64], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); 237 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 {
246 } 246 }
247 } 247 }
248 } 248 }
249 else 249 else
250 { 250 {
251 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); 251 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);//Приходите через 7 дней
252 pNumActiveItem = 0; //added 252 pNumActiveItem = 0; //added
253 } 253 }
254 } 254 }
255 break; 255 break;
256 } 256 }
422 pItemInShop = (ItemGen *)&pParty->StandartItemsInShops[(int)v61][v60]; 422 pItemInShop = (ItemGen *)&pParty->StandartItemsInShops[(int)v61][v60];
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, BuildingType_WeaponShop, v61, 2); 427 v7 = BuildDialogueString((char *)pMerchantsBuyPhrases[pPlayer->SelectPhrasesTransaction(pItemInShop, BuildingType_WeaponShop, v61, 2)],
428 v7 = BuildDialogueString((char *)pMerchantsBuyPhrases[v64], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); 428 uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0);
429 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); 429 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0)) / 2 + 138, pColorWhite, v7, 3);
430 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3);
431 } 430 }
432 else 431 else
433 { 432 {
434 v7 = BuildDialogueString(pGlobalTXT_LocalizationStrings[181], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0); 433 v7 = BuildDialogueString(pGlobalTXT_LocalizationStrings[181], uActiveCharacter - 1, pItemInShop, (char *)window_SpeakInHouse->ptr_1C, 2, 0);
435 pTextHeight = pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0); 434 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pFontArrus->CalcTextHeight(v7, &dialog_window, 0, 0)) / 2 + 138, pColorWhite, v7, 3);
436 dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3);
437 } 435 }
438 } 436 }
439 } 437 }
440 else 438 else
441 { 439 {
442 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); 440 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
443 pNumActiveItem = 0; //added 441 pNumActiveItem = 0; //added
444 } 442 }
445 } 443 }
446 break; 444 break;
447 } 445 }
767 v36 = BuildDialogueString(v15, uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); 765 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; 766 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138;
769 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); 767 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3);
770 return; 768 return;
771 } 769 }
772 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); 770 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed);
773 return; 771 return;
774 } 772 }
775 break; 773 break;
776 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: 774 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL:
777 { 775 {
839 v36 = BuildDialogueString(v15, uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0); 837 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; 838 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138;
841 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); 839 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3);
842 return; 840 return;
843 } 841 }
844 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); 842 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed);
845 return; 843 return;
846 } 844 }
847 break; 845 break;
848 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: 846 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT:
849 { 847 {
1016 ++v104; 1014 ++v104;
1017 } 1015 }
1018 while ( v104 < 8 ); 1016 while ( v104 < 8 );
1019 return; 1017 return;
1020 } 1018 }
1021 dialog_window.DrawCurrentTime(pParty->field_3C.field_50[window_SpeakInHouse->par1C]- pParty->uTimePlayed); 1019 dialog_window.DrawCurrentTime(pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed);
1022 return; 1020 return;
1023 } 1021 }
1024 break; 1022 break;
1025 case HOUSE_DIALOGUE_LEARN_SKILLS: 1023 case HOUSE_DIALOGUE_LEARN_SKILLS:
1026 { 1024 {
1349 v65 = pGlobalTXT_LocalizationStrings[196]; 1347 v65 = pGlobalTXT_LocalizationStrings[196];
1350 } 1348 }
1351 DrawTextAtStatusBar(v65, 0); 1349 DrawTextAtStatusBar(v65, 0);
1352 if ( !v109 ) 1350 if ( !v109 )
1353 { 1351 {
1354 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); 1352 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
1355 return; 1353 return;
1356 } 1354 }
1357 v66 = pMouse->GetCursorPos(&v98); 1355 v66 = pMouse->GetCursorPos(&v98);
1358 pNumActiveItem = v66->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v96)->y]; 1356 pNumActiveItem = v66->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v96)->y];
1359 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF ) 1357 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF )
1549 v65 = pGlobalTXT_LocalizationStrings[196]; 1547 v65 = pGlobalTXT_LocalizationStrings[196];
1550 } 1548 }
1551 DrawTextAtStatusBar(v65, 0); 1549 DrawTextAtStatusBar(v65, 0);
1552 if ( !v109 ) 1550 if ( !v109 )
1553 { 1551 {
1554 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); 1552 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
1555 return; 1553 return;
1556 } 1554 }
1557 v66 = pMouse->GetCursorPos(&v98); 1555 v66 = pMouse->GetCursorPos(&v98);
1558 pNumActiveItem = v66->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v96)->y]; 1556 pNumActiveItem = v66->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v96)->y];
1559 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF ) 1557 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF )
1930 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" 1928 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy"
1931 } 1929 }
1932 DrawTextAtStatusBar(v69, 0); 1930 DrawTextAtStatusBar(v69, 0);
1933 if ( !v117 ) 1931 if ( !v117 )
1934 { 1932 {
1935 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); 1933 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
1936 return; 1934 return;
1937 } 1935 }
1938 v70 = pMouse->GetCursorPos(&v102); 1936 v70 = pMouse->GetCursorPos(&v102);
1939 result = v70->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v100)->y]; 1937 result = v70->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v100)->y];
1940 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) 1938 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF )
2061 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" 2059 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy"
2062 } 2060 }
2063 DrawTextAtStatusBar(v69, 0); 2061 DrawTextAtStatusBar(v69, 0);
2064 if ( !v117 ) 2062 if ( !v117 )
2065 { 2063 {
2066 dialog_window.DrawCurrentTime( pParty->field_3C.field_50[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); 2064 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
2067 return; 2065 return;
2068 } 2066 }
2069 v70 = pMouse->GetCursorPos(&v102); 2067 v70 = pMouse->GetCursorPos(&v102);
2070 result = v70->x + pSRZBufferLineOffsets[v70->y]; 2068 result = v70->x + pSRZBufferLineOffsets[v70->y];
2071 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) 2069 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF )