Mercurial > might-and-magic-trilogy
comparison Actor.cpp @ 67:476145dc3441
Слияние
author | Ritor1 |
---|---|
date | Fri, 26 Oct 2012 23:22:41 +0600 |
parents | 5159d2e6f559 |
children | 8453114181af |
comparison
equal
deleted
inserted
replaced
66:5ec98919c8fd | 67:476145dc3441 |
---|---|
256 1, | 256 1, |
257 0, | 257 0, |
258 0x88u, | 258 0x88u, |
259 9u, | 259 9u, |
260 0, | 260 0, |
261 nullstring, | 261 "", |
262 0); | 262 0); |
263 pDialogueWindow->_41D08F(4, 1, 0, 1); | 263 pDialogueWindow->_41D08F(4, 1, 0, 1); |
264 } | 264 } |
265 } | 265 } |
266 } | 266 } |
267 } | 267 } |
268 pDialogueWindow->CreateButton(61u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 1u, 0x31u, nullstring, 0); | 268 pDialogueWindow->CreateButton(61u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 1u, 0x31u, "", 0); |
269 pDialogueWindow->CreateButton(177u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 2u, 0x32u, nullstring, 0); | 269 pDialogueWindow->CreateButton(177u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 2u, 0x32u, "", 0); |
270 pDialogueWindow->CreateButton(292u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 3u, 0x33u, nullstring, 0); | 270 pDialogueWindow->CreateButton(292u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 3u, 0x33u, "", 0); |
271 pDialogueWindow->CreateButton(407u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 4u, 0x34u, nullstring, 0); | 271 pDialogueWindow->CreateButton(407u, 424u, 0x1Fu, 0x28u, 2, 94, 0x6Eu, 4u, 0x34u, "", 0); |
272 if ( v17 && uActiveCharacter && !(v5->uFlags & 0x80) ) | 272 if ( v17 && uActiveCharacter && !(v5->uFlags & 0x80) ) |
273 { | 273 { |
274 if ( pParty->uCurrentHour < 5 || pParty->uCurrentHour > 0x15 ) | 274 if ( pParty->uCurrentHour < 5 || pParty->uCurrentHour > 0x15 ) |
275 { | 275 { |
276 v15 = 0; | 276 v15 = 0; |
727 } | 727 } |
728 return; | 728 return; |
729 } | 729 } |
730 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 730 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
731 return; | 731 return; |
732 v118 = pParty->vPosition.y; | 732 v118 = pParty->vPosition.z; |
733 v111 = pParty->vPosition.x; | 733 v111 = pParty->vPosition.x; |
734 v114 = pParty->vPosition.y + 2500; | 734 v114 = pParty->vPosition.z + 2500; |
735 v113 = pParty->vPosition.z; | 735 v113 = pParty->vPosition.y; |
736 v23 = 8; | 736 v23 = 8; |
737 if ( uSkillLevel & 0x0100 ) | 737 if ( uSkillLevel & 0x0100 ) |
738 { | 738 { |
739 v107 = 14; | 739 v107 = 14; |
740 } | 740 } |
1784 if ( !v8 ) | 1784 if ( !v8 ) |
1785 { | 1785 { |
1786 if ( !v4 ) | 1786 if ( !v4 ) |
1787 { | 1787 { |
1788 outx = pParty->vPosition.x; | 1788 outx = pParty->vPosition.x; |
1789 outy = pParty->vPosition.z; | 1789 outy = pParty->vPosition.y; |
1790 v14 = pParty->vPosition.y + (signed int)pParty->uPartyHeight / 3; | 1790 v14 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
1791 LABEL_27: | 1791 LABEL_27: |
1792 outz = v14; | 1792 outz = v14; |
1793 goto LABEL_28; | 1793 goto LABEL_28; |
1794 } | 1794 } |
1795 v15 = v4 - 1; | 1795 v15 = v4 - 1; |
1805 goto LABEL_28; | 1805 goto LABEL_28; |
1806 v40 = &outz; | 1806 v40 = &outz; |
1807 v39 = &outy; | 1807 v39 = &outy; |
1808 v38 = &outx; | 1808 v38 = &outx; |
1809 v18 = pParty->sRotationY - stru_5C6E00->uIntegerHalfPi; | 1809 v18 = pParty->sRotationY - stru_5C6E00->uIntegerHalfPi; |
1810 v37.z = pParty->vPosition.y + (signed int)pParty->uPartyHeight / 3; | 1810 v37.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
1811 goto LABEL_20; | 1811 goto LABEL_20; |
1812 } | 1812 } |
1813 v40 = &outz; | 1813 v40 = &outz; |
1814 v39 = &outy; | 1814 v39 = &outy; |
1815 v38 = &outx; | 1815 v38 = &outx; |
1816 v18 = pParty->sRotationY - stru_5C6E00->uIntegerHalfPi; | 1816 v18 = pParty->sRotationY - stru_5C6E00->uIntegerHalfPi; |
1817 v37.z = pParty->vPosition.y + (signed int)pParty->uPartyHeight / 3; | 1817 v37.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
1818 } | 1818 } |
1819 else | 1819 else |
1820 { | 1820 { |
1821 v40 = &outz; | 1821 v40 = &outz; |
1822 v39 = &outy; | 1822 v39 = &outy; |
1823 v38 = &outx; | 1823 v38 = &outx; |
1824 v37.z = pParty->vPosition.y + (signed int)pParty->uPartyHeight / 3; | 1824 v37.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
1825 v18 = stru_5C6E00->uIntegerHalfPi + pParty->sRotationY; | 1825 v18 = stru_5C6E00->uIntegerHalfPi + pParty->sRotationY; |
1826 } | 1826 } |
1827 *(_QWORD *)&v37.x = *(_QWORD *)&pParty->vPosition.x; | 1827 *(_QWORD *)&v37.x = *(_QWORD *)&pParty->vPosition.x; |
1828 v36 = 0; | 1828 v36 = 0; |
1829 v35 = 8; | 1829 v35 = 8; |
1832 goto LABEL_28; | 1832 goto LABEL_28; |
1833 } | 1833 } |
1834 v40 = &outz; | 1834 v40 = &outz; |
1835 v39 = &outy; | 1835 v39 = &outy; |
1836 v38 = &outx; | 1836 v38 = &outx; |
1837 v37.z = pParty->vPosition.y + (signed int)pParty->uPartyHeight / 3; | 1837 v37.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
1838 v18 = stru_5C6E00->uIntegerHalfPi + pParty->sRotationY; | 1838 v18 = stru_5C6E00->uIntegerHalfPi + pParty->sRotationY; |
1839 LABEL_20: | 1839 LABEL_20: |
1840 *(_QWORD *)&v37 = *(_QWORD *)&pParty->vPosition.x; | 1840 *(_QWORD *)&v37 = *(_QWORD *)&pParty->vPosition.x; |
1841 v36 = 0; | 1841 v36 = 0; |
1842 v35 = 24; | 1842 v35 = 24; |
1889 goto LABEL_41; | 1889 goto LABEL_41; |
1890 } | 1890 } |
1891 if ( v21 == 4 ) | 1891 if ( v21 == 4 ) |
1892 { | 1892 { |
1893 LODWORD(v45) = pParty->vPosition.x; | 1893 LODWORD(v45) = pParty->vPosition.x; |
1894 LODWORD(v44) = pParty->vPosition.z; | 1894 LODWORD(v44) = pParty->vPosition.y; |
1895 v29 = a4; | 1895 v29 = a4; |
1896 if ( !a4 ) | 1896 if ( !a4 ) |
1897 v29 = pParty->sEyelevel; | 1897 v29 = pParty->sEyelevel; |
1898 v28 = pParty->vPosition.y + v29; | 1898 v28 = pParty->vPosition.z + v29; |
1899 goto LABEL_44; | 1899 goto LABEL_44; |
1900 } | 1900 } |
1901 if ( v21 == 5 ) | 1901 if ( v21 == 5 ) |
1902 { | 1902 { |
1903 v26 = v22; | 1903 v26 = v22; |
2153 else | 2153 else |
2154 { | 2154 { |
2155 if ( (edx0 & 7) == 4 ) | 2155 if ( (edx0 & 7) == 4 ) |
2156 { | 2156 { |
2157 v6 = (AIDirection *)pParty->vPosition.x; | 2157 v6 = (AIDirection *)pParty->vPosition.x; |
2158 v7 = (AIDirection *)pParty->vPosition.z; | 2158 v7 = (AIDirection *)pParty->vPosition.y; |
2159 v23 = pParty->vPosition.y + pParty->sEyelevel; | 2159 v23 = pParty->vPosition.z + pParty->sEyelevel; |
2160 } | 2160 } |
2161 else | 2161 else |
2162 { | 2162 { |
2163 v6 = arg0; | 2163 v6 = arg0; |
2164 v7 = arg0; | 2164 v7 = arg0; |
2552 else | 2552 else |
2553 { | 2553 { |
2554 if ( (edx0 & 7) == 4 ) | 2554 if ( (edx0 & 7) == 4 ) |
2555 { | 2555 { |
2556 v4 = (AIDirection *)pParty->vPosition.x; | 2556 v4 = (AIDirection *)pParty->vPosition.x; |
2557 v5 = (AIDirection *)pParty->vPosition.z; | 2557 v5 = (AIDirection *)pParty->vPosition.y; |
2558 v21 = pParty->vPosition.y + pParty->sEyelevel; | 2558 v21 = pParty->vPosition.z + pParty->sEyelevel; |
2559 } | 2559 } |
2560 else | 2560 else |
2561 { | 2561 { |
2562 v4 = pDir; | 2562 v4 = pDir; |
2563 v5 = pDir; | 2563 v5 = pDir; |
2664 else | 2664 else |
2665 { | 2665 { |
2666 if ( (edx0 & 7) == 4 ) | 2666 if ( (edx0 & 7) == 4 ) |
2667 { | 2667 { |
2668 v4 = (AIDirection *)pParty->vPosition.x; | 2668 v4 = (AIDirection *)pParty->vPosition.x; |
2669 v5 = (AIDirection *)pParty->vPosition.z; | 2669 v5 = (AIDirection *)pParty->vPosition.y; |
2670 v21 = pParty->vPosition.y + pParty->sEyelevel; | 2670 v21 = pParty->vPosition.z + pParty->sEyelevel; |
2671 } | 2671 } |
2672 else | 2672 else |
2673 { | 2673 { |
2674 v4 = pDir; | 2674 v4 = pDir; |
2675 v5 = pDir; | 2675 v5 = pDir; |
2775 else | 2775 else |
2776 { | 2776 { |
2777 if ( (edx0 & 7) == 4 ) | 2777 if ( (edx0 & 7) == 4 ) |
2778 { | 2778 { |
2779 v4 = (AIDirection *)pParty->vPosition.x; | 2779 v4 = (AIDirection *)pParty->vPosition.x; |
2780 v5 = (AIDirection *)pParty->vPosition.z; | 2780 v5 = (AIDirection *)pParty->vPosition.y; |
2781 v20 = pParty->vPosition.y + pParty->sEyelevel; | 2781 v20 = pParty->vPosition.z + pParty->sEyelevel; |
2782 } | 2782 } |
2783 else | 2783 else |
2784 { | 2784 { |
2785 v4 = pDir; | 2785 v4 = pDir; |
2786 v5 = pDir; | 2786 v5 = pDir; |
2871 else | 2871 else |
2872 { | 2872 { |
2873 if ( (edx0 & 7) == 4 ) | 2873 if ( (edx0 & 7) == 4 ) |
2874 { | 2874 { |
2875 v4 = pParty->vPosition.x; | 2875 v4 = pParty->vPosition.x; |
2876 v5 = pParty->vPosition.z; | 2876 v5 = pParty->vPosition.y; |
2877 v22 = pParty->vPosition.y + pParty->sEyelevel; | 2877 v22 = pParty->vPosition.z + pParty->sEyelevel; |
2878 } | 2878 } |
2879 else | 2879 else |
2880 { | 2880 { |
2881 v4 = (int)pDir; | 2881 v4 = (int)pDir; |
2882 v5 = (int)pDir; | 2882 v5 = (int)pDir; |
3434 v13 = stru_5C6E00->uIntegerPi + v10->uYawAngle; | 3434 v13 = stru_5C6E00->uIntegerPi + v10->uYawAngle; |
3435 v17 = v12; | 3435 v17 = v12; |
3436 v19 = stru_5C6E00->SinCos(v18 + v13 - stru_5C6E00->uIntegerHalfPi); | 3436 v19 = stru_5C6E00->SinCos(v18 + v13 - stru_5C6E00->uIntegerHalfPi); |
3437 v7->uYawAngle = stru_5C6E00->Atan2( | 3437 v7->uYawAngle = stru_5C6E00->Atan2( |
3438 v17 - v7->vPosition.x, | 3438 v17 - v7->vPosition.x, |
3439 pParty->vPosition.z | 3439 pParty->vPosition.y |
3440 + ((unsigned __int64)(v19 * (signed __int64)v10->uDistanceXZ) >> 16) | 3440 + ((unsigned __int64)(v19 * (signed __int64)v10->uDistanceXZ) >> 16) |
3441 - v7->vPosition.y); | 3441 - v7->vPosition.y); |
3442 if ( uActionLength ) | 3442 if ( uActionLength ) |
3443 v7->uCurrentActionLength = uActionLength; | 3443 v7->uCurrentActionLength = uActionLength; |
3444 else | 3444 else |
3798 { | 3798 { |
3799 v15 = dword_4DF390; | 3799 v15 = dword_4DF390; |
3800 if ( !v3->pMonsterInfo.uHostilityType ) | 3800 if ( !v3->pMonsterInfo.uHostilityType ) |
3801 v15 = dword_4DF380[v14]; | 3801 v15 = dword_4DF380[v14]; |
3802 v16 = abs(v3->vPosition.x - pParty->vPosition.x); | 3802 v16 = abs(v3->vPosition.x - pParty->vPosition.x); |
3803 v28 = abs(v3->vPosition.y - pParty->vPosition.z); | 3803 v28 = abs(v3->vPosition.y - pParty->vPosition.y); |
3804 v17 = abs(v3->vPosition.z - pParty->vPosition.y); | 3804 v17 = abs(v3->vPosition.z - pParty->vPosition.z); |
3805 if ( v16 <= v15 && v28 <= v15 && v17 <= v15 ) | 3805 if ( v16 <= v15 && v28 <= v15 && v17 <= v15 ) |
3806 { | 3806 { |
3807 if ( v16 * v16 + v28 * v28 + v17 * v17 < (unsigned int)v25 ) | 3807 if ( v16 * v16 + v28 * v28 + v17 * v17 < (unsigned int)v25 ) |
3808 *v20 = 4; | 3808 *v20 = 4; |
3809 } | 3809 } |