Mercurial > mm7
comparison mm7_1.cpp @ 1078:b44dee7e70e8
added a structure for 0x50B700-0x50BBB8
author | zipi |
---|---|
date | Sat, 25 May 2013 20:18:23 +0100 |
parents | b79139c3b5c8 |
children | 81a30c2e3e0a |
comparison
equal
deleted
inserted
replaced
1077:2210109f280d | 1078:b44dee7e70e8 |
---|---|
33 #include "IconFrameTable.h" | 33 #include "IconFrameTable.h" |
34 #include "TurnEngine.h" | 34 #include "TurnEngine.h" |
35 #include "texts.h" | 35 #include "texts.h" |
36 #include "UIHouses.h" | 36 #include "UIHouses.h" |
37 #include "mm7_data.h" | 37 #include "mm7_data.h" |
38 #include "stru367.h" | |
38 | 39 |
39 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); | 40 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); |
40 int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4); | 41 int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4); |
41 bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive); | 42 bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive); |
42 bool __fastcall Initialize(HINSTANCE hInst, char *pCmdLine); | 43 bool __fastcall Initialize(HINSTANCE hInst, char *pCmdLine); |
1569 signed int ia; // [sp+24h] [bp-4h]@19 | 1570 signed int ia; // [sp+24h] [bp-4h]@19 |
1570 signed int ib; // [sp+24h] [bp-4h]@31 | 1571 signed int ib; // [sp+24h] [bp-4h]@31 |
1571 signed int ic; // [sp+24h] [bp-4h]@41 | 1572 signed int ic; // [sp+24h] [bp-4h]@41 |
1572 signed int id; // [sp+24h] [bp-4h]@51 | 1573 signed int id; // [sp+24h] [bp-4h]@51 |
1573 signed int ie; // [sp+24h] [bp-4h]@61 | 1574 signed int ie; // [sp+24h] [bp-4h]@61 |
1574 | 1575 return 0; |
1575 v1 = &pIndoor->pFaces[uFaceID]; | 1576 v1 = &pIndoor->pFaces[uFaceID]; |
1576 //this = pGame->pIndoorCameraD3D; | 1577 //this = pGame->pIndoorCameraD3D; |
1577 v2 = &pIndoor->pVertices[v1->pVertexIDs[0]]; | 1578 v2 = &pIndoor->pVertices[v1->pVertexIDs[0]]; |
1578 //v3 = *(_DWORD *)&v2->x; | 1579 //v3 = *(_DWORD *)&v2->x; |
1579 v4 = v2->z; | 1580 v4 = v2->z; |
1580 //v5 = 0; | 1581 //v5 = 0; |
1581 if ( v1->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x) | 1582 if ( v1->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x) |
1582 + v1->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y) | 1583 + v1->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y) |
1583 + v1->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 ) | 1584 + v1->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 ) |
1584 { | 1585 { |
1585 dword_50B700 = 1; | 1586 stru_50B700.field_0 = 1; |
1586 } | 1587 } |
1587 else | 1588 else |
1588 { | 1589 { |
1589 dword_50B700 = 0; | 1590 stru_50B700.field_0 = 0; |
1590 if ( !v1->Portal() ) | 1591 if ( !v1->Portal() ) |
1591 return 0; | 1592 return 0; |
1592 } | 1593 } |
1593 //v66 = v1->uNumVertices; | 1594 //v66 = v1->uNumVertices; |
1594 for (uint i = 0; i < v1->uNumVertices; ++i) | 1595 for (uint i = 0; i < v1->uNumVertices; ++i) |
1596 auto v6 = &pIndoor->pVertices[v1->pVertexIDs[i]]; | 1597 auto v6 = &pIndoor->pVertices[v1->pVertexIDs[i]]; |
1597 pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible( | 1598 pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible( |
1598 v6->x, | 1599 v6->x, |
1599 v6->y, | 1600 v6->y, |
1600 v6->z, | 1601 v6->z, |
1601 &_50B924_view_transformed_xs[i], | 1602 &stru_50B700._view_transformed_xs[i], |
1602 &_50B834_view_transformed_zs[i], | 1603 &stru_50B700._view_transformed_zs[i], |
1603 &_50B744_view_transformed_ys[i], | 1604 &stru_50B700._view_transformed_ys[i], |
1604 0); | 1605 0); |
1605 } | 1606 } |
1606 | 1607 |
1607 //v7 = v1->uNumVertices; | 1608 //v7 = v1->uNumVertices; |
1608 //v8 = 0; | 1609 //v8 = 0; |
1609 if (v1->uNumVertices <= 0) | 1610 if (v1->uNumVertices <= 0) |
1610 return 0; | 1611 return 0; |
1611 | 1612 |
1612 bool bFound = false; | 1613 bool bFound = false; |
1613 for (uint i = 0; i < v1->uNumVertices; ++i) | 1614 for (uint i = 0; i < v1->uNumVertices; ++i) |
1614 if (_50B924_view_transformed_xs[i] >= 0x80000u) | 1615 if (stru_50B700._view_transformed_xs[i] >= 0x80000u) |
1615 { | 1616 { |
1616 bFound = true; | 1617 bFound = true; |
1617 break; | 1618 break; |
1618 } | 1619 } |
1619 if (!bFound) | 1620 if (!bFound) |
1620 return 0; | 1621 return 0; |
1621 | 1622 |
1622 v79 = 0; | 1623 v79 = 0; |
1623 _50B924_view_transformed_xs[v1->uNumVertices] = _50B924_view_transformed_xs[0]; | 1624 stru_50B700._view_transformed_xs[v1->uNumVertices] = stru_50B700._view_transformed_xs[0]; |
1624 _50B834_view_transformed_zs[v1->uNumVertices] = _50B834_view_transformed_zs[0]; | 1625 stru_50B700._view_transformed_zs[v1->uNumVertices] = stru_50B700._view_transformed_zs[0]; |
1625 _50B744_view_transformed_ys[v1->uNumVertices] = _50B744_view_transformed_ys[0]; | 1626 stru_50B700._view_transformed_ys[v1->uNumVertices] = stru_50B700._view_transformed_ys[0]; |
1626 thisa = _50B924_view_transformed_xs[0] >= (signed int)0x80000u; | 1627 thisa = stru_50B700._view_transformed_xs[0] >= (signed int)0x80000u; |
1627 //int i = 1; | 1628 //int i = 1; |
1628 for (uint i = 1; i <= v1->uNumVertices; ++i) | 1629 for (uint i = 1; i <= v1->uNumVertices; ++i) |
1629 { | 1630 { |
1630 v10 = _50B924_view_transformed_xs[i]; | 1631 v10 = stru_50B700._view_transformed_xs[i]; |
1631 v81 = v10 >= (signed int)0x80000u; | 1632 v81 = v10 >= (signed int)0x80000u; |
1632 if ( thisa ^ v81 ) | 1633 if ( thisa ^ v81 ) |
1633 { | 1634 { |
1634 v11 = _50B924_view_transformed_xs[i - 1]; | 1635 v11 = stru_50B700._view_transformed_xs[i - 1]; |
1635 if ( v10 >= (signed int)0x80000u ) | 1636 if ( v10 >= (signed int)0x80000u ) |
1636 { | 1637 { |
1637 v12 = v10 - v11; | 1638 v12 = v10 - v11; |
1638 v13 = 0x80000 - v11; | 1639 v13 = 0x80000 - v11; |
1639 LODWORD(v14) = v13 << 16; | 1640 LODWORD(v14) = v13 << 16; |
1640 HIDWORD(v14) = v13 >> 16; | 1641 HIDWORD(v14) = v13 >> 16; |
1641 v15 = &_50B744_view_transformed_ys[i - 1]; | 1642 v15 = &stru_50B700._view_transformed_ys[i - 1]; |
1642 dword_50B828[v79] = ((unsigned __int64)((_50B834_view_transformed_zs[i] - _50B834_view_transformed_zs[i - 1]) * v14 / v12) >> 16) + _50B834_view_transformed_zs[i - 1]; | 1643 stru_50B700.field_128[v79] = ((unsigned __int64)((stru_50B700._view_transformed_zs[i] - stru_50B700._view_transformed_zs[i - 1]) * v14 / v12) >> 16) + stru_50B700._view_transformed_zs[i - 1]; |
1643 thisb = (unsigned __int64)((_50B744_view_transformed_ys[i] - _50B744_view_transformed_ys[i - 1]) * v14 / v12) >> 16; | 1644 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[i] - stru_50B700._view_transformed_ys[i - 1]) * v14 / v12) >> 16; |
1644 } | 1645 } |
1645 else | 1646 else |
1646 { | 1647 { |
1647 v16 = v11 - v10; | 1648 v16 = v11 - v10; |
1648 v17 = 0x80000 - v10; | 1649 v17 = 0x80000 - v10; |
1649 LODWORD(v18) = v17 << 16; | 1650 LODWORD(v18) = v17 << 16; |
1650 HIDWORD(v18) = v17 >> 16; | 1651 HIDWORD(v18) = v17 >> 16; |
1651 v15 = &_50B744_view_transformed_ys[i]; | 1652 v15 = &stru_50B700._view_transformed_ys[i]; |
1652 dword_50B828[v79] = ((unsigned __int64)((_50B834_view_transformed_zs[i - 1] - _50B834_view_transformed_zs[i]) * v18 / v16) >> 16) + _50B834_view_transformed_zs[i]; | 1653 stru_50B700.field_128[v79] = ((unsigned __int64)((stru_50B700._view_transformed_zs[i - 1] - stru_50B700._view_transformed_zs[i]) * v18 / v16) >> 16) + stru_50B700._view_transformed_zs[i]; |
1653 thisb = (unsigned __int64)((_50B744_view_transformed_ys[i - 1] - _50B744_view_transformed_ys[i]) * v18 / v16) >> 16; | 1654 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[i - 1] - stru_50B700._view_transformed_ys[i]) * v18 / v16) >> 16; |
1654 } | 1655 } |
1655 v19 = v79++; | 1656 v19 = v79++; |
1656 //v7 = v66; | 1657 //v7 = v66; |
1657 dword_50B738[v19] = thisb + *v15; | 1658 stru_50B700.field_38[v19] = thisb + *v15; |
1658 dword_50B918[v19] = 0x80000u; | 1659 stru_50B700.field_218[v19] = 0x80000u; |
1659 } | 1660 } |
1660 if ( v81 ) | 1661 if ( v81 ) |
1661 { | 1662 { |
1662 v20 = v79++; | 1663 v20 = v79++; |
1663 dword_50B918[v20] = _50B924_view_transformed_xs[i]; | 1664 stru_50B700.field_218[v20] = stru_50B700._view_transformed_xs[i]; |
1664 dword_50B828[v20] = _50B834_view_transformed_zs[i]; | 1665 stru_50B700.field_128[v20] = stru_50B700._view_transformed_zs[i]; |
1665 dword_50B738[v20] = _50B744_view_transformed_ys[i]; | 1666 stru_50B700.field_38[v20] = stru_50B700._view_transformed_ys[i]; |
1666 } | 1667 } |
1667 //++i; | 1668 //++i; |
1668 thisa = v81; | 1669 thisa = v81; |
1669 } | 1670 } |
1670 v21 = v79; | 1671 v21 = v79; |
1671 dword_50B918[v79] = dword_50B918[0]; | 1672 stru_50B700.field_218[v79] = stru_50B700.field_218[0]; |
1672 dword_50B828[v79] = dword_50B828[0]; | 1673 stru_50B700.field_128[v79] = stru_50B700.field_128[0]; |
1673 dword_50B738[v79] = dword_50B738[0]; | 1674 stru_50B700.field_38[v79] = stru_50B700.field_38[0]; |
1674 for (ia = 0; ia < v79; ++ia) | 1675 for (ia = 0; ia < v79; ++ia) |
1675 { | 1676 { |
1676 v22 = ia; | 1677 v22 = ia; |
1677 thisc = abs(dword_50B918[ia]); | 1678 thisc = abs(stru_50B700.field_218[ia]); |
1678 if ( abs(dword_50B828[ia]) >> 13 <= thisc ) | 1679 if ( abs(stru_50B700.field_128[ia]) >> 13 <= thisc ) |
1679 { | 1680 { |
1680 v27 = dword_50B828[v22]; | 1681 v27 = stru_50B700.field_128[v22]; |
1681 LODWORD(v28) = v27 << 16; | 1682 LODWORD(v28) = v27 << 16; |
1682 HIDWORD(v28) = v27 >> 16; | 1683 HIDWORD(v28) = v27 >> 16; |
1683 v26 = v28 / dword_50B918[v22]; | 1684 v26 = v28 / stru_50B700.field_218[v22]; |
1684 v23 = 0; | 1685 v23 = 0; |
1685 } | 1686 } |
1686 else | 1687 else |
1687 { | 1688 { |
1688 v23 = 0; | 1689 v23 = 0; |
1689 v24 = 0; | 1690 v24 = 0; |
1690 if ( dword_50B828[v22] >= 0 ) | 1691 if ( stru_50B700.field_128[v22] >= 0 ) |
1691 { | 1692 { |
1692 LOBYTE(v24) = dword_50B918[v22] >= 0; | 1693 LOBYTE(v24) = stru_50B700.field_218[v22] >= 0; |
1693 v26 = ((v24 - 1) & 0xFF800000) + 0x400000; | 1694 v26 = ((v24 - 1) & 0xFF800000) + 0x400000; |
1694 } | 1695 } |
1695 else | 1696 else |
1696 { | 1697 { |
1697 LOBYTE(v24) = dword_50B918[v22] >= 0; | 1698 LOBYTE(v24) = stru_50B700.field_218[v22] >= 0; |
1698 v25 = v24 - 1; | 1699 v25 = v24 - 1; |
1699 v26 = (v25 & 0x800000) - 0x400000; | 1700 v26 = (v25 & 0x800000) - 0x400000; |
1700 } | 1701 } |
1701 } | 1702 } |
1702 v29 = dword_50B738[v22]; | 1703 v29 = stru_50B700.field_38[v22]; |
1703 dword_50BAF8_xs[v22] = v26; | 1704 stru_50B700._xs3[v22] = v26; |
1704 if ( abs(v29) >> 13 <= thisc ) | 1705 if ( abs(v29) >> 13 <= thisc ) |
1705 { | 1706 { |
1706 v33 = dword_50B738[v22]; | 1707 v33 = stru_50B700.field_38[v22]; |
1707 LODWORD(v34) = v33 << 16; | 1708 LODWORD(v34) = v33 << 16; |
1708 HIDWORD(v34) = v33 >> 16; | 1709 HIDWORD(v34) = v33 >> 16; |
1709 v32 = v34 / dword_50B918[v22]; | 1710 v32 = v34 / stru_50B700.field_218[v22]; |
1710 } | 1711 } |
1711 else | 1712 else |
1712 { | 1713 { |
1713 v30 = 0; | 1714 v30 = 0; |
1714 if ( dword_50B738[v22] >= v23 ) | 1715 if ( stru_50B700.field_38[v22] >= v23 ) |
1715 { | 1716 { |
1716 LOBYTE(v30) = dword_50B918[v22] >= v23; | 1717 LOBYTE(v30) = stru_50B700.field_218[v22] >= v23; |
1717 v32 = ((v30 - 1) & 0xFF800000) + 0x400000; | 1718 v32 = ((v30 - 1) & 0xFF800000) + 0x400000; |
1718 } | 1719 } |
1719 else | 1720 else |
1720 { | 1721 { |
1721 LOBYTE(v30) = dword_50B918[v22] >= v23; | 1722 LOBYTE(v30) = stru_50B700.field_218[v22] >= v23; |
1722 v31 = v30 - 1; | 1723 v31 = v30 - 1; |
1723 v32 = (v31 & 0x800000) - 0x400000; | 1724 v32 = (v31 & 0x800000) - 0x400000; |
1724 } | 1725 } |
1725 } | 1726 } |
1726 dword_50BA08_ys[v22] = v32; | 1727 stru_50B700._ys2[v22] = v32; |
1727 dword_50BAF8_xs[v22] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BAF8_xs[v22]) >> 16; | 1728 stru_50B700._xs3[v22] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)stru_50B700._xs3[v22]) >> 16; |
1728 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BA08_ys[v22]) >> 16; | 1729 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)stru_50B700._ys2[v22]) >> 16; |
1729 dword_50BAF8_xs[v22] = pBLVRenderParams->uViewportCenterX - dword_50BAF8_xs[v22]; | 1730 stru_50B700._xs3[v22] = pBLVRenderParams->uViewportCenterX - stru_50B700._xs3[v22]; |
1730 dword_50BA08_ys[v22] = pBLVRenderParams->uViewportCenterY - v35; | 1731 stru_50B700._ys2[v22] = pBLVRenderParams->uViewportCenterY - v35; |
1731 } | 1732 } |
1732 v36 = 0; | 1733 v36 = 0; |
1733 dword_50BAF8_xs[v21] = dword_50BAF8_xs[0]; | 1734 stru_50B700._xs3[v21] = stru_50B700._xs3[0]; |
1734 dword_50BA08_ys[v21] = dword_50BA08_ys[0]; | 1735 stru_50B700._ys2[v21] = stru_50B700._ys2[0]; |
1735 v37 = pBLVRenderParams->uViewportX; | 1736 v37 = pBLVRenderParams->uViewportX; |
1736 v38 = dword_50BAF8_xs[0] < (signed int)pBLVRenderParams->uViewportX; | 1737 v38 = stru_50B700._xs3[0] < (signed int)pBLVRenderParams->uViewportX; |
1737 LOBYTE(v38) = dword_50BAF8_xs[0] >= (signed int)pBLVRenderParams->uViewportX; | 1738 LOBYTE(v38) = stru_50B700._xs3[0] >= (signed int)pBLVRenderParams->uViewportX; |
1738 v39 = 1; | 1739 v39 = 1; |
1739 ib = 1; | 1740 ib = 1; |
1740 if ( v79 < 1 ) | 1741 if ( v79 < 1 ) |
1741 return 0; | 1742 return 0; |
1742 do | 1743 do |
1743 { | 1744 { |
1744 v40 = v39; | 1745 v40 = v39; |
1745 v41 = dword_50BAF8_xs[v40]; | 1746 v41 = stru_50B700._xs3[v40]; |
1746 v82 = v41 >= (signed int)v37; | 1747 v82 = v41 >= (signed int)v37; |
1747 if ( v38 ^ v82 ) | 1748 if ( v38 ^ v82 ) |
1748 { | 1749 { |
1749 if ( v41 >= (signed int)v37 ) | 1750 if ( v41 >= (signed int)v37 ) |
1750 { | 1751 { |
1751 v67 = (signed int)(v37 - dword_50BAF8_xs[v40 - 1]) * (signed __int64)(dword_50BA08_ys[v40] - dword_50BA08_ys[v40 - 1]) / (v41 - dword_50BAF8_xs[v40 - 1]); | 1752 v67 = (signed int)(v37 - stru_50B700._xs3[v40 - 1]) * (signed __int64)(stru_50B700._ys2[v40] - stru_50B700._ys2[v40 - 1]) / (v41 - stru_50B700._xs3[v40 - 1]); |
1752 v42 = dword_50BA08_ys[v40 - 1]; | 1753 v42 = stru_50B700._ys2[v40 - 1]; |
1753 } | 1754 } |
1754 else | 1755 else |
1755 { | 1756 { |
1756 v67 = (signed int)(v37 - v41) * (signed __int64)(dword_50BA08_ys[v40 - 1] - dword_50BA08_ys[v40]) / (dword_50BAF8_xs[v40 - 1] - v41); | 1757 v67 = (signed int)(v37 - v41) * (signed __int64)(stru_50B700._ys2[v40 - 1] - stru_50B700._ys2[v40]) / (stru_50B700._xs3[v40 - 1] - v41); |
1757 v42 = dword_50BA08_ys[v40]; | 1758 v42 = stru_50B700._ys2[v40]; |
1758 } | 1759 } |
1759 dword_50B9FC_ys[v36] = v67 + v42; | 1760 stru_50B700._ys[v36] = v67 + v42; |
1760 v37 = pBLVRenderParams->uViewportX; | 1761 v37 = pBLVRenderParams->uViewportX; |
1761 dword_50BAEC_xs[v36] = pBLVRenderParams->uViewportX; | 1762 stru_50B700._xs2[v36] = pBLVRenderParams->uViewportX; |
1762 ++v36; | 1763 ++v36; |
1763 } | 1764 } |
1764 v38 = v82; | 1765 v38 = v82; |
1765 if ( v82 ) | 1766 if ( v82 ) |
1766 { | 1767 { |
1767 dword_50BAEC_xs[v36] = dword_50BAF8_xs[v40]; | 1768 stru_50B700._xs2[v36] = stru_50B700._xs3[v40]; |
1768 dword_50B9FC_ys[v36] = dword_50BA08_ys[v40]; | 1769 stru_50B700._ys[v36] = stru_50B700._ys2[v40]; |
1769 ++v36; | 1770 ++v36; |
1770 } | 1771 } |
1771 v39 = ib++ + 1; | 1772 v39 = ib++ + 1; |
1772 } | 1773 } |
1773 while ( ib <= v79 ); | 1774 while ( ib <= v79 ); |
1774 | 1775 |
1775 if (v36 < 1) | 1776 if (v36 < 1) |
1776 return 0; | 1777 return 0; |
1777 | 1778 |
1778 v43 = 0; | 1779 v43 = 0; |
1779 dword_50BAEC_xs[v36] = dword_50BAEC_xs[0]; | 1780 stru_50B700._xs2[v36] = stru_50B700._xs2[0]; |
1780 dword_50B9FC_ys[v36] = dword_50B9FC_ys[0]; | 1781 stru_50B700._ys[v36] = stru_50B700._ys[0]; |
1781 v44 = pBLVRenderParams->uViewportZ; | 1782 v44 = pBLVRenderParams->uViewportZ; |
1782 thisd = dword_50BAEC_xs[0] <= (signed int)pBLVRenderParams->uViewportZ; | 1783 thisd = stru_50B700._xs2[0] <= (signed int)pBLVRenderParams->uViewportZ; |
1783 ic = 1; | 1784 ic = 1; |
1784 | 1785 |
1785 do | 1786 do |
1786 { | 1787 { |
1787 v45 = ic; | 1788 v45 = ic; |
1788 v46 = dword_50BAEC_xs[ic]; | 1789 v46 = stru_50B700._xs2[ic]; |
1789 v83 = v46 <= (signed int)v44; | 1790 v83 = v46 <= (signed int)v44; |
1790 if ( thisd ^ v83 ) | 1791 if ( thisd ^ v83 ) |
1791 { | 1792 { |
1792 if ( v46 <= (signed int)v44 ) | 1793 if ( v46 <= (signed int)v44 ) |
1793 { | 1794 { |
1794 v68 = (signed int)(v44 - dword_50BAEC_xs[v45 - 1]) * (signed __int64)(dword_50B9FC_ys[v45] - dword_50B9FC_ys[v45 - 1]) / (v46 - dword_50BAEC_xs[v45 - 1]); | 1795 v68 = (signed int)(v44 - stru_50B700._xs2[v45 - 1]) * (signed __int64)(stru_50B700._ys[v45] - stru_50B700._ys[v45 - 1]) / (v46 - stru_50B700._xs2[v45 - 1]); |
1795 v47 = dword_50B9FC_ys[v45 - 1]; | 1796 v47 = stru_50B700._ys[v45 - 1]; |
1796 } | 1797 } |
1797 else | 1798 else |
1798 { | 1799 { |
1799 v68 = (signed int)(v44 - v46) * (signed __int64)(dword_50B9FC_ys[v45 - 1] - dword_50B9FC_ys[v45]) / (dword_50BAEC_xs[v45 - 1] - v46); | 1800 v68 = (signed int)(v44 - v46) * (signed __int64)(stru_50B700._ys[v45 - 1] - stru_50B700._ys[v45]) / (stru_50B700._xs2[v45 - 1] - v46); |
1800 v47 = dword_50B9FC_ys[v45]; | 1801 v47 = stru_50B700._ys[v45]; |
1801 } | 1802 } |
1802 dword_50B9F0[v43] = v68 + v47; | 1803 stru_50B700.field_2F0[v43] = v68 + v47; |
1803 v44 = pBLVRenderParams->uViewportZ; | 1804 v44 = pBLVRenderParams->uViewportZ; |
1804 dword_50BAE0[v43] = pBLVRenderParams->uViewportZ; | 1805 stru_50B700._xs[v43] = pBLVRenderParams->uViewportZ; |
1805 ++v43; | 1806 ++v43; |
1806 } | 1807 } |
1807 if ( v83 ) | 1808 if ( v83 ) |
1808 { | 1809 { |
1809 dword_50BAE0[v43] = dword_50BAEC_xs[v45]; | 1810 stru_50B700._xs[v43] = stru_50B700._xs2[v45]; |
1810 dword_50B9F0[v43++] = dword_50B9FC_ys[v45]; | 1811 stru_50B700.field_2F0[v43++] = stru_50B700._ys[v45]; |
1811 } | 1812 } |
1812 ++ic; | 1813 ++ic; |
1813 thisd = v83; | 1814 thisd = v83; |
1814 } | 1815 } |
1815 while ( ic <= v36 ); | 1816 while ( ic <= v36 ); |
1816 | 1817 |
1817 if (v43 < 1) | 1818 if (v43 < 1) |
1818 return 0; | 1819 return 0; |
1819 | 1820 |
1820 v48 = 0; | 1821 v48 = 0; |
1821 dword_50BAE0[v43] = dword_50BAE0[0]; | 1822 stru_50B700._xs[v43] = stru_50B700._xs[0]; |
1822 dword_50B9F0[v43] = dword_50B9F0[0]; | 1823 stru_50B700.field_2F0[v43] = stru_50B700.field_2F0[0]; |
1823 v49 = pBLVRenderParams->uViewportY; | 1824 v49 = pBLVRenderParams->uViewportY; |
1824 v50 = dword_50B9F0[0] < (signed int)pBLVRenderParams->uViewportY; | 1825 v50 = stru_50B700.field_2F0[0] < (signed int)pBLVRenderParams->uViewportY; |
1825 LOBYTE(v50) = dword_50B9F0[0] >= (signed int)pBLVRenderParams->uViewportY; | 1826 LOBYTE(v50) = stru_50B700.field_2F0[0] >= (signed int)pBLVRenderParams->uViewportY; |
1826 v51 = 1; | 1827 v51 = 1; |
1827 id = 1; | 1828 id = 1; |
1828 do | 1829 do |
1829 { | 1830 { |
1830 v52 = v51; | 1831 v52 = v51; |
1831 v53 = dword_50B9F0[v52]; | 1832 v53 = stru_50B700.field_2F0[v52]; |
1832 v84 = v53 >= (signed int)v49; | 1833 v84 = v53 >= (signed int)v49; |
1833 if ( v50 ^ v84 ) | 1834 if ( v50 ^ v84 ) |
1834 { | 1835 { |
1835 if ( v53 >= (signed int)v49 ) | 1836 if ( v53 >= (signed int)v49 ) |
1836 { | 1837 { |
1837 v69 = (signed int)(v49 - dword_50B9F0[v52 - 1]) * (signed __int64)(dword_50BAE0[v52] - dword_50BAE0[v52 - 1]) / (v53 - dword_50B9F0[v52 - 1]); | 1838 v69 = (signed int)(v49 - stru_50B700.field_2F0[v52 - 1]) * (signed __int64)(stru_50B700._xs[v52] - stru_50B700._xs[v52 - 1]) / (v53 - stru_50B700.field_2F0[v52 - 1]); |
1838 v54 = dword_50BAE0[v52 - 1]; | 1839 v54 = stru_50B700._xs[v52 - 1]; |
1839 } | 1840 } |
1840 else | 1841 else |
1841 { | 1842 { |
1842 v69 = (signed int)(v49 - v53) * (signed __int64)(dword_50BAE0[v52 - 1] - dword_50BAE0[v52]) / (dword_50B9F0[v52 - 1] - v53); | 1843 v69 = (signed int)(v49 - v53) * (signed __int64)(stru_50B700._xs[v52 - 1] - stru_50B700._xs[v52]) / (stru_50B700.field_2F0[v52 - 1] - v53); |
1843 v54 = dword_50BAE0[v52]; | 1844 v54 = stru_50B700._xs[v52]; |
1844 } | 1845 } |
1845 dword_50BAD4[v48] = v69 + v54; | 1846 stru_50B700.field_3D4[v48] = v69 + v54; |
1846 v49 = pBLVRenderParams->uViewportY; | 1847 v49 = pBLVRenderParams->uViewportY; |
1847 dword_50B9E4[v48] = pBLVRenderParams->uViewportY; | 1848 stru_50B700._xs[v48+1] = pBLVRenderParams->uViewportY; |
1848 ++v48; | 1849 ++v48; |
1849 } | 1850 } |
1850 v50 = v84; | 1851 v50 = v84; |
1851 if ( v84 ) | 1852 if ( v84 ) |
1852 { | 1853 { |
1853 dword_50BAD4[v48] = dword_50BAE0[v52]; | 1854 stru_50B700.field_3D4[v48] = stru_50B700._xs[v52]; |
1854 dword_50B9E4[v48++] = dword_50B9F0[v52]; | 1855 stru_50B700._xs[v48+1] = stru_50B700.field_2F0[v52]; |
1856 v48++; | |
1855 } | 1857 } |
1856 v51 = id++ + 1; | 1858 v51 = id++ + 1; |
1857 } | 1859 } |
1858 while ( id <= v43 ); | 1860 while ( id <= v43 ); |
1859 | 1861 |
1860 if (v48 < 1) | 1862 if (v48 < 1) |
1861 return 0; | 1863 return 0; |
1862 | 1864 |
1863 v55 = 0; | 1865 v55 = 0; |
1864 dword_50BAD4[v48] = dword_50BAD4[0]; | 1866 stru_50B700.field_3D4[v48] = stru_50B700.field_3D4[0]; |
1865 dword_50B9E4[v48] = dword_50B9E4[0]; | 1867 stru_50B700._xs[v48+1] = stru_50B700._xs[1]; |
1866 v56 = pBLVRenderParams->uViewportW; | 1868 v56 = pBLVRenderParams->uViewportW; |
1867 thise = dword_50B9E4[0] <= (signed int)pBLVRenderParams->uViewportW; | 1869 thise = stru_50B700._xs[1] <= (signed int)pBLVRenderParams->uViewportW; |
1868 ie = 1; | 1870 ie = 1; |
1869 do | 1871 do |
1870 { | 1872 { |
1871 v57 = ie; | 1873 v57 = ie; |
1872 v58 = dword_50B9E4[ie]; | 1874 v58 = stru_50B700._xs[ie+1]; |
1873 v85 = v58 <= (signed int)v56; | 1875 v85 = v58 <= (signed int)v56; |
1874 if ( thise ^ v85 ) | 1876 if ( thise ^ v85 ) |
1875 { | 1877 { |
1876 if ( v58 <= (signed int)v56 ) | 1878 if ( v58 <= (signed int)v56 ) |
1877 { | 1879 { |
1878 v70 = (signed int)(v56 - dword_50B9E4[v57 - 1]) * (signed __int64)(dword_50BAD4[v57] - dword_50BAD4[v57 - 1]) / (v58 - dword_50B9E4[v57 - 1]); | 1880 v70 = (signed int)(v56 - stru_50B700._xs[v57]) * (signed __int64)(stru_50B700.field_3D4[v57] - stru_50B700.field_3D4[v57 - 1]) / (v58 - stru_50B700._xs[v57]); |
1879 v59 = dword_50BAD4[v57 - 1]; | 1881 v59 = stru_50B700.field_3D4[v57 - 1]; |
1880 } | 1882 } |
1881 else | 1883 else |
1882 { | 1884 { |
1883 v70 = (signed int)(v56 - v58) * (signed __int64)(dword_50BAD4[v57 - 1] - dword_50BAD4[v57]) / (dword_50B9E4[v57 - 1] - v58); | 1885 v70 = (signed int)(v56 - v58) * (signed __int64)(stru_50B700.field_3D4[v57 - 1] - stru_50B700.field_3D4[v57]) / (stru_50B700._xs[v57] - v58); |
1884 v59 = dword_50BAD4[v57]; | 1886 v59 = stru_50B700.field_3D4[v57]; |
1885 } | 1887 } |
1886 _50BAC8_screen_space_x[v55] = v70 + v59; | 1888 stru_50B700._screen_space_x[v55] = v70 + v59; |
1887 v56 = pBLVRenderParams->uViewportW; | 1889 v56 = pBLVRenderParams->uViewportW; |
1888 _50B9D8_screen_space_y[v55] = pBLVRenderParams->uViewportW; | 1890 stru_50B700._screen_space_y[v55] = pBLVRenderParams->uViewportW; |
1889 ++v55; | 1891 ++v55; |
1890 } | 1892 } |
1891 if ( v85 ) | 1893 if ( v85 ) |
1892 { | 1894 { |
1893 _50BAC8_screen_space_x[v55] = dword_50BAD4[v57]; | 1895 stru_50B700._screen_space_x[v55] = stru_50B700.field_3D4[v57]; |
1894 _50B9D8_screen_space_y[v55++] = dword_50B9E4[v57]; | 1896 stru_50B700._screen_space_y[v55++] = stru_50B700._xs[v57+1]; |
1895 } | 1897 } |
1896 ++ie; | 1898 ++ie; |
1897 thise = v85; | 1899 thise = v85; |
1898 } | 1900 } |
1899 while ( ie <= v48 ); | 1901 while ( ie <= v48 ); |
1900 | 1902 |
1901 if ( !v55 ) | 1903 if ( !v55 ) |
1902 return 0; | 1904 return 0; |
1903 v61 = pRenderer->pRenderD3D == 0; | 1905 v61 = pRenderer->pRenderD3D == 0; |
1904 _50BAC8_screen_space_x[v55] = _50BAC8_screen_space_x[0]; | 1906 stru_50B700._screen_space_x[v55] = stru_50B700._screen_space_x[0]; |
1905 _50B9D8_screen_space_y[v55] = _50B9D8_screen_space_y[0]; | 1907 stru_50B700._screen_space_y[v55] = stru_50B700._screen_space_y[0]; |
1906 if ( v61 && v55 > 3 ) | 1908 if ( v61 && v55 > 3 ) |
1907 { | 1909 { |
1908 _50BAC8_screen_space_x[v55 + 1] = _50BAC8_screen_space_x[1]; | 1910 stru_50B700._screen_space_x[v55 + 1] = stru_50B700._screen_space_x[1]; |
1909 _50B9D8_screen_space_y[v55 + 1] = _50B9D8_screen_space_y[1]; | 1911 stru_50B700._screen_space_y[v55 + 1] = stru_50B700._screen_space_y[1]; |
1910 thisf = 2 * (dword_50B700 != 0) - 1; | 1912 thisf = 2 * (stru_50B700.field_0 != 0) - 1; |
1911 if ( v55 > 0 ) | 1913 if ( v55 > 0 ) |
1912 { | 1914 { |
1913 v62 = 1; | 1915 v62 = 1; |
1914 v71 = 1; | 1916 v71 = 1; |
1915 do | 1917 do |
1922 if ( v62 >= v55 ) | 1924 if ( v62 >= v55 ) |
1923 v62 -= v55; | 1925 v62 -= v55; |
1924 if ( v64 >= v55 ) | 1926 if ( v64 >= v55 ) |
1925 v64 -= v55; | 1927 v64 -= v55; |
1926 if ( thisf | 1928 if ( thisf |
1927 * ((_50B9D8_screen_space_y[v64] - _50B9D8_screen_space_y[v63]) * (_50BAC8_screen_space_x[v62] - _50BAC8_screen_space_x[v63]) | 1929 * ((stru_50B700._screen_space_y[v64] - stru_50B700._screen_space_y[v63]) * (stru_50B700._screen_space_x[v62] - stru_50B700._screen_space_x[v63]) |
1928 - (_50B9D8_screen_space_y[v62] - _50B9D8_screen_space_y[v63]) * (_50BAC8_screen_space_x[v64] - _50BAC8_screen_space_x[v63])) < 0 ) | 1930 - (stru_50B700._screen_space_y[v62] - stru_50B700._screen_space_y[v63]) * (stru_50B700._screen_space_x[v64] - stru_50B700._screen_space_x[v63])) < 0 ) |
1929 { | 1931 { |
1930 v62 = v80; | 1932 v62 = v80; |
1931 v71 = v80; | 1933 v71 = v80; |
1932 } | 1934 } |
1933 else | 1935 else |
1934 { | 1936 { |
1935 v62 = v71; | 1937 v62 = v71; |
1936 v65 = v71; | 1938 v65 = v71; |
1937 if ( v71 < v55 || (v65 = v71 - v55, v71 - v55 < v55) ) | 1939 if ( v71 < v55 || (v65 = v71 - v55, v71 - v55 < v55) ) |
1938 { | 1940 { |
1939 memcpy(&_50B9D8_screen_space_y[v65], &_50B9D8_screen_space_y[v65 + 1], 4 * ((unsigned int)(4 * (v55 - v65)) >> 2)); | 1941 memcpy(&stru_50B700._screen_space_y[v65], &stru_50B700._screen_space_y[v65 + 1], 4 * ((unsigned int)(4 * (v55 - v65)) >> 2)); |
1940 memcpy(&_50BAC8_screen_space_x[v65], &_50BAC8_screen_space_x[v65 + 1], 4 * ((unsigned int)(4 * (v55 - v65)) >> 2)); | 1942 memcpy(&stru_50B700._screen_space_x[v65], &stru_50B700._screen_space_x[v65 + 1], 4 * ((unsigned int)(4 * (v55 - v65)) >> 2)); |
1941 } | 1943 } |
1942 --v55; | 1944 --v55; |
1943 } | 1945 } |
1944 } | 1946 } |
1945 while ( v62 - 1 < v55 ); | 1947 while ( v62 - 1 < v55 ); |
1946 } | 1948 } |
1947 _50BAC8_screen_space_x[v55] = _50BAC8_screen_space_x[0]; | 1949 stru_50B700._screen_space_x[v55] = stru_50B700._screen_space_x[0]; |
1948 _50B9D8_screen_space_y[v55] = _50B9D8_screen_space_y[0]; | 1950 stru_50B700._screen_space_y[v55] = stru_50B700._screen_space_y[0]; |
1949 } | 1951 } |
1950 return v55; | 1952 return v55; |
1951 } | 1953 } |
1952 | 1954 |
1953 //----- (00424579) -------------------------------------------------------- | 1955 //----- (00424579) -------------------------------------------------------- |
1981 v4 = &pIndoor->pVertices[*v2->pVertexIDs]; | 1983 v4 = &pIndoor->pVertices[*v2->pVertexIDs]; |
1982 if ( v2->pFacePlane_old.vNormal.x * ((signed __int16)*(int *)&v4->x - pBLVRenderParams->vPartyPos.x) | 1984 if ( v2->pFacePlane_old.vNormal.x * ((signed __int16)*(int *)&v4->x - pBLVRenderParams->vPartyPos.x) |
1983 + v2->pFacePlane_old.vNormal.y * ((signed __int16)(*(int *)&v4->x >> 16) - pBLVRenderParams->vPartyPos.y) | 1985 + v2->pFacePlane_old.vNormal.y * ((signed __int16)(*(int *)&v4->x >> 16) - pBLVRenderParams->vPartyPos.y) |
1984 + v2->pFacePlane_old.vNormal.z * (v4->z - pBLVRenderParams->vPartyPos.z) < 0 ) | 1986 + v2->pFacePlane_old.vNormal.z * (v4->z - pBLVRenderParams->vPartyPos.z) < 0 ) |
1985 { | 1987 { |
1986 dword_50B700 = 1; | 1988 stru_50B700.field_0 = 1; |
1987 } | 1989 } |
1988 else | 1990 else |
1989 { | 1991 { |
1990 dword_50B700 = 0; | 1992 stru_50B700.field_0 = 0; |
1991 if ( !(v2->uAttributes & 1) ) | 1993 if ( !(v2->uAttributes & 1) ) |
1992 return 0; | 1994 return 0; |
1993 } | 1995 } |
1994 v29 = 0; | 1996 v29 = 0; |
1995 v5 = v2->uNumVertices; | 1997 v5 = v2->uNumVertices; |
2301 v4 = a1; | 2303 v4 = a1; |
2302 v5 = a2; | 2304 v5 = a2; |
2303 v74 = a1; | 2305 v74 = a1; |
2304 v60 = a2; | 2306 v60 = a2; |
2305 if ( !a1 | 2307 if ( !a1 |
2306 || (!dword_50B700 ? (v64 = -1, v6 = 1, v63 = 1) : (v6 = 1, v63 = -1, v64 = 1), | 2308 || (!stru_50B700.field_0 ? (v64 = -1, v6 = 1, v63 = 1) : (v6 = 1, v63 = -1, v64 = 1), |
2307 v7 = _50B9D8_screen_space_y[0], | 2309 v7 = stru_50B700._screen_space_y[0], |
2308 v65 = 0, | 2310 v65 = 0, |
2309 v8 = _50B9D8_screen_space_y[0], | 2311 v8 = stru_50B700._screen_space_y[0], |
2310 a1 <= v6) ) | 2312 a1 <= v6) ) |
2311 return 0; | 2313 return 0; |
2312 do | 2314 do |
2313 { | 2315 { |
2314 v9 = _50B9D8_screen_space_y[v6]; | 2316 v9 = stru_50B700._screen_space_y[v6]; |
2315 if ( v9 >= v7 ) | 2317 if ( v9 >= v7 ) |
2316 { | 2318 { |
2317 if ( v9 > v8 ) | 2319 if ( v9 > v8 ) |
2318 v8 = _50B9D8_screen_space_y[v6]; | 2320 v8 = stru_50B700._screen_space_y[v6]; |
2319 } | 2321 } |
2320 else | 2322 else |
2321 { | 2323 { |
2322 v65 = v6; | 2324 v65 = v6; |
2323 v7 = _50B9D8_screen_space_y[v6]; | 2325 v7 = stru_50B700._screen_space_y[v6]; |
2324 } | 2326 } |
2325 ++v6; | 2327 ++v6; |
2326 } | 2328 } |
2327 while ( v6 < v4 ); | 2329 while ( v6 < v4 ); |
2328 v73 = v8; | 2330 v73 = v8; |
2346 } | 2348 } |
2347 else | 2349 else |
2348 { | 2350 { |
2349 v10 -= v74; | 2351 v10 -= v74; |
2350 } | 2352 } |
2351 v12 = _50B9D8_screen_space_y[v10]; | 2353 v12 = stru_50B700._screen_space_y[v10]; |
2352 if ( v12 <= _50B9D8_screen_space_y[v11] ) | 2354 if ( v12 <= stru_50B700._screen_space_y[v11] ) |
2353 { | 2355 { |
2354 v55 = v10; | 2356 v55 = v10; |
2355 v11 = v10; | 2357 v11 = v10; |
2356 } | 2358 } |
2357 if ( v12 == v73 ) | 2359 if ( v12 == v73 ) |
2372 { | 2374 { |
2373 v13 -= v74; | 2375 v13 -= v74; |
2374 } | 2376 } |
2375 v67 = v13; | 2377 v67 = v13; |
2376 LABEL_27: | 2378 LABEL_27: |
2377 if ( _50B9D8_screen_space_y[v13] != _50B9D8_screen_space_y[v55] ) | 2379 if ( stru_50B700._screen_space_y[v13] != stru_50B700._screen_space_y[v55] ) |
2378 { | 2380 { |
2379 v14 = _50BAC8_screen_space_x[v55]; | 2381 v14 = stru_50B700._screen_space_x[v55]; |
2380 v62 = v14 << 16; | 2382 v62 = v14 << 16; |
2381 v54 = ((_50BAC8_screen_space_x[v13] - v14) << 16) / (_50B9D8_screen_space_y[v13] - _50B9D8_screen_space_y[v55]); | 2383 v54 = ((stru_50B700._screen_space_x[v13] - v14) << 16) / (stru_50B700._screen_space_y[v13] - stru_50B700._screen_space_y[v55]); |
2382 v5->array_18[v7] = LOWORD(_50BAC8_screen_space_x[v55]); | 2384 v5->array_18[v7] = LOWORD(stru_50B700._screen_space_x[v55]); |
2383 } | 2385 } |
2384 v15 = v65; | 2386 v15 = v65; |
2385 v69 = 0; | 2387 v69 = 0; |
2386 v61 = v65; | 2388 v61 = v65; |
2387 if ( v74 > 0 ) | 2389 if ( v74 > 0 ) |
2397 } | 2399 } |
2398 else | 2400 else |
2399 { | 2401 { |
2400 v15 -= v74; | 2402 v15 -= v74; |
2401 } | 2403 } |
2402 v17 = _50B9D8_screen_space_y[v15]; | 2404 v17 = stru_50B700._screen_space_y[v15]; |
2403 if ( v17 <= _50B9D8_screen_space_y[v16] ) | 2405 if ( v17 <= stru_50B700._screen_space_y[v16] ) |
2404 { | 2406 { |
2405 v61 = v15; | 2407 v61 = v15; |
2406 v16 = v15; | 2408 v16 = v15; |
2407 } | 2409 } |
2408 if ( v17 == v73 ) | 2410 if ( v17 == v73 ) |
2425 } | 2427 } |
2426 v66 = v18; | 2428 v66 = v18; |
2427 LABEL_44: | 2429 LABEL_44: |
2428 v19 = v18; | 2430 v19 = v18; |
2429 v20 = v61; | 2431 v20 = v61; |
2430 v53 = _50B9D8_screen_space_y[v19] - _50B9D8_screen_space_y[v61]; | 2432 v53 = stru_50B700._screen_space_y[v19] - stru_50B700._screen_space_y[v61]; |
2431 if ( _50B9D8_screen_space_y[v19] != _50B9D8_screen_space_y[v61] ) | 2433 if ( stru_50B700._screen_space_y[v19] != stru_50B700._screen_space_y[v61] ) |
2432 { | 2434 { |
2433 v21 = _50BAC8_screen_space_x[v20]; | 2435 v21 = stru_50B700._screen_space_x[v20]; |
2434 v5 = v60; | 2436 v5 = v60; |
2435 v61 = v21 << 16; | 2437 v61 = v21 << 16; |
2436 v53 = ((_50BAC8_screen_space_x[v19] - v21) << 16) / v53; | 2438 v53 = ((stru_50B700._screen_space_x[v19] - v21) << 16) / v53; |
2437 v60->array_3D8[v73] = LOWORD(_50BAC8_screen_space_x[v20]); | 2439 v60->array_3D8[v73] = LOWORD(stru_50B700._screen_space_x[v20]); |
2438 } | 2440 } |
2439 v22 = v7; | 2441 v22 = v7; |
2440 v70 = v7; | 2442 v70 = v7; |
2441 if ( v7 <= v73 ) | 2443 if ( v7 <= v73 ) |
2442 { | 2444 { |
2443 v56 = &v5->array_3D8[v7]; | 2445 v56 = &v5->array_3D8[v7]; |
2444 v23 = &v5->array_18[v7]; | 2446 v23 = &v5->array_18[v7]; |
2445 do | 2447 do |
2446 { | 2448 { |
2447 v24 = v67; | 2449 v24 = v67; |
2448 if ( v22 < _50B9D8_screen_space_y[v67] || v22 == v73 ) | 2450 if ( v22 < stru_50B700._screen_space_y[v67] || v22 == v73 ) |
2449 goto LABEL_57; | 2451 goto LABEL_57; |
2450 v25 = v64 + v67; | 2452 v25 = v64 + v67; |
2451 v67 = v25; | 2453 v67 = v25; |
2452 if ( v25 < v74 ) | 2454 if ( v25 < v74 ) |
2453 { | 2455 { |
2460 v25 -= v74; | 2462 v25 -= v74; |
2461 } | 2463 } |
2462 v67 = v25; | 2464 v67 = v25; |
2463 LABEL_55: | 2465 LABEL_55: |
2464 v26 = v25; | 2466 v26 = v25; |
2465 v27 = _50B9D8_screen_space_y[v26] - _50B9D8_screen_space_y[v24]; | 2467 v27 = stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24]; |
2466 if ( _50B9D8_screen_space_y[v26] - _50B9D8_screen_space_y[v24] > 0 ) | 2468 if ( stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24] > 0 ) |
2467 { | 2469 { |
2468 v28 = _50BAC8_screen_space_x[v24]; | 2470 v28 = stru_50B700._screen_space_x[v24]; |
2469 v54 = ((_50BAC8_screen_space_x[v26] - v28) << 16) / v27; | 2471 v54 = ((stru_50B700._screen_space_x[v26] - v28) << 16) / v27; |
2470 v62 = v28 << 16; | 2472 v62 = v28 << 16; |
2471 } | 2473 } |
2472 LABEL_57: | 2474 LABEL_57: |
2473 v29 = v66; | 2475 v29 = v66; |
2474 if ( v70 >= _50B9D8_screen_space_y[v66] && v70 != v73 ) | 2476 if ( v70 >= stru_50B700._screen_space_y[v66] && v70 != v73 ) |
2475 { | 2477 { |
2476 v30 = v63 + v66; | 2478 v30 = v63 + v66; |
2477 v66 += v63; | 2479 v66 += v63; |
2478 if ( v66 >= v74 ) | 2480 if ( v66 >= v74 ) |
2479 { | 2481 { |
2485 v30 += v74; | 2487 v30 += v74; |
2486 LABEL_63: | 2488 LABEL_63: |
2487 v66 = v30; | 2489 v66 = v30; |
2488 } | 2490 } |
2489 v31 = v30; | 2491 v31 = v30; |
2490 v32 = _50B9D8_screen_space_y[v31] - _50B9D8_screen_space_y[v29]; | 2492 v32 = stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29]; |
2491 if ( _50B9D8_screen_space_y[v31] - _50B9D8_screen_space_y[v29] > 0 ) | 2493 if ( stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29] > 0 ) |
2492 { | 2494 { |
2493 v33 = _50BAC8_screen_space_x[v29]; | 2495 v33 = stru_50B700._screen_space_x[v29]; |
2494 v53 = ((_50BAC8_screen_space_x[v31] - v33) << 16) / v32; | 2496 v53 = ((stru_50B700._screen_space_x[v31] - v33) << 16) / v32; |
2495 v61 = v33 << 16; | 2497 v61 = v33 << 16; |
2496 } | 2498 } |
2497 } | 2499 } |
2498 *(__int16 *)((char *)v56 + (int)(char *)v5->array_18 - (char *)v5->array_3D8) = HIWORD(v62); | 2500 *(__int16 *)((char *)v56 + (int)(char *)v5->array_18 - (char *)v5->array_3D8) = HIWORD(v62); |
2499 *v56 = HIWORD(v61); | 2501 *v56 = HIWORD(v61); |
2609 } | 2611 } |
2610 while ( v49 <= v73 ); | 2612 while ( v49 <= v73 ); |
2611 } | 2613 } |
2612 return 1; | 2614 return 1; |
2613 } | 2615 } |
2614 // 50B700: using guessed type int dword_50B700; | 2616 // 50B700: using guessed type int stru_50B700.field_0; |
2615 | 2617 |
2616 //----- (00424CD7) -------------------------------------------------------- | 2618 //----- (00424CD7) -------------------------------------------------------- |
2617 signed int __fastcall sr_424CD7(unsigned int uVertexID) | 2619 signed int __fastcall sr_424CD7(unsigned int uVertexID) |
2618 { | 2620 { |
2619 unsigned int v1; // edx@1 | 2621 unsigned int v1; // edx@1 |