mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 08:00:01 +00:00
Merge branch 'miami' of https://github.com/GTAmodding/re3 into miami
This commit is contained in:
commit
f5f153dbfd
|
@ -76,7 +76,7 @@ CdStreamInitThread(void)
|
||||||
gChannelRequestQ.tail = 0;
|
gChannelRequestQ.tail = 0;
|
||||||
gChannelRequestQ.size = gNumChannels + 1;
|
gChannelRequestQ.size = gNumChannels + 1;
|
||||||
ASSERT(gChannelRequestQ.items != nil );
|
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) {
|
if (gCdStreamSema == SEM_FAILED) {
|
||||||
|
@ -91,7 +91,7 @@ CdStreamInitThread(void)
|
||||||
for ( int32 i = 0; i < gNumChannels; i++ )
|
for ( int32 i = 0; i < gNumChannels; i++ )
|
||||||
{
|
{
|
||||||
sprintf(semName,"/semaphore_done%d",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)
|
if (gpReadInfo[i].pDoneSemaphore == SEM_FAILED)
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ CdStreamInitThread(void)
|
||||||
|
|
||||||
#ifdef ONE_THREAD_PER_CHANNEL
|
#ifdef ONE_THREAD_PER_CHANNEL
|
||||||
sprintf(semName,"/semaphore_start%d",i);
|
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)
|
if (gpReadInfo[i].pStartSemaphore == SEM_FAILED)
|
||||||
{
|
{
|
||||||
|
@ -171,6 +171,7 @@ CdStreamInit(int32 numChannels)
|
||||||
gNumImages = 0;
|
gNumImages = 0;
|
||||||
|
|
||||||
gNumChannels = numChannels;
|
gNumChannels = numChannels;
|
||||||
|
ASSERT( gNumChannels != 0 );
|
||||||
|
|
||||||
gpReadInfo = (CdReadInfo *)calloc(numChannels, sizeof(CdReadInfo));
|
gpReadInfo = (CdReadInfo *)calloc(numChannels, sizeof(CdReadInfo));
|
||||||
ASSERT( gpReadInfo != nil );
|
ASSERT( gpReadInfo != nil );
|
||||||
|
@ -398,7 +399,12 @@ void *CdStreamThread(void *param)
|
||||||
#ifndef ONE_THREAD_PER_CHANNEL
|
#ifndef ONE_THREAD_PER_CHANNEL
|
||||||
while (gCdStreamThreadStatus != 2) {
|
while (gCdStreamThreadStatus != 2) {
|
||||||
sem_wait(gCdStreamSema);
|
sem_wait(gCdStreamSema);
|
||||||
|
|
||||||
int32 channel = GetFirstInQueue(&gChannelRequestQ);
|
int32 channel = GetFirstInQueue(&gChannelRequestQ);
|
||||||
|
|
||||||
|
// spurious wakeup
|
||||||
|
if (channel == -1)
|
||||||
|
continue;
|
||||||
#else
|
#else
|
||||||
int channel = *((int*)param);
|
int channel = *((int*)param);
|
||||||
while (gpReadInfo[channel].nThreadStatus != 2){
|
while (gpReadInfo[channel].nThreadStatus != 2){
|
||||||
|
|
|
@ -591,7 +591,6 @@ bool CGame::ShutDown(void)
|
||||||
gPhoneInfo.Shutdown();
|
gPhoneInfo.Shutdown();
|
||||||
CWeapon::ShutdownWeapons();
|
CWeapon::ShutdownWeapons();
|
||||||
CPedType::Shutdown();
|
CPedType::Shutdown();
|
||||||
CMBlur::MotionBlurClose();
|
|
||||||
|
|
||||||
for (int32 i = 0; i < NUMPLAYERS; i++)
|
for (int32 i = 0; i < NUMPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
@ -617,7 +616,7 @@ bool CGame::ShutDown(void)
|
||||||
CStreaming::Shutdown();
|
CStreaming::Shutdown();
|
||||||
CTxdStore::GameShutdown();
|
CTxdStore::GameShutdown();
|
||||||
CCollision::Shutdown();
|
CCollision::Shutdown();
|
||||||
CWaterLevel::DestroyWavyAtomic();
|
CWaterLevel::Shutdown();
|
||||||
CRubbish::Shutdown();
|
CRubbish::Shutdown();
|
||||||
CClouds::Shutdown();
|
CClouds::Shutdown();
|
||||||
CShadows::Shutdown();
|
CShadows::Shutdown();
|
||||||
|
@ -626,6 +625,7 @@ bool CGame::ShutDown(void)
|
||||||
CWeaponEffects::Shutdown();
|
CWeaponEffects::Shutdown();
|
||||||
CParticle::Shutdown();
|
CParticle::Shutdown();
|
||||||
CPools::ShutDown();
|
CPools::ShutDown();
|
||||||
|
CHud::ReInitialise();
|
||||||
CTxdStore::RemoveTxdSlot(gameTxdSlot);
|
CTxdStore::RemoveTxdSlot(gameTxdSlot);
|
||||||
CMBlur::MotionBlurClose();
|
CMBlur::MotionBlurClose();
|
||||||
CdStreamRemoveImages();
|
CdStreamRemoveImages();
|
||||||
|
|
|
@ -406,6 +406,10 @@ bool LoadINISettings()
|
||||||
ReadIniIfExists("CustomPipesValues", "LightmapMult", &CustomPipes::LightmapMult);
|
ReadIniIfExists("CustomPipesValues", "LightmapMult", &CustomPipes::LightmapMult);
|
||||||
ReadIniIfExists("CustomPipesValues", "GlossMult", &CustomPipes::GlossMult);
|
ReadIniIfExists("CustomPipesValues", "GlossMult", &CustomPipes::GlossMult);
|
||||||
#endif
|
#endif
|
||||||
|
ReadIniIfExists("Rendering", "BackfaceCulling", &gBackfaceCulling);
|
||||||
|
#ifdef NEW_RENDERER
|
||||||
|
ReadIniIfExists("Rendering", "NewRenderer", &gbNewRenderer);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PROPER_SCALING
|
#ifdef PROPER_SCALING
|
||||||
ReadIniIfExists("Draw", "ProperScaling", &CDraw::ms_bProperScaling);
|
ReadIniIfExists("Draw", "ProperScaling", &CDraw::ms_bProperScaling);
|
||||||
|
@ -495,6 +499,9 @@ void SaveINISettings()
|
||||||
StoreIni("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
|
StoreIni("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
|
||||||
#endif
|
#endif
|
||||||
StoreIni("Rendering", "BackfaceCulling", gBackfaceCulling);
|
StoreIni("Rendering", "BackfaceCulling", gBackfaceCulling);
|
||||||
|
#ifdef NEW_RENDERER
|
||||||
|
StoreIni("Rendering", "NewRenderer", gbNewRenderer);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PROPER_SCALING
|
#ifdef PROPER_SCALING
|
||||||
StoreIni("Draw", "ProperScaling", CDraw::ms_bProperScaling);
|
StoreIni("Draw", "ProperScaling", CDraw::ms_bProperScaling);
|
||||||
|
|
|
@ -318,6 +318,7 @@ CWaterLevel::Shutdown()
|
||||||
|
|
||||||
_DELETE_TEXTURE(gpWaterTex);
|
_DELETE_TEXTURE(gpWaterTex);
|
||||||
_DELETE_TEXTURE(gpWaterEnvTex);
|
_DELETE_TEXTURE(gpWaterEnvTex);
|
||||||
|
_DELETE_TEXTURE(gpWaterWakeTex);
|
||||||
_DELETE_TEXTURE(gpWaterEnvBaseTex);
|
_DELETE_TEXTURE(gpWaterEnvBaseTex);
|
||||||
|
|
||||||
#undef _DELETE_TEXTURE
|
#undef _DELETE_TEXTURE
|
||||||
|
@ -714,9 +715,9 @@ CWaterLevel::GetWaterLevel(float fX, float fY, float fZ, float *pfOutLevel, bool
|
||||||
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8 nBlock = aWaterFineBlockList[x][y];
|
int8 nBlock = aWaterFineBlockList[x][y];
|
||||||
|
|
||||||
if ( nBlock == 0x80 )
|
if ( nBlock == NO_WATER )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ASSERT( pfOutLevel != nil );
|
ASSERT( pfOutLevel != nil );
|
||||||
|
@ -756,9 +757,9 @@ CWaterLevel::GetWaterLevelNoWaves(float fX, float fY, float fZ, float *pfOutLeve
|
||||||
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8 nBlock = aWaterFineBlockList[x][y];
|
int8 nBlock = aWaterFineBlockList[x][y];
|
||||||
|
|
||||||
if ( nBlock == 0x80 )
|
if ( nBlock == NO_WATER )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ASSERT( pfOutLevel != nil );
|
ASSERT( pfOutLevel != nil );
|
||||||
|
|
Loading…
Reference in a new issue