comparison mm7_2.cpp @ 574:f90753ebabe3

Merge
author Nomad
date Wed, 06 Mar 2013 06:41:36 +0200
parents 7c0763248a87 cdf3afa8db74
children 9e80b6e1b155 42d5777c2f47
comparison
equal deleted inserted replaced
573:7c0763248a87 574:f90753ebabe3
13398 assert(sizeof(EventIndex) == 0xC); 13398 assert(sizeof(EventIndex) == 0xC);
13399 assert(sizeof(_2devent) == 0x34); 13399 assert(sizeof(_2devent) == 0x34);
13400 assert(sizeof(stru176) == 0x20); 13400 assert(sizeof(stru176) == 0x20);
13401 assert(sizeof(SavegameHeader) == 0x64); 13401 assert(sizeof(SavegameHeader) == 0x64);
13402 assert(sizeof(SavegameList) == 0x3138); 13402 assert(sizeof(SavegameList) == 0x3138);
13403 assert(sizeof(StorylineText) == 0x168); 13403 assert(sizeof(StorylineText) == 0x160);
13404 assert(sizeof(FactionTable) == 0x1EF1); 13404 assert(sizeof(FactionTable) == 0x1EF1);
13405 assert(sizeof(Decal) == 0xC20); 13405 assert(sizeof(Decal) == 0xC20);
13406 assert(sizeof(DecalBuilder) == 0x30C038); 13406 assert(sizeof(DecalBuilder) == 0x30C038);
13407 assert(sizeof(MonsterInfo) == 0x58); 13407 assert(sizeof(MonsterInfo) == 0x58);
13408 assert(sizeof(MonsterStats) == 0x5BA0); 13408 assert(sizeof(MonsterStats) == 0x5BA0);
14654 v4 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSkillType; 14654 v4 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSkillType;
14655 if ( v4 == 4 ) 14655 if ( v4 == 4 )
14656 { 14656 {
14657 if ( v2 ) 14657 if ( v2 )
14658 { 14658 {
14659 LABEL_7:
14660 LOBYTE(v5) = v0->GetActualSkillLevel(PLAYER_SKILL_SPEAR); 14659 LOBYTE(v5) = v0->GetActualSkillLevel(PLAYER_SKILL_SPEAR);
14661 if ( (signed int)SkillToMastery(v5) < 3 ) 14660 if ( (signed int)SkillToMastery(v5) < 3 )
14662 { 14661 {
14663 LABEL_8:
14664 v0->PlaySound(SPEECH_39, 0); 14662 v0->PlaySound(SPEECH_39, 0);
14665 return; 14663 return;
14666 } 14664 }
14667 v3 = pParty->pPickedItem.uItemID; 14665 v3 = pParty->pPickedItem.uItemID;
14668 goto LABEL_16;
14669 } 14666 }
14670 } 14667 }
14671 else 14668 else
14672 { 14669 {
14673 if ( (v4 == 8 || v4 == 1 || v4 == 2) 14670 if ( (v4 == 8 || v4 == 1 || v4 == 2)
14674 && v1 14671 && v1
14675 && pItemsTable->pItems[*(int *)&v0->pInventoryItems[v1-1]].uSkillType == 4 ) 14672 && pItemsTable->pItems[*(int *)&v0->pInventoryItems[v1-1]].uSkillType == 4 )
14676 goto LABEL_7; 14673 {
14677 } 14674 LOBYTE(v5) = v0->GetActualSkillLevel(PLAYER_SKILL_SPEAR);
14678 LABEL_16: 14675 if ( (signed int)SkillToMastery(v5) < 3 )
14676 {
14677 v0->PlaySound(SPEECH_39, 0);
14678 return;
14679 }
14680 }
14681 }
14679 if ( !v0->CanEquip_RaceAndAlignmentCheck(v3) ) 14682 if ( !v0->CanEquip_RaceAndAlignmentCheck(v3) )
14680 goto LABEL_8; 14683 {
14684
14685 v0->PlaySound(SPEECH_39, 0);
14686 return;
14687 }
14681 if ( pParty->pPickedItem.uItemID == 604 ) 14688 if ( pParty->pPickedItem.uItemID == 604 )
14682 { 14689 {
14683 sub_467E7F_EquipBody(3u); 14690 sub_467E7F_EquipBody(3u);
14684 WetsuitOn(uActiveCharacter); 14691 WetsuitOn(uActiveCharacter);
14685 return; 14692 return;
14694 case 7u: 14701 case 7u:
14695 case 8u: 14702 case 8u:
14696 case 9u: 14703 case 9u:
14697 case 0xBu: 14704 case 0xBu:
14698 if ( !v0->HasSkill(v4) ) 14705 if ( !v0->HasSkill(v4) )
14699 goto LABEL_8; 14706 {
14707 v0->PlaySound(SPEECH_39, 0);
14708 return;
14709 }
14700 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (v6 != 3 || bUnderwater) ) 14710 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (v6 != 3 || bUnderwater) )
14701 goto LABEL_95; 14711 {
14712 v46 = 0;
14713 v45 = 0;
14714 v44 = 0;
14715 v43 = 0;
14716 v42 = -1;
14717 v41 = 0;
14718 v40 = 0;
14719 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46);
14720 return;
14721 }
14702 sub_467E7F_EquipBody(v6); 14722 sub_467E7F_EquipBody(v6);
14703 if ( pParty->pPickedItem.uItemID == 604 ) 14723 if ( pParty->pPickedItem.uItemID == 604 )
14704 WetsuitOff(uActiveCharacter); 14724 WetsuitOff(uActiveCharacter);
14705 return; 14725 return;
14706 case 0xAu: 14726 case 0xAu:
14707 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) 14727 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) )
14708 goto LABEL_95; 14728 {
14729 v46 = 0;
14730 v45 = 0;
14731 v44 = 0;
14732 v43 = 0;
14733 v42 = -1;
14734 v41 = 0;
14735 v40 = 0;
14736 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46);
14737 return;
14738 }
14709 v52 = 10; 14739 v52 = 10;
14710 v7 = (int)&v0->pEquipment.field_28; 14740 v7 = (int)&v0->pEquipment.field_28;
14711 while ( 1 ) 14741 while ( 1 )
14712 { 14742 {
14713 if ( !*(int *)v7 ) 14743 if ( !*(int *)v7 )
14714 { 14744 {
14715 v8 = v0->FindFreeInventorySlot(); 14745 v8 = v0->FindFreeInventorySlot();
14716 if ( (v8 & 0x80000000u) == 0 ) 14746 if ( (v8 & 0x80000000u) == 0 )
14747 {
14748 v9 = v52;
14749 pParty->pPickedItem.uBodyAnchor = v52 + 1;
14750 memcpy(&v0->pInventoryItems[v8], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v8]));
14751 *(&v0->pEquipment.uOffHand + v9) = v8 + 1;
14752 pMouse->RemoveHoldingItem();
14717 break; 14753 break;
14754 }
14718 } 14755 }
14719 ++v52; 14756 ++v52;
14720 v7 += 4; 14757 v7 += 4;
14721 if ( (signed int)v52 > 15 ) 14758 if ( (signed int)v52 > 15 )
14722 goto LABEL_33; 14759 break;
14723 } 14760 }
14724 v9 = v52;
14725 pParty->pPickedItem.uBodyAnchor = v52 + 1;
14726 memcpy(&v0->pInventoryItems[v8], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v8]));
14727 *(&v0->pEquipment.uOffHand + v9) = v8 + 1;
14728 pMouse->RemoveHoldingItem();
14729 LABEL_33:
14730 if ( v52 == 16 ) 14761 if ( v52 == 16 )
14731 { 14762 {
14732 v52 = v0->pEquipment.field_3C - 1; 14763 v52 = v0->pEquipment.field_3C - 1;
14733 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); 14764 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
14734 v10 = (int)((char *)v0 + 36 * v52); 14765 v10 = (int)((char *)v0 + 36 * v52);
14741 v0->pEquipment.field_3C = v11; 14772 v0->pEquipment.field_3C = v11;
14742 } 14773 }
14743 return; 14774 return;
14744 case 4u: 14775 case 4u:
14745 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) 14776 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) )
14746 goto LABEL_95; 14777 {
14778 v46 = 0;
14779 v45 = 0;
14780 v44 = 0;
14781 v43 = 0;
14782 v42 = -1;
14783 v41 = 0;
14784 v40 = 0;
14785 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46);
14786 return;
14787 }
14747 if ( !v0->HasSkill(v4) ) 14788 if ( !v0->HasSkill(v4) )
14748 goto LABEL_8; 14789 {
14790 v0->PlaySound(SPEECH_39, 0);
14791 return;
14792 }
14749 if ( v54 ) 14793 if ( v54 )
14750 { 14794 {
14751 --v54; 14795 --v54;
14752 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); 14796 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
14753 v12 = (int)((char *)v0 + 36 * v54); 14797 v12 = (int)((char *)v0 + 36 * v54);
14771 { 14815 {
14772 pParty->pPickedItem.uBodyAnchor = 1; 14816 pParty->pPickedItem.uBodyAnchor = 1;
14773 v17 = v52 + 1; 14817 v17 = v52 + 1;
14774 memcpy(&v0->pInventoryItems[v52], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v52])); 14818 memcpy(&v0->pInventoryItems[v52], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v52]));
14775 v0->pEquipment.uOffHand = v17; 14819 v0->pEquipment.uOffHand = v17;
14776 goto LABEL_45; 14820 pMouse->RemoveHoldingItem();
14821 return;
14777 } 14822 }
14778 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); 14823 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
14779 v15 = (int)((char *)v0 + 36 * (v53 - 1)); 14824 v15 = (int)((char *)v0 + 36 * (v53 - 1));
14780 *(char *)(v15 + 556) = 0; 14825 *(char *)(v15 + 556) = 0;
14781 pParty->pPickedItem.Reset(); 14826 pParty->pPickedItem.Reset();
14790 case 0u: 14835 case 0u:
14791 case 0xCu: 14836 case 0xCu:
14792 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) 14837 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter)
14793 && pParty->pPickedItem.uItemID != 64 14838 && pParty->pPickedItem.uItemID != 64
14794 && pParty->pPickedItem.uItemID != 65 ) 14839 && pParty->pPickedItem.uItemID != 65 )
14795 goto LABEL_95; 14840 {
14841 v46 = 0;
14842 v45 = 0;
14843 v44 = 0;
14844 v43 = 0;
14845 v42 = -1;
14846 v41 = 0;
14847 v40 = 0;
14848 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46);
14849 return;
14850 }
14796 if ( !v0->HasSkill(v4) ) 14851 if ( !v0->HasSkill(v4) )
14797 goto LABEL_8; 14852 {
14853 v0->PlaySound(SPEECH_39, 0);
14854 return;
14855 }
14798 v50 = 0; 14856 v50 = 0;
14799 if ( v4 == 2 && (unsigned __int16)(v0->pActiveSkills[2] & 0xFFC0) 14857 if ( v4 == 2 && (unsigned __int16)(v0->pActiveSkills[2] & 0xFFC0)
14800 || v4 == 1 && (signed int)SkillToMastery(v0->pActiveSkills[1]) >= 3 ) 14858 || v4 == 1 && (signed int)SkillToMastery(v0->pActiveSkills[1]) >= 3 )
14801 { 14859 {
14802 if (pAsyncMouse) 14860 if (pAsyncMouse)
14828 memcpy((void *)(v20 + 532), &_this, 0x24u); 14886 memcpy((void *)(v20 + 532), &_this, 0x24u);
14829 v0->pEquipment.uOffHand = v21; 14887 v0->pEquipment.uOffHand = v21;
14830 if ( !v14 ) 14888 if ( !v14 )
14831 return; 14889 return;
14832 v22 = _this.uItemID; 14890 v22 = _this.uItemID;
14833 LABEL_73:
14834 v50 = v22; 14891 v50 = v22;
14835 goto LABEL_74; 14892 if ( v50 )
14893 stru_A750F8[uActiveCharacter - 1]._494836(
14894 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50),
14895 uActiveCharacter - 1 + 9);
14896 break;
14836 } 14897 }
14837 v23 = v0->FindFreeInventorySlot(); 14898 v23 = v0->FindFreeInventorySlot();
14838 if ( (v23 & 0x80000000u) != 0 ) 14899 if ( (v23 & 0x80000000u) != 0 )
14839 return; 14900 return;
14840 pParty->pPickedItem.uBodyAnchor = 1; 14901 pParty->pPickedItem.uBodyAnchor = 1;
14841 v50 = (unsigned int)&v0->pInventoryItems[v23]; 14902 v50 = (unsigned int)&v0->pInventoryItems[v23];
14842 memcpy(&v0->pInventoryItems[v23], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v23])); 14903 memcpy(&v0->pInventoryItems[v23], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v23]));
14843 v0->pEquipment.uOffHand = v23 + 1; 14904 v0->pEquipment.uOffHand = v23 + 1;
14844 LABEL_71:
14845 pMouse->RemoveHoldingItem(); 14905 pMouse->RemoveHoldingItem();
14846 if ( v52 != 12 ) 14906 if ( v52 != 12 )
14847 return; 14907 return;
14848 v22 = *(int *)v50; 14908 v22 = *(int *)v50;
14849 goto LABEL_73; 14909 v50 = v22;
14910 if ( v50 )
14911 stru_A750F8[uActiveCharacter - 1]._494836(
14912 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50),
14913 uActiveCharacter - 1 + 9);
14914 break;
14850 } 14915 }
14851 } 14916 }
14852 } 14917 }
14853 if ( !v53 ) 14918 if ( !v53 )
14854 { 14919 {
14857 return; 14922 return;
14858 pParty->pPickedItem.uBodyAnchor = 2; 14923 pParty->pPickedItem.uBodyAnchor = 2;
14859 v50 = (unsigned int)&v0->pInventoryItems[v26]; 14924 v50 = (unsigned int)&v0->pInventoryItems[v26];
14860 memcpy(&v0->pInventoryItems[v26], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v26])); 14925 memcpy(&v0->pInventoryItems[v26], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v26]));
14861 v0->pEquipment.uMainHand = v26 + 1; 14926 v0->pEquipment.uMainHand = v26 + 1;
14862 goto LABEL_71; 14927 pMouse->RemoveHoldingItem();
14928 if ( v52 != 12 )
14929 return;
14930 v22 = *(int *)v50;
14931 v50 = v22;
14932 if ( v50 )
14933 stru_A750F8[uActiveCharacter - 1]._494836(
14934 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50),
14935 uActiveCharacter - 1 + 9);
14936 break;
14863 } 14937 }
14864 --v53; 14938 --v53;
14865 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); 14939 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
14866 v24 = (int)((char *)v0 + 36 * v53); 14940 v24 = (int)((char *)v0 + 36 * v53);
14867 *(char *)(v24 + 556) = 0; 14941 *(char *)(v24 + 556) = 0;
14874 v0->pEquipment.uMainHand = v25; 14948 v0->pEquipment.uMainHand = v25;
14875 if ( v14 ) 14949 if ( v14 )
14876 v50 = _this.uItemID; 14950 v50 = _this.uItemID;
14877 if ( v51 ) 14951 if ( v51 )
14878 v0->pEquipment.uOffHand = 0; 14952 v0->pEquipment.uOffHand = 0;
14879 LABEL_74:
14880 if ( v50 ) 14953 if ( v50 )
14881 stru_A750F8[uActiveCharacter - 1]._494836( 14954 stru_A750F8[uActiveCharacter - 1]._494836(
14882 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), 14955 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50),
14883 uActiveCharacter - 1 + 9); 14956 uActiveCharacter - 1 + 9);
14884 break; 14957 break;
14885 case 1u: 14958 case 1u:
14886 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) 14959 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) )
14887 goto LABEL_95; 14960 {
14961 v46 = 0;
14962 v45 = 0;
14963 v44 = 0;
14964 v43 = 0;
14965 v42 = -1;
14966 v41 = 0;
14967 v40 = 0;
14968 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46);
14969 return;
14970 }
14888 if ( !v0->HasSkill(v4) ) 14971 if ( !v0->HasSkill(v4) )
14889 goto LABEL_8; 14972 {
14973 v0->PlaySound(SPEECH_39, 0);
14974 return;
14975 }
14890 if ( v53 ) 14976 if ( v53 )
14891 { 14977 {
14892 if ( v54 ) 14978 if ( v54 )
14893 { 14979 {
14894 v46 = 0; 14980 v46 = 0;
14896 v44 = 0; 14982 v44 = 0;
14897 v43 = 0; 14983 v43 = 0;
14898 v42 = -1; 14984 v42 = -1;
14899 v41 = 0; 14985 v41 = 0;
14900 v40 = 0; 14986 v40 = 0;
14901 goto LABEL_96; 14987 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46);
14988 return;
14902 } 14989 }
14903 --v53; 14990 --v53;
14904 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); 14991 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
14905 v27 = (int)((char *)v0 + 36 * v53); 14992 v27 = (int)((char *)v0 + 36 * v53);
14906 *(char *)(v27 + 556) = 0; 14993 *(char *)(v27 + 556) = 0;
14933 { 15020 {
14934 pParty->pPickedItem.uBodyAnchor = 2; 15021 pParty->pPickedItem.uBodyAnchor = 2;
14935 v31 = v52 + 1; 15022 v31 = v52 + 1;
14936 memcpy(&v0->pInventoryItems[v52], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v52])); 15023 memcpy(&v0->pInventoryItems[v52], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v52]));
14937 v0->pEquipment.uMainHand = v31; 15024 v0->pEquipment.uMainHand = v31;
14938 LABEL_45:
14939 pMouse->RemoveHoldingItem(); 15025 pMouse->RemoveHoldingItem();
14940 } 15026 }
14941 } 15027 }
14942 } 15028 }
14943 return; 15029 return;
14970 v52 = pItemsTable->pItems[v38->uItemID].uEquipType; 15056 v52 = pItemsTable->pItems[v38->uItemID].uEquipType;
14971 if ( v14 ) 15057 if ( v14 )
14972 { 15058 {
14973 if ( bUnderwater ) 15059 if ( bUnderwater )
14974 { 15060 {
14975 LABEL_95:
14976 v46 = 0; 15061 v46 = 0;
14977 v45 = 0; 15062 v45 = 0;
14978 v44 = 0; 15063 v44 = 0;
14979 v43 = 0; 15064 v43 = 0;
14980 v42 = -1; 15065 v42 = -1;
14981 v41 = 0; 15066 v41 = 0;
14982 v40 = 0; 15067 v40 = 0;
14983 LABEL_96:
14984 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46); 15068 pAudioPlayer->PlaySound(SOUND_27, v40, v41, v42, v43, v44, v45, v46);
14985 return; 15069 return;
14986 } 15070 }
14987 WetsuitOff(uActiveCharacter); 15071 WetsuitOff(uActiveCharacter);
14988 } 15072 }
15103 if ( v1 != (int *)-1 ) 15187 if ( v1 != (int *)-1 )
15104 DoInteractionWithTopmostZObject((unsigned __int16)v1, (signed int)(unsigned __int16)v1 >> 3); 15188 DoInteractionWithTopmostZObject((unsigned __int16)v1, (signed int)(unsigned __int16)v1 >> 3);
15105 } 15189 }
15106 v22 = 0; 15190 v22 = 0;
15107 v1 = (int *)((signed int)(viewparams->uScreenZ + viewparams->uScreenX) >> 1); 15191 v1 = (int *)((signed int)(viewparams->uScreenZ + viewparams->uScreenX) >> 1);
15108 if ( (signed int)viewparams->uScreenY >= (signed int)viewparams->uScreenW ) 15192 if ( (signed int)viewparams->uScreenY < (signed int)viewparams->uScreenW )
15109 goto LABEL_21; 15193 {
15110 v2 = (char *)v1 - 50; 15194 v2 = (char *)v1 - 50;
15111 v1 = (int *)((char *)v1 + 50); 15195 v1 = (int *)((char *)v1 + 50);
15112 v3 = 640 * viewparams->uScreenY; 15196 v3 = 640 * viewparams->uScreenY;
15113 v17 = v2; 15197 v17 = v2;
15114 v20 = v1; 15198 v20 = v1;
15115 v18 = ((viewparams->uScreenW - viewparams->uScreenY - 1) >> 1) + 1; 15199 v18 = ((viewparams->uScreenW - viewparams->uScreenY - 1) >> 1) + 1;
15116 do 15200 do
15117 { 15201 {
15118 if ( (signed int)v2 >= (signed int)v20 ) 15202 if ( (signed int)v2 < (signed int)v20 )
15119 goto LABEL_20; 15203 {
15120 v1 = &pRenderer->pActiveZBuffer[(int)&v2[v3]]; 15204 v1 = &pRenderer->pActiveZBuffer[(int)&v2[v3]];
15121 v21 = &pRenderer->pActiveZBuffer[(int)&v2[v3]]; 15205 v21 = &pRenderer->pActiveZBuffer[(int)&v2[v3]];
15122 v4 = v22; 15206 v4 = v22;
15123 v5 = (((char *)v20 - v2 - 1) >> 1) + 1; 15207 v5 = (((char *)v20 - v2 - 1) >> 1) + 1;
15124 do 15208 do
15125 { 15209 {
15126 v6 = 0; 15210 v6 = 0;
15127 v7 = *v1 & 0xFFFF; 15211 v7 = *v1 & 0xFFFF;
15128 v19 = 0; 15212 v19 = 0;
15129 if ( v4 > 0 ) 15213 if ( v4 > 0 )
15130 { 15214 {
15131 do 15215 do
15132 { 15216 {
15133 if ( dword_7207F0[v6] == v7 ) 15217 if ( dword_7207F0[v6] == v7 )
15134 break; 15218 break;
15135 ++v6; 15219 ++v6;
15136 v19 = v6; 15220 v19 = v6;
15137 } 15221 }
15138 while ( v6 < v22 ); 15222 while ( v6 < v22 );
15139 } 15223 }
15140 if ( (v7 & 7) == OBJECT_Decoration) 15224 if ( (v7 & 7) == OBJECT_Decoration)
15141 { 15225 {
15142 v16 = (unsigned int)v7 >> 3; 15226 v16 = (unsigned int)v7 >> 3;
15143 if ( (signed int)(((unsigned int)*v21 >> 16) 15227 if ( (signed int)(((unsigned int)*v21 >> 16)
15144 - pDecorationList->pDecorations[pLevelDecorations[(unsigned int)v7 >> 3].uDecorationDescID].uRadius) > 512 ) 15228 - pDecorationList->pDecorations[pLevelDecorations[(unsigned int)v7 >> 3].uDecorationDescID].uRadius) <= 512 )
15145 goto LABEL_18; 15229 if ( v19 == v22 && v4 < 100 )
15146 } 15230 {
15147 else 15231 ++v22;
15148 { 15232 ++v4;
15149 if ( (unsigned int)*v21 > 0x2000000 ) 15233 v8 = *v21;
15150 goto LABEL_18; 15234 dword_7207EC[v4] = v7;
15151 } 15235 dword_72065C[v4] = v8;
15152 if ( v19 == v22 && v4 < 100 ) 15236 }
15153 { 15237 }
15154 ++v22; 15238 else if ( (unsigned int)*v21 <= 0x2000000 )
15155 ++v4; 15239 {
15156 v8 = *v21; 15240 if ( v19 == v22 && v4 < 100 )
15157 dword_7207EC[v4] = v7; 15241 {
15158 dword_72065C[v4] = v8; 15242 ++v22;
15159 } 15243 ++v4;
15160 LABEL_18: 15244 v8 = *v21;
15161 v1 = v21 + 2; 15245 dword_7207EC[v4] = v7;
15162 --v5; 15246 dword_72065C[v4] = v8;
15163 v21 += 2; 15247 }
15164 } 15248 }
15165 while ( v5 ); 15249 v1 = v21 + 2;
15166 v2 = v17; 15250 --v5;
15167 LABEL_20: 15251 v21 += 2;
15168 v3 += 1280; 15252 }
15169 --v18; 15253 while ( v5 );
15170 } 15254 v2 = v17;
15171 while ( v18 ); 15255 }
15172 LABEL_21: 15256 v3 += 1280;
15257 --v18;
15258 }
15259 while ( v18 );
15260 }
15173 if ( v22 > 0 ) 15261 if ( v22 > 0 )
15174 { 15262 {
15175 v9 = dword_720660; 15263 v9 = dword_720660;
15176 v10 = 1; 15264 v10 = 1;
15177 do 15265 do
15342 { 15430 {
15343 if ( a1 >> 9 >= pOutdoor->uNumBModels 15431 if ( a1 >> 9 >= pOutdoor->uNumBModels
15344 || (v7 = &pOutdoor->pBModels[a1 >> 9].pFaces[(a1 >> 3) & 0x3F], BYTE2(v7->uAttributes) & 0x10) 15432 || (v7 = &pOutdoor->pBModels[a1 >> 9].pFaces[(a1 >> 3) & 0x3F], BYTE2(v7->uAttributes) & 0x10)
15345 || (v6 = v7->sCogTriggeredID) == 0 ) 15433 || (v6 = v7->sCogTriggeredID) == 0 )
15346 return 1; 15434 return 1;
15347 LABEL_13:
15348 EventProcessor((signed __int16)v6, v2, 1); 15435 EventProcessor((signed __int16)v6, v2, 1);
15349 return 0; 15436 return 0;
15350 } 15437 }
15351 v4 = &pIndoor->pFaces[a1 >> 3]; 15438 v4 = &pIndoor->pFaces[a1 >> 3];
15352 v5 = v4->uAttributes; 15439 v5 = v4->uAttributes;
15356 return 1; 15443 return 1;
15357 } 15444 }
15358 if ( v5 & 0x100000 || (v6 = pIndoor->pFaceExtras[v4->uFaceExtraID].uEventID) == 0 ) 15445 if ( v5 & 0x100000 || (v6 = pIndoor->pFaceExtras[v4->uFaceExtraID].uEventID) == 0 )
15359 return 1; 15446 return 1;
15360 if ( pCurrentScreen != SCREEN_BRANCHLESS_NPC_DIALOG ) 15447 if ( pCurrentScreen != SCREEN_BRANCHLESS_NPC_DIALOG )
15361 goto LABEL_13; 15448 {
15449 EventProcessor((signed __int16)v6, v2, 1);
15450 return 0;
15451 }
15362 break; 15452 break;
15363 } 15453 }
15364 return 0; 15454 return 0;
15365 } 15455 }
15366 // 4E28F8: using guessed type int pCurrentScreen; 15456 // 4E28F8: using guessed type int pCurrentScreen;