summaryrefslogtreecommitdiffstats
path: root/src/audio/PoliceRadio.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-14 23:10:50 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-14 23:10:50 +0200
commite373d0526ef07183cba8e89aba46f2ab416e67ba (patch)
treee6b2052e078cd2ad2ae1503262421c6858a20a0f /src/audio/PoliceRadio.h
parentCFont (diff)
parentRwMatFX support with linked RW libs (diff)
downloadre3-e373d0526ef07183cba8e89aba46f2ab416e67ba.tar
re3-e373d0526ef07183cba8e89aba46f2ab416e67ba.tar.gz
re3-e373d0526ef07183cba8e89aba46f2ab416e67ba.tar.bz2
re3-e373d0526ef07183cba8e89aba46f2ab416e67ba.tar.lz
re3-e373d0526ef07183cba8e89aba46f2ab416e67ba.tar.xz
re3-e373d0526ef07183cba8e89aba46f2ab416e67ba.tar.zst
re3-e373d0526ef07183cba8e89aba46f2ab416e67ba.zip
Diffstat (limited to 'src/audio/PoliceRadio.h')
-rw-r--r--src/audio/PoliceRadio.h90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/audio/PoliceRadio.h b/src/audio/PoliceRadio.h
index 4c7030f1..0f351f52 100644
--- a/src/audio/PoliceRadio.h
+++ b/src/audio/PoliceRadio.h
@@ -1,46 +1,46 @@
-#pragma once
-
-#include "Wanted.h"
-
-struct cAMCrime {
- int32 type;
- CVector position;
- uint16 timer;
-
- cAMCrime()
- {
- type = CRIME_NONE;
- position = CVector(0.0f, 0.0f, 0.0f);
- timer = 0;
- }
-};
-
-static_assert(sizeof(cAMCrime) == 20, "cAMCrime: error ");
-
-class cPoliceRadioQueue
-{
-public:
- int32 crimesSamples[60];
- uint8 policeChannelTimer;
- uint8 policeChannelTimerSeconds;
- uint8 policeChannelCounterSeconds;
- cAMCrime crimes[10];
-
- cPoliceRadioQueue()
- {
- policeChannelTimerSeconds = 0;
- policeChannelCounterSeconds = 0;
- policeChannelTimer = 0;
- }
-
- void Add(uint32 sample)
- {
- if (policeChannelTimer != 60) {
- crimesSamples[policeChannelTimerSeconds] = sample;
- policeChannelTimer++;
- policeChannelTimerSeconds = (policeChannelTimerSeconds + 1) % 60;
- }
- }
-};
-
+#pragma once
+
+#include "Wanted.h"
+
+struct cAMCrime {
+ int32 type;
+ CVector position;
+ uint16 timer;
+
+ cAMCrime()
+ {
+ type = CRIME_NONE;
+ position = CVector(0.0f, 0.0f, 0.0f);
+ timer = 0;
+ }
+};
+
+static_assert(sizeof(cAMCrime) == 20, "cAMCrime: error ");
+
+class cPoliceRadioQueue
+{
+public:
+ int32 crimesSamples[60];
+ uint8 policeChannelTimer;
+ uint8 policeChannelTimerSeconds;
+ uint8 policeChannelCounterSeconds;
+ cAMCrime crimes[10];
+
+ cPoliceRadioQueue()
+ {
+ policeChannelTimerSeconds = 0;
+ policeChannelCounterSeconds = 0;
+ policeChannelTimer = 0;
+ }
+
+ void Add(uint32 sample)
+ {
+ if (policeChannelTimer != 60) {
+ crimesSamples[policeChannelTimerSeconds] = sample;
+ policeChannelTimer++;
+ policeChannelTimerSeconds = (policeChannelTimerSeconds + 1) % 60;
+ }
+ }
+};
+
static_assert(sizeof(cPoliceRadioQueue) == 444, "cPoliceRadioQueue: error "); \ No newline at end of file