mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 04:30:00 +00:00
Merge pull request #809 from erorcun/master
Fix build without CFO, NO_ISLAND_LOADING, save postfx/pipeline mults
This commit is contained in:
commit
c96ffb05b1
|
@ -122,7 +122,6 @@ int8 CMenuManager::m_nDisplayMSAALevel = 0;
|
|||
#endif
|
||||
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
int8 CMenuManager::m_DisplayIslandLoading = ISLAND_LOADING_LOW;
|
||||
int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
|
||||
#endif
|
||||
|
||||
|
@ -1236,21 +1235,6 @@ CMenuManager::Draw()
|
|||
AsciiToUnicode(_psGetVideoModeList()[m_nDisplayVideoMode], unicodeTemp);
|
||||
rightText = unicodeTemp;
|
||||
break;
|
||||
//#ifdef NO_ISLAND_LOADING
|
||||
// case MENUACTION_ISLANDLOADING:
|
||||
// switch (m_DisplayIslandLoading) {
|
||||
// case ISLAND_LOADING_LOW:
|
||||
// rightText = TheText.Get("FEM_LOW");
|
||||
// break;
|
||||
// case ISLAND_LOADING_MEDIUM:
|
||||
// rightText = TheText.Get("FEM_MED");
|
||||
// break;
|
||||
// case ISLAND_LOADING_HIGH:
|
||||
// rightText = TheText.Get("FEM_HIG");
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
//#endif
|
||||
case MENUACTION_AUDIOHW:
|
||||
if (m_nPrefsAudio3DProviderIndex == -1)
|
||||
rightText = TheText.Get("FEA_NAH");
|
||||
|
@ -1430,12 +1414,6 @@ CMenuManager::Draw()
|
|||
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES") && m_nHelperTextMsgId == 1)
|
||||
ResetHelperText();
|
||||
}
|
||||
//#ifdef NO_ISLAND_LOADING
|
||||
// if (m_DisplayIslandLoading == m_PrefsIslandLoading) {
|
||||
// if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL") && m_nHelperTextMsgId == 1)
|
||||
// ResetHelperText();
|
||||
// }
|
||||
//#endif
|
||||
if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) {
|
||||
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH"))
|
||||
SetHelperText(1);
|
||||
|
@ -1444,12 +1422,6 @@ CMenuManager::Draw()
|
|||
if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES"))
|
||||
SetHelperText(1);
|
||||
}
|
||||
//#ifdef NO_ISLAND_LOADING
|
||||
// if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
|
||||
// if (!strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEM_ISL"))
|
||||
// SetHelperText(1);
|
||||
// }
|
||||
//#endif
|
||||
if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) {
|
||||
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH") != 0
|
||||
// To make assigning built-in actions to new custom options possible.
|
||||
|
@ -4822,45 +4794,6 @@ CMenuManager::ProcessButtonPresses(void)
|
|||
SaveSettings();
|
||||
}
|
||||
break;
|
||||
//#ifdef NO_ISLAND_LOADING
|
||||
// case MENUACTION_ISLANDLOADING:
|
||||
// if (m_DisplayIslandLoading != m_PrefsIslandLoading) {
|
||||
// if (!m_bGameNotLoaded) {
|
||||
// if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
|
||||
// if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
|
||||
// CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
|
||||
// if (m_PrefsIslandLoading == ISLAND_LOADING_LOW) {
|
||||
// if (CGame::currLevel != LEVEL_INDUSTRIAL)
|
||||
// CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
|
||||
// if (CGame::currLevel != LEVEL_COMMERCIAL)
|
||||
// CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
|
||||
// if (CGame::currLevel != LEVEL_SUBURBAN)
|
||||
// CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
|
||||
// CCollision::bAlreadyLoaded = true;
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// CStreaming::RequestBigBuildings(CGame::currLevel);
|
||||
// } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// CStreaming::RequestIslands(CGame::currLevel);
|
||||
// } else
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// } else { // low
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// CCollision::bAlreadyLoaded = false;
|
||||
// CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||
// CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||
// CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||
// CStreaming::RequestIslands(CGame::currLevel);
|
||||
// }
|
||||
//
|
||||
// CStreaming::LoadAllRequestedModels(true);
|
||||
// } else
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// SetHelperText(0);
|
||||
// SaveSettings();
|
||||
// }
|
||||
// break;
|
||||
//#endif
|
||||
case MENUACTION_AUDIOHW:
|
||||
{
|
||||
int selectedProvider = m_nPrefsAudio3DProviderIndex;
|
||||
|
@ -4935,40 +4868,6 @@ CMenuManager::ProcessButtonPresses(void)
|
|||
RestoreDefGraphics(FEOPTION_ACTION_SELECT);
|
||||
RestoreDefDisplay(FEOPTION_ACTION_SELECT);
|
||||
#endif
|
||||
//#ifdef NO_ISLAND_LOADING
|
||||
// m_DisplayIslandLoading = ISLAND_LOADING_LOW;
|
||||
// if (!m_bGameNotLoaded) {
|
||||
// if (m_DisplayIslandLoading > ISLAND_LOADING_LOW) {
|
||||
// if (m_DisplayIslandLoading == ISLAND_LOADING_HIGH)
|
||||
// CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
|
||||
// if (m_PrefsIslandLoading == ISLAND_LOADING_LOW) {
|
||||
// if (CGame::currLevel != LEVEL_INDUSTRIAL)
|
||||
// CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
|
||||
// if (CGame::currLevel != LEVEL_COMMERCIAL)
|
||||
// CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
|
||||
// if (CGame::currLevel != LEVEL_SUBURBAN)
|
||||
// CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
|
||||
// CCollision::bAlreadyLoaded = true;
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// CStreaming::RequestBigBuildings(CGame::currLevel);
|
||||
// } else if (m_PrefsIslandLoading == ISLAND_LOADING_HIGH) {
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// CStreaming::RequestIslands(CGame::currLevel);
|
||||
// } else
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// } else { // low
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
// CCollision::bAlreadyLoaded = false;
|
||||
// CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||
// CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||
// CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||
// CStreaming::RequestIslands(CGame::currLevel);
|
||||
// }
|
||||
//
|
||||
// CStreaming::LoadAllRequestedModels(true);
|
||||
// } else
|
||||
// m_PrefsIslandLoading = m_DisplayIslandLoading;
|
||||
//#endif // NO_ISLAND_LOADING
|
||||
SaveSettings();
|
||||
} else if ((m_nCurrScreen != MENUPAGE_SKIN_SELECT_OLD) && (m_nCurrScreen == MENUPAGE_CONTROLLER_PC)) {
|
||||
ControlsManager.MakeControllerActionsBlank();
|
||||
|
@ -5228,15 +5127,6 @@ CMenuManager::ProcessButtonPresses(void)
|
|||
}
|
||||
}
|
||||
break;
|
||||
//#ifdef NO_ISLAND_LOADING
|
||||
// case MENUACTION_ISLANDLOADING:
|
||||
// m_DisplayIslandLoading += changeValueBy;
|
||||
// if (m_DisplayIslandLoading > ISLAND_LOADING_HIGH)
|
||||
// m_DisplayIslandLoading = ISLAND_LOADING_LOW;
|
||||
// else if (m_DisplayIslandLoading < ISLAND_LOADING_LOW)
|
||||
// m_DisplayIslandLoading = ISLAND_LOADING_HIGH;
|
||||
// break;
|
||||
//#endif
|
||||
case MENUACTION_AUDIOHW:
|
||||
if (m_nPrefsAudio3DProviderIndex != -1) {
|
||||
m_nPrefsAudio3DProviderIndex += changeValueBy;
|
||||
|
|
|
@ -235,11 +235,11 @@ enum eMenuScreen
|
|||
MENUPAGE_KEYBOARD_CONTROLS = 55,
|
||||
MENUPAGE_MOUSE_CONTROLS = 56,
|
||||
MENUPAGE_MISSION_RETRY = 57,
|
||||
#ifdef MENU_MAP
|
||||
MENUPAGE_MAP = 58,
|
||||
#endif
|
||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||
|
||||
#ifdef MENU_MAP
|
||||
MENUPAGE_MAP,
|
||||
#endif
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
MENUPAGE_GRAPHICS_SETTINGS,
|
||||
#else
|
||||
|
@ -380,9 +380,6 @@ enum eMenuAction
|
|||
// MENUACTION_MIPMAPS,
|
||||
// MENUACTION_TEXTURE_FILTERING,
|
||||
//#endif
|
||||
//#ifdef NO_ISLAND_LOADING
|
||||
// MENUACTION_ISLANDLOADING,
|
||||
//#endif
|
||||
};
|
||||
|
||||
enum eCheckHover
|
||||
|
@ -718,7 +715,6 @@ public:
|
|||
ISLAND_LOADING_HIGH
|
||||
};
|
||||
|
||||
static int8 m_DisplayIslandLoading;
|
||||
static int8 m_PrefsIslandLoading;
|
||||
|
||||
#define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p)
|
||||
|
|
|
@ -203,20 +203,6 @@ static const char* FrontendFilenames[][2] =
|
|||
{"fe_radio9", "" },
|
||||
};
|
||||
|
||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||
bool CMenuManager::m_PrefsCutsceneBorders = true;
|
||||
#endif
|
||||
|
||||
#ifdef MULTISAMPLING
|
||||
int8 CMenuManager::m_nPrefsMSAALevel = 0;
|
||||
int8 CMenuManager::m_nDisplayMSAALevel = 0;
|
||||
#endif
|
||||
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
int8 CMenuManager::m_DisplayIslandLoading = ISLAND_LOADING_LOW;
|
||||
int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
|
||||
#endif
|
||||
|
||||
int32 CMenuManager::m_PrefsSfxVolume = 102;
|
||||
int32 CMenuManager::m_PrefsMusicVolume = 102;
|
||||
int32 CMenuManager::m_PrefsBrightness = 256;
|
||||
|
|
|
@ -160,31 +160,9 @@ public:
|
|||
static int32 m_PrefsLanguage;
|
||||
static CONTRCONFIG m_PrefsControllerConfig;
|
||||
static bool m_PrefsUseVibration;
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
enum
|
||||
{
|
||||
ISLAND_LOADING_LOW = 0,
|
||||
ISLAND_LOADING_MEDIUM,
|
||||
ISLAND_LOADING_HIGH
|
||||
};
|
||||
|
||||
static int8 m_DisplayIslandLoading;
|
||||
static int8 m_PrefsIslandLoading;
|
||||
|
||||
#define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p)
|
||||
#define ISLAND_LOADING_ISNT(p) if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_##p)
|
||||
#else
|
||||
#define ISLAND_LOADING_IS(p)
|
||||
#define ISLAND_LOADING_ISNT(p)
|
||||
#endif
|
||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||
static bool m_PrefsCutsceneBorders;
|
||||
#endif
|
||||
#ifdef MULTISAMPLING
|
||||
static int8 m_nPrefsMSAALevel;
|
||||
static int8 m_nDisplayMSAALevel;
|
||||
#endif
|
||||
|
||||
#ifdef GTA_PC
|
||||
bool m_bQuitGameNoCD;
|
||||
|
||||
|
|
|
@ -392,6 +392,9 @@ CMenuScreen aScreens[MENUPAGES] = {
|
|||
{ "FET_PAU", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
|
||||
MENUACTION_RESUME, "FEM_RES", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
|
||||
#ifdef MENU_MAP
|
||||
MENUACTION_CHANGEMENU, "FEG_MAP", SAVESLOT_NONE, MENUPAGE_MAP,
|
||||
#endif
|
||||
MENUACTION_CHANGEMENU, "FEP_STA", SAVESLOT_NONE, MENUPAGE_STATS,
|
||||
MENUACTION_CHANGEMENU, "FEP_BRI", SAVESLOT_NONE, MENUPAGE_BRIEFS,
|
||||
MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS,
|
||||
|
@ -436,6 +439,14 @@ CMenuScreen aScreens[MENUPAGES] = {
|
|||
},
|
||||
#endif
|
||||
|
||||
#ifdef MENU_MAP
|
||||
// MENUPAGE_MAP
|
||||
{ "FEG_MAP", 1, MENUPAGE_NONE, MENUPAGE_NONE, 2, 2,
|
||||
MENUACTION_UNK110, "", SAVESLOT_NONE, MENUPAGE_NONE, // to prevent cross/enter to go back
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
},
|
||||
#endif
|
||||
|
||||
// MENUPAGE_UNK
|
||||
{ "", 0, MENUPAGE_NONE, MENUPAGE_NONE, 0, 0,
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
#include "custompipes.h"
|
||||
#include "RwHelper.h"
|
||||
#include "Text.h"
|
||||
#include "Streaming.h"
|
||||
#include "FileLoader.h"
|
||||
#include "Collision.h"
|
||||
#include "ModelInfo.h"
|
||||
|
||||
// Menu screens array is at the bottom of the file.
|
||||
|
||||
|
@ -48,6 +52,12 @@
|
|||
#define DUALPASS_SELECTOR
|
||||
#endif
|
||||
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
#define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&CMenuManager::m_PrefsIslandLoading, "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) },
|
||||
#else
|
||||
#define ISLAND_LOADING_SELECTOR
|
||||
#endif
|
||||
|
||||
#ifdef EXTENDED_COLOURFILTER
|
||||
#define POSTFX_SELECTORS \
|
||||
MENUACTION_CFO_SELECT, "FED_CLF", { new CCFOSelect((int8*)&CPostFX::EffectSwitch, "ColourFilter", filterNames, ARRAY_SIZE(filterNames), false, nil) }, \
|
||||
|
@ -80,6 +90,18 @@ void RestoreDefGraphics(int8 action) {
|
|||
#ifdef MULTISAMPLING
|
||||
FrontEndMenuManager.m_nPrefsMSAALevel = FrontEndMenuManager.m_nDisplayMSAALevel = 0;
|
||||
#endif
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
if (FrontEndMenuManager.m_bGameNotLoaded) {
|
||||
FrontEndMenuManager.m_PrefsIslandLoading = FrontEndMenuManager.ISLAND_LOADING_LOW;
|
||||
CCollision::bAlreadyLoaded = false;
|
||||
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||
CStreaming::RequestIslands(CGame::currLevel);
|
||||
CStreaming::LoadAllRequestedModels(true);
|
||||
} else
|
||||
FrontEndMenuManager.m_PrefsIslandLoading = FrontEndMenuManager.ISLAND_LOADING_LOW;
|
||||
#endif
|
||||
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
|
||||
CMenuManager::m_PrefsFrameLimiter = true;
|
||||
CMenuManager::m_PrefsVsyncDisp = true;
|
||||
|
@ -120,6 +142,47 @@ void RestoreDefDisplay(int8 action) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
const char *islandLoadingOpts[] = { "FEM_LOW", "FEM_MED", "FEM_HIG" };
|
||||
void IslandLoadingAfterChange(int8 before, int8 after) {
|
||||
if (!FrontEndMenuManager.m_bGameNotLoaded) {
|
||||
if (after > FrontEndMenuManager.ISLAND_LOADING_LOW) {
|
||||
FrontEndMenuManager.m_PrefsIslandLoading = before; // calls below needs previous mode :shrug:
|
||||
|
||||
if (after == FrontEndMenuManager.ISLAND_LOADING_HIGH)
|
||||
CStreaming::RemoveIslandsNotUsed(LEVEL_GENERIC);
|
||||
if (before == FrontEndMenuManager.ISLAND_LOADING_LOW) {
|
||||
if (CGame::currLevel != LEVEL_INDUSTRIAL)
|
||||
CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
|
||||
if (CGame::currLevel != LEVEL_COMMERCIAL)
|
||||
CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
|
||||
if (CGame::currLevel != LEVEL_SUBURBAN)
|
||||
CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
|
||||
CCollision::bAlreadyLoaded = true;
|
||||
FrontEndMenuManager.m_PrefsIslandLoading = after;
|
||||
CStreaming::RequestBigBuildings(CGame::currLevel);
|
||||
|
||||
} else if (before == FrontEndMenuManager.ISLAND_LOADING_HIGH) {
|
||||
FrontEndMenuManager.m_PrefsIslandLoading = after;
|
||||
CStreaming::RequestIslands(CGame::currLevel);
|
||||
} else
|
||||
FrontEndMenuManager.m_PrefsIslandLoading = after;
|
||||
|
||||
} else { // low
|
||||
CCollision::bAlreadyLoaded = false;
|
||||
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||
CStreaming::RequestIslands(CGame::currLevel);
|
||||
}
|
||||
|
||||
CStreaming::LoadAllRequestedModels(true);
|
||||
}
|
||||
|
||||
FrontEndMenuManager.SetHelperText(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
void LangPolSelect(int8 action)
|
||||
{
|
||||
|
@ -761,6 +824,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
|
|||
#ifdef EXTENDED_PIPELINES
|
||||
PIPELINES_SELECTOR
|
||||
#endif
|
||||
ISLAND_LOADING_SELECTOR
|
||||
DUALPASS_SELECTOR
|
||||
MENUACTION_CFO_DYNAMIC, "FET_DEF", { new CCFODynamic(nil, nil, nil, RestoreDefGraphics) },
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
|
||||
|
@ -770,6 +834,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
|
|||
{ "FET_ADV", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS,
|
||||
new CCustomScreenLayout({MENUSPRITE_MAINMENU, 50, 0, 20, FONT_HEADING, FESCREEN_LEFT_ALIGN, true, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), nil,
|
||||
|
||||
ISLAND_LOADING_SELECTOR
|
||||
DUALPASS_SELECTOR
|
||||
CUTSCENE_BORDERS_TOGGLE
|
||||
FREE_CAM_TOGGLE
|
||||
|
|
|
@ -212,10 +212,10 @@ enum Config {
|
|||
# define TIMEBARS // print debug timers
|
||||
#endif
|
||||
|
||||
#define FIX_BUGS // fixes bugs that we've came across during reversing, TODO: use this more
|
||||
#define FIX_BUGS // fixes bugs that we've came across during reversing
|
||||
#define MORE_LANGUAGES // Add more translations to the game
|
||||
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
|
||||
#define LOAD_INI_SETTINGS
|
||||
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
|
||||
|
||||
// Rendering/display
|
||||
//#define EXTRA_MODEL_FLAGS // from mobile to optimize rendering
|
||||
|
@ -227,19 +227,11 @@ enum Config {
|
|||
#define PS2_ALPHA_TEST // emulate ps2 alpha test
|
||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||
#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
|
||||
#ifdef LIBRW
|
||||
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
||||
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
|
||||
#endif
|
||||
#define MULTISAMPLING // adds MSAA option
|
||||
|
||||
#ifdef LIBRW
|
||||
// these are not supported with librw yet
|
||||
# undef MULTISAMPLING
|
||||
#endif
|
||||
|
||||
// Particle
|
||||
//#define PC_PARTICLE
|
||||
|
@ -277,7 +269,13 @@ enum Config {
|
|||
//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
|
||||
//# define PS2_SAVE_DIALOG // PS2 style save dialog with transparent black box
|
||||
# define CUSTOM_FRONTEND_OPTIONS
|
||||
# define GRAPHICS_MENU_OPTIONS // otherwise Advanced Options menu will appear if Display is full
|
||||
|
||||
# ifdef CUSTOM_FRONTEND_OPTIONS
|
||||
# define GRAPHICS_MENU_OPTIONS // otherwise Advanced Options menu will appear if Display is full
|
||||
# define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
|
||||
# define CUTSCENE_BORDERS_SWITCH
|
||||
# define MULTISAMPLING // adds MSAA option
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Script
|
||||
|
@ -336,3 +334,8 @@ enum Config {
|
|||
#define PC_PARTICLE
|
||||
#define VC_PED_PORTS // To not process collisions always. But should be tested if that's really beneficial
|
||||
#endif
|
||||
|
||||
#ifdef LIBRW
|
||||
// these are not supported with librw yet
|
||||
# undef MULTISAMPLING
|
||||
#endif
|
||||
|
|
|
@ -102,6 +102,26 @@ float CheckAndReadIniFloat(const char *cat, const char *key, float original)
|
|||
return original;
|
||||
}
|
||||
|
||||
void CheckAndSaveIniInt(const char *cat, const char *key, int val, bool &changed)
|
||||
{
|
||||
char temp[10];
|
||||
if (atoi(cfg.get(cat, key, "xxx").c_str()) != val) { // if .ini doesn't have our key, compare with xxx and forcefully add it
|
||||
changed = true;
|
||||
sprintf(temp, "%u", val);
|
||||
cfg.set(cat, key, temp);
|
||||
}
|
||||
}
|
||||
|
||||
void CheckAndSaveIniFloat(const char *cat, const char *key, float val, bool &changed)
|
||||
{
|
||||
char temp[10];
|
||||
if (atof(cfg.get(cat, key, "xxx").c_str()) != val) { // if .ini doesn't have our key, compare with xxx and forcefully add it
|
||||
changed = true;
|
||||
sprintf(temp, "%f", val);
|
||||
cfg.set(cat, key, temp);
|
||||
}
|
||||
}
|
||||
|
||||
void LoadINISettings()
|
||||
{
|
||||
cfg.load_file("re3.ini");
|
||||
|
@ -156,11 +176,6 @@ void LoadINISettings()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
CMenuManager::m_PrefsIslandLoading = CheckAndReadIniInt("FrontendOptions", "NoIslandLoading", CMenuManager::m_PrefsIslandLoading);
|
||||
CMenuManager::m_DisplayIslandLoading = CMenuManager::m_PrefsIslandLoading;
|
||||
#endif
|
||||
|
||||
#ifdef EXTENDED_COLOURFILTER
|
||||
CPostFX::Intensity = CheckAndReadIniFloat("CustomPipesValues", "PostFXIntensity", CPostFX::Intensity);
|
||||
#endif
|
||||
|
@ -192,21 +207,22 @@ void SaveINISettings()
|
|||
break;
|
||||
|
||||
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
|
||||
if (atoi(cfg.get("FrontendOptions", option.m_CFO->save, "xxx").c_str()) != *option.m_CFO->value) { // if .ini doesn't have that key compare with xxx, so we can add it
|
||||
changed = true;
|
||||
sprintf(temp, "%u", *option.m_CFO->value);
|
||||
cfg.set("FrontendOptions", option.m_CFO->save, temp);
|
||||
}
|
||||
// Beware: CFO only supports saving uint8 right now
|
||||
CheckAndSaveIniInt("FrontendOptions", option.m_CFO->save, *option.m_CFO->value, changed);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
if (atoi(cfg.get("FrontendOptions", "NoIslandLoading", "xxx").c_str()) != CMenuManager::m_PrefsIslandLoading) {
|
||||
changed = true;
|
||||
sprintf(temp, "%u", CMenuManager::m_PrefsIslandLoading);
|
||||
cfg.set("FrontendOptions", "NoIslandLoading", temp);
|
||||
}
|
||||
|
||||
#ifdef EXTENDED_COLOURFILTER
|
||||
CheckAndSaveIniFloat("CustomPipesValues", "PostFXIntensity", CPostFX::Intensity, changed);
|
||||
#endif
|
||||
#ifdef EXTENDED_PIPELINES
|
||||
CheckAndSaveIniFloat("CustomPipesValues", "NeoVehicleShininess", CustomPipes::VehicleShininess, changed);
|
||||
CheckAndSaveIniFloat("CustomPipesValues", "NeoVehicleSpecularity", CustomPipes::VehicleSpecularity, changed);
|
||||
CheckAndSaveIniFloat("CustomPipesValues", "RimlightMult", CustomPipes::RimlightMult, changed);
|
||||
CheckAndSaveIniFloat("CustomPipesValues", "LightmapMult", CustomPipes::LightmapMult, changed);
|
||||
CheckAndSaveIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult, changed);
|
||||
#endif
|
||||
|
||||
if (changed)
|
||||
|
|
Loading…
Reference in a new issue