summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-19 22:44:08 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-19 22:44:08 +0200
commit9fd91e6250d2b52b92923bd801a826ce3f9ec45e (patch)
tree60272cfddde19d8baca635972df11ba780460f06
parentMerge remote-tracking branch 'origin/miami' into miami (diff)
parentupdate librw (diff)
downloadre3-9fd91e6250d2b52b92923bd801a826ce3f9ec45e.tar
re3-9fd91e6250d2b52b92923bd801a826ce3f9ec45e.tar.gz
re3-9fd91e6250d2b52b92923bd801a826ce3f9ec45e.tar.bz2
re3-9fd91e6250d2b52b92923bd801a826ce3f9ec45e.tar.lz
re3-9fd91e6250d2b52b92923bd801a826ce3f9ec45e.tar.xz
re3-9fd91e6250d2b52b92923bd801a826ce3f9ec45e.tar.zst
re3-9fd91e6250d2b52b92923bd801a826ce3f9ec45e.zip
-rw-r--r--src/control/Script.cpp37
-rw-r--r--src/core/Frontend.h6
-rw-r--r--src/core/Pad.cpp4
3 files changed, 23 insertions, 24 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 7694311f..fabc375b 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -10590,17 +10590,13 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CollectParameters(&m_nIp, 1);
CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0];
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
-#endif
+ ISLAND_LOADING_IS(LOW)
{
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
}
CCollision::SortOutCollisionAfterLoad();
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
-#endif
+ ISLAND_LOADING_ISNT(HIGH)
{
CStreaming::RequestIslands(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true);
@@ -11283,9 +11279,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0];
if (CGame::currLevel != CCollision::ms_collisionInMemory) {
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
-#endif
+ ISLAND_LOADING_IS(LOW)
{
DMAudio.SetEffectsFadeVol(0);
CPad::StopPadsShaking();
@@ -11293,29 +11287,24 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
DMAudio.Service();
}
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
-#endif
+
+ ISLAND_LOADING_IS(LOW)
{
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
}
CCollision::SortOutCollisionAfterLoad();
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
-#endif
+
+ ISLAND_LOADING_ISNT(HIGH)
CStreaming::RequestIslands(CGame::currLevel);
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
-#endif
+
+ ISLAND_LOADING_IS(LOW)
CStreaming::RequestBigBuildings(CGame::currLevel);
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
-#endif
+
+ ISLAND_LOADING_ISNT(HIGH)
CStreaming::LoadAllRequestedModels(true);
-#ifdef NO_ISLAND_LOADING
- if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
-#endif
+
+ ISLAND_LOADING_IS(LOW)
DMAudio.SetEffectsFadeVol(127);
}
CTimer::Update();
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 8b6fee87..858ad1f3 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -637,6 +637,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
void Initialise();
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index eb2b1e31..42b26c63 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"