comparison Engine/Graphics/IndoorCameraD3D.cpp @ 2534:1bcadc6dd203

enum SOUND_
author Ritor1
date Mon, 09 Feb 2015 19:17:12 +0600
parents 9ec6b8be16fe
children a902abdfc7f2
comparison
equal deleted inserted replaced
2533:2baaac65d5bf 2534:1bcadc6dd203
1352 void IndoorCameraD3D::CalculateRotations(int camera_rot_x, int camera_rot_y) 1352 void IndoorCameraD3D::CalculateRotations(int camera_rot_x, int camera_rot_y)
1353 { 1353 {
1354 sRotationX = camera_rot_x; 1354 sRotationX = camera_rot_x;
1355 sRotationY = camera_rot_y; 1355 sRotationY = camera_rot_y;
1356 1356
1357 fRotationYSine = sin((3.141592653589793 + 3.141592653589793) * (double)sRotationY / 2048.0); 1357 fRotationYSine = sin((pi_double + pi_double) * (double)sRotationY / 2048.0);
1358 fRotationYCosine = cos((3.141592653589793 + 3.141592653589793) * (double)sRotationY / 2048.0); 1358 fRotationYCosine = cos((pi_double + pi_double) * (double)sRotationY / 2048.0);
1359 if (byte_4D864C && pGame->uFlags & 0x80 || uCurrentlyLoadedLevelType == LEVEL_Indoor) 1359 if (byte_4D864C && pGame->uFlags & 0x80 || uCurrentlyLoadedLevelType == LEVEL_Indoor)
1360 { 1360 {
1361 fRotationXSine = sin((3.141592653589793 + 3.141592653589793) * (double)-sRotationX / 2048.0); 1361 fRotationXSine = sin((pi_double + pi_double) * (double)-sRotationX / 2048.0);
1362 fRotationXCosine = cos((3.141592653589793 + 3.141592653589793) * (double)-sRotationX / 2048.0); 1362 fRotationXCosine = cos((pi_double + pi_double) * (double)-sRotationX / 2048.0);
1363 1363
1364 int_sine_y = stru_5C6E00->Sin( pGame->pIndoorCameraD3D->sRotationY); 1364 int_sine_y = stru_5C6E00->Sin( pGame->pIndoorCameraD3D->sRotationY);
1365 int_cosine_y = stru_5C6E00->Cos( pGame->pIndoorCameraD3D->sRotationY); 1365 int_cosine_y = stru_5C6E00->Cos( pGame->pIndoorCameraD3D->sRotationY);
1366 int_sine_x = stru_5C6E00->Sin(-pGame->pIndoorCameraD3D->sRotationX); 1366 int_sine_x = stru_5C6E00->Sin(-pGame->pIndoorCameraD3D->sRotationX);
1367 int_cosine_x = stru_5C6E00->Cos(-pGame->pIndoorCameraD3D->sRotationX); 1367 int_cosine_x = stru_5C6E00->Cos(-pGame->pIndoorCameraD3D->sRotationX);
1368 } 1368 }
1369 else 1369 else
1370 { 1370 {
1371 fRotationXSine = sin((3.141592653589793 + 3.141592653589793) * (double)sRotationX / 2048.0); 1371 fRotationXSine = sin((pi_double + pi_double) * (double)sRotationX / 2048.0);
1372 fRotationXCosine = cos((3.141592653589793 + 3.141592653589793) * (double)sRotationX / 2048.0); 1372 fRotationXCosine = cos((pi_double + pi_double) * (double)sRotationX / 2048.0);
1373 1373
1374 int_sine_y = stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationY); 1374 int_sine_y = stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationY);
1375 int_cosine_y = stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationY); 1375 int_cosine_y = stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationY);
1376 int_sine_x = stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationX); 1376 int_sine_x = stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationX);
1377 int_cosine_x = stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationX); 1377 int_cosine_x = stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationX);