diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-07-11 11:03:56 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-07-11 11:04:26 +0200 |
commit | 6eb8f6ae5a87fe32c93388e67559da988f48fb7f (patch) | |
tree | 3e803214b7955c83077914407ad4c4b2d2f1c83e /src | |
parent | enable island loading for now (diff) | |
download | re3-6eb8f6ae5a87fe32c93388e67559da988f48fb7f.tar re3-6eb8f6ae5a87fe32c93388e67559da988f48fb7f.tar.gz re3-6eb8f6ae5a87fe32c93388e67559da988f48fb7f.tar.bz2 re3-6eb8f6ae5a87fe32c93388e67559da988f48fb7f.tar.lz re3-6eb8f6ae5a87fe32c93388e67559da988f48fb7f.tar.xz re3-6eb8f6ae5a87fe32c93388e67559da988f48fb7f.tar.zst re3-6eb8f6ae5a87fe32c93388e67559da988f48fb7f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/Frontend.cpp | 10 | ||||
-rw-r--r-- | src/core/Frontend.h | 4 | ||||
-rw-r--r-- | src/core/config.h | 1 | ||||
-rw-r--r-- | src/core/main.cpp | 12 | ||||
-rw-r--r-- | src/core/re3.cpp | 14 | ||||
-rw-r--r-- | src/render/Draw.cpp | 6 |
6 files changed, 44 insertions, 3 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 841f6bbb..e67e939a 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -112,6 +112,10 @@ int8 CMenuManager::m_bFrontEnd_ReloadObrTxtGxt; int32 CMenuManager::m_PrefsMusicVolume = 102; int32 CMenuManager::m_PrefsSfxVolume = 102; +#ifdef CUTSCENE_BORDERS_SWITCH +bool CMenuManager::m_PrefsCutsceneBorders = true; +#endif + char CMenuManager::m_PrefsSkinFile[256] = DEFAULT_SKIN_NAME; int32 CMenuManager::m_KeyPressedCode = -1; @@ -3218,6 +3222,9 @@ CMenuManager::LoadSettings() #ifdef FREE_CAM CFileMgr::Read(fileHandle, (char*)&TheCamera.bFreeCam, 1); #endif +#ifdef CUTSCENE_BORDERS_SWITCH + CFileMgr::Read(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1); +#endif } } @@ -3311,6 +3318,9 @@ CMenuManager::SaveSettings() #ifdef FREE_CAM CFileMgr::Write(fileHandle, (char*)&TheCamera.bFreeCam, 1); #endif +#ifdef CUTSCENE_BORDERS_SWITCH + CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1); +#endif } CFileMgr::CloseFile(fileHandle); diff --git a/src/core/Frontend.h b/src/core/Frontend.h index b07f7260..758e29aa 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -582,6 +582,10 @@ public: static uint8 m_PrefsPlayerGreen; static uint8 m_PrefsPlayerBlue; +#ifdef CUTSCENE_BORDERS_SWITCH + static bool m_PrefsCutsceneBorders; +#endif + #ifndef MASTER static bool m_PrefsMarketing; static bool m_PrefsDisableTutorials; diff --git a/src/core/config.h b/src/core/config.h index f2716783..2ba7a021 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -201,6 +201,7 @@ enum Config { #define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time //#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU //#define USE_TEXTURE_POOL +#define CUTSCENE_BORDERS_SWITCH // Particle //#define PC_PARTICLE diff --git a/src/core/main.cpp b/src/core/main.cpp index f8a3bd0d..a1c64a6d 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -254,7 +254,11 @@ DoFade(void) fadeColor.a = alpha; } - if(TheCamera.m_WideScreenOn){ + if(TheCamera.m_WideScreenOn +#ifdef CUTSCENE_BORDERS_SWITCH + && CMenuManager::m_PrefsCutsceneBorders +#endif + ){ // what's this? float y = SCREEN_HEIGHT/2 * TheCamera.m_ScreenReductionPercentage/100.0f; rect.left = 0.0f; @@ -862,7 +866,11 @@ Render2dStuff(void) CReplay::Display(); CPickups::RenderPickUpText(); - if(TheCamera.m_WideScreenOn) + if(TheCamera.m_WideScreenOn +#ifdef CUTSCENE_BORDERS_SWITCH + && CMenuManager::m_PrefsCutsceneBorders +#endif + ) TheCamera.DrawBordersForWideScreen(); CPed *player = FindPlayerPed(); diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 7aa6800e..d6319f3a 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -132,6 +132,14 @@ void ToggleFreeCam(int8 action) } #endif +#ifdef CUTSCENE_BORDERS_SWITCH +void BorderModeChange(int8 displayedValue) +{ + CMenuManager::m_PrefsCutsceneBorders = !!displayedValue; + FrontEndMenuManager.SaveSettings(); +} +#endif + // Reloaded on language change, so you can use hardcoded wchar* and TheText.Get with peace of mind void CustomFrontendOptionsPopulate(void) @@ -161,6 +169,12 @@ CustomFrontendOptionsPopulate(void) FrontendOptionSetPosition(MENUPAGE_CONTROLLER_PC, 1); FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil); #endif + +#ifdef CUTSCENE_BORDERS_SWITCH + static const wchar *off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") }; + FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 9); + FrontendOptionAddSelect((const wchar *)L"CUTSCENE BORDERS", off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil); +#endif } #endif diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index bb37a3a3..db87e76d 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -3,6 +3,7 @@ #include "Draw.h" #include "Frontend.h" #include "Camera.h" +#include "CutsceneMgr.h" #ifdef ASPECT_RATIO_SCALE float CDraw::ms_fAspectRatio = DEFAULT_ASPECT_RATIO; @@ -62,7 +63,10 @@ void CDraw::SetFOV(float fov) { #ifdef ASPECT_RATIO_SCALE - ms_fScaledFOV = ConvertFOV(fov); + if (!CCutsceneMgr::IsRunning()) + ms_fScaledFOV = ConvertFOV(fov); + else + ms_fScaledFOV = fov; #endif ms_fFOV = fov; } |