diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2019-06-17 12:37:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 12:37:59 +0200 |
commit | 0bb8bf9d1505792a0fd4f9872fd57fca8f197d13 (patch) | |
tree | cc2c85e0ccf486546de22074639d0e8fbe032f65 /src/Frontend.cpp | |
parent | Merge pull request #7 from GTAmodding/master (diff) | |
parent | Merge pull request #20 from gennariarmando/master (diff) | |
download | re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.gz re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.bz2 re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.lz re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.xz re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.tar.zst re3-0bb8bf9d1505792a0fd4f9872fd57fca8f197d13.zip |
Diffstat (limited to 'src/Frontend.cpp')
-rw-r--r-- | src/Frontend.cpp | 49 |
1 files changed, 40 insertions, 9 deletions
diff --git a/src/Frontend.cpp b/src/Frontend.cpp index 35e48065..b8ee10f4 100644 --- a/src/Frontend.cpp +++ b/src/Frontend.cpp @@ -2,15 +2,30 @@ #include "patcher.h" #include "Frontend.h" -int &CMenuManager::OS_Language = *(int*)0x5F2F78; -int &CMenuManager::m_PrefsBrightness = *(int*)0x5F2E50; -int &CMenuManager::m_PrefsLanguage = *(int*)0x941238; -bool &CMenuManager::m_PrefsUseWideScreen = *(bool*)0x95CD23; -Bool &CMenuManager::m_PrefsVsync = *(Bool*)0x5F2E58; -Bool &CMenuManager::m_PrefsAllowNastyGame = *(Bool*)0x5F2E64; -Bool &CMenuManager::m_bStartUpFrontEndRequested = *(Bool*)0x95CCF4; -Bool &CMenuManager::m_PrefsFrameLimiter = *(Bool*)0x5F2E60; -Bool &CMenuManager::m_PrefsUseVibration = *(Bool*)0x95CD92; +int32 &CMenuManager::OS_Language = *(int32*)0x5F2F78; +int8 &CMenuManager::m_PrefsUseVibration = *(int8*)0x95CD92; +int8 &CMenuManager::m_DisplayControllerOnFoot = *(int8*)0x95CD8D; +int8 &CMenuManager::m_PrefsVsync = *(int8*)0x5F2E58; +int8 &CMenuManager::m_PrefsVsyncDisp = *(int8*)0x5F2E5C; +int8 &CMenuManager::m_PrefsFrameLimiter = *(int8*)0x5F2E60; +int8 &CMenuManager::BlurOn = *(int8*)0x95CDAD; +int8 &CMenuManager::m_PrefsShowSubtitles = *(int8*)0x5F2E54; +int8 &CMenuManager::m_PrefsSpeakers = *(int8*)0x95CD7E; +int8 &CMenuManager::m_ControlMethod = *(int8*)0x8F5F7C; +int8 &CMenuManager::m_PrefsDMA = *(int8*)0x5F2F74; +int8 &CMenuManager::m_PrefsLanguage = *(int8*)0x941238; + +bool &CMenuManager::m_PrefsAllowNastyGame = *(bool*)0x5F2E64; +bool &CMenuManager::m_bStartUpFrontEndRequested = *(bool*)0x95CCF4; + +int8 &CMenuManager::m_PrefsUseWideScreen = *(int8*)0x95CD23; +int8 &CMenuManager::m_PrefsRadioStation = *(int8*)0x95CDA4; +int8 &CMenuManager::m_bDisableMouseSteering = *(int8*)0x60252C; +int32 &CMenuManager::m_PrefsBrightness = *(int32*)0x5F2E50; +float &CMenuManager::m_PrefsLOD = *(float*)0x8F42C4; +int8 &CMenuManager::m_bFrontEnd_ReloadObrTxtGxt = *(int8*)0x628CFC; +int32 &CMenuManager::m_PrefsMusicVolume = *(int32*)0x5F2E4C; +int32 &CMenuManager::m_PrefsSfxVolume = *(int32*)0x5F2E48; CMenuManager &FrontEndMenuManager = *(CMenuManager*)0x8F59D8; @@ -20,3 +35,19 @@ WRAPPER void CMenuManager::UnloadTextures(void) { EAXJMP(0x47A440); } WRAPPER void CMenuManager::LoadAllTextures(void) { EAXJMP(0x47A230); } WRAPPER void CMenuManager::LoadSettings(void) { EAXJMP(0x488EE0); } WRAPPER void CMenuManager::WaitForUserCD(void) { EAXJMP(0x48ADD0); } + +int CMenuManager::FadeIn(int alpha) { + if (m_nCurrScreen == MENU_LOADING_IN_PROGRESS || + m_nCurrScreen == MENU_SAVING_IN_PROGRESS || + m_nCurrScreen == MENU_DELETING) + return alpha; + + if (m_nMenuFadeAlpha >= alpha) + return alpha; + + return m_nMenuFadeAlpha; +} + +STARTPATCHES + InjectHook(0x48AC60, &CMenuManager::FadeIn, PATCH_JUMP); +ENDPATCHES
\ No newline at end of file |