Mercurial > mm7
comparison mm7_3.cpp @ 811:d6e84d158052
Merge
author | Gloval |
---|---|
date | Tue, 26 Mar 2013 00:58:16 +0400 |
parents | f5156b8c61ad 7bb33867d2cb |
children | d37b03507b3b |
comparison
equal
deleted
inserted
replaced
810:f5156b8c61ad | 811:d6e84d158052 |
---|---|
1727 angle = pParty->sRotationY; | 1727 angle = pParty->sRotationY; |
1728 _view_angle = pParty->sRotationX; | 1728 _view_angle = pParty->sRotationX; |
1729 v82 = (unsigned __int64)(pEventTimer->dt_in_some_format | 1729 v82 = (unsigned __int64)(pEventTimer->dt_in_some_format |
1730 * (signed __int64)((signed int)(pParty->y_rotation_speed * stru_5C6E00->uIntegerPi) | 1730 * (signed __int64)((signed int)(pParty->y_rotation_speed * stru_5C6E00->uIntegerPi) |
1731 / 180)) >> 16; | 1731 / 180)) >> 16; |
1732 LABEL_87: | 1732 //LABEL_87: |
1733 while ( pPartyActionQueue->uNumActions ) | 1733 while ( pPartyActionQueue->uNumActions ) |
1734 { | 1734 { |
1735 switch ( pPartyActionQueue->Next() ) | 1735 switch ( pPartyActionQueue->Next() ) |
1736 { | 1736 { |
1737 case PARTY_TurnLeft: | 1737 case PARTY_TurnLeft: |
1738 v12 = uTurnSpeed; | |
1739 if ( uTurnSpeed ) | |
1740 goto LABEL_58; | |
1741 v13 = (double)v82 * fTurnSpeedMultiplier; | |
1742 v14 = angle + (unsigned __int64)(signed __int64)v13; | |
1743 angle = stru_5C6E00->uDoublePiMask & v14; | |
1744 goto LABEL_87; | |
1745 case PARTY_TurnRight: | |
1746 LODWORD(v15) = uTurnSpeed; | |
1747 if ( uTurnSpeed ) | 1738 if ( uTurnSpeed ) |
1748 { | 1739 { |
1749 angle = stru_5C6E00->uDoublePiMask & (angle - v15); | 1740 v14 = angle + uTurnSpeed; |
1750 goto LABEL_87; | 1741 angle = stru_5C6E00->uDoublePiMask & v14; |
1742 break; | |
1743 } | |
1744 v14 = angle + (unsigned __int64)(signed __int64)(double)v82 * fTurnSpeedMultiplier; | |
1745 angle = stru_5C6E00->uDoublePiMask & v14; | |
1746 break; | |
1747 case PARTY_TurnRight: | |
1748 if ( uTurnSpeed ) | |
1749 { | |
1750 angle = stru_5C6E00->uDoublePiMask & (angle - uTurnSpeed); | |
1751 break; | |
1751 } | 1752 } |
1752 v16 = (double)v82 * fTurnSpeedMultiplier; | 1753 v16 = (double)v82 * fTurnSpeedMultiplier; |
1753 //{ | 1754 angle = stru_5C6E00->uDoublePiMask & (angle - (signed __int64)v16); |
1754 v15 = (signed __int64)v16; | 1755 break; |
1755 angle = stru_5C6E00->uDoublePiMask & (angle - v15); | |
1756 goto LABEL_87; | |
1757 //} | |
1758 case PARTY_FastTurnLeft: | 1756 case PARTY_FastTurnLeft: |
1759 v12 = uTurnSpeed; | |
1760 if ( uTurnSpeed ) | 1757 if ( uTurnSpeed ) |
1761 { | 1758 { |
1762 LABEL_58: | 1759 v14 = angle + uTurnSpeed; |
1763 v14 = angle + v12; | |
1764 } | 1760 } |
1765 else | 1761 else |
1766 { | 1762 { |
1767 v13 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; | 1763 v14 = angle + (unsigned __int64)(signed __int64)(fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; |
1768 v14 = angle + (unsigned __int64)(signed __int64)v13; | |
1769 } | 1764 } |
1770 angle = stru_5C6E00->uDoublePiMask & v14; | 1765 angle = stru_5C6E00->uDoublePiMask & v14; |
1771 goto LABEL_87; | 1766 break; |
1772 case PARTY_FastTurnRight: | 1767 case PARTY_FastTurnRight: |
1773 LODWORD(v15) = uTurnSpeed; | 1768 LODWORD(v15) = uTurnSpeed; |
1774 if ( !uTurnSpeed ) | 1769 if ( !uTurnSpeed ) |
1775 { | 1770 { |
1776 v16 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; | 1771 v15 = (signed __int64)(fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; |
1777 v15 = (signed __int64)v16; | |
1778 } | 1772 } |
1779 angle = stru_5C6E00->uDoublePiMask & (angle - v15); | 1773 angle = stru_5C6E00->uDoublePiMask & (angle - v15); |
1780 goto LABEL_87; | 1774 break; |
1781 case PARTY_StrafeLeft://Ctrl + <- | 1775 case PARTY_StrafeLeft: |
1782 __debugbreak(); | 1776 v2 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; |
1783 v17 = stru_5C6E00->Sin(angle); | 1777 v1 += (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; |
1784 v18 = (double)v81; | |
1785 //v88 = v18; | |
1786 v78 = (unsigned __int64)(v17 * (signed __int64)((signed int)(signed __int64)(v18 * fWalkSpeedMultiplier) >> 1)) >> 16; | |
1787 v2 -= v78; | |
1788 v19 = stru_5C6E00->Cos(angle); | |
1789 v78 = (unsigned __int64)(v19 * (signed __int64)((signed int)(signed __int64)(v18 * fWalkSpeedMultiplier) >> 1)) >> 16; | |
1790 v1 += v78; | |
1791 v78 = 1; | 1778 v78 = 1; |
1792 goto LABEL_87; | 1779 break; |
1793 case PARTY_StrafeRight: | 1780 case PARTY_StrafeRight: |
1794 __debugbreak(); | 1781 v2 += (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; |
1795 v20 = stru_5C6E00->Sin(angle); | 1782 v1 -= (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; |
1796 v21 = (double)v81; | |
1797 //v88 = v21; | |
1798 v78 = (unsigned __int64)(v20 * (signed __int64)((signed int)(signed __int64)(v21 * fWalkSpeedMultiplier) >> 1)) >> 16; | |
1799 v2 += v78; | |
1800 v22 = stru_5C6E00->Cos(angle); | |
1801 v78 = (unsigned __int64)(v22 * (signed __int64)((signed int)(signed __int64)(v21 * fWalkSpeedMultiplier) >> 1)) >> 16; | |
1802 //goto LABEL_68; | |
1803 v1 -= v78; | |
1804 v78 = 1; | 1783 v78 = 1; |
1805 goto LABEL_87; | 1784 break; |
1806 case PARTY_WalkForward: | 1785 case PARTY_WalkForward: |
1807 __debugbreak(); | 1786 v2 += (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier)) >> 16; |
1808 v23 = stru_5C6E00->Cos(angle); | 1787 v1 += (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier)) >> 16; |
1809 v24 = (double)v81; | |
1810 //v88 = v24; | |
1811 v78 = (unsigned __int64)(v23 * (signed __int64)(signed int)(signed __int64)(v24 * fWalkSpeedMultiplier)) >> 16; | |
1812 v2 += v78; | |
1813 v25 = stru_5C6E00->Sin(angle); | |
1814 v78 = (unsigned __int64)(v25 * (signed __int64)(signed int)(signed __int64)(v24 * fWalkSpeedMultiplier)) >> 16; | |
1815 v1 += v78; | |
1816 v78 = 1; | 1788 v78 = 1; |
1817 goto LABEL_87; | 1789 break; |
1818 case PARTY_WalkBackward: | 1790 case PARTY_WalkBackward: |
1819 __debugbreak(); | 1791 v2 -= (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; |
1820 v26 = stru_5C6E00->Cos(angle); | 1792 v1 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; |
1821 v27 = (double)v81; | |
1822 //v88 = v27; | |
1823 v78 = (unsigned __int64)(v26 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16; | |
1824 v2 -= v78; | |
1825 v28 = stru_5C6E00->Sin(angle); | |
1826 v78 = (unsigned __int64)(v28 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16; | |
1827 v1 -= v78; | |
1828 v78 = 1; | 1793 v78 = 1; |
1829 goto LABEL_87; | 1794 break; |
1830 case PARTY_RunForward: | 1795 case PARTY_RunForward: |
1831 //v29 = stru_5C6E00->Cos(angle); | |
1832 //v30 = (double)v81; | |
1833 //v88 = (double)v81; | |
1834 v2 += (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(2 * (unsigned __int64)(signed __int64)((double)v81 * fWalkSpeedMultiplier))) >> 16; | 1796 v2 += (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(2 * (unsigned __int64)(signed __int64)((double)v81 * fWalkSpeedMultiplier))) >> 16; |
1835 //v31 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); | |
1836 v1 += (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(2 * (unsigned __int64)(signed __int64)((double)v81 * fWalkSpeedMultiplier))) >> 16; | 1797 v1 += (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(2 * (unsigned __int64)(signed __int64)((double)v81 * fWalkSpeedMultiplier))) >> 16; |
1837 v72 = 1; | 1798 v72 = 1; |
1838 goto LABEL_87; | 1799 break; |
1839 case PARTY_RunBackward: | 1800 case PARTY_RunBackward: |
1840 //v32 = stru_5C6E00->SinCos(angle); | 1801 //v32 = stru_5C6E00->SinCos(angle); |
1841 //v33 = (double)v81; | 1802 //v33 = (double)v81; |
1842 //v88 = (double)v81; | 1803 //v88 = (double)v81; |
1843 v2 -= (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; | 1804 v2 -= (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; |
1844 //v34 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); | 1805 //v34 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); |
1845 v1 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; | 1806 v1 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; |
1846 v72 = 1; | 1807 v72 = 1; |
1847 goto LABEL_87; | 1808 break; |
1848 case PARTY_LookUp: | 1809 case PARTY_LookUp: |
1849 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * 25.0); | 1810 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * 25.0); |
1850 if ( _view_angle > 128 ) | 1811 if ( _view_angle > 128 ) |
1851 _view_angle = 128; | 1812 _view_angle = 128; |
1852 v35 = uActiveCharacter; | 1813 v35 = uActiveCharacter; |
1853 if ( !uActiveCharacter ) | 1814 if ( uActiveCharacter ) |
1854 goto LABEL_87; | 1815 pPlayers[v35]->PlaySound((PlayerSpeech)SPEECH_63, 0); |
1855 pPlayers[v35]->PlaySound((PlayerSpeech)SPEECH_63, 0); | |
1856 break; | 1816 break; |
1857 case PARTY_LookDown: | 1817 case PARTY_LookDown: |
1858 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * -25.0); | 1818 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * -25.0); |
1859 if ( _view_angle < -128 ) | 1819 if ( _view_angle < -128 ) |
1860 _view_angle = -128; | 1820 _view_angle = -128; |
1871 bJumping = 1; | 1831 bJumping = 1; |
1872 pParty->uFallSpeed = (signed __int64)((double)(pParty->field_24 << 6) * 1.5 + (double)pParty->uFallSpeed); | 1832 pParty->uFallSpeed = (signed __int64)((double)(pParty->field_24 << 6) * 1.5 + (double)pParty->uFallSpeed); |
1873 } | 1833 } |
1874 break; | 1834 break; |
1875 default: | 1835 default: |
1876 goto LABEL_87; | 1836 break; |
1877 } | 1837 } |
1878 } | 1838 } |
1879 v36 = 0; | 1839 v36 = 0; |
1880 pParty->sRotationY = angle; | 1840 pParty->sRotationY = angle; |
1881 pParty->sRotationX = _view_angle; | 1841 pParty->sRotationX = _view_angle; |
12322 v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; | 12282 v4 = (212 - pFontCreate->CalcTextHeight(v1, &v8, 0, 0)) / 2 + 101; |
12323 v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); | 12283 v8.DrawTitleText(pFontCreate, 0, v4, 0, v1, 3); |
12324 } | 12284 } |
12325 else if ( v10 ) | 12285 else if ( v10 ) |
12326 { | 12286 { |
12327 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" | 12287 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" |
12328 v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; | 12288 v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; |
12329 v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); | 12289 v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); |
12330 } | 12290 } |
12331 else assert(false); | 12291 else assert(false); |
12332 | 12292 |
12367 | 12327 |
12368 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; | 12328 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; |
12369 pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)]; | 12329 pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)]; |
12370 v1 = pMapStats->GetMapInfo(pCurrentMapName); | 12330 v1 = pMapStats->GetMapInfo(pCurrentMapName); |
12371 if ( v1 ) | 12331 if ( v1 ) |
12372 sprintf(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" | 12332 sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" |
12373 else | 12333 else |
12374 strcpy(sHouseName, pGlobalTXT_LocalizationStrings[79]);// "Exit" | 12334 strcpy(sHouseName, pGlobalTXT_LocalizationStrings[79]);// "Exit" |
12375 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, (int)sHouseName); | 12335 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, (int)sHouseName); |
12376 } | 12336 } |
12377 | 12337 |
12436 else | 12396 else |
12437 { | 12397 { |
12438 v6 = v3; | 12398 v6 = v3; |
12439 v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." | 12399 v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." |
12440 } | 12400 } |
12441 sprintf(pTmpBuf, v5, v6, v1->pName); | 12401 sprintfex(pTmpBuf, v5, v6, v1->pName); |
12442 strcat(pTmpBuf, "\n \n"); | 12402 strcat(pTmpBuf, "\n \n"); |
12443 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); | 12403 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); |
12444 strcat(pTmpBuf, pTmpBuf2); | 12404 strcat(pTmpBuf, pTmpBuf2); |
12445 v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); | 12405 v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); |
12446 v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); | 12406 v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u); |
12447 _unused_5B5924_is_travel_ui_drawn = 1; | 12407 _unused_5B5924_is_travel_ui_drawn = 1; |
12448 } | 12408 } |