2020-04-09 18:50:24 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-01-16 13:44:59 +00:00
|
|
|
#include "Crime.h"
|
2020-04-09 18:50:24 +00:00
|
|
|
|
|
|
|
struct cAMCrime {
|
|
|
|
int32 type;
|
|
|
|
CVector position;
|
|
|
|
uint16 timer;
|
|
|
|
|
|
|
|
cAMCrime()
|
|
|
|
{
|
|
|
|
type = CRIME_NONE;
|
|
|
|
position = CVector(0.0f, 0.0f, 0.0f);
|
|
|
|
timer = 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-05-10 15:49:33 +00:00
|
|
|
VALIDATE_SIZE(cAMCrime, 20);
|
2020-04-09 18:50:24 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-10-02 00:55:26 +00:00
|
|
|
VALIDATE_SIZE(cPoliceRadioQueue, 0x1BC);
|