diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-06-27 23:01:51 +0200 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-06-27 23:01:51 +0200 |
commit | 1c11a8081f246dda91ff11d4207d87bb93260b1a (patch) | |
tree | 226ff4fb914fbd93d67aff62ed24ac896ff2c89a /src/core/Camera.cpp | |
parent | nullsampman (diff) | |
download | re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.gz re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.bz2 re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.lz re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.xz re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.zst re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.zip |
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r-- | src/core/Camera.cpp | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 35d230dc..05e6588a 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -30,6 +30,7 @@ #include "Pools.h" #include "Debug.h" #include "GenericGameStorage.h" +#include "MemoryCard.h" #include "Camera.h" enum @@ -91,17 +92,28 @@ CCamera::Init(void) float fMouseAccelHorzntl = m_fMouseAccelHorzntl; float fMouseAccelVertical = m_fMouseAccelVertical; #endif -#ifdef FIX_BUGS - static const CCamera DummyCamera = CCamera(0.f); - *this = DummyCamera; -#else - memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh? + +#ifdef PS2_MENU + if ( !TheMemoryCard.m_bWantToLoad && !FrontEndMenuManager.m_bWantToRestart ) { #endif -#ifdef GTA3_1_1_PATCH - m_fMouseAccelHorzntl = fMouseAccelHorzntl; - m_fMouseAccelVertical = fMouseAccelVertical; + + #ifdef FIX_BUGS + static const CCamera DummyCamera = CCamera(0.f); + *this = DummyCamera; + #else + memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh? + #endif + + #ifdef GTA3_1_1_PATCH + m_fMouseAccelHorzntl = fMouseAccelHorzntl; + m_fMouseAccelVertical = fMouseAccelVertical; + #endif + m_pRwCamera = nil; + +#ifdef PS2_MENU + } #endif - m_pRwCamera = nil; + m_1rstPersonRunCloseToAWall = false; m_fPositionAlongSpline = 0.0f; m_bCameraJustRestored = false; @@ -168,7 +180,12 @@ CCamera::Init(void) PlayerExhaustion = 1.0f; DebugCamMode = CCam::MODE_NONE; m_PedOrientForBehindOrInFront = 0.0f; - if(!FrontEndMenuManager.m_bWantToRestart){ +#ifdef PS2_MENU + if ( !TheMemoryCard.m_bWantToLoad && !FrontEndMenuManager.m_bWantToRestart ) +#else + if(!FrontEndMenuManager.m_bWantToRestart) +#endif + { m_bFading = false; CDraw::FadeValue = 0; m_fFLOATingFade = 0.0f; @@ -177,7 +194,11 @@ CCamera::Init(void) m_fFLOATingFadeMusic = 0.0f; } m_bMoveCamToAvoidGeom = false; +#ifdef PS2_MENU + if ( TheMemoryCard.m_bWantToLoad || FrontEndMenuManager.m_bWantToRestart ) +#else if(FrontEndMenuManager.m_bWantToRestart) +#endif m_bMoveCamToAvoidGeom = true; m_bStartingSpline = false; m_iTypeOfSwitch = INTERPOLATION; @@ -493,10 +514,10 @@ CCamera::Process(void) GetMatrix().GetPosition().y += shakeOffset * (((shakeRand & 0xF0) >> 4) - 7); GetMatrix().GetPosition().z += shakeOffset * (((shakeRand & 0xF00) >> 8) - 7); - if(shakeOffset > 0.0f && m_BlurType != MBLUR_SNIPER) + if(shakeOffset > 0.0f && m_BlurType != MOTION_BLUR_SNIPER) SetMotionBlurAlpha(Min((int)(shakeStrength*255.0f) + 25, 150)); if(Cams[ActiveCam].Mode == CCam::MODE_1STPERSON && FindPlayerVehicle() && FindPlayerVehicle()->GetUp().z < 0.2f) - SetMotionBlur(230, 230, 230, 215, MBLUR_NORMAL); + SetMotionBlur(230, 230, 230, 215, MOTION_BLUR_LIGHT_SCENE); CalculateDerivedValues(); CDraw::SetFOV(FOV); @@ -2208,7 +2229,7 @@ CCamera::ProcessWideScreenOn(void) void CCamera::DrawBordersForWideScreen(void) { - if(m_BlurType == MBLUR_NONE || m_BlurType == MBLUR_NORMAL) + if(m_BlurType == MOTION_BLUR_NONE || m_BlurType == MOTION_BLUR_LIGHT_SCENE) SetMotionBlurAlpha(80); CSprite2d::DrawRect( @@ -3102,7 +3123,11 @@ CCamera::ProcessMusicFade(void) if(m_fTimeToFadeMusic == 0.0f) m_fTimeToFadeMusic = 1.0f; +#ifdef PS2_MENU + if(m_bMoveCamToAvoidGeom || TheMemoryCard.StillToFadeOut){ +#else if(m_bMoveCamToAvoidGeom || StillToFadeOut){ +#endif m_fFLOATingFadeMusic = 256.0f; m_bMoveCamToAvoidGeom = false; }else |