Mercurial > mm7
comparison mm7_3.cpp @ 238:b070b83a897b
Merge
author | Gloval |
---|---|
date | Mon, 18 Feb 2013 00:49:50 +0400 |
parents | 2799737f8a74 99ef31ffa74e |
children | ea0b5ff2ae23 |
comparison
equal
deleted
inserted
replaced
237:2799737f8a74 | 238:b070b83a897b |
---|---|
14493 v84 = viewparams->sPartyPosZ; | 14493 v84 = viewparams->sPartyPosZ; |
14494 if ( viewparams->field_2C != 384 ) | 14494 if ( viewparams->field_2C != 384 ) |
14495 { | 14495 { |
14496 if ( viewparams->field_2C == 768 ) | 14496 if ( viewparams->field_2C == 768 ) |
14497 { | 14497 { |
14498 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) | 14498 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
14499 goto LABEL_23; | 14499 v5 = 680; |
14500 v5 = 680; | |
14501 } | 14500 } |
14502 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 14501 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
14503 goto LABEL_8; | 14502 goto LABEL_8; |
14504 LABEL_23: | 14503 LABEL_23: |
14505 v94 = a4 - x_ + 1; | 14504 v94 = a4 - x_ + 1; |
14586 v93 = (unsigned __int16 *)((char *)v93 + v38); | 14585 v93 = (unsigned __int16 *)((char *)v93 + v38); |
14587 --v96; | 14586 --v96; |
14588 } | 14587 } |
14589 while ( v96 ); | 14588 while ( v96 ); |
14590 } | 14589 } |
14591 goto LABEL_38; | 14590 } |
14592 } | 14591 else |
14593 v6 = viewparams->field_38; | 14592 { |
14594 v86 = viewparams->field_38; | 14593 v6 = viewparams->field_38; |
14595 v84 = viewparams->field_3A; | 14594 v86 = viewparams->field_38; |
14596 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) | 14595 v84 = viewparams->field_3A; |
14597 goto LABEL_23; | 14596 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) |
14598 v5 = viewparams->field_2C - 34; | 14597 goto LABEL_23; |
14599 LABEL_8: | 14598 v5 = viewparams->field_2C - 34; |
14600 black = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0); | 14599 LABEL_8: |
14601 teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); | 14600 black = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0); |
14602 v7 = (uint *)pIndoor->pMapOutlines; | 14601 teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); |
14603 uNumBlueFacesInBLVMinimap = 0; | 14602 v7 = (uint *)pIndoor->pMapOutlines; |
14604 v8 = pIndoor->pMapOutlines->uNumOutlines == 0; | 14603 uNumBlueFacesInBLVMinimap = 0; |
14605 v9 = pIndoor->pMapOutlines->uNumOutlines < 0; | 14604 v8 = pIndoor->pMapOutlines->uNumOutlines == 0; |
14606 v94 = 0; | 14605 v9 = pIndoor->pMapOutlines->uNumOutlines < 0; |
14607 if ( !(v9 | v8) ) | 14606 v94 = 0; |
14608 { | 14607 if ( !(v9 | v8) ) |
14609 i = 0; | 14608 { |
14610 do | 14609 i = 0; |
14611 { | 14610 do |
14612 v10 = (int)((char *)v7 + i + 4); | 14611 { |
14613 v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes; | 14612 v10 = (int)((char *)v7 + i + 4); |
14614 if ( BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) ) | 14613 v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes; |
14615 goto LABEL_17; | 14614 if ( !(BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) )) |
14616 v12 = *(short *)((char *)v7 + i + 14); | 14615 { |
14617 if ( !(v12 & 1) ) | 14616 v12 = *(short *)((char *)v7 + i + 14); |
14618 { | 14617 if ( !(v12 & 1) ) |
14619 if ( !(v96 & 0x80) && (v11 & 0x80u) == 0 ) | 14618 { |
14620 goto LABEL_17; | 14619 if ( !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) |
14621 v96 = (signed int)v94 >> 3; | 14620 { |
14622 v13 = v94; | 14621 v96 = (signed int)v94 >> 3; |
14623 *(short *)(v10 + 10) = v12 | 1; | 14622 v13 = v94; |
14624 pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8); | 14623 *(short *)(v10 + 10) = v12 | 1; |
14625 } | 14624 pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8); |
14626 v14 = *(short *)v10; | 14625 } |
14627 v88 = v5; | 14626 } |
14628 v15 = &pIndoor->pVertices[v14]; | 14627 if ( (!(v12 & 1) && !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) || v12 & 1) |
14629 v16 = v15->x; | 14628 { |
14630 v17 = v15->y - v84; | 14629 v14 = *(short *)v10; |
14631 v93 = (unsigned __int16 *)(v16 - v6); | 14630 v88 = v5; |
14632 v92 = v17; | 14631 v15 = &pIndoor->pVertices[v14]; |
14633 v18 = &pIndoor->pVertices[*(short *)(v10 + 2)]; | 14632 v16 = v15->x; |
14634 v19 = v18->x; | 14633 v17 = v15->y - v84; |
14635 v20 = v18->y - v84; | 14634 v93 = (unsigned __int16 *)(v16 - v6); |
14636 v95 = v19 - v6; | 14635 v92 = v17; |
14637 v97 = (const void *)v20; | 14636 v18 = &pIndoor->pVertices[*(short *)(v10 + 2)]; |
14638 v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16; | 14637 v19 = v18->x; |
14639 v87 = (unsigned __int64)((signed int)v92 * (signed __int64)v5) >> 16; | 14638 v20 = v18->y - v84; |
14640 v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16); | 14639 v95 = v19 - v6; |
14641 v92 = (unsigned __int64)(v20 * (signed __int64)v5) >> 16; | 14640 v97 = (const void *)v20; |
14642 pRenderer->Line2D( | 14641 v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16; |
14643 v85 + v88, | 14642 v87 = (unsigned __int64)((signed int)v92 * (signed __int64)v5) >> 16; |
14644 v90 - v87, | 14643 v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16); |
14645 v85 + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16), | 14644 v92 = (unsigned __int64)(v20 * (signed __int64)v5) >> 16; |
14646 v90 - v92, | 14645 pRenderer->Line2D( |
14647 black); | 14646 v85 + v88, |
14648 v7 = (uint *)pIndoor->pMapOutlines; | 14647 v90 - v87, |
14649 LABEL_17: | 14648 v85 + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16), |
14650 ++v94; | 14649 v90 - v92, |
14651 i += 12; | 14650 black); |
14652 } | 14651 v7 = (uint *)pIndoor->pMapOutlines; |
14653 while ( (signed int)v94 < (signed int)*v7 ); | 14652 } |
14654 } | 14653 } |
14655 v21 = 0; | 14654 ++v94; |
14656 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 ) | 14655 i += 12; |
14657 { | 14656 } |
14658 while ( 1 ) | 14657 while ( (signed int)v94 < (signed int)*v7 ); |
14659 { | 14658 } |
14660 v22 = pBlueFacesInBLVMinimapIDs[v21]; | 14659 v21 = 0; |
14661 v87 = v5; | 14660 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 ) |
14662 v23 = (int)&v7[3 * v22 + 1]; | 14661 { |
14663 v24 = &pIndoor->pVertices[*(short *)v23]; | 14662 while ( 1 ) |
14664 v25 = &pIndoor->pVertices[*(short *)(v23 + 2)]; | 14663 { |
14665 v26 = v25->x; | 14664 v22 = pBlueFacesInBLVMinimapIDs[v21]; |
14666 v27 = (unsigned __int16 *)(v24->x - v86); | 14665 v87 = v5; |
14667 v28 = v24->y - v84; | 14666 v23 = (int)&v7[3 * v22 + 1]; |
14668 v29 = v25->y - v84; | 14667 v24 = &pIndoor->pVertices[*(short *)v23]; |
14669 v93 = v27; | 14668 v25 = &pIndoor->pVertices[*(short *)(v23 + 2)]; |
14670 v92 = v28; | 14669 v26 = v25->x; |
14671 v97 = (const void *)v29; | 14670 v27 = (unsigned __int16 *)(v24->x - v86); |
14672 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16; | 14671 v28 = v24->y - v84; |
14673 v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16; | 14672 v29 = v25->y - v84; |
14674 i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16; | 14673 v93 = v27; |
14675 v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16; | 14674 v92 = v28; |
14676 pRenderer->Line2D( | 14675 v97 = (const void *)v29; |
14677 v85 + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16), | 14676 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16; |
14678 v90 - v88, | 14677 v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16; |
14679 v85 + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16), | 14678 i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16; |
14680 v90 - v95, | 14679 v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16; |
14681 teal); | 14680 pRenderer->Line2D( |
14682 ++v21; | 14681 v85 + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16), |
14683 if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap ) | 14682 v90 - v88, |
14684 break; | 14683 v85 + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16), |
14685 v7 = (uint *)pIndoor->pMapOutlines; | 14684 v90 - v95, |
14686 } | 14685 teal); |
14687 v6 = v86; | 14686 ++v21; |
14688 } | 14687 if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap ) |
14689 LABEL_38: | 14688 break; |
14689 v7 = (uint *)pIndoor->pMapOutlines; | |
14690 } | |
14691 v6 = v86; | |
14692 } | |
14693 } | |
14690 v47 = ((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + v85 - 3; | 14694 v47 = ((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + v85 - 3; |
14691 v81 = pParty->vPosition.y - v84; | 14695 v81 = pParty->vPosition.y - v84; |
14692 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - v84) * (signed __int64)v5) >> 16); | 14696 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - v84) * (signed __int64)v5) >> 16); |
14693 v48 = 1; | 14697 v48 = 1; |
14694 v49 = v90 - (int)v97 - 3; | 14698 v49 = v90 - (int)v97 - 3; |
14738 { | 14742 { |
14739 if ( (signed int)v51 > 1408 ) | 14743 if ( (signed int)v51 > 1408 ) |
14740 { | 14744 { |
14741 if ( (signed int)v51 >= 1664 ) | 14745 if ( (signed int)v51 >= 1664 ) |
14742 { | 14746 { |
14743 if ( (signed int)v51 > 1920 ) | 14747 if ( (signed int)v51 <= 1920 ) |
14744 goto LABEL_71; | 14748 v73 = 7; |
14745 v73 = 7; | |
14746 } | 14749 } |
14747 else | 14750 else |
14748 { | 14751 { |
14749 v73 = 6; | 14752 v73 = 6; |
14750 } | 14753 } |
14766 } | 14769 } |
14767 else | 14770 else |
14768 { | 14771 { |
14769 v73 = 2; | 14772 v73 = 2; |
14770 } | 14773 } |
14771 v50 = v73; | 14774 if( (signed int)v51 <=1920) |
14772 goto LABEL_71; | 14775 v50 = v73; |
14773 } | 14776 } |
14774 v50 = 1; | 14777 else |
14775 } | 14778 v50 = 1; |
14776 LABEL_71: | 14779 } |
14777 pRenderer->_4A6776( | 14780 pRenderer->_4A6776( |
14778 v47, | 14781 v47, |
14779 v49, | 14782 v49, |
14780 (Texture *)(pTextureIDs_pMapDirs[v50] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v50]] : 0)); | 14783 (Texture *)(pTextureIDs_pMapDirs[v50] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v50]] : 0)); |
14781 } | 14784 } |