summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorbigbossbro08 <bigbossbro08@gmail.com>2020-05-10 17:49:33 +0200
committerbigbossbro08 <bigbossbro08@gmail.com>2020-05-10 17:49:33 +0200
commitc798e1bacdaabaf140ff3904948fd7cec46c09bb (patch)
treeef6d50874117bcc819b90dcd231d74f23fa0108d /src/audio
parentdefined out asserts. (diff)
downloadre3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar
re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.gz
re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.bz2
re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.lz
re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.xz
re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.zst
re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioCollision.h8
-rw-r--r--src/audio/AudioManager.h17
-rw-r--r--src/audio/AudioScriptObject.h2
-rw-r--r--src/audio/MusicManager.h2
-rw-r--r--src/audio/PoliceRadio.h4
5 files changed, 12 insertions, 21 deletions
diff --git a/src/audio/AudioCollision.h b/src/audio/AudioCollision.h
index e8711f9a..0a058916 100644
--- a/src/audio/AudioCollision.h
+++ b/src/audio/AudioCollision.h
@@ -20,9 +20,7 @@ public:
// no methods
};
-#ifdef CHECK_STRUCT_SIZES
-static_assert(sizeof(cAudioCollision) == 40, "cAudioCollision: error");
-#endif
+VALIDATE_SIZE(cAudioCollision, 40);
class cAudioCollisionManager
{
@@ -37,6 +35,4 @@ public:
void AddCollisionToRequestedQueue();
};
-#ifdef CHECK_STRUCT_SIZES
-static_assert(sizeof(cAudioCollisionManager) == 852, "cAudioCollisionManager: error");
-#endif \ No newline at end of file
+VALIDATE_SIZE(cAudioCollisionManager, 852);
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 5f00eac4..3e20b993 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -35,7 +35,7 @@ public:
int8 m_nVolumeChange;
};
-static_assert(sizeof(tSound) == 92, "tSound: error");
+VALIDATE_SIZE(tSound, 92);
class CPhysical;
class CAutomobile;
@@ -52,9 +52,7 @@ public:
uint8 m_AudioEvents;
};
-#ifdef CHECK_STRUCT_SIZES
-static_assert(sizeof(tAudioEntity) == 40, "tAudioEntity: error");
-#endif
+VALIDATE_SIZE(tAudioEntity, 40);
class tPedComment
{
@@ -67,7 +65,7 @@ public:
int8 m_nProcess;
};
-static_assert(sizeof(tPedComment) == 28, "tPedComment: error");
+VALIDATE_SIZE(tPedComment, 28);
class cPedComments
{
@@ -82,7 +80,7 @@ public:
void Process();
};
-static_assert(sizeof(cPedComments) == 1164, "cPedComments: error");
+VALIDATE_SIZE(cPedComments, 1164);
class CEntity;
@@ -98,8 +96,7 @@ public:
int32 m_nMissionAudioCounter;
bool m_bIsPlayed;
};
-
-static_assert(sizeof(cMissionAudio) == 32, "cMissionAudio: error");
+VALIDATE_SIZE(cMissionAudio, 32);
// name made up
class cAudioScriptObjectManager
@@ -137,9 +134,7 @@ public:
float m_fVelocityChange;
};
-#ifdef CHECK_STRUCT_SIZES
-static_assert(sizeof(cVehicleParams) == 0x18, "cVehicleParams: error");
-#endif
+VALIDATE_SIZE(cVehicleParams, 0x18);
enum {
/*
diff --git a/src/audio/AudioScriptObject.h b/src/audio/AudioScriptObject.h
index 4308faee..ecc07fdf 100644
--- a/src/audio/AudioScriptObject.h
+++ b/src/audio/AudioScriptObject.h
@@ -148,6 +148,6 @@ public:
static void SaveAllAudioScriptObjects(uint8 *buf, uint32 *size);
};
-static_assert(sizeof(cAudioScriptObject) == 20, "cAudioScriptObject: error");
+VALIDATE_SIZE(cAudioScriptObject, 20);
extern void PlayOneShotScriptObject(uint8 id, CVector const &pos); \ No newline at end of file
diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h
index 5d6f41cf..e8b94da6 100644
--- a/src/audio/MusicManager.h
+++ b/src/audio/MusicManager.h
@@ -84,6 +84,6 @@ public:
bool ChangeRadioChannel();
};
-static_assert(sizeof(cMusicManager) == 0x95C, "cMusicManager: error");
+VALIDATE_SIZE(cMusicManager, 0x95C);
extern cMusicManager MusicManager;
diff --git a/src/audio/PoliceRadio.h b/src/audio/PoliceRadio.h
index 0f351f52..c01f21ce 100644
--- a/src/audio/PoliceRadio.h
+++ b/src/audio/PoliceRadio.h
@@ -15,7 +15,7 @@ struct cAMCrime {
}
};
-static_assert(sizeof(cAMCrime) == 20, "cAMCrime: error ");
+VALIDATE_SIZE(cAMCrime, 20);
class cPoliceRadioQueue
{
@@ -43,4 +43,4 @@ public:
}
};
-static_assert(sizeof(cPoliceRadioQueue) == 444, "cPoliceRadioQueue: error "); \ No newline at end of file
+VALIDATE_SIZE(cPoliceRadioQueue, 444);