comparison mm7_3.cpp @ 633:f6aeea3eb893

Слияние
author Ritor1
date Mon, 11 Mar 2013 09:28:57 +0600
parents f234b67a9caf 574cc56e05e9
children ccf8b4815a1f
comparison
equal deleted inserted replaced
632:f234b67a9caf 633:f6aeea3eb893
1764 while ( pPartyActionQueue->uNumActions ) 1764 while ( pPartyActionQueue->uNumActions )
1765 { 1765 {
1766 switch ( pPartyActionQueue->Next() ) 1766 switch ( pPartyActionQueue->Next() )
1767 { 1767 {
1768 case PARTY_TurnLeft: 1768 case PARTY_TurnLeft:
1769 __debugbreak();
1770 v12 = uTurnSpeed; 1769 v12 = uTurnSpeed;
1771 if ( uTurnSpeed ) 1770 if ( uTurnSpeed )
1772 goto LABEL_58; 1771 goto LABEL_58;
1773 v13 = (double)v82 * fTurnSpeedMultiplier; 1772 v13 = (double)v82 * fTurnSpeedMultiplier;
1774 goto LABEL_51; 1773 goto LABEL_51;
1775 case PARTY_TurnRight: 1774 case PARTY_TurnRight:
1776 __debugbreak();
1777 LODWORD(v15) = uTurnSpeed; 1775 LODWORD(v15) = uTurnSpeed;
1778 if ( uTurnSpeed ) 1776 if ( uTurnSpeed )
1779 goto LABEL_56; 1777 goto LABEL_56;
1780 v16 = (double)v82 * fTurnSpeedMultiplier; 1778 v16 = (double)v82 * fTurnSpeedMultiplier;
1781 goto LABEL_55; 1779 goto LABEL_55;
1840 case PARTY_WalkBackward: 1838 case PARTY_WalkBackward:
1841 __debugbreak(); 1839 __debugbreak();
1842 v26 = stru_5C6E00->Cos(angle); 1840 v26 = stru_5C6E00->Cos(angle);
1843 v27 = (double)v81; 1841 v27 = (double)v81;
1844 //v88 = v27; 1842 //v88 = v27;
1845 v78 = (unsigned __int64)(v26 1843 v78 = (unsigned __int64)(v26 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16;
1846 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16;
1847 v2 -= v78; 1844 v2 -= v78;
1848 v28 = stru_5C6E00->Sin(angle); 1845 v28 = stru_5C6E00->Sin(angle);
1849 v78 = (unsigned __int64)(v28 1846 v78 = (unsigned __int64)(v28 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16;
1850 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16;
1851 LABEL_68: 1847 LABEL_68:
1852 v1 -= v78; 1848 v1 -= v78;
1853 LABEL_64: 1849 LABEL_64:
1854 v78 = 1; 1850 v78 = 1;
1855 goto LABEL_87; 1851 goto LABEL_87;
1871 v1 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; 1867 v1 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16;
1872 //LABEL_70: 1868 //LABEL_70:
1873 v72 = 1; 1869 v72 = 1;
1874 goto LABEL_87; 1870 goto LABEL_87;
1875 case PARTY_LookUp: 1871 case PARTY_LookUp:
1876 __debugbreak();
1877 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * 25.0); 1872 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * 25.0);
1878 if ( _view_angle > 128 ) 1873 if ( _view_angle > 128 )
1879 _view_angle = 128; 1874 _view_angle = 128;
1880 v35 = uActiveCharacter; 1875 v35 = uActiveCharacter;
1881 if ( !uActiveCharacter ) 1876 if ( !uActiveCharacter )
1882 goto LABEL_87; 1877 goto LABEL_87;
1883 v65 = 0; 1878 v65 = 0;
1884 v63 = SPEECH_63; 1879 v63 = SPEECH_63;
1885 goto LABEL_76; 1880 goto LABEL_76;
1886 case PARTY_LookDown: 1881 case PARTY_LookDown:
1887 __debugbreak();
1888 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * -25.0); 1882 _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * -25.0);
1889 if ( _view_angle < -128 ) 1883 if ( _view_angle < -128 )
1890 _view_angle = -128; 1884 _view_angle = -128;
1891 v35 = uActiveCharacter; 1885 v35 = uActiveCharacter;
1892 if ( uActiveCharacter ) 1886 if ( uActiveCharacter )
1896 LABEL_76: 1890 LABEL_76:
1897 pPlayers[v35]->PlaySound((PlayerSpeech)v63, v65); 1891 pPlayers[v35]->PlaySound((PlayerSpeech)v63, v65);
1898 } 1892 }
1899 break; 1893 break;
1900 case PARTY_CenterView: 1894 case PARTY_CenterView:
1901 __debugbreak();
1902 _view_angle = 0; 1895 _view_angle = 0;
1903 break; 1896 break;
1904 case PARTY_Jump: 1897 case PARTY_Jump:
1905 __debugbreak();
1906 if ( (!bJumping || party_z <= v80 + 6 && v89 <= 0) && pParty->field_24 ) 1898 if ( (!bJumping || party_z <= v80 + 6 && v89 <= 0) && pParty->field_24 )
1907 { 1899 {
1908 bJumping = 1; 1900 bJumping = 1;
1909 v89 = (signed __int64)((double)(pParty->field_24 << 6) * 1.5 + (double)v89); 1901 v89 = (signed __int64)((double)(pParty->field_24 << 6) * 1.5 + (double)v89);
1910 } 1902 }
11213 float v19; // eax@19 11205 float v19; // eax@19
11214 signed __int64 v20; // qtt@19 11206 signed __int64 v20; // qtt@19
11215 signed __int64 v21; // qtt@20 11207 signed __int64 v21; // qtt@20
11216 int v22; // edx@21 11208 int v22; // edx@21
11217 int v23; // eax@21 11209 int v23; // eax@21
11218 Particle_ local_0; // [sp+Ch] [bp-A0h]@3 11210 Particle_sw local_0; // [sp+Ch] [bp-A0h]@3
11219 double v25; // [sp+74h] [bp-38h]@19 11211 double v25; // [sp+74h] [bp-38h]@19
11220 unsigned int v26; // [sp+7Ch] [bp-30h]@1 11212 unsigned int v26; // [sp+7Ch] [bp-30h]@1
11221 int a2; // [sp+80h] [bp-2Ch]@5 11213 int a2; // [sp+80h] [bp-2Ch]@5
11222 int a3; // [sp+84h] [bp-28h]@5 11214 int a3; // [sp+84h] [bp-28h]@5
11223 int a1; // [sp+88h] [bp-24h]@5 11215 int a1; // [sp+88h] [bp-24h]@5
11338 } 11330 }
11339 else 11331 else
11340 { 11332 {
11341 memset(&local_0, 0, 0x68u); // fire, like at the Pit's tavern 11333 memset(&local_0, 0, 0x68u); // fire, like at the Pit's tavern
11342 v5 = (double)v2->vPosition.x; 11334 v5 = (double)v2->vPosition.x;
11343 local_0.bFree = 1036; 11335 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
11344 local_0.uDiffuse = 0xFF3C1Eu; 11336 local_0.uDiffuse = 0xFF3C1E;
11345 local_0.x = v5; 11337 local_0.x = v5;
11346 local_0.y = (double)v2->vPosition.y; 11338 local_0.y = (double)v2->vPosition.y;
11347 local_0.z = (double)v2->vPosition.z; 11339 local_0.z = (double)v2->vPosition.z;
11348 local_0.flt_10 = 0.0; 11340 local_0.flt_10 = 0.0;
11349 local_0.flt_14 = 0.0; 11341 local_0.flt_14 = 0.0;
11527 v1 = a1; 11519 v1 = a1;
11528 v2 = 0; 11520 v2 = 0;
11529 v3 = &pIndoor->pSectors[pBspRenderer->field_FA8[a1].uSectorID]; 11521 v3 = &pIndoor->pSectors[pBspRenderer->field_FA8[a1].uSectorID];
11530 if ( pRenderer->pRenderD3D ) 11522 if ( pRenderer->pRenderD3D )
11531 { 11523 {
11524 for (uint i = 0; i < v3->uNumNonBSPFaces; ++i)
11525 //Log::Warning(L"Non-BSP face: %X", v3->pFaceIDs[v2]);
11526 pBspRenderer->AddFaceToRenderList_d3d(v1, v3->pFaceIDs[i]);
11527 }
11528 else
11529 {
11532 if ( v3->uNumNonBSPFaces > 0 ) 11530 if ( v3->uNumNonBSPFaces > 0 )
11533 { 11531 {
11534 do 11532 do
11535 { 11533 pBspRenderer->AddFaceToRenderList_sw(v1, v3->pFaceIDs[v2++]);
11536 Log::Warning(L"Non-BSP face: %X", v3->pFaceIDs[v2]);
11537 pBspRenderer->PrepareFaceRenderList_d3d(v1, v3->pFaceIDs[v2++]);
11538 }
11539 while ( v2 < v3->uNumNonBSPFaces );
11540 }
11541 }
11542 else
11543 {
11544 if ( v3->uNumNonBSPFaces > 0 )
11545 {
11546 do
11547 pBspRenderer->PrepareFaceRenderList_sw(v1, v3->pFaceIDs[v2++]);
11548 while ( v2 < v3->uNumNonBSPFaces ); 11534 while ( v2 < v3->uNumNonBSPFaces );
11549 } 11535 }
11550 } 11536 }
11551 if ( v3->field_0 & 0x10 ) 11537 if ( v3->field_0 & 0x10 )
11552 sub_4406BC(v1, v3->uFirstBSPNode); 11538 sub_4406BC(v1, v3->uFirstBSPNode);
11565 __int16 v9; // di@18 11551 __int16 v9; // di@18
11566 int v10; // [sp+10h] [bp-Ch]@1 11552 int v10; // [sp+10h] [bp-Ch]@1
11567 bool v11; // [sp+14h] [bp-8h]@5 11553 bool v11; // [sp+14h] [bp-8h]@5
11568 BspRenderer_stru0 *v12; // [sp+18h] [bp-4h]@1 11554 BspRenderer_stru0 *v12; // [sp+18h] [bp-4h]@1
11569 11555
11570 Log::Warning(L"sub_4406BC(%u, %u)", a1, uFirstNode); 11556 //Log::Warning(L"sub_4406BC(%u, %u)", a1, uFirstNode);
11571 11557
11572 v10 = a1; 11558 v10 = a1;
11573 v12 = &pBspRenderer->field_FA8[a1]; 11559 v12 = &pBspRenderer->field_FA8[a1];
11574 while ( 1 ) 11560 while ( 1 )
11575 { 11561 {
11590 if ( v6 != -1 ) 11576 if ( v6 != -1 )
11591 sub_4406BC(v10, v6); 11577 sub_4406BC(v10, v6);
11592 v7 = v3->uCoplanarOffset; 11578 v7 = v3->uCoplanarOffset;
11593 v8 = v7 + v3->uCoplanarSize; 11579 v8 = v7 + v3->uCoplanarSize;
11594 11580
11595 Log::Warning(L"Node %u: %X to %X (%hX)", uFirstNode, v7, v8, v2->pFaceIDs[v7]); 11581 //Log::Warning(L"Node %u: %X to %X (%hX)", uFirstNode, v7, v8, v2->pFaceIDs[v7]);
11596 11582
11597 if ( pRenderer->pRenderD3D ) 11583 if ( pRenderer->pRenderD3D )
11598 { 11584 {
11599 while ( v7 < v8 ) 11585 while ( v7 < v8 )
11600 pBspRenderer->PrepareFaceRenderList_d3d(v10, v2->pFaceIDs[v7++]); 11586 pBspRenderer->AddFaceToRenderList_d3d(v10, v2->pFaceIDs[v7++]);
11601 } 11587 }
11602 else 11588 else
11603 { 11589 {
11604 while ( v7 < v8 ) 11590 while ( v7 < v8 )
11605 pBspRenderer->PrepareFaceRenderList_sw(v10, v2->pFaceIDs[v7++]); 11591 pBspRenderer->AddFaceToRenderList_sw(v10, v2->pFaceIDs[v7++]);
11606 } 11592 }
11607 v9 = v11 ? v3->uFront : v3->uBack; 11593 v9 = v11 ? v3->uFront : v3->uBack;
11608 if ( v9 == -1 ) 11594 if ( v9 == -1 )
11609 break; 11595 break;
11610 uFirstNode = v9; 11596 uFirstNode = v9;