Mercurial > mm7
changeset 238:b070b83a897b
Merge
author | Gloval |
---|---|
date | Mon, 18 Feb 2013 00:49:50 +0400 |
parents | 2799737f8a74 (current diff) 99ef31ffa74e (diff) |
children | ea0b5ff2ae23 |
files | mm7_1.cpp mm7_3.cpp |
diffstat | 2 files changed, 114 insertions(+), 112 deletions(-) [+] |
line wrap: on
line diff
--- a/mm7_1.cpp Mon Feb 18 00:47:36 2013 +0400 +++ b/mm7_1.cpp Mon Feb 18 00:49:50 2013 +0400 @@ -5747,7 +5747,6 @@ //v3 = player; if (auto slot = player->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) { - __debugbreak(); // invalid inventory indexing memcpy(&player->pInventoryItems[slot-1], &pParty->pPickedItem, 0x24u); viewparams->bRedrawGameUI = true; pMouse->RemoveHoldingItem();
--- a/mm7_3.cpp Mon Feb 18 00:47:36 2013 +0400 +++ b/mm7_3.cpp Mon Feb 18 00:49:50 2013 +0400 @@ -14495,9 +14495,8 @@ { if ( viewparams->field_2C == 768 ) { - if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) - goto LABEL_23; - v5 = 680; + if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) + v5 = 680; } if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) goto LABEL_8; @@ -14588,105 +14587,110 @@ } while ( v96 ); } - goto LABEL_38; - } - v6 = viewparams->field_38; - v86 = viewparams->field_38; - v84 = viewparams->field_3A; - if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) - goto LABEL_23; - v5 = viewparams->field_2C - 34; -LABEL_8: - black = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0); - teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); - v7 = (uint *)pIndoor->pMapOutlines; - uNumBlueFacesInBLVMinimap = 0; - v8 = pIndoor->pMapOutlines->uNumOutlines == 0; - v9 = pIndoor->pMapOutlines->uNumOutlines < 0; - v94 = 0; - if ( !(v9 | v8) ) - { - i = 0; - do - { - v10 = (int)((char *)v7 + i + 4); - v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes; - if ( BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) ) - goto LABEL_17; - v12 = *(short *)((char *)v7 + i + 14); - if ( !(v12 & 1) ) - { - if ( !(v96 & 0x80) && (v11 & 0x80u) == 0 ) - goto LABEL_17; - v96 = (signed int)v94 >> 3; - v13 = v94; - *(short *)(v10 + 10) = v12 | 1; - pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8); - } - v14 = *(short *)v10; - v88 = v5; - v15 = &pIndoor->pVertices[v14]; - v16 = v15->x; - v17 = v15->y - v84; - v93 = (unsigned __int16 *)(v16 - v6); - v92 = v17; - v18 = &pIndoor->pVertices[*(short *)(v10 + 2)]; - v19 = v18->x; - v20 = v18->y - v84; - v95 = v19 - v6; - v97 = (const void *)v20; - v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16; - v87 = (unsigned __int64)((signed int)v92 * (signed __int64)v5) >> 16; - v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16); - v92 = (unsigned __int64)(v20 * (signed __int64)v5) >> 16; - pRenderer->Line2D( - v85 + v88, - v90 - v87, - v85 + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16), - v90 - v92, - black); - v7 = (uint *)pIndoor->pMapOutlines; -LABEL_17: - ++v94; - i += 12; - } - while ( (signed int)v94 < (signed int)*v7 ); - } - v21 = 0; - if ( (signed int)uNumBlueFacesInBLVMinimap > 0 ) - { - while ( 1 ) - { - v22 = pBlueFacesInBLVMinimapIDs[v21]; - v87 = v5; - v23 = (int)&v7[3 * v22 + 1]; - v24 = &pIndoor->pVertices[*(short *)v23]; - v25 = &pIndoor->pVertices[*(short *)(v23 + 2)]; - v26 = v25->x; - v27 = (unsigned __int16 *)(v24->x - v86); - v28 = v24->y - v84; - v29 = v25->y - v84; - v93 = v27; - v92 = v28; - v97 = (const void *)v29; - v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16; - v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16; - i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16; - v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16; - pRenderer->Line2D( - v85 + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16), - v90 - v88, - v85 + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16), - v90 - v95, - teal); - ++v21; - if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap ) - break; - v7 = (uint *)pIndoor->pMapOutlines; - } - v6 = v86; - } -LABEL_38: + } + else + { + v6 = viewparams->field_38; + v86 = viewparams->field_38; + v84 = viewparams->field_3A; + if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) + goto LABEL_23; + v5 = viewparams->field_2C - 34; + LABEL_8: + black = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0); + teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu); + v7 = (uint *)pIndoor->pMapOutlines; + uNumBlueFacesInBLVMinimap = 0; + v8 = pIndoor->pMapOutlines->uNumOutlines == 0; + v9 = pIndoor->pMapOutlines->uNumOutlines < 0; + v94 = 0; + if ( !(v9 | v8) ) + { + i = 0; + do + { + v10 = (int)((char *)v7 + i + 4); + v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes; + if ( !(BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) )) + { + v12 = *(short *)((char *)v7 + i + 14); + if ( !(v12 & 1) ) + { + if ( !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) + { + v96 = (signed int)v94 >> 3; + v13 = v94; + *(short *)(v10 + 10) = v12 | 1; + pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8); + } + } + if ( (!(v12 & 1) && !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) || v12 & 1) + { + v14 = *(short *)v10; + v88 = v5; + v15 = &pIndoor->pVertices[v14]; + v16 = v15->x; + v17 = v15->y - v84; + v93 = (unsigned __int16 *)(v16 - v6); + v92 = v17; + v18 = &pIndoor->pVertices[*(short *)(v10 + 2)]; + v19 = v18->x; + v20 = v18->y - v84; + v95 = v19 - v6; + v97 = (const void *)v20; + v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16; + v87 = (unsigned __int64)((signed int)v92 * (signed __int64)v5) >> 16; + v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16); + v92 = (unsigned __int64)(v20 * (signed __int64)v5) >> 16; + pRenderer->Line2D( + v85 + v88, + v90 - v87, + v85 + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16), + v90 - v92, + black); + v7 = (uint *)pIndoor->pMapOutlines; + } + } + ++v94; + i += 12; + } + while ( (signed int)v94 < (signed int)*v7 ); + } + v21 = 0; + if ( (signed int)uNumBlueFacesInBLVMinimap > 0 ) + { + while ( 1 ) + { + v22 = pBlueFacesInBLVMinimapIDs[v21]; + v87 = v5; + v23 = (int)&v7[3 * v22 + 1]; + v24 = &pIndoor->pVertices[*(short *)v23]; + v25 = &pIndoor->pVertices[*(short *)(v23 + 2)]; + v26 = v25->x; + v27 = (unsigned __int16 *)(v24->x - v86); + v28 = v24->y - v84; + v29 = v25->y - v84; + v93 = v27; + v92 = v28; + v97 = (const void *)v29; + v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16; + v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16; + i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16; + v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16; + pRenderer->Line2D( + v85 + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16), + v90 - v88, + v85 + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16), + v90 - v95, + teal); + ++v21; + if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap ) + break; + v7 = (uint *)pIndoor->pMapOutlines; + } + v6 = v86; + } + } v47 = ((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + v85 - 3; v81 = pParty->vPosition.y - v84; v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - v84) * (signed __int64)v5) >> 16); @@ -14740,9 +14744,8 @@ { if ( (signed int)v51 >= 1664 ) { - if ( (signed int)v51 > 1920 ) - goto LABEL_71; - v73 = 7; + if ( (signed int)v51 <= 1920 ) + v73 = 7; } else { @@ -14768,12 +14771,12 @@ { v73 = 2; } - v50 = v73; - goto LABEL_71; - } - v50 = 1; - } -LABEL_71: + if( (signed int)v51 <=1920) + v50 = v73; + } + else + v50 = 1; + } pRenderer->_4A6776( v47, v49,