Merge remote-tracking branch 'origin/miami' into lcs

# Conflicts:
#	.github/workflows/reLCS_msvc_amd64.yml
#	.github/workflows/reLCS_msvc_x86.yml
#	README.md
#	gamefiles/TEXT/american.gxt
#	gamefiles/TEXT/french.gxt
#	gamefiles/TEXT/german.gxt
#	gamefiles/TEXT/italian.gxt
#	gamefiles/TEXT/spanish.gxt
#	premake5.lua
#	src/animation/AnimManager.cpp
#	src/animation/AnimationId.h
#	src/audio/MusicManager.cpp
#	src/audio/audio_enums.h
#	src/control/Script7.cpp
#	src/core/FileLoader.cpp
#	src/core/re3.cpp
#	src/extras/custompipes_d3d9.cpp
#	src/extras/custompipes_gl.cpp
#	src/extras/postfx.cpp
#	src/extras/shaders/colourfilterVC.frag
#	src/extras/shaders/colourfilterVC_PS.hlsl
#	src/extras/shaders/make_hlsl.cmd
#	src/extras/shaders/obj/colourfilterVC_PS.cso
#	src/extras/shaders/obj/colourfilterVC_PS.inc
#	src/extras/shaders/obj/colourfilterVC_frag.inc
#	src/peds/PedFight.cpp
#	src/render/Font.cpp
#	src/render/Hud.cpp
#	src/render/Particle.cpp
#	src/render/WaterCannon.cpp
#	src/skel/win/gtavc.ico
#	src/vehicles/Automobile.cpp
#	utils/gxt/american.txt
#	utils/gxt/french.txt
#	utils/gxt/german.txt
#	utils/gxt/italian.txt
#	utils/gxt/spanish.txt
This commit is contained in:
Sergeanur
2021-02-16 18:08:19 +02:00
114 changed files with 5143 additions and 2112 deletions

View File

@@ -46,7 +46,6 @@
//TODO: fix eax3 reverb
//TODO: max channels
//TODO: loop count
cSampleManager SampleManager;
bool _bSampmanInitialised = false;
@@ -1695,7 +1694,7 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
ASSERT(stream != NULL);
aStream[nStream] = stream;
if ( !stream->IsOpened() )
if ( !stream->Setup() )
{
delete stream;
aStream[nStream] = NULL;
@@ -1725,7 +1724,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
if ( stream )
{
if ( stream->Setup() )
if ( stream->IsOpened() )
{
stream->Start();
}
@@ -1771,13 +1770,13 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
aStream[nStream] = stream;
if (stream->IsOpened()) {
if (stream->Setup()) {
if (position != 0)
stream->SetPosMS(position);
if (stream->Setup()) {
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
nStreamLoopedFlag[nStream] = true;
if (position != 0)
stream->SetPosMS(position);
stream->Start();
}
stream->Start();
return true;
} else {
@@ -1798,10 +1797,8 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
}
if (aStream[nStream]->IsOpened()) {
if (aStream[nStream]->Setup()) {
aStream[nStream]->Start();
}
if (aStream[nStream]->Setup()) {
aStream[nStream]->Start();
return true;
} else {
@@ -1827,13 +1824,13 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
aStream[nStream] = stream;
if (stream->IsOpened()) {
if (stream->Setup()) {
if (position != 0)
stream->SetPosMS(position);
if (stream->Setup()) {
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
nStreamLoopedFlag[nStream] = true;
if (position != 0)
stream->SetPosMS(position);
stream->Start();
}
stream->Start();
return true;
} else {
@@ -1854,13 +1851,11 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]);
}
if (aStream[nStream]->IsOpened()) {
if (aStream[nStream]->Setup()) {
if (position != 0)
aStream[nStream]->SetPosMS(position);
if (aStream[nStream]->Setup()) {
if (position != 0)
aStream[nStream]->SetPosMS(position);
aStream[nStream]->Start();
}
aStream[nStream]->Start();
_bIsMp3Active = true;
return true;
@@ -1884,13 +1879,13 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
aStream[nStream] = stream;
if ( stream->IsOpened() ) {
if ( stream->Setup() ) {
if (position != 0)
stream->SetPosMS(position);
if ( stream->Setup() ) {
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
nStreamLoopedFlag[nStream] = true;
if (position != 0)
stream->SetPosMS(position);
stream->Start();
}
stream->Start();
return true;
} else {
@@ -1913,6 +1908,9 @@ cSampleManager::StopStreamedFile(uint8 nStream)
{
delete stream;
aStream[nStream] = NULL;
if ( nStream == 0 )
_bIsMp3Active = false;
}
}
@@ -1925,7 +1923,21 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
if ( stream )
{
return stream->GetPosMS();
if ( _bIsMp3Active )
{
tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index);
if ( mp3 != NULL )
{
return stream->GetPosMS() + mp3->nTrackStreamPos;
}
else
return 0;
}
else
{
return stream->GetPosMS();
}
}
return 0;
@@ -2001,6 +2013,12 @@ cSampleManager::Service(void)
if ( stream )
stream->Update();
}
int refCount = CChannel::channelsThatNeedService;
for ( int32 i = 0; refCount && i < MAXCHANNELS+MAX2DCHANNELS; i++ )
{
if ( aChannel[i].Update() )
refCount--;
}
}
bool