diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Collision.cpp | 33 | ||||
-rw-r--r-- | src/core/Frontend.h | 6 | ||||
-rw-r--r-- | src/core/Pad.cpp | 4 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 8 |
4 files changed, 26 insertions, 25 deletions
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp index bd0dfb92..d8603cd8 100644 --- a/src/core/Collision.cpp +++ b/src/core/Collision.cpp @@ -521,10 +521,12 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange) } if (level == CGame::currLevel || forceChange) { +#ifdef FIX_BUGS + CTimer::Suspend(); +#else CTimer::Stop(); -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW) #endif + ISLAND_LOADING_IS(LOW) { DMAudio.SetEffectsFadeVol(0); CPad::StopPadsShaking(); @@ -534,17 +536,13 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange) CPopulation::DealWithZoneChange(ms_collisionInMemory, CGame::currLevel, false); -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH) -#endif + ISLAND_LOADING_ISNT(HIGH) { 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 + ISLAND_LOADING_IS(LOW) { CStreaming::RemoveBigBuildings(LEVEL_INDUSTRIAL); CStreaming::RemoveBigBuildings(LEVEL_COMMERCIAL); @@ -557,9 +555,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange) ms_collisionInMemory = CGame::currLevel; CReplay::EmptyReplayBuffer(); -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW) -#endif + ISLAND_LOADING_IS(LOW) { if (CGame::currLevel != LEVEL_GENERIC) LoadSplash(GetLevelSplashScreen(CGame::currLevel)); @@ -572,18 +568,19 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange) CStreaming::RequestIslands(CGame::currLevel); #endif CStreaming::LoadAllRequestedModels(true); -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW) -#endif + + ISLAND_LOADING_IS(LOW) { CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel); CGame::TidyUpMemory(true, true); } +#ifdef FIX_BUGS + CTimer::Resume(); +#else CTimer::Update(); -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW) #endif + ISLAND_LOADING_IS(LOW) DMAudio.SetEffectsFadeVol(127); } } @@ -596,9 +593,7 @@ CCollision::SortOutCollisionAfterLoad(void) { if(ms_collisionInMemory == CGame::currLevel) return; -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW) -#endif + ISLAND_LOADING_IS(LOW) CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel); if (CGame::currLevel != LEVEL_GENERIC) { diff --git a/src/core/Frontend.h b/src/core/Frontend.h index d631a7d1..cf112b3d 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -635,6 +635,12 @@ public: 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 public: diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index d4ffc5ea..3b46a110 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -11,7 +11,11 @@ #include "platform.h" #ifdef XINPUT #include <xinput.h> +#if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1) #pragma comment( lib, "Xinput9_1_0.lib" ) +#else +#pragma comment( lib, "Xinput.lib" ) +#endif #endif #include "Pad.h" diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 089e8b23..1892bf57 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -743,9 +743,7 @@ CStreaming::RequestBigBuildings(eLevelName level) void CStreaming::RequestIslands(eLevelName level) { -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH) -#endif + ISLAND_LOADING_ISNT(HIGH) switch(level){ case LEVEL_INDUSTRIAL: RequestModel(islandLODcomInd, BIGBUILDINGFLAGS); @@ -946,9 +944,7 @@ CStreaming::RemoveBuildings(eLevelName level) void CStreaming::RemoveUnusedBigBuildings(eLevelName level) { -#ifdef NO_ISLAND_LOADING - if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW) -#endif + ISLAND_LOADING_IS(LOW) { if (level != LEVEL_INDUSTRIAL) RemoveBigBuildings(LEVEL_INDUSTRIAL); |