Mercurial > mm7
comparison UI/UIShops.cpp @ 1747:cecb080929c4
Party_stru0 renamed to PartyTimeStruct, fixed its members, renamed Party::field_3C to Party::PartyTimes, started Player::SetVariable refactoring start
author | Grumpy7 |
---|---|
date | Mon, 30 Sep 2013 05:48:32 +0200 |
parents | f44b6e02e81c |
children | 19684d4bbe9a |
comparison
equal
deleted
inserted
replaced
1738:ef86fc6d6a80 | 1747:cecb080929c4 |
---|---|
246 } | 246 } |
247 } | 247 } |
248 } | 248 } |
249 else | 249 else |
250 { | 250 { |
251 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);//Приходите через 7 дней | 251 dialog_window.DrawCurrentTime( pParty->PartyTimes.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 } |
435 } | 435 } |
436 } | 436 } |
437 } | 437 } |
438 else | 438 else |
439 { | 439 { |
440 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); | 440 dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); |
441 pNumActiveItem = 0; //added | 441 pNumActiveItem = 0; //added |
442 } | 442 } |
443 } | 443 } |
444 break; | 444 break; |
445 } | 445 } |
765 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); |
766 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 766 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
767 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); | 767 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); |
768 return; | 768 return; |
769 } | 769 } |
770 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 770 dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
771 return; | 771 return; |
772 } | 772 } |
773 break; | 773 break; |
774 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: | 774 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: |
775 { | 775 { |
837 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); |
838 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; | 838 v115 = (174 - pFontArrus->CalcTextHeight(v36, &dialog_window, 0, 0)) / 2 + 138; |
839 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); | 839 dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3); |
840 return; | 840 return; |
841 } | 841 } |
842 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 842 dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
843 return; | 843 return; |
844 } | 844 } |
845 break; | 845 break; |
846 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: | 846 case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: |
847 { | 847 { |
1014 ++v104; | 1014 ++v104; |
1015 } | 1015 } |
1016 while ( v104 < 8 ); | 1016 while ( v104 < 8 ); |
1017 return; | 1017 return; |
1018 } | 1018 } |
1019 dialog_window.DrawCurrentTime(pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); | 1019 dialog_window.DrawCurrentTime(pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed); |
1020 return; | 1020 return; |
1021 } | 1021 } |
1022 break; | 1022 break; |
1023 case HOUSE_DIALOGUE_LEARN_SKILLS: | 1023 case HOUSE_DIALOGUE_LEARN_SKILLS: |
1024 { | 1024 { |
1347 v65 = pGlobalTXT_LocalizationStrings[196]; | 1347 v65 = pGlobalTXT_LocalizationStrings[196]; |
1348 } | 1348 } |
1349 DrawTextAtStatusBar(v65, 0); | 1349 DrawTextAtStatusBar(v65, 0); |
1350 if ( !v109 ) | 1350 if ( !v109 ) |
1351 { | 1351 { |
1352 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); | 1352 dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); |
1353 return; | 1353 return; |
1354 } | 1354 } |
1355 pMouse->GetCursorPos(&v98); | 1355 pMouse->GetCursorPos(&v98); |
1356 pNumActiveItem = v98.x + pSRZBufferLineOffsets[v98.y]; | 1356 pNumActiveItem = v98.x + pSRZBufferLineOffsets[v98.y]; |
1357 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF ) | 1357 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF ) |
1547 v65 = pGlobalTXT_LocalizationStrings[196]; | 1547 v65 = pGlobalTXT_LocalizationStrings[196]; |
1548 } | 1548 } |
1549 DrawTextAtStatusBar(v65, 0); | 1549 DrawTextAtStatusBar(v65, 0); |
1550 if ( !v109 ) | 1550 if ( !v109 ) |
1551 { | 1551 { |
1552 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); | 1552 dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); |
1553 return; | 1553 return; |
1554 } | 1554 } |
1555 v66 = pMouse->GetCursorPos(&v98); | 1555 v66 = pMouse->GetCursorPos(&v98); |
1556 pNumActiveItem = v66->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v96)->y]; | 1556 pNumActiveItem = v66->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v96)->y]; |
1557 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF ) | 1557 if ( pRenderer->pActiveZBuffer[pNumActiveItem] & 0xFFFF ) |
1928 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" | 1928 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" |
1929 } | 1929 } |
1930 DrawTextAtStatusBar(v69, 0); | 1930 DrawTextAtStatusBar(v69, 0); |
1931 if ( !v117 ) | 1931 if ( !v117 ) |
1932 { | 1932 { |
1933 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); | 1933 dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); |
1934 return; | 1934 return; |
1935 } | 1935 } |
1936 v70 = pMouse->GetCursorPos(&v102); | 1936 v70 = pMouse->GetCursorPos(&v102); |
1937 result = v70->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v100)->y]; | 1937 result = v70->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v100)->y]; |
1938 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) | 1938 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) |
2059 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" | 2059 v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" |
2060 } | 2060 } |
2061 DrawTextAtStatusBar(v69, 0); | 2061 DrawTextAtStatusBar(v69, 0); |
2062 if ( !v117 ) | 2062 if ( !v117 ) |
2063 { | 2063 { |
2064 dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); | 2064 dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); |
2065 return; | 2065 return; |
2066 } | 2066 } |
2067 v70 = pMouse->GetCursorPos(&v102); | 2067 v70 = pMouse->GetCursorPos(&v102); |
2068 result = v70->x + pSRZBufferLineOffsets[v70->y]; | 2068 result = v70->x + pSRZBufferLineOffsets[v70->y]; |
2069 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) | 2069 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) |
2665 return; | 2665 return; |
2666 } | 2666 } |
2667 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); | 2667 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); |
2668 return; | 2668 return; |
2669 } | 2669 } |
2670 if ( (signed __int64)pParty->field_3C._shop_ban_times[(unsigned int)window_SpeakInHouse->ptr_1C]<= (signed __int64)pParty->uTimePlayed ) | 2670 if ( (signed __int64)pParty->PartyTimes._shop_ban_times[(unsigned int)window_SpeakInHouse->ptr_1C]<= (signed __int64)pParty->uTimePlayed ) |
2671 { | 2671 { |
2672 if ( pParty->uNumGold <= 10000 ) | 2672 if ( pParty->uNumGold <= 10000 ) |
2673 { | 2673 { |
2674 if ( !dword_F8B1E4 ) | 2674 if ( !dword_F8B1E4 ) |
2675 return; | 2675 return; |