comparison Game.cpp @ 120:fe0e317c0de0

Camera rotation fixed. Sorta
author Nomad
date Sun, 10 Feb 2013 23:43:28 +0200
parents 2fb33d31ca0d
children 3471df3713e2 eeb0a8222d59 c70fea5013aa
comparison
equal deleted inserted replaced
119:be3c07c98861 120:fe0e317c0de0
56 uFlags2 &= 0xFFFFFFFDu; 56 uFlags2 &= 0xFFFFFFFDu;
57 if ( pParty->_497FC5_check_party_perception_against_level() ) 57 if ( pParty->_497FC5_check_party_perception_against_level() )
58 uFlags2 |= 2u; 58 uFlags2 |= 2u;
59 pIndoorCamera->sRotationX = pParty->sRotationX; 59 pIndoorCamera->sRotationX = pParty->sRotationX;
60 pIndoorCamera->sRotationY = pParty->sRotationY; 60 pIndoorCamera->sRotationY = pParty->sRotationY;
61 pIndoorCamera->pos.x = pParty->vPosition.x - pParty->field_18 * (stru_5C6E00->SinCos(pIndoorCamera->sRotationY) / 2048.0);//12552 61 //pIndoorCamera->pos.x = pParty->vPosition.x - ((__int64)pParty->y_rotation_granularity * stru_5C6E00->SinCos(pIndoorCamera->sRotationY)) / 2048.0;//12552
62 pIndoorCamera->pos.y = pParty->vPosition.y - pParty->field_18 * (stru_5C6E00->SinCos(pIndoorCamera->sRotationY) / 2048.0);//800 62 //pIndoorCamera->pos.y = pParty->vPosition.y - ((__int64)pParty->y_rotation_granularity * stru_5C6E00->SinCos(pIndoorCamera->sRotationY)) / 2048.0;//800
63 pIndoorCamera->pos.x = pParty->vPosition.x - pParty->y_rotation_granularity * cosf(2 * 3.141592653589 * pIndoorCamera->sRotationY / 2048.0);
64 pIndoorCamera->pos.y = pParty->vPosition.y - pParty->y_rotation_granularity * sinf(2 * 3.141592653589 * pIndoorCamera->sRotationY / 2048.0);
63 pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel;//193, but real 353 65 pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel;//193, but real 353
64 pIndoorCamera->Initialize2(); 66 pIndoorCamera->Initialize2();
65 pIndoorCameraD3D->CreateWorldMatrixAndSomeStuff(); 67 pIndoorCameraD3D->CreateWorldMatrixAndSomeStuff();
66 pIndoorCameraD3D->_4374E8_ProllyBuildFrustrum(); 68 pIndoorCameraD3D->_4374E8_ProllyBuildFrustrum();
67 69