summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-29 17:16:40 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-29 17:16:40 +0100
commitf5f153dbfdf7e913e86b25fc234b5374c362233d (patch)
tree5da8d686f09f0fe95814e55ee84f1d4741e413a9 /src/core
parentEven more fixes & shorten quit screen (diff)
parentfix NewRender typo (diff)
downloadre3-f5f153dbfdf7e913e86b25fc234b5374c362233d.tar
re3-f5f153dbfdf7e913e86b25fc234b5374c362233d.tar.gz
re3-f5f153dbfdf7e913e86b25fc234b5374c362233d.tar.bz2
re3-f5f153dbfdf7e913e86b25fc234b5374c362233d.tar.lz
re3-f5f153dbfdf7e913e86b25fc234b5374c362233d.tar.xz
re3-f5f153dbfdf7e913e86b25fc234b5374c362233d.tar.zst
re3-f5f153dbfdf7e913e86b25fc234b5374c362233d.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CdStreamPosix.cpp12
-rw-r--r--src/core/Game.cpp4
-rw-r--r--src/core/re3.cpp7
3 files changed, 18 insertions, 5 deletions
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp
index 8a27665a..e18280e5 100644
--- a/src/core/CdStreamPosix.cpp
+++ b/src/core/CdStreamPosix.cpp
@@ -76,7 +76,7 @@ CdStreamInitThread(void)
gChannelRequestQ.tail = 0;
gChannelRequestQ.size = gNumChannels + 1;
ASSERT(gChannelRequestQ.items != nil );
- gCdStreamSema = sem_open("/semaphore_cd_stream", O_CREAT, 0644, 1);
+ gCdStreamSema = sem_open("/semaphore_cd_stream", O_CREAT, 0644, 0);
if (gCdStreamSema == SEM_FAILED) {
@@ -91,7 +91,7 @@ CdStreamInitThread(void)
for ( int32 i = 0; i < gNumChannels; i++ )
{
sprintf(semName,"/semaphore_done%d",i);
- gpReadInfo[i].pDoneSemaphore = sem_open(semName, O_CREAT, 0644, 1);
+ gpReadInfo[i].pDoneSemaphore = sem_open(semName, O_CREAT, 0644, 0);
if (gpReadInfo[i].pDoneSemaphore == SEM_FAILED)
{
@@ -102,7 +102,7 @@ CdStreamInitThread(void)
#ifdef ONE_THREAD_PER_CHANNEL
sprintf(semName,"/semaphore_start%d",i);
- gpReadInfo[i].pStartSemaphore = sem_open(semName, O_CREAT, 0644, 1);
+ gpReadInfo[i].pStartSemaphore = sem_open(semName, O_CREAT, 0644, 0);
if (gpReadInfo[i].pStartSemaphore == SEM_FAILED)
{
@@ -171,6 +171,7 @@ CdStreamInit(int32 numChannels)
gNumImages = 0;
gNumChannels = numChannels;
+ ASSERT( gNumChannels != 0 );
gpReadInfo = (CdReadInfo *)calloc(numChannels, sizeof(CdReadInfo));
ASSERT( gpReadInfo != nil );
@@ -398,7 +399,12 @@ void *CdStreamThread(void *param)
#ifndef ONE_THREAD_PER_CHANNEL
while (gCdStreamThreadStatus != 2) {
sem_wait(gCdStreamSema);
+
int32 channel = GetFirstInQueue(&gChannelRequestQ);
+
+ // spurious wakeup
+ if (channel == -1)
+ continue;
#else
int channel = *((int*)param);
while (gpReadInfo[channel].nThreadStatus != 2){
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 83d30bb4..ed9d67f4 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -591,7 +591,6 @@ bool CGame::ShutDown(void)
gPhoneInfo.Shutdown();
CWeapon::ShutdownWeapons();
CPedType::Shutdown();
- CMBlur::MotionBlurClose();
for (int32 i = 0; i < NUMPLAYERS; i++)
{
@@ -617,7 +616,7 @@ bool CGame::ShutDown(void)
CStreaming::Shutdown();
CTxdStore::GameShutdown();
CCollision::Shutdown();
- CWaterLevel::DestroyWavyAtomic();
+ CWaterLevel::Shutdown();
CRubbish::Shutdown();
CClouds::Shutdown();
CShadows::Shutdown();
@@ -626,6 +625,7 @@ bool CGame::ShutDown(void)
CWeaponEffects::Shutdown();
CParticle::Shutdown();
CPools::ShutDown();
+ CHud::ReInitialise();
CTxdStore::RemoveTxdSlot(gameTxdSlot);
CMBlur::MotionBlurClose();
CdStreamRemoveImages();
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index d0006fd3..87aca59c 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -406,6 +406,10 @@ bool LoadINISettings()
ReadIniIfExists("CustomPipesValues", "LightmapMult", &CustomPipes::LightmapMult);
ReadIniIfExists("CustomPipesValues", "GlossMult", &CustomPipes::GlossMult);
#endif
+ ReadIniIfExists("Rendering", "BackfaceCulling", &gBackfaceCulling);
+#ifdef NEW_RENDERER
+ ReadIniIfExists("Rendering", "NewRenderer", &gbNewRenderer);
+#endif
#ifdef PROPER_SCALING
ReadIniIfExists("Draw", "ProperScaling", &CDraw::ms_bProperScaling);
@@ -495,6 +499,9 @@ void SaveINISettings()
StoreIni("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
#endif
StoreIni("Rendering", "BackfaceCulling", gBackfaceCulling);
+#ifdef NEW_RENDERER
+ StoreIni("Rendering", "NewRenderer", gbNewRenderer);
+#endif
#ifdef PROPER_SCALING
StoreIni("Draw", "ProperScaling", CDraw::ms_bProperScaling);