comparison Game.cpp @ 1669:bd28d08e2c75

Merge
author Ritor1
date Tue, 17 Sep 2013 22:55:48 +0600
parents afc1c3514dd5
children 8971dc85b8fb
comparison
equal deleted inserted replaced
1668:d17247968bd6 1669:bd28d08e2c75
15 #include "stru9.h" 15 #include "stru9.h"
16 #include "stru10.h" 16 #include "stru10.h"
17 17
18 #include "Game.h" 18 #include "Game.h"
19 #include "Party.h" 19 #include "Party.h"
20 #include "IndoorCamera.h"
21 #include "Viewport.h" 20 #include "Viewport.h"
22 #include "Time.h" 21 #include "Time.h"
23 #include "Outdoor.h" 22 #include "Outdoor.h"
24 #include "Outdoor_stuff.h" 23 #include "Outdoor_stuff.h"
25 #include "Overlays.h" 24 #include "Overlays.h"
72 //int v5; // eax@35 71 //int v5; // eax@35
73 72
74 uFlags2 &= ~0x02; 73 uFlags2 &= ~0x02;
75 if ( pParty->_497FC5_check_party_perception_against_level() ) 74 if ( pParty->_497FC5_check_party_perception_against_level() )
76 uFlags2 |= 2u; 75 uFlags2 |= 2u;
77 pIndoorCamera->sRotationX = pParty->sRotationX; 76
78 pIndoorCamera->sRotationY = pParty->sRotationY; 77 pGame->pIndoorCameraD3D->sRotationX = pParty->sRotationX;
79 //pIndoorCamera->pos.x = pParty->vPosition.x - ((__int64)pParty->y_rotation_granularity * stru_5C6E00->SinCos(pIndoorCamera->sRotationY)) / 2048.0;//12552 78 pGame->pIndoorCameraD3D->sRotationY = pParty->sRotationY;
80 //pIndoorCamera->pos.y = pParty->vPosition.y - ((__int64)pParty->y_rotation_granularity * stru_5C6E00->SinCos(pIndoorCamera->sRotationY)) / 2048.0;//800 79 pGame->pIndoorCameraD3D->vPartyPos.x = pParty->vPosition.x - pParty->y_rotation_granularity * cosf(2 * 3.141592653589 * pParty->sRotationY / 2048.0);
81 pIndoorCamera->pos.x = pParty->vPosition.x - pParty->y_rotation_granularity * cosf(2 * 3.141592653589 * pIndoorCamera->sRotationY / 2048.0); 80 pGame->pIndoorCameraD3D->vPartyPos.y = pParty->vPosition.y - pParty->y_rotation_granularity * sinf(2 * 3.141592653589 * pParty->sRotationY / 2048.0);
82 pIndoorCamera->pos.y = pParty->vPosition.y - pParty->y_rotation_granularity * sinf(2 * 3.141592653589 * pIndoorCamera->sRotationY / 2048.0); 81 pGame->pIndoorCameraD3D->vPartyPos.z = pParty->vPosition.z + pParty->sEyelevel;//193, but real 353
83 pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel;//193, but real 353 82
84 pIndoorCamera->Initialize2(); 83 //pIndoorCamera->Initialize2();
84 {
85 pIndoorCameraD3D->fRotationYSine = sin((3.141592653589793 + 3.141592653589793) * (double)pParty->sRotationY / 2048.0);
86 pIndoorCameraD3D->fRotationYCosine = cos((3.141592653589793 + 3.141592653589793) * (double)pParty->sRotationY / 2048.0);
87 if ( byte_4D864C && pGame->uFlags & 0x80 || uCurrentlyLoadedLevelType == LEVEL_Indoor)
88 {
89 pIndoorCameraD3D->fRotationXSine = sin((3.141592653589793 + 3.141592653589793) * (double)-pParty->sRotationX / 2048.0);
90 pIndoorCameraD3D->fRotationXCosine = cos((3.141592653589793 + 3.141592653589793) * (double)-pParty->sRotationX / 2048.0);
91 }
92 else
93 {
94 pIndoorCameraD3D->fRotationXSine = sin((3.141592653589793 + 3.141592653589793) * (double)pParty->sRotationX / 2048.0);
95 pIndoorCameraD3D->fRotationXCosine = cos((3.141592653589793 + 3.141592653589793) * (double)pParty->sRotationX / 2048.0);
96 }
97 }
85 pIndoorCameraD3D->CreateWorldMatrixAndSomeStuff(); 98 pIndoorCameraD3D->CreateWorldMatrixAndSomeStuff();
86 pIndoorCameraD3D->_4374E8_ProllyBuildFrustrum(); 99 pIndoorCameraD3D->_4374E8_ProllyBuildFrustrum();
87 100
88 if ( pVideoPlayer->AnyMovieLoaded() ) 101 if ( pVideoPlayer->AnyMovieLoaded() )
89 { 102 {