summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/sampman.h110
-rw-r--r--src/audio/sampman_miles.cpp132
-rw-r--r--src/audio/sampman_oal.cpp39
-rw-r--r--src/control/Garages.cpp3
-rw-r--r--src/control/Script.cpp28
-rw-r--r--src/control/Script.h1
-rw-r--r--src/control/Script6.cpp4
-rw-r--r--src/core/Fire.cpp2
-rw-r--r--src/core/config.h4
-rw-r--r--src/peds/PedFight.cpp8
-rw-r--r--src/renderer/2dEffect.h (renamed from src/render/2dEffect.h)0
-rw-r--r--src/renderer/Antennas.cpp (renamed from src/render/Antennas.cpp)0
-rw-r--r--src/renderer/Antennas.h (renamed from src/render/Antennas.h)0
-rw-r--r--src/renderer/Clouds.cpp (renamed from src/render/Clouds.cpp)0
-rw-r--r--src/renderer/Clouds.h (renamed from src/render/Clouds.h)0
-rw-r--r--src/renderer/Console.cpp (renamed from src/render/Console.cpp)0
-rw-r--r--src/renderer/Console.h (renamed from src/render/Console.h)0
-rw-r--r--src/renderer/Coronas.cpp (renamed from src/render/Coronas.cpp)0
-rw-r--r--src/renderer/Coronas.h (renamed from src/render/Coronas.h)0
-rw-r--r--src/renderer/Credits.cpp (renamed from src/render/Credits.cpp)0
-rw-r--r--src/renderer/Credits.h (renamed from src/render/Credits.h)0
-rw-r--r--src/renderer/Draw.cpp (renamed from src/render/Draw.cpp)0
-rw-r--r--src/renderer/Draw.h (renamed from src/render/Draw.h)0
-rw-r--r--src/renderer/Fluff.cpp (renamed from src/render/Fluff.cpp)0
-rw-r--r--src/renderer/Fluff.h (renamed from src/render/Fluff.h)0
-rw-r--r--src/renderer/Font.cpp (renamed from src/render/Font.cpp)0
-rw-r--r--src/renderer/Font.h (renamed from src/render/Font.h)0
-rw-r--r--src/renderer/Glass.cpp (renamed from src/render/Glass.cpp)0
-rw-r--r--src/renderer/Glass.h (renamed from src/render/Glass.h)0
-rw-r--r--src/renderer/Hud.cpp (renamed from src/render/Hud.cpp)0
-rw-r--r--src/renderer/Hud.h (renamed from src/render/Hud.h)0
-rw-r--r--src/renderer/Instance.cpp (renamed from src/render/Instance.cpp)0
-rw-r--r--src/renderer/Instance.h (renamed from src/render/Instance.h)0
-rw-r--r--src/renderer/Lines.cpp (renamed from src/render/Lines.cpp)0
-rw-r--r--src/renderer/Lines.h (renamed from src/render/Lines.h)0
-rw-r--r--src/renderer/MBlur.cpp (renamed from src/render/MBlur.cpp)0
-rw-r--r--src/renderer/MBlur.h (renamed from src/render/MBlur.h)0
-rw-r--r--src/renderer/Particle.cpp (renamed from src/render/Particle.cpp)0
-rw-r--r--src/renderer/Particle.h (renamed from src/render/Particle.h)0
-rw-r--r--src/renderer/ParticleMgr.cpp (renamed from src/render/ParticleMgr.cpp)0
-rw-r--r--src/renderer/ParticleMgr.h (renamed from src/render/ParticleMgr.h)0
-rw-r--r--src/renderer/ParticleType.h (renamed from src/render/ParticleType.h)0
-rw-r--r--src/renderer/PlayerSkin.cpp (renamed from src/render/PlayerSkin.cpp)0
-rw-r--r--src/renderer/PlayerSkin.h (renamed from src/render/PlayerSkin.h)0
-rw-r--r--src/renderer/PointLights.cpp (renamed from src/render/PointLights.cpp)0
-rw-r--r--src/renderer/PointLights.h (renamed from src/render/PointLights.h)0
-rw-r--r--src/renderer/RenderBuffer.cpp (renamed from src/render/RenderBuffer.cpp)0
-rw-r--r--src/renderer/RenderBuffer.h (renamed from src/render/RenderBuffer.h)0
-rw-r--r--src/renderer/Renderer.cpp (renamed from src/render/Renderer.cpp)0
-rw-r--r--src/renderer/Renderer.h (renamed from src/render/Renderer.h)0
-rw-r--r--src/renderer/Rubbish.cpp (renamed from src/render/Rubbish.cpp)0
-rw-r--r--src/renderer/Rubbish.h (renamed from src/render/Rubbish.h)0
-rw-r--r--src/renderer/Shadows.cpp (renamed from src/render/Shadows.cpp)0
-rw-r--r--src/renderer/Shadows.h (renamed from src/render/Shadows.h)0
-rw-r--r--src/renderer/Skidmarks.cpp (renamed from src/render/Skidmarks.cpp)0
-rw-r--r--src/renderer/Skidmarks.h (renamed from src/render/Skidmarks.h)0
-rw-r--r--src/renderer/SpecialFX.cpp (renamed from src/render/SpecialFX.cpp)0
-rw-r--r--src/renderer/SpecialFX.h (renamed from src/render/SpecialFX.h)0
-rw-r--r--src/renderer/Sprite.cpp (renamed from src/render/Sprite.cpp)0
-rw-r--r--src/renderer/Sprite.h (renamed from src/render/Sprite.h)0
-rw-r--r--src/renderer/Sprite2d.cpp (renamed from src/render/Sprite2d.cpp)0
-rw-r--r--src/renderer/Sprite2d.h (renamed from src/render/Sprite2d.h)0
-rw-r--r--src/renderer/TexList.cpp (renamed from src/render/TexList.cpp)0
-rw-r--r--src/renderer/TexList.h (renamed from src/render/TexList.h)0
-rw-r--r--src/renderer/Timecycle.cpp (renamed from src/render/Timecycle.cpp)0
-rw-r--r--src/renderer/Timecycle.h (renamed from src/render/Timecycle.h)0
-rw-r--r--src/renderer/WaterCannon.cpp (renamed from src/render/WaterCannon.cpp)0
-rw-r--r--src/renderer/WaterCannon.h (renamed from src/render/WaterCannon.h)0
-rw-r--r--src/renderer/WaterLevel.cpp (renamed from src/render/WaterLevel.cpp)0
-rw-r--r--src/renderer/WaterLevel.h (renamed from src/render/WaterLevel.h)0
-rw-r--r--src/renderer/Weather.cpp (renamed from src/render/Weather.cpp)0
-rw-r--r--src/renderer/Weather.h (renamed from src/render/Weather.h)0
72 files changed, 271 insertions, 60 deletions
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index d1ad9a26..dc95622b 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -259,8 +259,8 @@ static char StreamedNameTable[][25] = {
"AUDIO\\door_2.OPUS", "AUDIO\\door_3.OPUS", "AUDIO\\door_4.OPUS", "AUDIO\\door_5.OPUS", "AUDIO\\door_6.OPUS", "AUDIO\\t3_a.OPUS",
"AUDIO\\t3_b.OPUS", "AUDIO\\t3_c.OPUS", "AUDIO\\k1_b.OPUS", "AUDIO\\cat1.OPUS"};
#else
-#if defined(PS2_AUDIO_PATHS)
-static char StreamedNameTable[][25]=
+#ifdef PS2_AUDIO_PATHS
+static char PS2StreamedNameTable[][25]=
{
"AUDIO\\MUSIC\\HEAD.VB",
"AUDIO\\MUSIC\\CLASS.VB",
@@ -357,7 +357,110 @@ static char StreamedNameTable[][25]=
"AUDIO\\PHONE\\MT_PH4.VB",
"AUDIO\\MUSIC\\MISCOM.VB",
"AUDIO\\MUSIC\\END.VB",
-#else
+ "AUDIO\\lib_a1.WAV",
+ "AUDIO\\lib_a2.WAV",
+ "AUDIO\\lib_a.WAV",
+ "AUDIO\\lib_b.WAV",
+ "AUDIO\\lib_c.WAV",
+ "AUDIO\\lib_d.WAV",
+ "AUDIO\\l2_a.WAV",
+ "AUDIO\\j4t_1.WAV",
+ "AUDIO\\j4t_2.WAV",
+ "AUDIO\\j4t_3.WAV",
+ "AUDIO\\j4t_4.WAV",
+ "AUDIO\\j4_a.WAV",
+ "AUDIO\\j4_b.WAV",
+ "AUDIO\\j4_c.WAV",
+ "AUDIO\\j4_d.WAV",
+ "AUDIO\\j4_e.WAV",
+ "AUDIO\\j4_f.WAV",
+ "AUDIO\\j6_1.WAV",
+ "AUDIO\\j6_a.WAV",
+ "AUDIO\\j6_b.WAV",
+ "AUDIO\\j6_c.WAV",
+ "AUDIO\\j6_d.WAV",
+ "AUDIO\\t4_a.WAV",
+ "AUDIO\\s1_a.WAV",
+ "AUDIO\\s1_a1.WAV",
+ "AUDIO\\s1_b.WAV",
+ "AUDIO\\s1_c.WAV",
+ "AUDIO\\s1_c1.WAV",
+ "AUDIO\\s1_d.WAV",
+ "AUDIO\\s1_e.WAV",
+ "AUDIO\\s1_f.WAV",
+ "AUDIO\\s1_g.WAV",
+ "AUDIO\\s1_h.WAV",
+ "AUDIO\\s1_i.WAV",
+ "AUDIO\\s1_j.WAV",
+ "AUDIO\\s1_k.WAV",
+ "AUDIO\\s1_l.WAV",
+ "AUDIO\\s3_a.WAV",
+ "AUDIO\\s3_b.WAV",
+ "AUDIO\\el3_a.WAV",
+ "AUDIO\\mf1_a.WAV",
+ "AUDIO\\mf2_a.WAV",
+ "AUDIO\\mf3_a.WAV",
+ "AUDIO\\mf3_b.WAV",
+ "AUDIO\\mf3_b1.WAV",
+ "AUDIO\\mf3_c.WAV",
+ "AUDIO\\mf4_a.WAV",
+ "AUDIO\\mf4_b.WAV",
+ "AUDIO\\mf4_c.WAV",
+ "AUDIO\\a1_a.WAV",
+ "AUDIO\\a3_a.WAV",
+ "AUDIO\\a5_a.WAV",
+ "AUDIO\\a4_a.WAV",
+ "AUDIO\\a4_b.WAV",
+ "AUDIO\\a4_c.WAV",
+ "AUDIO\\a4_d.WAV",
+ "AUDIO\\k1_a.WAV",
+ "AUDIO\\k3_a.WAV",
+ "AUDIO\\r1_a.WAV",
+ "AUDIO\\r2_a.WAV",
+ "AUDIO\\r2_b.WAV",
+ "AUDIO\\r2_c.WAV",
+ "AUDIO\\r2_d.WAV",
+ "AUDIO\\r2_e.WAV",
+ "AUDIO\\r2_f.WAV",
+ "AUDIO\\r2_g.WAV",
+ "AUDIO\\r2_h.WAV",
+ "AUDIO\\r5_a.WAV",
+ "AUDIO\\r6_a.WAV",
+ "AUDIO\\r6_a1.WAV",
+ "AUDIO\\r6_b.WAV",
+ "AUDIO\\lo2_a.WAV",
+ "AUDIO\\lo6_a.WAV",
+ "AUDIO\\yd2_a.WAV",
+ "AUDIO\\yd2_b.WAV",
+ "AUDIO\\yd2_c.WAV",
+ "AUDIO\\yd2_c1.WAV",
+ "AUDIO\\yd2_d.WAV",
+ "AUDIO\\yd2_e.WAV",
+ "AUDIO\\yd2_f.WAV",
+ "AUDIO\\yd2_g.WAV",
+ "AUDIO\\yd2_h.WAV",
+ "AUDIO\\yd2_ass.WAV",
+ "AUDIO\\yd2_ok.WAV",
+ "AUDIO\\h5_a.WAV",
+ "AUDIO\\h5_b.WAV",
+ "AUDIO\\h5_c.WAV",
+ "AUDIO\\ammu_a.WAV",
+ "AUDIO\\ammu_b.WAV",
+ "AUDIO\\ammu_c.WAV",
+ "AUDIO\\door_1.WAV",
+ "AUDIO\\door_2.WAV",
+ "AUDIO\\door_3.WAV",
+ "AUDIO\\door_4.WAV",
+ "AUDIO\\door_5.WAV",
+ "AUDIO\\door_6.WAV",
+ "AUDIO\\t3_a.WAV",
+ "AUDIO\\t3_b.WAV",
+ "AUDIO\\t3_c.WAV",
+ "AUDIO\\k1_b.WAV",
+ "AUDIO\\cat1.WAV"
+};
+#endif
+
static char StreamedNameTable[][25] =
{
"AUDIO\\HEAD.WAV",
@@ -455,7 +558,6 @@ static char StreamedNameTable[][25] =
"AUDIO\\MT_PH4.MP3",
"AUDIO\\MISCOM.WAV",
"AUDIO\\END.MP3",
-#endif
"AUDIO\\lib_a1.WAV",
"AUDIO\\lib_a2.WAV",
"AUDIO\\lib_a.WAV",
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index e820864c..d529513d 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -992,11 +992,20 @@ cSampleManager::Initialise(void)
if ( GetDriveType(m_szCDRomRootPath) == DRIVE_CDROM )
{
+ FILE *f;
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, StreamedNameTable[0]);
-
- FILE *f = fopen(filepath, "rb");
+ strcat(filepath, PS2StreamedNameTable[0]);
+ f = fopen(filepath, "rb");
+
+ if ( !f )
+#endif
+ {
+ strcpy(filepath, m_szCDRomRootPath);
+ strcat(filepath, StreamedNameTable[0]);
+ f = fopen(filepath, "rb");
+ }
if ( f )
{
fclose(f);
@@ -1005,11 +1014,20 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, StreamedNameTable[i]);
-
+ strcat(filepath, PS2StreamedNameTable[i]);
+
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
-
+ if ( !mp3Stream[0] )
+#endif
+ {
+ strcpy(filepath, m_szCDRomRootPath);
+ strcat(filepath, StreamedNameTable[i]);
+
+ mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
+ }
+
if ( mp3Stream[0] )
{
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
@@ -1078,7 +1096,14 @@ cSampleManager::Initialise(void)
strcpy(_aHDDPath, m_szCDRomRootPath);
rootpath[0] = '\0';
- FILE *f = fopen(StreamedNameTable[0], "rb");
+ FILE *f;
+
+#ifdef PS2_AUDIO_PATHS
+ f = fopen(PS2StreamedNameTable[0], "rb");
+ if (!f)
+#endif
+
+ f = fopen(StreamedNameTable[0], "rb");
if ( f )
{
@@ -1086,11 +1111,20 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, rootpath);
- strcat(filepath, StreamedNameTable[i]);
-
+ strcat(filepath, PS2StreamedNameTable[i]);
+
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
-
+ if ( !mp3Stream[0] )
+#endif
+ {
+ strcpy(filepath, rootpath);
+ strcat(filepath, StreamedNameTable[i]);
+
+ mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
+ }
+
if ( mp3Stream[0] )
{
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
@@ -1299,9 +1333,11 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
char filepath[MAX_PATH];
+ FILE *f;
+#ifdef PS2_AUDIO_PATHS
#if GTA_VERSION >= GTA3_PC_11
- if (_bUseHDDAudio)
+ if(_bUseHDDAudio)
strcpy(filepath, _aHDDPath);
else
strcpy(filepath, m_szCDRomRootPath);
@@ -1309,10 +1345,25 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
strcpy(filepath, m_szCDRomRootPath);
#endif // #if GTA_VERSION >= GTA3_PC_11
- strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
-
- FILE *f = fopen(filepath, "rb");
+ strcat(filepath, PS2StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
+
+ f = fopen(filepath, "rb");
+ if ( !f )
+#endif // PS2_AUDIO_PATHS
+ {
+#if GTA_VERSION >= GTA3_PC_11
+ if (_bUseHDDAudio)
+ strcpy(filepath, _aHDDPath);
+ else
+ strcpy(filepath, m_szCDRomRootPath);
+#else
+ strcpy(filepath, m_szCDRomRootPath);
+#endif // #if GTA_VERSION >= GTA3_PC_11
+
+ strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
+ f = fopen(filepath, "rb");
+ }
if ( f )
{
fclose(f);
@@ -2007,11 +2058,19 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
char filepath[MAX_PATH];
-
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, StreamedNameTable[nFile]);
-
+ strcat(filepath, PS2StreamedNameTable[nFile]);
+
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
+ if ( !mp3Stream[nStream] )
+#endif
+ {
+ strcpy(filepath, m_szCDRomRootPath);
+ strcat(filepath, StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
+ }
if ( mp3Stream[nStream] )
{
@@ -2073,10 +2132,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
// Try to continue from previous song, if already started
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
nFile = 0;
+#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_szCDRomRootPath);
- strcat(filename, StreamedNameTable[nFile]);
-
+ strcat(filename, PS2StreamedNameTable[nFile]);
+
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ if ( !mp3Stream[nStream] )
+#endif
+ {
+ strcpy(filename, m_szCDRomRootPath);
+ strcat(filename, StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
@@ -2120,10 +2188,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
nFile = 0;
_bIsMp3Active = 0;
+#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_szCDRomRootPath);
- strcat(filename, StreamedNameTable[nFile]);
-
+ strcat(filename, PS2StreamedNameTable[nFile]);
+
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ if ( !mp3Stream[nStream] )
+#endif
+ {
+ strcpy(filename, m_szCDRomRootPath);
+ strcat(filename, StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
@@ -2161,10 +2238,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
position = 0;
nFile = 0;
}
+#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_szCDRomRootPath);
- strcat(filename, StreamedNameTable[nFile]);
-
+ strcat(filename, PS2StreamedNameTable[nFile]);
+
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ if ( !mp3Stream[nStream] )
+#endif
+ {
+ strcpy(filename, m_szCDRomRootPath);
+ strcat(filename, StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index fdd449f7..2d9f9e86 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -894,7 +894,11 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
- if ( aStream[0] && aStream[0]->Open(StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000) )
+ if(aStream[0] && (
+#ifdef PS2_AUDIO_PATHS
+ aStream[0]->Open(PS2StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000) ||
+#endif
+ aStream[0]->Open(StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000)))
{
uint32 tatalms = aStream[0]->GetLengthMS();
aStream[0]->Close();
@@ -1601,8 +1605,6 @@ cSampleManager::StopChannel(uint32 nChannel)
void
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
{
- char filename[MAX_PATH];
-
ASSERT( nStream < MAX_STREAMS );
if ( nFile < TOTAL_STREAMED_SOUNDS )
@@ -1611,9 +1613,10 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
stream->Close();
- strcpy(filename, StreamedNameTable[nFile]);
-
- stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if ( !stream->Setup() )
{
stream->Close();
@@ -1673,10 +1676,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
// Try to continue from previous song, if already started
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
nFile = 0;
- strcpy(filename, StreamedNameTable[nFile]);
-
CStream *stream = aStream[nStream];
- stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if ( stream->Setup() ) {
if (position != 0)
stream->SetPosMS(position);
@@ -1725,10 +1729,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
nFile = 0;
_bIsMp3Active = 0;
- strcpy(filename, StreamedNameTable[nFile]);
-
- CStream* stream = aStream[nStream];
- stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ CStream *stream = aStream[nStream];
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if (stream->Setup()) {
if (position != 0)
@@ -1768,11 +1773,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
position = 0;
nFile = 0;
}
- strcpy(filename, StreamedNameTable[nFile]);
-
CStream *stream = aStream[nStream];
-
- aStream[nStream]->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if ( stream->Setup() ) {
if (position != 0)
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 91971ae7..245e961d 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -2306,6 +2306,9 @@ void CGarages::Save(uint8 * buf, uint32 * size)
#else
* size = 5484;
#endif
+#if !defined THIS_IS_STUPID && !defined FIX_GARAGE_SIZE && defined COMPATIBLE_SAVES
+ memset(buf + 5240, 0, *size - 5240); // garbage data is written otherwise
+#endif
CloseHideOutGaragesBeforeSave();
WriteSaveBuf(buf, NumGarages);
WriteSaveBuf(buf, (uint32)BombsAreFree);
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index e06acdc3..b07c0701 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1771,20 +1771,12 @@ int scriptToLoad = 0;
int open_script()
{
- // glfwGetKey doesn't work because of CGame::Initialise is blocking
- CPad::UpdatePads();
- if (CPad::GetPad(0)->GetChar('G'))
- scriptToLoad = 0;
- if (CPad::GetPad(0)->GetChar('R'))
- scriptToLoad = 1;
- if (CPad::GetPad(0)->GetChar('D'))
- scriptToLoad = 2;
switch (scriptToLoad) {
- case 0: return CFileMgr::OpenFile("main.scm", "rb");
- case 1: return CFileMgr::OpenFile("main_freeroam.scm", "rb");
- case 2: return CFileMgr::OpenFile("main_d.scm", "rb");
+ case 0: return CFileMgr::OpenFile("data\\main.scm", "rb");
+ case 1: return CFileMgr::OpenFile("data\\main_freeroam.scm", "rb");
+ case 2: return CFileMgr::OpenFile("data\\main_d.scm", "rb");
}
- return CFileMgr::OpenFile("main.scm", "rb");
+ return CFileMgr::OpenFile("data\\main.scm", "rb");
}
#endif
@@ -1800,10 +1792,16 @@ void CTheScripts::Init()
MissionCleanUp.Init();
UpsideDownCars.Init();
StuckCars.Init();
- CFileMgr::SetDir("data");
#ifdef USE_DEBUG_SCRIPT_LOADER
+ // glfwGetKey doesn't work because of CGame::Initialise is blocking
+ CPad::UpdatePads();
+ if(CPad::GetPad(0)->GetChar('G')) scriptToLoad = 0;
+ if(CPad::GetPad(0)->GetChar('R')) scriptToLoad = 1;
+ if(CPad::GetPad(0)->GetChar('D')) scriptToLoad = 2;
+
int mainf = open_script();
#else
+ CFileMgr::SetDir("data");
int mainf = CFileMgr::OpenFile("main.scm", "rb");
#endif
CFileMgr::Read(mainf, (char*)ScriptSpace, SIZE_MAIN_SCRIPT);
@@ -4392,7 +4390,11 @@ CTheScripts::SwitchToMission(int32 mission)
CTimer::Suspend();
int offset = CTheScripts::MultiScriptArray[mission];
CFileMgr::ChangeDir("\\");
+#ifdef USE_DEBUG_SCRIPT_LOADER
+ int handle = open_script();
+#else
int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
+#endif
CFileMgr::Seek(handle, offset, 0);
CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
CFileMgr::CloseFile(handle);
diff --git a/src/control/Script.h b/src/control/Script.h
index 5682024b..cefd6747 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -591,5 +591,6 @@ void RetryMission(int, int);
#endif
#ifdef USE_DEBUG_SCRIPT_LOADER
+int open_script();
extern int scriptToLoad;
#endif \ No newline at end of file
diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp
index 31be6987..c9b2b070 100644
--- a/src/control/Script6.cpp
+++ b/src/control/Script6.cpp
@@ -305,7 +305,11 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CTimer::Suspend();
int offset = CTheScripts::MultiScriptArray[ScriptParams[0]];
CFileMgr::ChangeDir("\\");
+#ifdef USE_DEBUG_SCRIPT_LOADER
+ int handle = open_script();
+#else
int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
+#endif
CFileMgr::Seek(handle, offset, 0);
CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
CFileMgr::CloseFile(handle);
diff --git a/src/core/Fire.cpp b/src/core/Fire.cpp
index 984b21bb..8b184622 100644
--- a/src/core/Fire.cpp
+++ b/src/core/Fire.cpp
@@ -396,7 +396,7 @@ CFireManager::StartScriptFire(const CVector &pos, CEntity *target, float strengt
if (target) {
if (target->IsPed()) {
ped->m_pFire = fire;
- if (target != (CVehicle *)FindPlayerPed()) {
+ if (target != FindPlayerPed()) {
CVector2D pos = target->GetPosition();
ped->SetFlee(pos, 10000);
ped->SetMoveAnim();
diff --git a/src/core/config.h b/src/core/config.h
index 885f98b8..f0960e44 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -259,7 +259,7 @@ enum Config {
#define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds.
#define MORE_LANGUAGES // Add more translations to the game
-#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible, and keeps saves compatible between platforms
+#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible, and keeps saves compatible between platforms, needs to be enabled on 64bit builds!
#define FIX_INCOMPATIBLE_SAVES // try to fix incompatible saves, requires COMPATIBLE_SAVES
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
@@ -420,7 +420,7 @@ enum Config {
#define RADIO_SCROLL_TO_PREV_STATION
#define AUDIO_CACHE
#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally)
-//#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
+#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
//#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files
#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused
diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp
index 46ac369c..13d3930c 100644
--- a/src/peds/PedFight.cpp
+++ b/src/peds/PedFight.cpp
@@ -320,6 +320,14 @@ CPed::SetAttack(CEntity *victim)
((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch();
}
}
+#ifdef FIX_BUGS
+ // fix aiming for flamethrower while using PC controls
+ else if (GetWeapon()->m_eWeaponType == WEAPONTYPE_FLAMETHROWER && TheCamera.Cams[0].Using3rdPersonMouseCam() && this == FindPlayerPed())
+ {
+ SetAimFlag(m_fRotationCur);
+ ((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch();
+ }
+#endif
if (m_nPedState == PED_ATTACK) {
bIsAttacking = true;
return;
diff --git a/src/render/2dEffect.h b/src/renderer/2dEffect.h
index a8013b34..a8013b34 100644
--- a/src/render/2dEffect.h
+++ b/src/renderer/2dEffect.h
diff --git a/src/render/Antennas.cpp b/src/renderer/Antennas.cpp
index 5e30aca2..5e30aca2 100644
--- a/src/render/Antennas.cpp
+++ b/src/renderer/Antennas.cpp
diff --git a/src/render/Antennas.h b/src/renderer/Antennas.h
index 47cb1dad..47cb1dad 100644
--- a/src/render/Antennas.h
+++ b/src/renderer/Antennas.h
diff --git a/src/render/Clouds.cpp b/src/renderer/Clouds.cpp
index 957844a5..957844a5 100644
--- a/src/render/Clouds.cpp
+++ b/src/renderer/Clouds.cpp
diff --git a/src/render/Clouds.h b/src/renderer/Clouds.h
index 4d8cd2c8..4d8cd2c8 100644
--- a/src/render/Clouds.h
+++ b/src/renderer/Clouds.h
diff --git a/src/render/Console.cpp b/src/renderer/Console.cpp
index 8ea5b7a3..8ea5b7a3 100644
--- a/src/render/Console.cpp
+++ b/src/renderer/Console.cpp
diff --git a/src/render/Console.h b/src/renderer/Console.h
index 9f22236f..9f22236f 100644
--- a/src/render/Console.h
+++ b/src/renderer/Console.h
diff --git a/src/render/Coronas.cpp b/src/renderer/Coronas.cpp
index e9f9e662..e9f9e662 100644
--- a/src/render/Coronas.cpp
+++ b/src/renderer/Coronas.cpp
diff --git a/src/render/Coronas.h b/src/renderer/Coronas.h
index 46eb4315..46eb4315 100644
--- a/src/render/Coronas.h
+++ b/src/renderer/Coronas.h
diff --git a/src/render/Credits.cpp b/src/renderer/Credits.cpp
index 60581793..60581793 100644
--- a/src/render/Credits.cpp
+++ b/src/renderer/Credits.cpp
diff --git a/src/render/Credits.h b/src/renderer/Credits.h
index e049ce76..e049ce76 100644
--- a/src/render/Credits.h
+++ b/src/renderer/Credits.h
diff --git a/src/render/Draw.cpp b/src/renderer/Draw.cpp
index f702f188..f702f188 100644
--- a/src/render/Draw.cpp
+++ b/src/renderer/Draw.cpp
diff --git a/src/render/Draw.h b/src/renderer/Draw.h
index 8727e0e0..8727e0e0 100644
--- a/src/render/Draw.h
+++ b/src/renderer/Draw.h
diff --git a/src/render/Fluff.cpp b/src/renderer/Fluff.cpp
index c4cfe7f7..c4cfe7f7 100644
--- a/src/render/Fluff.cpp
+++ b/src/renderer/Fluff.cpp
diff --git a/src/render/Fluff.h b/src/renderer/Fluff.h
index fe3ab256..fe3ab256 100644
--- a/src/render/Fluff.h
+++ b/src/renderer/Fluff.h
diff --git a/src/render/Font.cpp b/src/renderer/Font.cpp
index 6a9944e1..6a9944e1 100644
--- a/src/render/Font.cpp
+++ b/src/renderer/Font.cpp
diff --git a/src/render/Font.h b/src/renderer/Font.h
index 9316ed34..9316ed34 100644
--- a/src/render/Font.h
+++ b/src/renderer/Font.h
diff --git a/src/render/Glass.cpp b/src/renderer/Glass.cpp
index cc45648c..cc45648c 100644
--- a/src/render/Glass.cpp
+++ b/src/renderer/Glass.cpp
diff --git a/src/render/Glass.h b/src/renderer/Glass.h
index 51c5aae9..51c5aae9 100644
--- a/src/render/Glass.h
+++ b/src/renderer/Glass.h
diff --git a/src/render/Hud.cpp b/src/renderer/Hud.cpp
index bba8c525..bba8c525 100644
--- a/src/render/Hud.cpp
+++ b/src/renderer/Hud.cpp
diff --git a/src/render/Hud.h b/src/renderer/Hud.h
index adfdf1fc..adfdf1fc 100644
--- a/src/render/Hud.h
+++ b/src/renderer/Hud.h
diff --git a/src/render/Instance.cpp b/src/renderer/Instance.cpp
index be6d73d6..be6d73d6 100644
--- a/src/render/Instance.cpp
+++ b/src/renderer/Instance.cpp
diff --git a/src/render/Instance.h b/src/renderer/Instance.h
index 693cfdf1..693cfdf1 100644
--- a/src/render/Instance.h
+++ b/src/renderer/Instance.h
diff --git a/src/render/Lines.cpp b/src/renderer/Lines.cpp
index b5c85149..b5c85149 100644
--- a/src/render/Lines.cpp
+++ b/src/renderer/Lines.cpp
diff --git a/src/render/Lines.h b/src/renderer/Lines.h
index f2694fc0..f2694fc0 100644
--- a/src/render/Lines.h
+++ b/src/renderer/Lines.h
diff --git a/src/render/MBlur.cpp b/src/renderer/MBlur.cpp
index 8e5fba2a..8e5fba2a 100644
--- a/src/render/MBlur.cpp
+++ b/src/renderer/MBlur.cpp
diff --git a/src/render/MBlur.h b/src/renderer/MBlur.h
index e2e5d38c..e2e5d38c 100644
--- a/src/render/MBlur.h
+++ b/src/renderer/MBlur.h
diff --git a/src/render/Particle.cpp b/src/renderer/Particle.cpp
index 76ddde50..76ddde50 100644
--- a/src/render/Particle.cpp
+++ b/src/renderer/Particle.cpp
diff --git a/src/render/Particle.h b/src/renderer/Particle.h
index 7f02e318..7f02e318 100644
--- a/src/render/Particle.h
+++ b/src/renderer/Particle.h
diff --git a/src/render/ParticleMgr.cpp b/src/renderer/ParticleMgr.cpp
index 3387d471..3387d471 100644
--- a/src/render/ParticleMgr.cpp
+++ b/src/renderer/ParticleMgr.cpp
diff --git a/src/render/ParticleMgr.h b/src/renderer/ParticleMgr.h
index 0100bb65..0100bb65 100644
--- a/src/render/ParticleMgr.h
+++ b/src/renderer/ParticleMgr.h
diff --git a/src/render/ParticleType.h b/src/renderer/ParticleType.h
index 8d352c44..8d352c44 100644
--- a/src/render/ParticleType.h
+++ b/src/renderer/ParticleType.h
diff --git a/src/render/PlayerSkin.cpp b/src/renderer/PlayerSkin.cpp
index f0fae45a..f0fae45a 100644
--- a/src/render/PlayerSkin.cpp
+++ b/src/renderer/PlayerSkin.cpp
diff --git a/src/render/PlayerSkin.h b/src/renderer/PlayerSkin.h
index e0214ce0..e0214ce0 100644
--- a/src/render/PlayerSkin.h
+++ b/src/renderer/PlayerSkin.h
diff --git a/src/render/PointLights.cpp b/src/renderer/PointLights.cpp
index 84ac4ab2..84ac4ab2 100644
--- a/src/render/PointLights.cpp
+++ b/src/renderer/PointLights.cpp
diff --git a/src/render/PointLights.h b/src/renderer/PointLights.h
index 9e94328f..9e94328f 100644
--- a/src/render/PointLights.h
+++ b/src/renderer/PointLights.h
diff --git a/src/render/RenderBuffer.cpp b/src/renderer/RenderBuffer.cpp
index 6120dfe2..6120dfe2 100644
--- a/src/render/RenderBuffer.cpp
+++ b/src/renderer/RenderBuffer.cpp
diff --git a/src/render/RenderBuffer.h b/src/renderer/RenderBuffer.h
index 485d24e3..485d24e3 100644
--- a/src/render/RenderBuffer.h
+++ b/src/renderer/RenderBuffer.h
diff --git a/src/render/Renderer.cpp b/src/renderer/Renderer.cpp
index 1c0bd445..1c0bd445 100644
--- a/src/render/Renderer.cpp
+++ b/src/renderer/Renderer.cpp
diff --git a/src/render/Renderer.h b/src/renderer/Renderer.h
index 0322939c..0322939c 100644
--- a/src/render/Renderer.h
+++ b/src/renderer/Renderer.h
diff --git a/src/render/Rubbish.cpp b/src/renderer/Rubbish.cpp
index 8da6b025..8da6b025 100644
--- a/src/render/Rubbish.cpp
+++ b/src/renderer/Rubbish.cpp
diff --git a/src/render/Rubbish.h b/src/renderer/Rubbish.h
index 37f895f3..37f895f3 100644
--- a/src/render/Rubbish.h
+++ b/src/renderer/Rubbish.h
diff --git a/src/render/Shadows.cpp b/src/renderer/Shadows.cpp
index 3884d3bb..3884d3bb 100644
--- a/src/render/Shadows.cpp
+++ b/src/renderer/Shadows.cpp
diff --git a/src/render/Shadows.h b/src/renderer/Shadows.h
index 8c909df3..8c909df3 100644
--- a/src/render/Shadows.h
+++ b/src/renderer/Shadows.h
diff --git a/src/render/Skidmarks.cpp b/src/renderer/Skidmarks.cpp
index 4c662a79..4c662a79 100644
--- a/src/render/Skidmarks.cpp
+++ b/src/renderer/Skidmarks.cpp
diff --git a/src/render/Skidmarks.h b/src/renderer/Skidmarks.h
index c061782d..c061782d 100644
--- a/src/render/Skidmarks.h
+++ b/src/renderer/Skidmarks.h
diff --git a/src/render/SpecialFX.cpp b/src/renderer/SpecialFX.cpp
index 6d96d21a..6d96d21a 100644
--- a/src/render/SpecialFX.cpp
+++ b/src/renderer/SpecialFX.cpp
diff --git a/src/render/SpecialFX.h b/src/renderer/SpecialFX.h
index 2d9f18b1..2d9f18b1 100644
--- a/src/render/SpecialFX.h
+++ b/src/renderer/SpecialFX.h
diff --git a/src/render/Sprite.cpp b/src/renderer/Sprite.cpp
index 3fef0733..3fef0733 100644
--- a/src/render/Sprite.cpp
+++ b/src/renderer/Sprite.cpp
diff --git a/src/render/Sprite.h b/src/renderer/Sprite.h
index ec4c1d1b..ec4c1d1b 100644
--- a/src/render/Sprite.h
+++ b/src/renderer/Sprite.h
diff --git a/src/render/Sprite2d.cpp b/src/renderer/Sprite2d.cpp
index 59622516..59622516 100644
--- a/src/render/Sprite2d.cpp
+++ b/src/renderer/Sprite2d.cpp
diff --git a/src/render/Sprite2d.h b/src/renderer/Sprite2d.h
index 0e12d441..0e12d441 100644
--- a/src/render/Sprite2d.h
+++ b/src/renderer/Sprite2d.h
diff --git a/src/render/TexList.cpp b/src/renderer/TexList.cpp
index 1689837f..1689837f 100644
--- a/src/render/TexList.cpp
+++ b/src/renderer/TexList.cpp
diff --git a/src/render/TexList.h b/src/renderer/TexList.h
index 7e042211..7e042211 100644
--- a/src/render/TexList.h
+++ b/src/renderer/TexList.h
diff --git a/src/render/Timecycle.cpp b/src/renderer/Timecycle.cpp
index 0d94dbd6..0d94dbd6 100644
--- a/src/render/Timecycle.cpp
+++ b/src/renderer/Timecycle.cpp
diff --git a/src/render/Timecycle.h b/src/renderer/Timecycle.h
index d5d7b67a..d5d7b67a 100644
--- a/src/render/Timecycle.h
+++ b/src/renderer/Timecycle.h
diff --git a/src/render/WaterCannon.cpp b/src/renderer/WaterCannon.cpp
index 08898be8..08898be8 100644
--- a/src/render/WaterCannon.cpp
+++ b/src/renderer/WaterCannon.cpp
diff --git a/src/render/WaterCannon.h b/src/renderer/WaterCannon.h
index a37bdd12..a37bdd12 100644
--- a/src/render/WaterCannon.h
+++ b/src/renderer/WaterCannon.h
diff --git a/src/render/WaterLevel.cpp b/src/renderer/WaterLevel.cpp
index 7001c0cf..7001c0cf 100644
--- a/src/render/WaterLevel.cpp
+++ b/src/renderer/WaterLevel.cpp
diff --git a/src/render/WaterLevel.h b/src/renderer/WaterLevel.h
index b797f251..b797f251 100644
--- a/src/render/WaterLevel.h
+++ b/src/renderer/WaterLevel.h
diff --git a/src/render/Weather.cpp b/src/renderer/Weather.cpp
index e57d57d6..e57d57d6 100644
--- a/src/render/Weather.cpp
+++ b/src/renderer/Weather.cpp
diff --git a/src/render/Weather.h b/src/renderer/Weather.h
index 9c670317..9c670317 100644
--- a/src/render/Weather.h
+++ b/src/renderer/Weather.h