Mercurial > mm7
comparison UI/UICharacter.cpp @ 1452:9add223260ce
Слияние
author | Ritor1 |
---|---|
date | Tue, 06 Aug 2013 09:26:17 +0600 |
parents | 6b1c8c41c83f 8b4f4c723edd |
children | bfe342ae0c1f |
comparison
equal
deleted
inserted
replaced
1451:6b1c8c41c83f | 1452:9add223260ce |
---|---|
613 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); | 613 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); |
614 strcat(pTmpBuf.data(), Source); | 614 strcat(pTmpBuf.data(), Source); |
615 strcat(pTmpBuf.data(), "\f00000"); | 615 strcat(pTmpBuf.data(), "\f00000"); |
616 | 616 |
617 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); | 617 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); |
618 result = dword_506528; | 618 result = books_primary_item_per_page; |
619 a1.uFrameX = 12; | 619 a1.uFrameX = 12; |
620 a1.uFrameY = 48; | 620 a1.uFrameY = 48; |
621 a1.uFrameWidth = 424; | 621 a1.uFrameWidth = 424; |
622 a1.uFrameHeight = 290; | 622 a1.uFrameHeight = 290; |
623 a1.uFrameZ = 435; | 623 a1.uFrameZ = 435; |
624 a1.uFrameW = 337; | 624 a1.uFrameW = 337; |
625 if (BtnDown_flag && num_achieved_awards + dword_506528 < num_achieved_awards_2) | 625 if (BtnDown_flag && num_achieved_awards + books_primary_item_per_page < full_num_items_in_book) |
626 result = dword_506528++ + 1; | 626 result = books_primary_item_per_page++ + 1; |
627 if (BtnUp_flag && result) | 627 if (BtnUp_flag && result) |
628 { | 628 { |
629 --result; | 629 --result; |
630 dword_506528 = result; | 630 books_primary_item_per_page = result; |
631 } | 631 } |
632 | 632 |
633 if ( dword_50651C < 0 ) | 633 if ( books_page_number < 0 ) |
634 { | 634 { |
635 result += num_achieved_awards; | 635 result += num_achieved_awards; |
636 dword_506528 = result; | 636 books_primary_item_per_page = result; |
637 if ( (signed int)(num_achieved_awards + result) > num_achieved_awards_2 ) | 637 if ( (signed int)(num_achieved_awards + result) > full_num_items_in_book ) |
638 { | 638 { |
639 result = num_achieved_awards_2 - num_achieved_awards; | 639 result = full_num_items_in_book - num_achieved_awards; |
640 dword_506528 = result; | 640 books_primary_item_per_page = result; |
641 } | 641 } |
642 } | 642 } |
643 else if ( dword_50651C > 0 ) | 643 else if ( books_page_number > 0 ) |
644 { | 644 { |
645 result -= num_achieved_awards; | 645 result -= num_achieved_awards; |
646 dword_506528 = result; | 646 books_primary_item_per_page = result; |
647 if ( (result & 0x80000000u) != 0 ) | 647 if ( (result & 0x80000000u) != 0 ) |
648 { | 648 { |
649 result = 0; | 649 result = 0; |
650 dword_506528 = result; | 650 books_primary_item_per_page = result; |
651 } | 651 } |
652 } | 652 } |
653 //LABEL_14: | 653 //LABEL_14: |
654 BtnDown_flag = 0; | 654 BtnDown_flag = 0; |
655 BtnUp_flag = 0; | 655 BtnUp_flag = 0; |
656 num_achieved_awards = 0; | 656 num_achieved_awards = 0; |
657 dword_50651C = 0; | 657 books_page_number = 0; |
658 | 658 |
659 | 659 |
660 for (uint i = result; i < num_achieved_awards_2; ++i) | 660 for (uint i = result; i < full_num_items_in_book; ++i) |
661 { | 661 { |
662 v5 = achieved_awards[i]; | 662 v5 = achieved_awards[i]; |
663 v6 = (char *)pAwards[v5].pText;//(char *)dword_723E80_award_related[v20 / 4]; | 663 v6 = (char *)pAwards[v5].pText;//(char *)dword_723E80_award_related[v20 / 4]; |
664 | 664 |
665 pTmpBuf[0] = 0; | 665 pTmpBuf[0] = 0; |
2568 num_achieved_awards = 0; | 2568 num_achieved_awards = 0; |
2569 | 2569 |
2570 memset(pTmpBuf2.data(), 0, 0x7D0u); | 2570 memset(pTmpBuf2.data(), 0, 0x7D0u); |
2571 BtnDown_flag = 0; | 2571 BtnDown_flag = 0; |
2572 BtnUp_flag = 0; | 2572 BtnUp_flag = 0; |
2573 dword_50651C = 0; | 2573 books_page_number = 0; |
2574 dword_506528 = 0; | 2574 books_primary_item_per_page = 0; |
2575 for (int i = 0; i < 105; ++i) | 2575 for (int i = 0; i < 105; ++i) |
2576 { | 2576 { |
2577 if ( _449B57_test_bit(pPlayer->_guilds_member_bits, i) && pAwards[i].pText ) | 2577 if ( _449B57_test_bit(pPlayer->_guilds_member_bits, i) && pAwards[i].pText ) |
2578 { | 2578 { |
2579 achieved_awards[num_achieved_awards++] = (AwardType)i; | 2579 achieved_awards[num_achieved_awards++] = (AwardType)i; |
2580 } | 2580 } |
2581 } | 2581 } |
2582 num_achieved_awards_2 = num_achieved_awards; | 2582 full_num_items_in_book = num_achieved_awards; |
2583 num_achieved_awards = 0; | 2583 num_achieved_awards = 0; |
2584 | 2584 |
2585 //sort awards index | 2585 //sort awards index |
2586 if (num_achieved_awards_2 > 0) | 2586 if (full_num_items_in_book > 0) |
2587 { | 2587 { |
2588 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort); | 2588 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort); |
2589 } | 2589 } |
2590 } | 2590 } |
2591 | 2591 |