1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-22 19:19:59 +00:00

add NoMovies ini option, rename gDrawVersionText, always save ini after loading

This commit is contained in:
withmorten 2021-02-18 22:40:32 +01:00
parent 6245a17e16
commit 48cec4a786
6 changed files with 36 additions and 16 deletions

View file

@ -3825,11 +3825,10 @@ CMenuManager::LoadSettings()
#ifdef LOAD_INI_SETTINGS #ifdef LOAD_INI_SETTINGS
if (LoadINISettings()) { if (LoadINISettings()) {
LoadINIControllerSettings(); LoadINIControllerSettings();
} else { }
// no re3.ini, create it // if no re3.ini, create it, or update it with new values
SaveINISettings(); SaveINISettings();
SaveINIControllerSettings(); SaveINIControllerSettings();
}
#endif #endif
m_PrefsVsync = m_PrefsVsyncDisp; m_PrefsVsync = m_PrefsVsyncDisp;

View file

@ -223,7 +223,6 @@ enum Config {
// not in master builds // not in master builds
#define VALIDATE_SAVE_SIZE #define VALIDATE_SAVE_SIZE
#define NO_MOVIES // disable intro videos
#define DEBUGMENU #define DEBUGMENU
#endif #endif
@ -241,6 +240,8 @@ enum Config {
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible #define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS #define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
#define NO_MOVIES // add option to disable intro videos
#if defined(__LP64__) || defined(_WIN64) #if defined(__LP64__) || defined(_WIN64)
#define FIX_BUGS_64 // Must have fixes to be able to run 64 bit build #define FIX_BUGS_64 // Must have fixes to be able to run 64 bit build
#endif #endif

View file

@ -92,7 +92,10 @@ bool gbModelViewer;
bool gbShowTimebars; bool gbShowTimebars;
#endif #endif
#ifdef DRAW_GAME_VERSION_TEXT #ifdef DRAW_GAME_VERSION_TEXT
bool gDrawVersionText; // Our addition, we think it was always enabled on !MASTER builds bool gbDrawVersionText; // Our addition, we think it was always enabled on !MASTER builds
#endif
#ifdef NO_MOVIES
bool gbNoMovies;
#endif #endif
volatile int32 frameCount; volatile int32 frameCount;
@ -1109,7 +1112,7 @@ DisplayGameDebugText()
#ifdef DRAW_GAME_VERSION_TEXT #ifdef DRAW_GAME_VERSION_TEXT
wchar ver[200]; wchar ver[200];
if(gDrawVersionText) // This realtime switch is our thing if(gbDrawVersionText) // This realtime switch is our thing
{ {
#ifdef USE_OUR_VERSIONING #ifdef USE_OUR_VERSIONING

View file

@ -66,3 +66,11 @@ void SaveINIControllerSettings();
extern bool gbNewRenderer; extern bool gbNewRenderer;
bool FredIsInFirstPersonCam(void); bool FredIsInFirstPersonCam(void);
#endif #endif
#ifdef DRAW_GAME_VERSION_TEXT
extern bool gbDrawVersionText;
#endif
#ifdef NO_MOVIES
extern bool gbNoMovies;
#endif

View file

@ -517,8 +517,10 @@ bool LoadINISettings()
ReadIniIfExists("Draw", "FixSprites", &CDraw::ms_bFixSprites); ReadIniIfExists("Draw", "FixSprites", &CDraw::ms_bFixSprites);
#endif #endif
#ifdef DRAW_GAME_VERSION_TEXT #ifdef DRAW_GAME_VERSION_TEXT
extern bool gDrawVersionText; ReadIniIfExists("General", "DrawVersionText", &gbDrawVersionText);
ReadIniIfExists("General", "DrawVersionText", &gDrawVersionText); #endif
#ifdef NO_MOVIES
ReadIniIfExists("General", "NoMovies", &gbNoMovies);
#endif #endif
#ifdef CUSTOM_FRONTEND_OPTIONS #ifdef CUSTOM_FRONTEND_OPTIONS
@ -608,8 +610,10 @@ void SaveINISettings()
StoreIni("Draw", "FixSprites", CDraw::ms_bFixSprites); StoreIni("Draw", "FixSprites", CDraw::ms_bFixSprites);
#endif #endif
#ifdef DRAW_GAME_VERSION_TEXT #ifdef DRAW_GAME_VERSION_TEXT
extern bool gDrawVersionText; StoreIni("General", "DrawVersionText", gbDrawVersionText);
StoreIni("General", "DrawVersionText", gDrawVersionText); #endif
#ifdef NO_MOVIES
StoreIni("General", "NoMovies", gbNoMovies);
#endif #endif
#ifdef CUSTOM_FRONTEND_OPTIONS #ifdef CUSTOM_FRONTEND_OPTIONS
for (int i = 0; i < MENUPAGES; i++) { for (int i = 0; i < MENUPAGES; i++) {
@ -990,8 +994,7 @@ extern bool gbRenderWorld2;
#ifdef DRAW_GAME_VERSION_TEXT #ifdef DRAW_GAME_VERSION_TEXT
extern bool gDrawVersionText; DebugMenuAddVarBool8("Debug", "Version Text", &gbDrawVersionText, nil);
DebugMenuAddVarBool8("Debug", "Version Text", &gDrawVersionText, nil);
#endif #endif
DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil); DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil);
#ifdef TIMEBARS #ifdef TIMEBARS

View file

@ -2275,7 +2275,7 @@ WinMain(HINSTANCE instance,
case GS_START_UP: case GS_START_UP:
{ {
#ifdef NO_MOVIES #ifdef NO_MOVIES
gGameState = GS_INIT_ONCE; gGameState = gbNoMovies ? GS_INIT_ONCE : GS_INIT_LOGO_MPEG;
#else #else
gGameState = GS_INIT_LOGO_MPEG; gGameState = GS_INIT_LOGO_MPEG;
#endif #endif
@ -2314,8 +2314,11 @@ WinMain(HINSTANCE instance,
case GS_INIT_INTRO_MPEG: case GS_INIT_INTRO_MPEG:
{ {
#ifndef NO_MOVIES #ifdef NO_MOVIES
if (!gbNoMovies)
#endif
CloseClip(); CloseClip();
#ifndef FIX_BUGS
CoUninitialize(); CoUninitialize();
#endif #endif
@ -2351,8 +2354,11 @@ WinMain(HINSTANCE instance,
case GS_INIT_ONCE: case GS_INIT_ONCE:
{ {
#ifndef NO_MOVIES #ifdef NO_MOVIES
if (!gbNoMovies)
#endif
CloseClip(); CloseClip();
#ifndef FIX_BUGS
CoUninitialize(); CoUninitialize();
#endif #endif