summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Collision.cpp112
-rw-r--r--src/core/Collision.h3
-rw-r--r--src/core/Frontend.cpp183
-rw-r--r--src/core/Frontend.h18
-rw-r--r--src/core/MenuScreens.cpp16
-rw-r--r--src/core/Streaming.cpp40
-rw-r--r--src/core/config.h2
7 files changed, 317 insertions, 57 deletions
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp
index 6522ff1c..bd0dfb92 100644
--- a/src/core/Collision.cpp
+++ b/src/core/Collision.cpp
@@ -21,6 +21,7 @@
#include "SurfaceTable.h"
#include "Lines.h"
#include "Collision.h"
+#include "Frontend.h"
// TODO: where do these go?
@@ -519,74 +520,101 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
}
}
- if(level == CGame::currLevel || forceChange){
+ if (level == CGame::currLevel || forceChange) {
CTimer::Stop();
-#ifndef NO_ISLAND_LOADING
- DMAudio.SetEffectsFadeVol(0);
- CPad::StopPadsShaking();
- LoadCollisionScreen(CGame::currLevel);
- DMAudio.Service();
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ {
+ DMAudio.SetEffectsFadeVol(0);
+ CPad::StopPadsShaking();
+ LoadCollisionScreen(CGame::currLevel);
+ DMAudio.Service();
+ }
CPopulation::DealWithZoneChange(ms_collisionInMemory, CGame::currLevel, false);
-#ifndef NO_ISLAND_LOADING
- CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
- CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
- CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
- CStreaming::RemoveBigBuildings(LEVEL_INDUSTRIAL);
- CStreaming::RemoveBigBuildings(LEVEL_COMMERCIAL);
- CStreaming::RemoveBigBuildings(LEVEL_SUBURBAN);
- CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
- CStreaming::RemoveUnusedModelsInLoadedList();
- CGame::TidyUpMemory(true, true);
- CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
+#endif
+ {
+ CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
+ CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
+ CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
+ }
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ {
+ CStreaming::RemoveBigBuildings(LEVEL_INDUSTRIAL);
+ CStreaming::RemoveBigBuildings(LEVEL_COMMERCIAL);
+ CStreaming::RemoveBigBuildings(LEVEL_SUBURBAN);
+ CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
+ CStreaming::RemoveUnusedModelsInLoadedList();
+ CGame::TidyUpMemory(true, true);
+ CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
+ }
ms_collisionInMemory = CGame::currLevel;
CReplay::EmptyReplayBuffer();
-#ifndef NO_ISLAND_LOADING
- if(CGame::currLevel != LEVEL_GENERIC)
- LoadSplash(GetLevelSplashScreen(CGame::currLevel));
- CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
- CStreaming::RemoveUnusedBuildings(CGame::currLevel);
- CStreaming::RequestBigBuildings(CGame::currLevel);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
+#endif
+ {
+ if (CGame::currLevel != LEVEL_GENERIC)
+ LoadSplash(GetLevelSplashScreen(CGame::currLevel));
+ CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
+ CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+ CStreaming::RequestBigBuildings(CGame::currLevel);
+ }
+#ifdef NO_ISLAND_LOADING
+ else if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_MEDIUM)
+ CStreaming::RequestIslands(CGame::currLevel);
#endif
CStreaming::LoadAllRequestedModels(true);
-#ifndef NO_ISLAND_LOADING
- CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel);
-
- CGame::TidyUpMemory(true, true);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ {
+ CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel);
+
+ CGame::TidyUpMemory(true, true);
+ }
CTimer::Update();
-#ifndef NO_ISLAND_LOADING
- DMAudio.SetEffectsFadeVol(127);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ DMAudio.SetEffectsFadeVol(127);
}
}
+#ifdef NO_ISLAND_LOADING
+bool CCollision::bAlreadyLoaded = false;
+#endif
void
CCollision::SortOutCollisionAfterLoad(void)
{
if(ms_collisionInMemory == CGame::currLevel)
return;
-#ifndef NO_ISLAND_LOADING
- CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
+
if (CGame::currLevel != LEVEL_GENERIC) {
#ifdef NO_ISLAND_LOADING
- static bool bAlreadyLoaded = false;
- if (bAlreadyLoaded) {
- ms_collisionInMemory = CGame::currLevel;
- return;
- }
- bAlreadyLoaded = true;
- CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
- CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
- CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
-#else
- CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
+ if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_LOW) {
+ if (bAlreadyLoaded) {
+ ms_collisionInMemory = CGame::currLevel;
+ return;
+ }
+ bAlreadyLoaded = true;
+ CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
+ CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
+ CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
+ } else
#endif
+ CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
if(!CGame::playingIntro)
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
}
diff --git a/src/core/Collision.h b/src/core/Collision.h
index d7498ac0..da94dd34 100644
--- a/src/core/Collision.h
+++ b/src/core/Collision.h
@@ -212,6 +212,9 @@ class CCollision
public:
static eLevelName ms_collisionInMemory;
static CLinkList<CColModel*> ms_colModelCache;
+#ifdef NO_ISLAND_LOADING
+ static bool bAlreadyLoaded;
+#endif
static void Init(void);
static void Shutdown(void);
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index df65f94f..0c813cbb 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -122,6 +122,11 @@ 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
+
char CMenuManager::m_PrefsSkinFile[256] = DEFAULT_SKIN_NAME;
int32 CMenuManager::m_KeyPressedCode = -1;
@@ -155,6 +160,10 @@ int32 MouseButtonJustClicked;
int32 JoyButtonJustClicked;
//int32 *pControlTemp = 0;
+#ifdef PS2_ALPHA_TEST
+extern bool gPS2alphaTest;
+#endif
+
#ifndef MASTER
bool CMenuManager::m_PrefsMarketing = false;
bool CMenuManager::m_PrefsDisableTutorials = false;
@@ -1190,6 +1199,21 @@ CMenuManager::Draw()
}
break;
#endif
+#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");
@@ -1245,6 +1269,11 @@ CMenuManager::Draw()
rightText = TheText.Get(m_PrefsCutsceneBorders ? "FEM_ON" : "FEM_OFF");
break;
#endif
+#ifdef PS2_ALPHA_TEST
+ case MENUACTION_PS2_ALPHA_TEST:
+ rightText = TheText.Get(gPS2alphaTest ? "FEM_ON" : "FEM_OFF");
+ break;
+#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
case MENUACTION_TRIGGERFUNC:
FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
@@ -1390,6 +1419,12 @@ CMenuManager::Draw()
ResetHelperText();
}
#endif
+#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);
@@ -1410,6 +1445,12 @@ CMenuManager::Draw()
SetHelperText(1);
}
#endif
+#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
&& m_nCurrScreen == MENUPAGE_SOUND_SETTINGS && m_nPrefsAudio3DProviderIndex != -1) {
@@ -3333,6 +3374,13 @@ CMenuManager::LoadSettings()
CFileMgr::Read(fileHandle, (char *)&m_nPrefsMSAALevel, 1);
m_nDisplayMSAALevel = m_nPrefsMSAALevel;
#endif
+#ifdef NO_ISLAND_LOADING
+ CFileMgr::Read(fileHandle, (char *)&CMenuManager::m_PrefsIslandLoading, 1);
+ CMenuManager::m_DisplayIslandLoading = CMenuManager::m_PrefsIslandLoading;
+#endif
+#ifdef PS2_ALPHA_TEST
+ CFileMgr::Read(fileHandle, (char *)&gPS2alphaTest, 1);
+#endif // PS2_ALPHA_TEST
}
}
@@ -3432,6 +3480,12 @@ CMenuManager::SaveSettings()
#ifdef MULTISAMPLING
CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_nPrefsMSAALevel, 1);
#endif
+#ifdef NO_ISLAND_LOADING
+ CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_PrefsIslandLoading, 1);
+#endif
+#ifdef PS2_ALPHA_TEST
+ CFileMgr::Write(fileHandle, (char *)&gPS2alphaTest, 1);
+#endif // PS2_ALPHA_TEST
}
CFileMgr::CloseFile(fileHandle);
@@ -4770,6 +4824,45 @@ CMenuManager::ProcessButtonPresses(void)
}
break;
#endif
+#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;
@@ -4842,6 +4935,43 @@ CMenuManager::ProcessButtonPresses(void)
#ifdef CUTSCENE_BORDERS_SWITCH
m_PrefsCutsceneBorders = true;
#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
+#ifdef PS2_ALPHA_TEST
+ gPS2alphaTest = false;
+#endif // PS2_ALPHA_TEST
SaveSettings();
#else
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
@@ -4870,6 +5000,43 @@ CMenuManager::ProcessButtonPresses(void)
#else
CMBlur::BlurOn = true;
#endif // GTA3_1_1_PATCH
+#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
+#ifdef PS2_ALPHA_TEST
+ gPS2alphaTest = false;
+#endif // PS2_ALPHA_TEST
SaveSettings();
#endif // GRAPHICS_MENU_OPTIONS
} else if ((m_nCurrScreen != MENUPAGE_SKIN_SELECT_OLD) && (m_nCurrScreen == MENUPAGE_CONTROLLER_PC)) {
@@ -5156,6 +5323,15 @@ CMenuManager::ProcessButtonPresses(void)
}
break;
#endif
+#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;
@@ -5328,6 +5504,13 @@ CMenuManager::ProcessOnOffMenuOptions()
SaveSettings();
break;
#endif
+#ifdef PS2_ALPHA_TEST
+ case MENUACTION_PS2_ALPHA_TEST:
+ gPS2alphaTest = !gPS2alphaTest;
+ DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
+ SaveSettings();
+ break;
+#endif
}
}
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index c9af7c10..dd82507e 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -372,6 +372,12 @@ enum eMenuAction
#ifdef MULTISAMPLING
MENUACTION_MULTISAMPLING,
#endif
+#ifdef NO_ISLAND_LOADING
+ MENUACTION_ISLANDLOADING,
+#endif
+#ifdef PS2_ALPHA_TEST
+ MENUACTION_PS2_ALPHA_TEST,
+#endif
#ifdef CUTSCENE_BORDERS_SWITCH
MENUACTION_CUTSCENEBORDERS,
#endif
@@ -622,6 +628,18 @@ public:
void PrintMap();
#endif
+#ifdef NO_ISLAND_LOADING
+ enum
+ {
+ ISLAND_LOADING_LOW = 0,
+ ISLAND_LOADING_MEDIUM,
+ ISLAND_LOADING_HIGH
+ };
+
+ static int8 m_DisplayIslandLoading;
+ static int8 m_PrefsIslandLoading;
+#endif
+
public:
static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2);
static void CentreMousePointer();
diff --git a/src/core/MenuScreens.cpp b/src/core/MenuScreens.cpp
index c313944c..02c004b3 100644
--- a/src/core/MenuScreens.cpp
+++ b/src/core/MenuScreens.cpp
@@ -30,6 +30,18 @@
#define MENU_MULTISAMPLING(screen)
#endif
+#ifdef NO_ISLAND_LOADING
+#define MENU_ISLAND_LOADING(screen) MENUACTION_ISLANDLOADING, "FEM_ISL", SAVESLOT_NONE, screen,
+#else
+#define MENU_ISLAND_LOADING(screen)
+#endif
+
+#ifdef PS2_ALPHA_TEST
+#define MENU_PS2_ALPHA_TEST(screen) MENUACTION_PS2_ALPHA_TEST, "FEM_2PR", SAVESLOT_NONE, screen,
+#else
+#define MENU_PS2_ALPHA_TEST(screen)
+#endif
+
CMenuScreen aScreens[] = {
// MENUPAGE_NONE = 0
{ "", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, },
@@ -84,6 +96,8 @@ CMenuScreen aScreens[] = {
MENU_CUTSCENE_BORDERS_SWITCH(MENUPAGE_DISPLAY_SETTINGS)
MENU_MIPMAPS(MENUPAGE_DISPLAY_SETTINGS)
MENU_TEXTURE_FILTERING(MENUPAGE_DISPLAY_SETTINGS)
+ MENU_ISLAND_LOADING(MENUPAGE_DISPLAY_SETTINGS)
+ MENU_PS2_ALPHA_TEST(MENUPAGE_DISPLAY_SETTINGS)
MENU_MULTISAMPLING(MENUPAGE_DISPLAY_SETTINGS)
MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS,
MENU_IMPROVED_VIDEOMODE(MENUPAGE_DISPLAY_SETTINGS)
@@ -502,6 +516,8 @@ CMenuScreen aScreens[] = {
MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
MENU_MIPMAPS(MENUPAGE_GRAPHICS_SETTINGS)
MENU_TEXTURE_FILTERING(MENUPAGE_GRAPHICS_SETTINGS)
+ MENU_ISLAND_LOADING(MENUPAGE_GRAPHICS_SETTINGS)
+ MENU_PS2_ALPHA_TEST(MENUPAGE_GRAPHICS_SETTINGS)
MENU_MULTISAMPLING(MENUPAGE_GRAPHICS_SETTINGS)
MENU_IMPROVED_VIDEOMODE(MENUPAGE_GRAPHICS_SETTINGS)
MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index 40189844..089e8b23 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -32,6 +32,7 @@
#include "Replay.h"
#endif
#include "main.h"
+#include "Frontend.h"
bool CStreaming::ms_disableStreaming;
bool CStreaming::ms_bLoadingBigModel;
@@ -727,7 +728,9 @@ CStreaming::RequestBigBuildings(eLevelName level)
for(i = n; i >= 0; i--){
b = CPools::GetBuildingPool()->GetSlot(i);
if(b && b->bIsBIGBuilding
-#ifndef NO_ISLAND_LOADING
+#ifdef NO_ISLAND_LOADING
+ && ((CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_LOW) || (b->m_level == level))
+#else
&& b->m_level == level
#endif
)
@@ -740,7 +743,9 @@ CStreaming::RequestBigBuildings(eLevelName level)
void
CStreaming::RequestIslands(eLevelName level)
{
-#ifndef NO_ISLAND_LOADING
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
+#endif
switch(level){
case LEVEL_INDUSTRIAL:
RequestModel(islandLODcomInd, BIGBUILDINGFLAGS);
@@ -756,7 +761,6 @@ CStreaming::RequestIslands(eLevelName level)
break;
default: break;
}
-#endif
}
void
@@ -942,14 +946,17 @@ CStreaming::RemoveBuildings(eLevelName level)
void
CStreaming::RemoveUnusedBigBuildings(eLevelName level)
{
-#ifndef NO_ISLAND_LOADING
- if(level != LEVEL_INDUSTRIAL)
- RemoveBigBuildings(LEVEL_INDUSTRIAL);
- if(level != LEVEL_COMMERCIAL)
- RemoveBigBuildings(LEVEL_COMMERCIAL);
- if(level != LEVEL_SUBURBAN)
- RemoveBigBuildings(LEVEL_SUBURBAN);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ {
+ if (level != LEVEL_INDUSTRIAL)
+ RemoveBigBuildings(LEVEL_INDUSTRIAL);
+ if (level != LEVEL_COMMERCIAL)
+ RemoveBigBuildings(LEVEL_COMMERCIAL);
+ if (level != LEVEL_SUBURBAN)
+ RemoveBigBuildings(LEVEL_SUBURBAN);
+ }
RemoveIslandsNotUsed(level);
}
@@ -969,7 +976,15 @@ DeleteIsland(CEntity *island)
void
CStreaming::RemoveIslandsNotUsed(eLevelName level)
{
-#ifndef NO_ISLAND_LOADING
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_HIGH) {
+ DeleteIsland(pIslandLODindustEntity);
+ DeleteIsland(pIslandLODcomIndEntity);
+ DeleteIsland(pIslandLODcomSubEntity);
+ DeleteIsland(pIslandLODsubIndEntity);
+ DeleteIsland(pIslandLODsubComEntity);
+ } else
+#endif
switch(level){
case LEVEL_INDUSTRIAL:
DeleteIsland(pIslandLODindustEntity);
@@ -987,16 +1002,13 @@ CStreaming::RemoveIslandsNotUsed(eLevelName level)
DeleteIsland(pIslandLODcomIndEntity);
break;
default:
-#endif // !NO_ISLAND_LOADING
DeleteIsland(pIslandLODindustEntity);
DeleteIsland(pIslandLODcomIndEntity);
DeleteIsland(pIslandLODcomSubEntity);
DeleteIsland(pIslandLODsubIndEntity);
DeleteIsland(pIslandLODsubComEntity);
-#ifndef NO_ISLAND_LOADING
break;
}
-#endif // !NO_ISLAND_LOADING
}
void
diff --git a/src/core/config.h b/src/core/config.h
index 081d9b39..6aa41e6b 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -205,7 +205,7 @@ 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 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
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)