mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 19:14:15 +01:00
Island loading cleanup and fix
This commit is contained in:
parent
c559b71bc9
commit
4d1cfb7214
@ -10017,17 +10017,13 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
|
|||||||
CollectParameters(&m_nIp, 1);
|
CollectParameters(&m_nIp, 1);
|
||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
CGame::currLevel = (eLevelName)ScriptParams[0];
|
CGame::currLevel = (eLevelName)ScriptParams[0];
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||||
}
|
}
|
||||||
CCollision::SortOutCollisionAfterLoad();
|
CCollision::SortOutCollisionAfterLoad();
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_ISNT(HIGH)
|
||||||
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::RequestIslands(CGame::currLevel);
|
CStreaming::RequestIslands(CGame::currLevel);
|
||||||
CStreaming::LoadAllRequestedModels(true);
|
CStreaming::LoadAllRequestedModels(true);
|
||||||
@ -10647,9 +10643,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
CGame::currLevel = (eLevelName)ScriptParams[0];
|
CGame::currLevel = (eLevelName)ScriptParams[0];
|
||||||
if (CGame::currLevel != CCollision::ms_collisionInMemory) {
|
if (CGame::currLevel != CCollision::ms_collisionInMemory) {
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DMAudio.SetEffectsFadeVol(0);
|
DMAudio.SetEffectsFadeVol(0);
|
||||||
CPad::StopPadsShaking();
|
CPad::StopPadsShaking();
|
||||||
@ -10657,29 +10651,24 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||||||
DMAudio.Service();
|
DMAudio.Service();
|
||||||
}
|
}
|
||||||
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
|
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
ISLAND_LOADING_IS(LOW)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||||
}
|
}
|
||||||
CCollision::SortOutCollisionAfterLoad();
|
CCollision::SortOutCollisionAfterLoad();
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
ISLAND_LOADING_ISNT(HIGH)
|
||||||
#endif
|
|
||||||
CStreaming::RequestIslands(CGame::currLevel);
|
CStreaming::RequestIslands(CGame::currLevel);
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
ISLAND_LOADING_IS(LOW)
|
||||||
#endif
|
|
||||||
CStreaming::RequestBigBuildings(CGame::currLevel);
|
CStreaming::RequestBigBuildings(CGame::currLevel);
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
ISLAND_LOADING_ISNT(HIGH)
|
||||||
#endif
|
|
||||||
CStreaming::LoadAllRequestedModels(true);
|
CStreaming::LoadAllRequestedModels(true);
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
ISLAND_LOADING_IS(LOW)
|
||||||
#endif
|
|
||||||
DMAudio.SetEffectsFadeVol(127);
|
DMAudio.SetEffectsFadeVol(127);
|
||||||
}
|
}
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
|
@ -521,10 +521,12 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (level == CGame::currLevel || forceChange) {
|
if (level == CGame::currLevel || forceChange) {
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
CTimer::Suspend();
|
||||||
|
#else
|
||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
#endif
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
{
|
{
|
||||||
DMAudio.SetEffectsFadeVol(0);
|
DMAudio.SetEffectsFadeVol(0);
|
||||||
CPad::StopPadsShaking();
|
CPad::StopPadsShaking();
|
||||||
@ -534,17 +536,13 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
|||||||
|
|
||||||
CPopulation::DealWithZoneChange(ms_collisionInMemory, CGame::currLevel, false);
|
CPopulation::DealWithZoneChange(ms_collisionInMemory, CGame::currLevel, false);
|
||||||
|
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_ISNT(HIGH)
|
||||||
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
|
CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
|
||||||
CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
|
CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
|
||||||
CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
|
CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
|
||||||
}
|
}
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::RemoveBigBuildings(LEVEL_INDUSTRIAL);
|
CStreaming::RemoveBigBuildings(LEVEL_INDUSTRIAL);
|
||||||
CStreaming::RemoveBigBuildings(LEVEL_COMMERCIAL);
|
CStreaming::RemoveBigBuildings(LEVEL_COMMERCIAL);
|
||||||
@ -557,9 +555,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
|||||||
|
|
||||||
ms_collisionInMemory = CGame::currLevel;
|
ms_collisionInMemory = CGame::currLevel;
|
||||||
CReplay::EmptyReplayBuffer();
|
CReplay::EmptyReplayBuffer();
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (CGame::currLevel != LEVEL_GENERIC)
|
if (CGame::currLevel != LEVEL_GENERIC)
|
||||||
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
|
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
|
||||||
@ -572,18 +568,19 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
|||||||
CStreaming::RequestIslands(CGame::currLevel);
|
CStreaming::RequestIslands(CGame::currLevel);
|
||||||
#endif
|
#endif
|
||||||
CStreaming::LoadAllRequestedModels(true);
|
CStreaming::LoadAllRequestedModels(true);
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
ISLAND_LOADING_IS(LOW)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel);
|
CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel);
|
||||||
|
|
||||||
CGame::TidyUpMemory(true, true);
|
CGame::TidyUpMemory(true, true);
|
||||||
}
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
CTimer::Resume();
|
||||||
|
#else
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
#ifdef NO_ISLAND_LOADING
|
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
#endif
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
DMAudio.SetEffectsFadeVol(127);
|
DMAudio.SetEffectsFadeVol(127);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -596,9 +593,7 @@ CCollision::SortOutCollisionAfterLoad(void)
|
|||||||
{
|
{
|
||||||
if(ms_collisionInMemory == CGame::currLevel)
|
if(ms_collisionInMemory == CGame::currLevel)
|
||||||
return;
|
return;
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||||
|
|
||||||
if (CGame::currLevel != LEVEL_GENERIC) {
|
if (CGame::currLevel != LEVEL_GENERIC) {
|
||||||
|
@ -635,6 +635,12 @@ public:
|
|||||||
|
|
||||||
static int8 m_DisplayIslandLoading;
|
static int8 m_DisplayIslandLoading;
|
||||||
static int8 m_PrefsIslandLoading;
|
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
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -11,7 +11,11 @@
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#ifdef XINPUT
|
#ifdef XINPUT
|
||||||
#include <xinput.h>
|
#include <xinput.h>
|
||||||
|
#if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1)
|
||||||
#pragma comment( lib, "Xinput9_1_0.lib" )
|
#pragma comment( lib, "Xinput9_1_0.lib" )
|
||||||
|
#else
|
||||||
|
#pragma comment( lib, "Xinput.lib" )
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
|
@ -743,9 +743,7 @@ CStreaming::RequestBigBuildings(eLevelName level)
|
|||||||
void
|
void
|
||||||
CStreaming::RequestIslands(eLevelName level)
|
CStreaming::RequestIslands(eLevelName level)
|
||||||
{
|
{
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_ISNT(HIGH)
|
||||||
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
|
||||||
#endif
|
|
||||||
switch(level){
|
switch(level){
|
||||||
case LEVEL_INDUSTRIAL:
|
case LEVEL_INDUSTRIAL:
|
||||||
RequestModel(islandLODcomInd, BIGBUILDINGFLAGS);
|
RequestModel(islandLODcomInd, BIGBUILDINGFLAGS);
|
||||||
@ -946,9 +944,7 @@ CStreaming::RemoveBuildings(eLevelName level)
|
|||||||
void
|
void
|
||||||
CStreaming::RemoveUnusedBigBuildings(eLevelName level)
|
CStreaming::RemoveUnusedBigBuildings(eLevelName level)
|
||||||
{
|
{
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (level != LEVEL_INDUSTRIAL)
|
if (level != LEVEL_INDUSTRIAL)
|
||||||
RemoveBigBuildings(LEVEL_INDUSTRIAL);
|
RemoveBigBuildings(LEVEL_INDUSTRIAL);
|
||||||
|
@ -218,9 +218,7 @@ CModelInfo::IsBikeModel(int32 id)
|
|||||||
void
|
void
|
||||||
CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level)
|
CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level)
|
||||||
{
|
{
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CBaseModelInfo *mi;
|
CBaseModelInfo *mi;
|
||||||
|
@ -562,17 +562,13 @@ RestoreForStartLoad()
|
|||||||
ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().x);
|
ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().x);
|
||||||
ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().y);
|
ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().y);
|
||||||
ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().z);
|
ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().z);
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||||
}
|
}
|
||||||
CCollision::SortOutCollisionAfterLoad();
|
CCollision::SortOutCollisionAfterLoad();
|
||||||
#ifdef NO_ISLAND_LOADING
|
ISLAND_LOADING_IS(LOW)
|
||||||
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStreaming::RequestBigBuildings(CGame::currLevel);
|
CStreaming::RequestBigBuildings(CGame::currLevel);
|
||||||
CStreaming::LoadAllRequestedModels(false);
|
CStreaming::LoadAllRequestedModels(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user