Mercurial > mm7
comparison mm7_1.cpp @ 583:a436924b31c3
CharacterUI_AwardsTab_Draw goto clean
author | zipi |
---|---|
date | Wed, 06 Mar 2013 10:59:51 +0000 |
parents | f54481c85df8 |
children | 6a36b1cd767e |
comparison
equal
deleted
inserted
replaced
582:88dd54e6e44a | 583:a436924b31c3 |
---|---|
662 } | 662 } |
663 if ( dword_50651C < 0 ) | 663 if ( dword_50651C < 0 ) |
664 { | 664 { |
665 result += awards_count; | 665 result += awards_count; |
666 dword_506528 = result; | 666 dword_506528 = result; |
667 if ( (signed int)(awards_count + result) <= awards_count2 ) | 667 if ( (signed int)(awards_count + result) > awards_count2 ) |
668 goto LABEL_14; | 668 { |
669 result = awards_count2 - awards_count; | 669 result = awards_count2 - awards_count; |
670 goto LABEL_13; | 670 dword_506528 = result; |
671 } | 671 } |
672 if ( dword_50651C > 0 ) | 672 } |
673 else if ( dword_50651C > 0 ) | |
673 { | 674 { |
674 result -= awards_count; | 675 result -= awards_count; |
675 dword_506528 = result; | 676 dword_506528 = result; |
676 if ( (result & 0x80000000u) != 0 ) | 677 if ( (result & 0x80000000u) != 0 ) |
677 { | 678 { |
678 result = 0; | 679 result = 0; |
679 LABEL_13: | |
680 dword_506528 = result; | 680 dword_506528 = result; |
681 goto LABEL_14; | 681 } |
682 } | 682 } |
683 } | 683 //LABEL_14: |
684 LABEL_14: | |
685 dword_506544 = 0; | 684 dword_506544 = 0; |
686 dword_506548 = 0; | 685 dword_506548 = 0; |
687 awards_count = 0; | 686 awards_count = 0; |
688 dword_50651C = 0; | 687 dword_50651C = 0; |
689 v21 = result; | 688 v21 = result; |
693 { | 692 { |
694 v5 = achievedAwardsIndex[v21]; | 693 v5 = achievedAwardsIndex[v21]; |
695 v20 = achievedAwardsIndex[v21]; | 694 v20 = achievedAwardsIndex[v21]; |
696 v6 = (char *)pAwards[v20].pText;//(char *)dword_723E80_award_related[v20 / 4]; | 695 v6 = (char *)pAwards[v20].pText;//(char *)dword_723E80_award_related[v20 / 4]; |
697 if ( v5 != 1 ) | 696 if ( v5 != 1 ) |
698 break; | 697 { |
699 v17 = pParty->uFine; | 698 if (!( (v5 < 85 || v5 > 91) && (v5 < 103 || v5 > 104) )) |
700 LABEL_42: | 699 { |
701 sprintf(pTmpBuf, v6, v17); | 700 if ( v5 > 89 ) |
702 v6 = pTmpBuf; | 701 { |
703 LABEL_43: | 702 if ( v5 == 90 ) |
703 { | |
704 v10 = (unsigned __int8)pParty->uNumArenaKnightWins; | |
705 v22 = v10; | |
706 } | |
707 else if ( v5 == 91 ) | |
708 { | |
709 v10 = (unsigned __int8)pParty->uNumArenaLordWins; | |
710 v22 = v10; | |
711 } | |
712 else if ( v5 == 103 ) | |
713 { | |
714 v10 = pParty->field_874; | |
715 v22 = v10; | |
716 } | |
717 else if ( v5 == 104 ) | |
718 { | |
719 v10 = pParty->field_878; | |
720 v22 = v10; | |
721 } | |
722 } | |
723 else | |
724 { | |
725 if ( v5 == 89 ) | |
726 { | |
727 v10 = (unsigned __int8)pParty->uNumArenaSquireWins; | |
728 v22 = v10; | |
729 } | |
730 else if ( v5 == 85 ) | |
731 { | |
732 v10 = pParty->uNumDeaths; | |
733 v22 = v10; | |
734 } | |
735 else if ( v5 == 86 ) | |
736 { | |
737 v10 = pParty->uNumBountiesCollected; | |
738 v22 = v10; | |
739 } | |
740 else if ( v5 == 87 ) | |
741 { | |
742 v10 = pParty->uNumPrisonTerms; | |
743 v22 = v10; | |
744 } | |
745 else if ( v5 == 88) | |
746 { | |
747 v10 = (unsigned __int8)pParty->uNumArenaPageWins; | |
748 v22 = v10; | |
749 } | |
750 } | |
751 v17 = v22; | |
752 sprintf(pTmpBuf, v6, v17); | |
753 v6 = pTmpBuf; | |
754 } | |
755 } | |
756 else | |
757 { | |
758 v17 = pParty->uFine; | |
759 sprintf(pTmpBuf, v6, v17); | |
760 v6 = pTmpBuf; | |
761 } | |
704 v14 = pAwards[v20].uSort;//dword_723E84[v20 / 4]; | 762 v14 = pAwards[v20].uSort;//dword_723E84[v20 / 4]; |
705 ++awards_count; | 763 ++awards_count; |
706 v15 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat( | 764 v15 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat( |
707 pAwardsTextColors[3 * v14 % 6], | 765 pAwardsTextColors[3 * v14 % 6], |
708 pAwardsTextColors[3 * v14 % 6 + 1], | 766 pAwardsTextColors[3 * v14 % 6 + 1], |
718 if ( v21 < awards_count2 ) | 776 if ( v21 < awards_count2 ) |
719 continue; | 777 continue; |
720 } | 778 } |
721 return; | 779 return; |
722 } | 780 } |
723 if ( (v5 < 85 || v5 > 91) && (v5 < 103 || v5 > 104) ) | 781 |
724 goto LABEL_43; | |
725 if ( v5 > 89 ) | |
726 { | |
727 v11 = v5 - 90; | |
728 if ( !v11 ) | |
729 { | |
730 v10 = (unsigned __int8)pParty->uNumArenaKnightWins; | |
731 goto LABEL_40; | |
732 } | |
733 v12 = v11 - 1; | |
734 if ( !v12 ) | |
735 { | |
736 v10 = (unsigned __int8)pParty->uNumArenaLordWins; | |
737 goto LABEL_40; | |
738 } | |
739 v13 = v12 - 12; | |
740 if ( !v13 ) | |
741 { | |
742 v10 = pParty->field_874; | |
743 goto LABEL_40; | |
744 } | |
745 if ( v13 == 1 ) | |
746 { | |
747 v10 = pParty->field_878; | |
748 goto LABEL_40; | |
749 } | |
750 } | |
751 else | |
752 { | |
753 if ( v5 == 89 ) | |
754 { | |
755 v10 = (unsigned __int8)pParty->uNumArenaSquireWins; | |
756 goto LABEL_40; | |
757 } | |
758 v7 = v5 - 85; | |
759 if ( !v7 ) | |
760 { | |
761 v10 = pParty->uNumDeaths; | |
762 goto LABEL_40; | |
763 } | |
764 v8 = v7 - 1; | |
765 if ( !v8 ) | |
766 { | |
767 v10 = pParty->uNumBountiesCollected; | |
768 goto LABEL_40; | |
769 } | |
770 v9 = v8 - 1; | |
771 if ( !v9 ) | |
772 { | |
773 v10 = pParty->uNumPrisonTerms; | |
774 goto LABEL_40; | |
775 } | |
776 if ( v9 == 1 ) | |
777 { | |
778 v10 = (unsigned __int8)pParty->uNumArenaPageWins; | |
779 LABEL_40: | |
780 v22 = v10; | |
781 goto LABEL_41; | |
782 } | |
783 } | |
784 LABEL_41: | |
785 v17 = v22; | |
786 goto LABEL_42; | |
787 } | 782 } |
788 return; | 783 return; |
789 } | 784 } |
790 // 50651C: using guessed type int dword_50651C; | 785 // 50651C: using guessed type int dword_50651C; |
791 // 506520: using guessed type int dword_506520; | 786 // 506520: using guessed type int dword_506520; |
2477 case EQUIP_RING: | 2472 case EQUIP_RING: |
2478 case EQUIP_AMULET: | 2473 case EQUIP_AMULET: |
2479 if (item_desc->uDamageDice) //"Armor" | 2474 if (item_desc->uDamageDice) //"Armor" |
2480 sprintfex(out_text + 100, "%s: +%d", pGlobalTXT_LocalizationStrings[11], item_desc->uDamageDice + item_desc->uDamageMod); | 2475 sprintfex(out_text + 100, "%s: +%d", pGlobalTXT_LocalizationStrings[11], item_desc->uDamageDice + item_desc->uDamageMod); |
2481 break; | 2476 break; |
2482 | 2477 case EQUIP_POTION: |
2478 if ( inspect_item->uEncantmentType ) | |
2479 sprintf(out_text + 200, "%s: %d",pGlobalTXT_LocalizationStrings[449] , inspect_item->uEncantmentType); //"Power" | |
2480 break; | |
2481 case EQUIP_REAGENT: | |
2482 sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], pItemsTable->pItems[inspect_item->uItemID].uDamageDice); //"Power" | |
2483 break; | |
2483 } | 2484 } |
2484 | 2485 |
2485 if ( v77 ) | 2486 if ( v77 ) |
2486 goto LABEL_65; | 2487 goto LABEL_65; |
2487 if (item_desc->uEquipType==EQUIP_POTION) | 2488 //v23 = item_desc->uEquipType; |
2488 { | 2489 |
2489 if ( inspect_item->uEnchantmentType ) | 2490 |
2490 sprintf(out_text + 200, "%s: %d",pGlobalTXT_LocalizationStrings[449] , inspect_item->uEnchantmentType); //"Power" | 2491 if ( inspect_item->uEncantmentType ) |
2491 } | |
2492 else if (item_desc->uEquipType== EQUIP_REAGENT) | |
2493 {sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], pItemsTable->pItems[inspect_item->uItemID].uDamageDice); //"Power" | |
2494 } | |
2495 else if ( inspect_item->uEnchantmentType ) | |
2496 { | 2492 { |
2497 sprintf(out_text + 200, "%s: %s +%d", pGlobalTXT_LocalizationStrings[210], | 2493 sprintf(out_text + 200, "%s: %s +%d", pGlobalTXT_LocalizationStrings[210], |
2498 pItemsTable->pEnchantments[inspect_item->uEnchantmentType-1].pBonusStat, inspect_item->_bonus_strength); //"Special" | 2494 pItemsTable->pEnchantments[inspect_item->uEncantmentType-1].pBonusStat, inspect_item->_bonus_strength); //"Special" |
2499 } | 2495 } |
2500 else if ( inspect_item->uSpecEnchantmentType ) | 2496 else if ( inspect_item->uSpecEnchantmentType ) |
2501 { | 2497 { |
2502 sprintf(out_text + 200, "%s: %s", pGlobalTXT_LocalizationStrings[210], | 2498 sprintf(out_text + 200, "%s: %s", pGlobalTXT_LocalizationStrings[210], |
2503 pItemsTable->pSpecialEnchantments[inspect_item->uSpecEnchantmentType-1].pBonusStatement, inspect_item->_bonus_strength); | 2499 pItemsTable->pSpecialEnchantments[inspect_item->uSpecEnchantmentType-1].pBonusStatement, inspect_item->_bonus_strength); |
2534 Str += v29; | 2530 Str += v29; |
2535 } | 2531 } |
2536 wHintWindow.uFrameHeight = v73->uTextureHeight + v81 + 54; | 2532 wHintWindow.uFrameHeight = v73->uTextureHeight + v81 + 54; |
2537 if ( (signed int)Str > (signed int)wHintWindow.uFrameHeight ) | 2533 if ( (signed int)Str > (signed int)wHintWindow.uFrameHeight ) |
2538 wHintWindow.uFrameHeight = (unsigned int)Str; | 2534 wHintWindow.uFrameHeight = (unsigned int)Str; |
2539 if ( inspect_item->uAttributes & 8 && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) ) | 2535 if ( inspect_item->uAttributes & 8 && (inspect_item->uSpecEnchantmentType || inspect_item->uEncantmentType) ) |
2540 wHintWindow.uFrameHeight += LOBYTE(pFontComic->uFontHeight); | 2536 wHintWindow.uFrameHeight += LOBYTE(pFontComic->uFontHeight); |
2541 v85 = 0; | 2537 v85 = 0; |
2542 if ( pFontArrus->uFontHeight ) | 2538 if ( pFontArrus->uFontHeight ) |
2543 { | 2539 { |
2544 wHintWindow.uFrameWidth -= 24; | 2540 wHintWindow.uFrameWidth -= 24; |
2602 v42 = wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight); | 2598 v42 = wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight); |
2603 v41 = 100; | 2599 v41 = 100; |
2604 } | 2600 } |
2605 else | 2601 else |
2606 { | 2602 { |
2607 if ( (inspect_item->uAttributes & 8) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) ) | 2603 if ( (inspect_item->uAttributes & 8) && (inspect_item->uSpecEnchantmentType || inspect_item->uEncantmentType) ) |
2608 { | 2604 { |
2609 sub_493F79(&v67, inspect_item->uExpireTime - pParty->uTimePlayed); | 2605 sub_493F79(&v67, inspect_item->uExpireTime - pParty->uTimePlayed); |
2610 strcpy(pTmpBuf, "Duration:"); | 2606 strcpy(pTmpBuf, "Duration:"); |
2611 Str = (char *)(v67.field_18_expire_year - game_starting_year); | 2607 Str = (char *)(v67.field_18_expire_year - game_starting_year); |
2612 if (v67.field_18_expire_year != 1168 ) | 2608 if (v67.field_18_expire_year != 1168 ) |