summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/FindMilesSDK.cmake2
-rw-r--r--cmake/Findmpg123.cmake2
-rw-r--r--src/audio/AudioCollision.cpp5
-rw-r--r--src/audio/AudioLogic.cpp5
-rw-r--r--src/audio/AudioManager.h5
-rw-r--r--src/audio/oal/aldlist.h2
-rw-r--r--src/audio/sampman_oal.cpp5
-rw-r--r--src/control/Pickups.cpp1
-rw-r--r--src/control/Restart.cpp1
-rw-r--r--src/control/Script5.cpp1
-rw-r--r--src/core/Cam.cpp2
-rw-r--r--src/core/Camera.cpp2
-rw-r--r--src/core/Camera.h2
-rw-r--r--src/core/FrontendTriggers.h4
-rw-r--r--src/core/Pools.cpp1
-rw-r--r--src/core/Radar.cpp1
-rw-r--r--src/core/Radar.h1
-rw-r--r--src/core/common.h7
-rw-r--r--src/core/re3.cpp4
-rw-r--r--src/fakerw/fake.cpp1
-rw-r--r--src/renderer/Draw.cpp2
-rw-r--r--src/renderer/Sprite.cpp4
-rw-r--r--src/rw/RwHelper.cpp1
-rw-r--r--src/weapons/Weapon.cpp4
24 files changed, 42 insertions, 23 deletions
diff --git a/cmake/FindMilesSDK.cmake b/cmake/FindMilesSDK.cmake
index 57da3a6e..dcf4da33 100644
--- a/cmake/FindMilesSDK.cmake
+++ b/cmake/FindMilesSDK.cmake
@@ -28,7 +28,7 @@ find_package_handle_standard_args(MilesSDK DEFAULT_MSG MilesSDK_LIBRARIES MilesS
if(NOT TARGET MilesSDK::MilesSDK)
add_library(MilesSDK::MilesSDK UNKNOWN IMPORTED)
set_target_properties(MilesSDK::MilesSDK PROPERTIES
- IMPORTED_LOCATION "${MilesSDK_LIBRARIES}
+ IMPORTED_LOCATION "${MilesSDK_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${MilesSDK_INCLUDE_DIR}"
)
endif()
diff --git a/cmake/Findmpg123.cmake b/cmake/Findmpg123.cmake
index c6fe56bb..aa59ad82 100644
--- a/cmake/Findmpg123.cmake
+++ b/cmake/Findmpg123.cmake
@@ -18,7 +18,7 @@ find_path(mpg123_INCLUDE_DIR mpg123.h
PATH_SUFFIXES include
)
-find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0
+find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0 libmpg123-0
HINTS ${PKG_MPG123_LIBRARIES}
PATHS "${mpg123_DIR}"
PATH_SUFFIXES lib
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index ed705b7d..d94d99ea 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -178,9 +178,8 @@ static const int32 gOneShotCol[] = {SFX_COL_TARMAC_1,
void
cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
{
-
- int16 s1;
- int16 s2;
+ uint16 s1;
+ uint16 s2;
int32 emittingVol;
float ratio;
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 7b8fa0d3..70fd3738 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -47,9 +47,6 @@
#define CHANNEL_PLAYER_VEHICLE_ENGINE m_nActiveSamples
#endif
-enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
-enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
-
void
cAudioManager::PreInitialiseGameSpecificSetup()
{
@@ -4092,7 +4089,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nCounter = 6;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_nFrequency += 200;
- m_sQueueSample.m_nOffset = MAX_VOLUME;
+ m_sQueueSample.m_nOffset = 127;
AddSampleToRequestedQueue();
}
return TRUE;
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 0eb0805c..1282280a 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -192,6 +192,9 @@ enum {
MAX_REFLECTIONS,
};
+enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
+enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
+
class cAudioManager
{
public:
@@ -214,8 +217,10 @@ public:
tAudioEntity m_asAudioEntities[NUM_AUDIOENTITIES];
int32 m_anAudioEntityIndices[NUM_AUDIOENTITIES];
int32 m_nAudioEntitiesTotal;
+#ifdef GTA_PC
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
+#endif
cAudioScriptObjectManager m_sAudioScriptObjectManager;
// miami
diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h
index bebb6791..3ed12d84 100644
--- a/src/audio/oal/aldlist.h
+++ b/src/audio/oal/aldlist.h
@@ -38,7 +38,7 @@ struct ALDEVICEINFO {
{
delete[] strDeviceName;
strDeviceName = NULL;
- }
+ }
void SetName(const char *name)
{
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 473e7ead..b2c364fb 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -178,7 +178,7 @@ add_providers()
SampleManager.Set3DProviderName(n, providers[n].name);
n++;
}
-
+
if ( alGetEnumValue("AL_EFFECT_EAXREVERB") != 0
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX2)
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX3)
@@ -1014,8 +1014,7 @@ cSampleManager::Initialise(void)
aStream[0]->Close();
nStreamLength[i] = tatalms;
- }
- else
+ } else
USERERROR("Can't open '%s'\n", StreamedNameTable[i]);
}
#ifdef AUDIO_CACHE
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index 9233a172..f31d89b3 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -23,6 +23,7 @@
#ifdef FIX_BUGS
#include "Replay.h"
#endif
+#include "SaveBuf.h"
#include "Script.h"
#include "Shadows.h"
#include "SpecialFX.h"
diff --git a/src/control/Restart.cpp b/src/control/Restart.cpp
index 39c9a234..af38537d 100644
--- a/src/control/Restart.cpp
+++ b/src/control/Restart.cpp
@@ -1,6 +1,7 @@
#include "common.h"
#include "Restart.h"
+#include "SaveBuf.h"
#include "Zones.h"
#include "PathFind.h"
#include "SaveBuf.h"
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index b0605574..abf1c993 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -12,6 +12,7 @@
#include "Pools.h"
#include "Population.h"
#include "RpAnimBlend.h"
+#include "SaveBuf.h"
#include "Shadows.h"
#include "SpecialFX.h"
#include "World.h"
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 3204613d..b4da6296 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -230,7 +230,7 @@ CCam::Process(void)
break;
case MODE_CAM_ON_A_STRING:
#ifdef FREE_CAM
- if(CCamera::bFreeCam)
+ if(CCamera::bFreeCam && !CVehicle::bCheat5)
Process_FollowCar_SA(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
else
#endif
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 6e632c7c..526f0015 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -4078,7 +4078,7 @@ CCamera::IsPointVisible(const CVector &center, const CMatrix *mat)
}
bool
-CCamera::IsSphereVisible(const CVector &center, float radius, const CMatrix *mat)
+CCamera::IsSphereVisible(const CVector &center, float radius, Const CMatrix *mat)
{
#ifdef GTA_PS2
CVuVector c;
diff --git a/src/core/Camera.h b/src/core/Camera.h
index 66a89f21..3468f6d6 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -632,7 +632,7 @@ public:
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
void CalculateDerivedValues(void);
bool IsPointVisible(const CVector &center, const CMatrix *mat);
- bool IsSphereVisible(const CVector &center, float radius, const CMatrix *mat);
+ bool IsSphereVisible(const CVector &center, float radius, Const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius);
bool IsBoxVisible(CVUVECTOR *box, const CMatrix *mat);
};
diff --git a/src/core/FrontendTriggers.h b/src/core/FrontendTriggers.h
index bbafb4be..44bae54f 100644
--- a/src/core/FrontendTriggers.h
+++ b/src/core/FrontendTriggers.h
@@ -792,12 +792,12 @@ TriggerAudio_StereoMono(CMenuMultiChoiceTriggered *widget)
{
if (widget->GetMenuSelection() == 1)
{
- DMAudio.SetMonoMode(true);
+ DMAudio.SetMonoMode(TRUE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MONO, 0);
}
else
{
- DMAudio.SetMonoMode(false);
+ DMAudio.SetMonoMode(FALSE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_STEREO, 0);
}
}
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index c4b4d3b0..e601b3c8 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -10,6 +10,7 @@
#endif
#include "Population.h"
#include "ProjectileInfo.h"
+#include "SaveBuf.h"
#include "Streaming.h"
#include "Wanted.h"
#include "World.h"
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 5c92206f..8d454d34 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -16,6 +16,7 @@
#include "Script.h"
#include "TxdStore.h"
#include "World.h"
+#include "SaveBuf.h"
#include "Streaming.h"
#include "SpecialFX.h"
#include "Font.h"
diff --git a/src/core/Radar.h b/src/core/Radar.h
index 3e61f8db..dbfcfd0d 100644
--- a/src/core/Radar.h
+++ b/src/core/Radar.h
@@ -1,5 +1,6 @@
#pragma once
#include "Sprite2d.h"
+#include "Draw.h"
#define CARBLIP_MARKER_COLOR_R 252
#define CARBLIP_MARKER_COLOR_G 138
diff --git a/src/core/common.h b/src/core/common.h
index bb6b93d3..57961f08 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -386,8 +386,11 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
#define _TODO(x)
#define _TODOCONST(x) (x)
-#ifdef CHECK_STRUCT_SIZES
-#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
+#ifdef CHECK_STRUCT_SIZES
+template<int s, int t> struct check_size {
+ static_assert(s == t, "Invalid structure size");
+};
+#define VALIDATE_SIZE(struc, size) check_size<sizeof(struc), size> struc ## Check
#else
#define VALIDATE_SIZE(struc, size)
#endif
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 98a51909..7a3be156 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -130,7 +130,7 @@ void LangJapSelect(int8 action)
void
CustomFrontendOptionsPopulate(void)
{
- // Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h
+ // Most of custom options are done statically in MenuScreensCustom.cpp, we add them here only if they're dependent to extra files
int fd;
// These work only if we have neo folder, so they're dynamically added
@@ -1271,7 +1271,9 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons
OutputDebugString(buff);
}
+#endif
+#ifndef MASTER
void re3_usererror(const char *format, ...)
{
va_list va;
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index dde7d03d..c6f6b3d1 100644
--- a/src/fakerw/fake.cpp
+++ b/src/fakerw/fake.cpp
@@ -16,7 +16,6 @@ using namespace rw;
RwUInt8 RwObjectGetType(const RwObject *obj) { return obj->type; }
RwFrame* rwObjectGetParent(const RwObject *obj) { return (RwFrame*)obj->parent; }
-
void *RwMalloc(size_t size) { return engine->memfuncs.rwmalloc(size, 0); }
void *RwCalloc(size_t numObj, size_t sizeObj) {
void *mem = RwMalloc(numObj*sizeObj);
diff --git a/src/renderer/Draw.cpp b/src/renderer/Draw.cpp
index 9c5921c3..a5e7504b 100644
--- a/src/renderer/Draw.cpp
+++ b/src/renderer/Draw.cpp
@@ -110,4 +110,4 @@ float CDraw::ScaleY(float y)
{
return ms_bProperScaling ? y : y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC);
}
-#endif \ No newline at end of file
+#endif \ No newline at end of file
diff --git a/src/renderer/Sprite.cpp b/src/renderer/Sprite.cpp
index f19ad55e..bf2c929f 100644
--- a/src/renderer/Sprite.cpp
+++ b/src/renderer/Sprite.cpp
@@ -5,6 +5,10 @@
#include "Camera.h"
#include "Sprite.h"
+#ifdef ASPECT_RATIO_SCALE
+#include "Frontend.h"
+#endif
+
float CSprite::m_f2DNearScreenZ;
float CSprite::m_f2DFarScreenZ;
float CSprite::m_fRecipNearClipPlane;
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 3206c8bd..8ad57fa1 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -1,5 +1,6 @@
#define WITHD3D
#include "common.h"
+#include <rpskin.h>
#include "Timecycle.h"
#include "skeleton.h"
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index f31e0c60..39f2265f 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -3163,7 +3163,11 @@ CWeapon::HitsGround(CEntity *holder, CVector *fireSource, CEntity *aimingTo)
void
CWeapon::BlowUpExplosiveThings(CEntity *thing)
{
+#ifdef FIX_BUGS
+ if ( thing && thing->IsObject() )
+#else
if ( thing )
+#endif
{
CObject *object = (CObject*)thing;
int32 mi = object->GetModelIndex();