Mercurial > mm7
diff Game.cpp @ 66:653fdf29c654
23.01.13 (work)
author | Ritor1 |
---|---|
date | Wed, 23 Jan 2013 17:29:00 +0600 |
parents | 66319a734368 |
children | 6ef241d53522 |
line wrap: on
line diff
--- a/Game.cpp Wed Jan 23 13:21:04 2013 +0600 +++ b/Game.cpp Wed Jan 23 17:29:00 2013 +0600 @@ -58,11 +58,9 @@ uFlags2 |= 2u; pIndoorCamera->sRotationX = pParty->sRotationX; pIndoorCamera->sRotationY = pParty->sRotationY; - pIndoorCamera->pos.x = pParty->vPosition.x - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) - * (signed __int64)pParty->field_18) >> 16); - pIndoorCamera->pos.y = pParty->vPosition.y - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi) - * (signed __int64)pParty->field_18) >> 16); - pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel; + pIndoorCamera->pos.x = pParty->vPosition.x - pParty->field_18 * (stru_5C6E00->SinCos(pIndoorCamera->sRotationY) / 2048.0);//12552 + pIndoorCamera->pos.y = pParty->vPosition.y - pParty->field_18 * (stru_5C6E00->SinCos(pIndoorCamera->sRotationY) / 2048.0);//800 + pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel;//193, but real 353 pIndoorCamera->Initialize2(); pIndoorCameraD3D->CreateWorldMatrixAndSomeStuff(); pIndoorCameraD3D->_4374E8_ProllyBuildFrustrum(); @@ -76,14 +74,14 @@ } else { - if ( pParty->vPosition.x != pParty->vPrevPosition.x | pParty->sRotationY != pParty->sPrevRotationY | pParty->vPosition.y != pParty->vPrevPosition.z - | pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.z != pParty->vPrevPosition.y | pParty->sEyelevel != pParty->sPrevEyelevel ) + if ( pParty->vPosition.x != pParty->vPrevPosition.x | pParty->sRotationY != pParty->sPrevRotationY | pParty->vPosition.y != pParty->vPrevPosition.y + | pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.z != pParty->vPrevPosition.z | pParty->sEyelevel != pParty->sPrevEyelevel ) pParty->uFlags |= 2u; - pParty->vPrevPosition.x = pParty->vPosition.x; - pParty->vPrevPosition.y = pParty->vPosition.z; + pParty->vPrevPosition = pParty->vPosition; + //pParty->vPrevPosition.y = pParty->vPosition.y; //v0 = &pRenderer; pParty->sPrevRotationY = pParty->sRotationY; - pParty->vPrevPosition.z = pParty->vPosition.y; + //pParty->vPrevPosition.z = pParty->vPosition.y; pParty->sPrevRotationX = pParty->sRotationX; pParty->sPrevEyelevel = pParty->sEyelevel; pRenderer->BeginSceneD3D(); @@ -139,7 +137,7 @@ { if ( !sub_4226C2() && pRenderer->pRenderD3D) pRenderer->FillRectFast(pViewport->uViewportX, pViewport->uViewportY, pViewport->uViewportZ - pViewport->uViewportX, - pViewport->uViewportW - pViewport->uViewportY + 1, pRenderer->uTargetGMask | pRenderer->uTargetBMask); + pViewport->uViewportW - pViewport->uViewportY + 1, pRenderer->uTargetGMask | pRenderer->uTargetBMask);//0x0000FFFF/*pRenderer->uTargetGMask | pRenderer->uTargetBMask*/ - white window viewparams->field_48 = 0; } }