summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-08 14:46:47 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-08 14:46:47 +0200
commit74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd (patch)
treeebe621b0d748a1a8854760cdfbd227ce7d93d164 /src/core
parentmerge (diff)
parentMerge branch 'master' into miami (diff)
downloadre3-74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd.tar
re3-74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd.tar.gz
re3-74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd.tar.bz2
re3-74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd.tar.lz
re3-74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd.tar.xz
re3-74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd.tar.zst
re3-74f00c3c6362f1fe7ee9d25a99ee8db5ce4e88dd.zip
Diffstat (limited to 'src/core')
-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
9 files changed, 16 insertions, 8 deletions
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;