Mercurial > mm7
comparison UI/UICharacter.cpp @ 1446:8b4f4c723edd
Questbook_Draw
author | Ritor1 |
---|---|
date | Mon, 05 Aug 2013 22:31:12 +0600 |
parents | 28f87f5234a1 |
children | 9add223260ce f682c853200d |
comparison
equal
deleted
inserted
replaced
1445:6de9c1316852 | 1446:8b4f4c723edd |
---|---|
625 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); | 625 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); |
626 strcat(pTmpBuf.data(), Source); | 626 strcat(pTmpBuf.data(), Source); |
627 strcat(pTmpBuf.data(), "\f00000"); | 627 strcat(pTmpBuf.data(), "\f00000"); |
628 | 628 |
629 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); | 629 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); |
630 result = dword_506528; | 630 result = books_primary_item_per_page; |
631 a1.uFrameX = 12; | 631 a1.uFrameX = 12; |
632 a1.uFrameY = 48; | 632 a1.uFrameY = 48; |
633 a1.uFrameWidth = 424; | 633 a1.uFrameWidth = 424; |
634 a1.uFrameHeight = 290; | 634 a1.uFrameHeight = 290; |
635 a1.uFrameZ = 435; | 635 a1.uFrameZ = 435; |
636 a1.uFrameW = 337; | 636 a1.uFrameW = 337; |
637 if (BtnDown_flag && num_achieved_awards + dword_506528 < num_achieved_awards_2) | 637 if (BtnDown_flag && num_achieved_awards + books_primary_item_per_page < full_num_items_in_book) |
638 result = dword_506528++ + 1; | 638 result = books_primary_item_per_page++ + 1; |
639 if (BtnUp_flag && result) | 639 if (BtnUp_flag && result) |
640 { | 640 { |
641 --result; | 641 --result; |
642 dword_506528 = result; | 642 books_primary_item_per_page = result; |
643 } | 643 } |
644 | 644 |
645 if ( dword_50651C < 0 ) | 645 if ( books_page_number < 0 ) |
646 { | 646 { |
647 result += num_achieved_awards; | 647 result += num_achieved_awards; |
648 dword_506528 = result; | 648 books_primary_item_per_page = result; |
649 if ( (signed int)(num_achieved_awards + result) > num_achieved_awards_2 ) | 649 if ( (signed int)(num_achieved_awards + result) > full_num_items_in_book ) |
650 { | 650 { |
651 result = num_achieved_awards_2 - num_achieved_awards; | 651 result = full_num_items_in_book - num_achieved_awards; |
652 dword_506528 = result; | 652 books_primary_item_per_page = result; |
653 } | 653 } |
654 } | 654 } |
655 else if ( dword_50651C > 0 ) | 655 else if ( books_page_number > 0 ) |
656 { | 656 { |
657 result -= num_achieved_awards; | 657 result -= num_achieved_awards; |
658 dword_506528 = result; | 658 books_primary_item_per_page = result; |
659 if ( (result & 0x80000000u) != 0 ) | 659 if ( (result & 0x80000000u) != 0 ) |
660 { | 660 { |
661 result = 0; | 661 result = 0; |
662 dword_506528 = result; | 662 books_primary_item_per_page = result; |
663 } | 663 } |
664 } | 664 } |
665 //LABEL_14: | 665 //LABEL_14: |
666 BtnDown_flag = 0; | 666 BtnDown_flag = 0; |
667 BtnUp_flag = 0; | 667 BtnUp_flag = 0; |
668 num_achieved_awards = 0; | 668 num_achieved_awards = 0; |
669 dword_50651C = 0; | 669 books_page_number = 0; |
670 | 670 |
671 | 671 |
672 for (uint i = result; i < num_achieved_awards_2; ++i) | 672 for (uint i = result; i < full_num_items_in_book; ++i) |
673 { | 673 { |
674 v5 = achieved_awards[i]; | 674 v5 = achieved_awards[i]; |
675 v6 = (char *)pAwards[v5].pText;//(char *)dword_723E80_award_related[v20 / 4]; | 675 v6 = (char *)pAwards[v5].pText;//(char *)dword_723E80_award_related[v20 / 4]; |
676 | 676 |
677 pTmpBuf[0] = 0; | 677 pTmpBuf[0] = 0; |
2580 num_achieved_awards = 0; | 2580 num_achieved_awards = 0; |
2581 | 2581 |
2582 memset(pTmpBuf2.data(), 0, 0x7D0u); | 2582 memset(pTmpBuf2.data(), 0, 0x7D0u); |
2583 BtnDown_flag = 0; | 2583 BtnDown_flag = 0; |
2584 BtnUp_flag = 0; | 2584 BtnUp_flag = 0; |
2585 dword_50651C = 0; | 2585 books_page_number = 0; |
2586 dword_506528 = 0; | 2586 books_primary_item_per_page = 0; |
2587 for (int i = 0; i < 105; ++i) | 2587 for (int i = 0; i < 105; ++i) |
2588 { | 2588 { |
2589 if ( _449B57_test_bit(pPlayer->_guilds_member_bits, i) && pAwards[i].pText ) | 2589 if ( _449B57_test_bit(pPlayer->_guilds_member_bits, i) && pAwards[i].pText ) |
2590 { | 2590 { |
2591 achieved_awards[num_achieved_awards++] = (AwardType)i; | 2591 achieved_awards[num_achieved_awards++] = (AwardType)i; |
2592 } | 2592 } |
2593 } | 2593 } |
2594 num_achieved_awards_2 = num_achieved_awards; | 2594 full_num_items_in_book = num_achieved_awards; |
2595 num_achieved_awards = 0; | 2595 num_achieved_awards = 0; |
2596 | 2596 |
2597 //sort awards index | 2597 //sort awards index |
2598 if (num_achieved_awards_2 > 0) | 2598 if (full_num_items_in_book > 0) |
2599 { | 2599 { |
2600 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort); | 2600 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort); |
2601 } | 2601 } |
2602 } | 2602 } |
2603 | 2603 |