From 9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686 Mon Sep 17 00:00:00 2001 From: claude-bot Date: Mon, 13 Jul 2026 12:27:07 +0000 Subject: Import Cai1Hsu/re3 @ miami (reVC / GTA:VC decompilation) Snapshot import (no upstream history) into git.ancap.in.ua/claude, per @lzcnt. Source: https://github.com/Cai1Hsu/re3 branch miami. --- src/audio/PoliceRadio.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/audio/PoliceRadio.h (limited to 'src/audio/PoliceRadio.h') diff --git a/src/audio/PoliceRadio.h b/src/audio/PoliceRadio.h new file mode 100644 index 0000000..d7c928e --- /dev/null +++ b/src/audio/PoliceRadio.h @@ -0,0 +1,46 @@ +#pragma once + +#include "Crime.h" + +struct cAMCrime { + int32 type; + CVector position; + uint16 timer; + + cAMCrime() + { + type = CRIME_NONE; + position = CVector(0.0f, 0.0f, 0.0f); + timer = 0; + } +}; + +VALIDATE_SIZE(cAMCrime, 20); + +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; + } + } +}; + +VALIDATE_SIZE(cPoliceRadioQueue, 0x1BC); -- cgit v1.2.3