summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-08 14:34:02 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-08 14:34:02 +0200
commit88b4c7b50b032f06510fec278babe7502cd85d64 (patch)
treea3696b405ab314eb845766c57f4c3e941753c3d5 /src/core
parentMerge pull request #1266 from Nick007J/miami (diff)
parentCVehicle fixes and cleanup (diff)
downloadre3-88b4c7b50b032f06510fec278babe7502cd85d64.tar
re3-88b4c7b50b032f06510fec278babe7502cd85d64.tar.gz
re3-88b4c7b50b032f06510fec278babe7502cd85d64.tar.bz2
re3-88b4c7b50b032f06510fec278babe7502cd85d64.tar.lz
re3-88b4c7b50b032f06510fec278babe7502cd85d64.tar.xz
re3-88b4c7b50b032f06510fec278babe7502cd85d64.tar.zst
re3-88b4c7b50b032f06510fec278babe7502cd85d64.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 cafbd340..89a48438 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -226,7 +226,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 e7cd65a0..3ebd52f2 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -4076,7 +4076,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 39ecb760..7612b937 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -631,7 +631,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 f58f4687..0792008a 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 0829dda6..b01a5d04 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 6f6acd49..9d3bca67 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -372,8 +372,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 b80830c0..b0183408 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;