summaryrefslogtreecommitdiffstats
path: root/src/core/Camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r--src/core/Camera.cpp134
1 files changed, 67 insertions, 67 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 88c87c95..75e52c5f 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -416,19 +416,19 @@ CCam::Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, fl
// BUG? is this ever used?
// The values seem to be roughly m_fPedZoomValueSmooth + 1.85
if(ResetStatics){
- if(TheCamera.PedZoomIndicator == 1.0) m_fRealGroundDist = 2.090556f;
- if(TheCamera.PedZoomIndicator == 2.0) m_fRealGroundDist = 3.34973f;
- if(TheCamera.PedZoomIndicator == 3.0) m_fRealGroundDist = 4.704914f;
- if(TheCamera.PedZoomIndicator == 4.0) m_fRealGroundDist = 2.090556f;
+ if(TheCamera.PedZoomIndicator == 1.0f) m_fRealGroundDist = 2.090556f;
+ if(TheCamera.PedZoomIndicator == 2.0f) m_fRealGroundDist = 3.34973f;
+ if(TheCamera.PedZoomIndicator == 3.0f) m_fRealGroundDist = 4.704914f;
+ if(TheCamera.PedZoomIndicator == 4.0f) m_fRealGroundDist = 2.090556f;
}
// And what is this? It's only used for collision and rotation it seems
float RealGroundDist;
- if(TheCamera.PedZoomIndicator == 1.0) RealGroundDist = 2.090556f;
- if(TheCamera.PedZoomIndicator == 2.0) RealGroundDist = 3.34973f;
- if(TheCamera.PedZoomIndicator == 3.0) RealGroundDist = 4.704914f;
- if(TheCamera.PedZoomIndicator == 4.0) RealGroundDist = 2.090556f;
+ if(TheCamera.PedZoomIndicator == 1.0f) RealGroundDist = 2.090556f;
+ if(TheCamera.PedZoomIndicator == 2.0f) RealGroundDist = 3.34973f;
+ if(TheCamera.PedZoomIndicator == 3.0f) RealGroundDist = 4.704914f;
+ if(TheCamera.PedZoomIndicator == 4.0f) RealGroundDist = 2.090556f;
if(m_fCloseInPedHeightOffset > 0.00001f)
- RealGroundDist = 1.7016;
+ RealGroundDist = 1.7016f;
bool Shooting = false;
@@ -1344,30 +1344,30 @@ CCamera::SetCamCutSceneOffSet(const CVector &pos)
void
CCamera::TakeControlWithSpline(short nSwitch)
{
- m_iModeToGoTo = CCam::MODE_FLYBY;
- m_bLookingAtPlayer = false;
- m_bLookingAtVector = false;
- m_bcutsceneFinished = false;
- m_iTypeOfSwitch = nSwitch;
- m_bStartInterScript = true;
-
+ m_iModeToGoTo = CCam::MODE_FLYBY;
+ m_bLookingAtPlayer = false;
+ m_bLookingAtVector = false;
+ m_bcutsceneFinished = false;
+ m_iTypeOfSwitch = nSwitch;
+ m_bStartInterScript = true;
+
//FindPlayerPed(); // unused
};
-void CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString()
-{
- m_bCamDirectlyInFront = true;
- CPlayerPed *player = FindPlayerPed();
- if (player)
- m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
+void CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString()
+{
+ m_bCamDirectlyInFront = true;
+ CPlayerPed *player = FindPlayerPed();
+ if (player)
+ m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
}
-void CCamera::SetCameraDirectlyBehindForFollowPed_CamOnAString()
-{
- m_bCamDirectlyBehind = true;
- CPlayerPed *player = FindPlayerPed();
- if (player)
- m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
+void CCamera::SetCameraDirectlyBehindForFollowPed_CamOnAString()
+{
+ m_bCamDirectlyBehind = true;
+ CPlayerPed *player = FindPlayerPed();
+ if (player)
+ m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
}
void
@@ -1382,80 +1382,80 @@ CCamera::SetWideScreenOff(void)
m_bWantsToSwitchWidescreenOff = m_WideScreenOn;
}
-void
-CCamera::SetNewPlayerWeaponMode(int16 mode, int16 minZoom, int16 maxZoom)
-{
- PlayerWeaponMode.Mode = mode;
- PlayerWeaponMode.MaxZoom = maxZoom;
- PlayerWeaponMode.MinZoom = minZoom;
- PlayerWeaponMode.Duration = 0.0f;
+void
+CCamera::SetNewPlayerWeaponMode(int16 mode, int16 minZoom, int16 maxZoom)
+{
+ PlayerWeaponMode.Mode = mode;
+ PlayerWeaponMode.MaxZoom = maxZoom;
+ PlayerWeaponMode.MinZoom = minZoom;
+ PlayerWeaponMode.Duration = 0.0f;
}
-void
-CCamera::UpdateAimingCoors(CVector const &coors)
-{
- m_cvecAimingTargetCoors = coors;
+void
+CCamera::UpdateAimingCoors(CVector const &coors)
+{
+ m_cvecAimingTargetCoors = coors;
}
void
CCamera::SetCamPositionForFixedMode(const CVector &Source, const CVector &UpOffSet)
{
- m_vecFixedModeSource = Source;
+ m_vecFixedModeSource = Source;
m_vecFixedModeUpOffSet = UpOffSet;
}
void
CCamera::SetRwCamera(RwCamera *cam)
{
- m_pRwCamera = cam;
- m_viewMatrix.Attach(&m_pRwCamera->viewMatrix, false);
+ m_pRwCamera = cam;
+ m_viewMatrix.Attach(&m_pRwCamera->viewMatrix, false);
CMBlur::MotionBlurOpen(m_pRwCamera);
}
uint32
CCamera::GetCutSceneFinishTime(void)
{
- int cam = ActiveCam;
- if (Cams[cam].Mode == CCam::MODE_FLYBY)
- return Cams[cam].m_uiFinishTime;
- cam = (cam + 1) % 2;
- if (Cams[cam].Mode == CCam::MODE_FLYBY)
- return Cams[cam].m_uiFinishTime;
-
+ int cam = ActiveCam;
+ if (Cams[cam].Mode == CCam::MODE_FLYBY)
+ return Cams[cam].m_uiFinishTime;
+ cam = (cam + 1) % 2;
+ if (Cams[cam].Mode == CCam::MODE_FLYBY)
+ return Cams[cam].m_uiFinishTime;
+
return 0;
}
void
CCamera::FinishCutscene(void)
{
- SetPercentAlongCutScene(100.0f);
- m_fPositionAlongSpline = 1.0f;
+ SetPercentAlongCutScene(100.0f);
+ m_fPositionAlongSpline = 1.0f;
m_bcutsceneFinished = true;
}
void
CCamera::SetZoomValueFollowPedScript(int16 mode)
-{
- switch (mode) {
- case 0: m_fPedZoomValueScript = 0.25f; break;
- case 1: m_fPedZoomValueScript = 1.5f; break;
- case 2: m_fPedZoomValueScript = 2.9f; break;
- default: m_fPedZoomValueScript = m_fPedZoomValueScript; break;
- }
-
+{
+ switch (mode) {
+ case 0: m_fPedZoomValueScript = 0.25f; break;
+ case 1: m_fPedZoomValueScript = 1.5f; break;
+ case 2: m_fPedZoomValueScript = 2.9f; break;
+ default: m_fPedZoomValueScript = m_fPedZoomValueScript; break;
+ }
+
m_bUseScriptZoomValuePed = true;
}
void
CCamera::SetZoomValueCamStringScript(int16 mode)
-{
- switch (mode) {
- case 0: m_fCarZoomValueScript = 0.05f; break;
- case 1: m_fCarZoomValueScript = 1.9f; break;
- case 2: m_fCarZoomValueScript = 3.9f; break;
- default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
- }
-
+{
+ switch (mode) {
+ case 0: m_fCarZoomValueScript = 0.05f; break;
+ case 1: m_fCarZoomValueScript = 1.9f; break;
+ case 2: m_fCarZoomValueScript = 3.9f; break;
+ default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
+ }
+
m_bUseScriptZoomValueCar = true;
}