Mercurial > mm7
comparison mm7_2.cpp @ 150:d92c78ab54fe
Слияние
author | Ritor1 |
---|---|
date | Tue, 12 Feb 2013 10:17:35 +0600 |
parents | 77ad59c17864 cca78efb377e |
children | 9abdd40a107b |
comparison
equal
deleted
inserted
replaced
149:2b0c652cc165 | 150:d92c78ab54fe |
---|---|
3247 v1 = pActors;//[0].uAIState; | 3247 v1 = pActors;//[0].uAIState; |
3248 v7 = uNumActors; | 3248 v7 = uNumActors; |
3249 do | 3249 do |
3250 { | 3250 { |
3251 v2 = v1->uAIState; | 3251 v2 = v1->uAIState; |
3252 if ( v1->uAIState == 5 || v2 == 11 || v2 == 19 || (v3 = v1->uSummonerID) != 0 && (v3 & 7) == 4 ) | 3252 if ( v1->uAIState == Dead || v2 == Removed || v2 == Disabled || (v3 = v1->uSummonerID) != 0 && (v3 & 7) == OBJECT_Player) |
3253 ++v0; | 3253 ++v0; |
3254 ++v1; | 3254 ++v1; |
3255 --v7; | 3255 --v7; |
3256 } | 3256 } |
3257 while ( v7 ); | 3257 while ( v7 ); |
15596 ++v6; | 15596 ++v6; |
15597 v19 = v6; | 15597 v19 = v6; |
15598 } | 15598 } |
15599 while ( v6 < v22 ); | 15599 while ( v6 < v22 ); |
15600 } | 15600 } |
15601 if ( (v7 & 7) == 5 ) | 15601 if ( (v7 & 7) == OBJECT_Decoration) |
15602 { | 15602 { |
15603 v16 = (unsigned int)v7 >> 3; | 15603 v16 = (unsigned int)v7 >> 3; |
15604 if ( (signed int)(((unsigned int)*v21 >> 16) | 15604 if ( (signed int)(((unsigned int)*v21 >> 16) |
15605 - pDecorationList->pDecorations[pLevelDecorations[(unsigned int)v7 >> 3].uDecorationDescID].uRadius) > 512 ) | 15605 - pDecorationList->pDecorations[pLevelDecorations[(unsigned int)v7 >> 3].uDecorationDescID].uRadius) > 512 ) |
15606 goto LABEL_18; | 15606 goto LABEL_18; |
15695 | 15695 |
15696 v26 = a2; | 15696 v26 = a2; |
15697 v2 = a1; | 15697 v2 = a1; |
15698 switch ( a1 & 7 ) | 15698 switch ( a1 & 7 ) |
15699 { | 15699 { |
15700 case 2: | 15700 case OBJECT_Item: |
15701 v17 = a1 >> 3; | 15701 v17 = a1 >> 3; |
15702 v26 = a1 >> 3; | 15702 v26 = a1 >> 3; |
15703 v18 = a1 >> 3; | 15703 v18 = a1 >> 3; |
15704 if ( pObjectList->pObjects[pLayingItems[v18].uObjectDescID].uFlags & 0x10 | 15704 if ( pObjectList->pObjects[pLayingItems[v18].uObjectDescID].uFlags & 0x10 |
15705 || v17 >= 1000 | 15705 || v17 >= 1000 |
15728 pParty->SetHoldingItem(v19); | 15728 pParty->SetHoldingItem(v19); |
15729 v21 = v26; | 15729 v21 = v26; |
15730 } | 15730 } |
15731 LayingItem::_42F933(v21); | 15731 LayingItem::_42F933(v21); |
15732 break; | 15732 break; |
15733 case 3: | 15733 |
15734 case OBJECT_Actor: | |
15734 v12 = a1 >> 3; | 15735 v12 = a1 >> 3; |
15735 v13 = &pActors[a1 >> 3]; | 15736 v13 = &pActors[a1 >> 3]; |
15736 v14 = v13->uAIState; | 15737 v14 = v13->uAIState; |
15737 if ( v14 == 4 || v14 == 17 ) | 15738 if ( v14 == 4 || v14 == 17 ) |
15738 return 1; | 15739 return 1; |
15770 } | 15771 } |
15771 } | 15772 } |
15772 } | 15773 } |
15773 } | 15774 } |
15774 break; | 15775 break; |
15775 case 5: | 15776 |
15777 case OBJECT_Decoration: | |
15776 v8 = &pLevelDecorations[a1 >> 3]; | 15778 v8 = &pLevelDecorations[a1 >> 3]; |
15777 v9 = v8->field_16_event_id; | 15779 v9 = v8->field_16_event_id; |
15778 if ( v9 ) | 15780 if ( v9 ) |
15779 { | 15781 { |
15780 EventProcessor(v9, a1, 1); | 15782 EventProcessor(v9, a1, 1); |
15790 _5C3420_pDecoration = v8; | 15792 _5C3420_pDecoration = v8; |
15791 EventProcessor(v11, 0, 1); | 15793 EventProcessor(v11, 0, 1); |
15792 _5C3420_pDecoration = 0; | 15794 _5C3420_pDecoration = 0; |
15793 } | 15795 } |
15794 break; | 15796 break; |
15797 | |
15795 default: | 15798 default: |
15796 if ( (a1 & 7) != 6 ) | 15799 if ( (a1 & 7) != OBJECT_BModel) |
15797 { | 15800 { |
15798 MessageBoxW(nullptr, L"Warning: Invalid ID reached!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Mouse.cpp:2020", 0); | 15801 MessageBoxW(nullptr, L"Warning: Invalid ID reached!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Mouse.cpp:2020", 0); |
15799 return 1; | 15802 return 1; |
15800 } | 15803 } |
15801 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor ) | 15804 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor ) |
15802 { | 15805 { |
15803 if ( a1 >> 9 >= pOutdoor->uNumBModels | 15806 if ( a1 >> 9 >= pOutdoor->uNumBModels |
15864 { | 15867 { |
15865 v5 = v15; | 15868 v5 = v15; |
15866 v6 = ((v12 - v4 - 1) >> 1) + 1; | 15869 v6 = ((v12 - v4 - 1) >> 1) + 1; |
15867 do | 15870 do |
15868 { | 15871 { |
15869 if ( (*(char *)v5 & 7) == 3 ) | 15872 if ( (*(char *)v5 & 7) == OBJECT_Actor) |
15870 { | 15873 { |
15871 if ( *v5 <= a3 << 16 ) | 15874 if ( *v5 <= a3 << 16 ) |
15872 { | 15875 { |
15873 v7 = (signed int)(unsigned __int16)*v5 >> 3; | 15876 v7 = (signed int)(unsigned __int16)*v5 >> 3; |
15874 v8 = pActors[v7].uAIState; | 15877 v8 = pActors[v7].uAIState; |
15935 do | 15938 do |
15936 { | 15939 { |
15937 v3 = pRenderer->GetParentBillboardID(a1a); | 15940 v3 = pRenderer->GetParentBillboardID(a1a); |
15938 v4 = pBillboardRenderList[v3].sZValue; | 15941 v4 = pBillboardRenderList[v3].sZValue; |
15939 v5 = (unsigned __int16)pBillboardRenderList[v3].sZValue; | 15942 v5 = (unsigned __int16)pBillboardRenderList[v3].sZValue; |
15940 if ( (v5 & 7) == 3 ) | 15943 if ( (v5 & 7) == OBJECT_Actor) |
15941 { | 15944 { |
15942 if ( v4 <= (unsigned int)(a3 << 16) ) | 15945 if ( v4 <= (unsigned int)(a3 << 16) ) |
15943 { | 15946 { |
15944 v6 = v5 >> 3; | 15947 v6 = v5 >> 3; |
15945 v7 = v6; | 15948 v7 = v6; |
16194 return 0; | 16197 return 0; |
16195 while ( 1 ) | 16198 while ( 1 ) |
16196 { | 16199 { |
16197 v19 = dword_720020_zvalues[v18] & 0xFFFF; | 16200 v19 = dword_720020_zvalues[v18] & 0xFFFF; |
16198 v20 = (dword_720020_zvalues[v18] & 0xFFFFu) >> 3; | 16201 v20 = (dword_720020_zvalues[v18] & 0xFFFFu) >> 3; |
16199 if ( (dword_720020_zvalues[v18] & 7) == 2 ) | 16202 if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Item) |
16200 { | 16203 { |
16201 if ( v20 >= 0x3E8 ) | 16204 if ( v20 >= 0x3E8 ) |
16202 return 0; | 16205 return 0; |
16203 if ( !(pLayingItems[v20].uAttributes & 0x10) ) | 16206 if ( !(pLayingItems[v20].uAttributes & 0x10) ) |
16204 { | 16207 { |
16207 v24 = v23; | 16210 v24 = v23; |
16208 goto LABEL_51; | 16211 goto LABEL_51; |
16209 } | 16212 } |
16210 goto LABEL_41; | 16213 goto LABEL_41; |
16211 } | 16214 } |
16212 if ( (dword_720020_zvalues[v18] & 7) == 3 ) | 16215 if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Actor) |
16213 { | 16216 { |
16214 if ( v20 >= 0xBB8 ) | 16217 if ( v20 >= 0xBB8 ) |
16215 return 0; | 16218 return 0; |
16216 v24 = (const char *)&pActors[v20]; | 16219 v24 = (const char *)&pActors[v20]; |
16217 goto LABEL_51; | 16220 goto LABEL_51; |
16218 } | 16221 } |
16219 if ( (dword_720020_zvalues[v18] & 7) == 5 ) | 16222 if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Decoration) |
16220 break; | 16223 break; |
16221 if ( (dword_720020_zvalues[v18] & 7) == 6 ) | 16224 if ( (dword_720020_zvalues[v18] & 7) == OBJECT_BModel) |
16222 { | 16225 { |
16223 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 16226 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
16224 { | 16227 { |
16225 v21 = &pIndoor->pFaces[v20]; | 16228 v21 = &pIndoor->pFaces[v20]; |
16226 if ( !(BYTE3(v21->uAttributes) & 2) ) | 16229 if ( !(BYTE3(v21->uAttributes) & 2) ) |
16548 v153 = uLayingItemID; | 16551 v153 = uLayingItemID; |
16549 v2 = &pLayingItems[uLayingItemID]; | 16552 v2 = &pLayingItems[uLayingItemID]; |
16550 v3 = &pObjectList->pObjects[v2->uObjectDescID]; | 16553 v3 = &pObjectList->pObjects[v2->uObjectDescID]; |
16551 v145 = a2; | 16554 v145 = a2; |
16552 v151 = a2 & 7; | 16555 v151 = a2 & 7; |
16553 if ( (a2 & 7) == 3 ) | 16556 if ( (a2 & 7) == OBJECT_Actor) |
16554 { | 16557 { |
16555 if ( (v2->field_58 & 7) == 3 && !pActors[v2->field_58 >> 3].GetActorsRelation(&pActors[a2 >> 3]) ) | 16558 if ( (v2->field_58 & 7) == OBJECT_Actor && !pActors[v2->field_58 >> 3].GetActorsRelation(&pActors[a2 >> 3]) ) |
16556 return 1; | 16559 return 1; |
16557 } | 16560 } |
16558 else | 16561 else |
16559 { | 16562 { |
16560 if ( (a2 & 7) == 4 && (v2->field_58 & 7) == 4 ) | 16563 if ( (a2 & 7) == OBJECT_Player && (v2->field_58 & 7) == OBJECT_Player) |
16561 return 1; | 16564 return 1; |
16562 } | 16565 } |
16563 if ( pParty->bTurnBasedModeOn == 1 ) | 16566 if ( pParty->bTurnBasedModeOn == 1 ) |
16564 { | 16567 { |
16565 v5 = v2->uAttributes; | 16568 v5 = v2->uAttributes; |
16567 { | 16570 { |
16568 --pTurnEngine->field_1C; | 16571 --pTurnEngine->field_1C; |
16569 v2->uAttributes = v5 & 0xFFFB; | 16572 v2->uAttributes = v5 & 0xFFFB; |
16570 } | 16573 } |
16571 } | 16574 } |
16572 if ( v151 == 6 && (v2->field_58 & 7) != 4 ) | 16575 if ( v151 == OBJECT_BModel && (v2->field_58 & 7) != OBJECT_Player) |
16573 BYTE2(pActors[v2->field_58 >> 3].uAttributes) |= 4u; | 16576 BYTE2(pActors[v2->field_58 >> 3].uAttributes) |= 4u; |
16574 v6 = v2->uItemType; | 16577 v6 = v2->uItemType; |
16575 v7 = v2->uItemType; | 16578 v7 = v2->uItemType; |
16576 if ( v7 > 3060 ) | 16579 if ( v7 > 3060 ) |
16577 { | 16580 { |
16624 case 0x2346u: | 16627 case 0x2346u: |
16625 v143 = 18030; | 16628 v143 = 18030; |
16626 break; | 16629 break; |
16627 } | 16630 } |
16628 v138 = 1; | 16631 v138 = 1; |
16629 if ( v151 != 3 ) | 16632 if ( v151 != OBJECT_Actor) |
16630 { | 16633 { |
16631 if ( v6 != 9030 || v2->field_50 != 4 ) | 16634 if ( v6 != 9030 || v2->field_50 != 4 ) |
16632 goto LABEL_246; | 16635 goto LABEL_246; |
16633 v2->_46BEF1_apply_spells(); | 16636 v2->_46BEF1_apply_spells(); |
16634 LABEL_233: | 16637 LABEL_233: |