1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 19:30:10 +00:00

Merge pull request #198 from ShFil119/audio6

Audio part 6
This commit is contained in:
aap 2019-08-28 12:58:42 +02:00 committed by GitHub
commit 792893df59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 4528 additions and 1844 deletions

View file

@ -119,7 +119,7 @@ bool EAX3ListenerInterpolate(LPEAXLISTENERPROPERTIES lpStart, LPEAXLISTENERPROPE
if (lpStart->flReflectionsDelay == lpFinish->flReflectionsDelay)
lpResult->flReflectionsDelay = lpStart->flReflectionsDelay;
else
lpResult->flReflectionsDelay = (float)exp( (log(lpStart->flReflectionsDelay+0.0001) * flInvRatio) + (log(lpFinish->flReflectionsDelay+0.0001) * flRatio) );
lpResult->flReflectionsDelay = (float)exp( (log(lpStart->flReflectionsDelay+0.0001f) * flInvRatio) + (log(lpFinish->flReflectionsDelay+0.0001f) * flRatio) );
// Reflections Pan
@ -155,7 +155,7 @@ bool EAX3ListenerInterpolate(LPEAXLISTENERPROPERTIES lpStart, LPEAXLISTENERPROPE
if (lpStart->flReverbDelay == lpFinish->flReverbDelay)
lpResult->flReverbDelay = lpStart->flReverbDelay;
else
lpResult->flReverbDelay = (float)exp( (log(lpStart->flReverbDelay+0.0001) * flInvRatio) + (log(lpFinish->flReverbDelay+0.0001) * flRatio) );
lpResult->flReverbDelay = (float)exp( (log(lpStart->flReverbDelay+0.0001f) * flInvRatio) + (log(lpFinish->flReverbDelay+0.0001f) * flRatio) );
// Reverb Pan
@ -354,7 +354,7 @@ void Clamp(EAXVECTOR *eaxVector)
// Array of scenario names //
//////////////////////////////////////////////////////
char* EAX30_SCENARIO_NAMES[] =
const char* EAX30_SCENARIO_NAMES[] =
{
"Castle",
"Factory",
@ -376,7 +376,7 @@ char* EAX30_SCENARIO_NAMES[] =
// Array of standardised location names //
//////////////////////////////////////////////////////
char* EAX30_LOCATION_NAMES[] =
const char* EAX30_LOCATION_NAMES[] =
{
"Hall",
"Large Room",
@ -410,7 +410,7 @@ EAXLISTENERPROPERTIES EAX30_STANDARD_PRESETS[EAX30_NUM_STANDARD_SCENARIOS][EAX30
// Array of original environment names //
//////////////////////////////////////////////////////
char* EAX30_ORIGINAL_PRESET_NAMES[] =
const char* EAX30_ORIGINAL_PRESET_NAMES[] =
{
"Generic",
"Padded Cell",
@ -480,7 +480,7 @@ EAXLISTENERPROPERTIES EAX30_ORIGINAL_PRESETS[] =
// Array of sport environment names //
//////////////////////////////////////////////////////
char* EAX30_SPORTS_PRESET_NAMES[] =
const char* EAX30_SPORTS_PRESET_NAMES[] =
{
"Empty Stadium",
"Full Stadium",
@ -512,7 +512,7 @@ EAXLISTENERPROPERTIES EAX30_SPORTS_PRESETS[] =
// Array of prefab environment names //
//////////////////////////////////////////////////////
char* EAX30_PREFAB_PRESET_NAMES[] =
const char* EAX30_PREFAB_PRESET_NAMES[] =
{
"Workshop",
"School Room",
@ -540,7 +540,7 @@ EAXLISTENERPROPERTIES EAX30_PREFAB_PRESETS[] =
// Array of Domes & Pipes environment names //
//////////////////////////////////////////////////////
char* EAX30_DOMESNPIPES_PRESET_NAMES[] =
const char* EAX30_DOMESNPIPES_PRESET_NAMES[] =
{
"Domed Tomb",
"Saint Paul's Dome",
@ -570,7 +570,7 @@ EAXLISTENERPROPERTIES EAX30_DOMESNPIPES_PRESETS[] =
// Array of Outdoors environment names //
//////////////////////////////////////////////////////
char* EAX30_OUTDOORS_PRESET_NAMES[] =
const char* EAX30_OUTDOORS_PRESET_NAMES[] =
{
"Backyard",
"Rolling Plains",
@ -598,7 +598,7 @@ EAXLISTENERPROPERTIES EAX30_OUTDOORS_PRESETS[] =
// Array of Mood environment names //
//////////////////////////////////////////////////////
char* EAX30_MOOD_PRESET_NAMES[] =
const char* EAX30_MOOD_PRESET_NAMES[] =
{
"Heaven",
"Hell",
@ -622,7 +622,7 @@ EAXLISTENERPROPERTIES EAX30_MOOD_PRESETS[] =
// Array of driving environment names //
//////////////////////////////////////////////////////
char* EAX30_DRIVING_PRESET_NAMES[] =
const char* EAX30_DRIVING_PRESET_NAMES[] =
{
"Race Commentator",
"Pit Garage",
@ -656,7 +656,7 @@ EAXLISTENERPROPERTIES EAX30_DRIVING_PRESETS[] =
// Array of City environment names //
//////////////////////////////////////////////////////
char* EAX30_CITY_PRESET_NAMES[] =
const char* EAX30_CITY_PRESET_NAMES[] =
{
"City Streets",
"Subway",
@ -686,7 +686,7 @@ EAXLISTENERPROPERTIES EAX30_CITY_PRESETS[] =
// Array of Misc environment names //
//////////////////////////////////////////////////////
char* EAX30_MISC_PRESET_NAMES[] =
const char* EAX30_MISC_PRESET_NAMES[] =
{
"Dusty Box Room",
"Chapel",

View file

@ -372,7 +372,7 @@ EAX30_SCENARIO;
// Array of scenario names //
//////////////////////////////////////////////////////
extern char* EAX30_SCENARIO_NAMES[];
extern const char* EAX30_SCENARIO_NAMES[];
//////////////////////////////////////////////////////
// Standardised Locations enumerated //
@ -402,7 +402,7 @@ EAX30_LOCATION;
// Array of standardised location names //
//////////////////////////////////////////////////////
extern char* EAX30_LOCATION_NAMES[];
extern const char* EAX30_LOCATION_NAMES[];
//////////////////////////////////////////////////////
// Number of effects in each scenario //
@ -471,7 +471,7 @@ EAX30_ORIGINAL_PRESET_ENUMS;
// Array of original environment names //
//////////////////////////////////////////////////////
extern char* EAX30_ORIGINAL_PRESET_NAMES[];
extern const char* EAX30_ORIGINAL_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Original effects matrix //
@ -501,7 +501,7 @@ EAX30_SPORTS_PRESET_ENUMS;
// Array of sport environment names //
//////////////////////////////////////////////////////
extern char* EAX30_SPORTS_PRESET_NAMES[];
extern const char* EAX30_SPORTS_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Sports effects matrix //
@ -529,7 +529,7 @@ EAX30_PREFAB_PRESET_ENUMS;
// Array of prefab environment names //
//////////////////////////////////////////////////////
char* EAX30_PREFAB_PRESET_NAMES[];
extern const char* EAX30_PREFAB_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Prefab effects matrix //
@ -558,7 +558,7 @@ EAX30_DOMESNPIPES_PRESET_ENUMS;
// Array of Domes & Pipes environment names //
//////////////////////////////////////////////////////
extern char* EAX30_DOMESNPIPES_PRESET_NAMES[];
extern const char* EAX30_DOMESNPIPES_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Domes & Pipes effects matrix //
@ -586,7 +586,7 @@ EAX30_OUTDOORS_PRESET_ENUMS;
// Array of Outdoors environment names //
//////////////////////////////////////////////////////
extern char* EAX30_OUTDOORS_PRESET_NAMES[];
extern const char* EAX30_OUTDOORS_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Outdoors effects matrix //
@ -612,7 +612,7 @@ EAX30_MOOD_PRESET_ENUMS;
// Array of Mood environment names //
//////////////////////////////////////////////////////
extern char* EAX30_MOOD_PRESET_NAMES[];
extern const char* EAX30_MOOD_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Mood effects matrix //
@ -643,7 +643,7 @@ EAX30_DRIVING_PRESET_ENUMS;
// Array of driving environment names //
//////////////////////////////////////////////////////
extern char* EAX30_DRIVING_PRESET_NAMES[];
extern const char* EAX30_DRIVING_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Driving effects matrix //
@ -672,7 +672,7 @@ EAX30_CITY_PRESET_ENUMS;
// Array of City environment names //
//////////////////////////////////////////////////////
extern char* EAX30_CITY_PRESET_NAMES[];
extern const char* EAX30_CITY_PRESET_NAMES[];
//////////////////////////////////////////////////////
// City effects matrix //
@ -699,7 +699,7 @@ EAX30_MISC_PRESET_ENUMS;
// Array of Misc environment names //
//////////////////////////////////////////////////////
extern char* EAX30_MISC_PRESET_NAMES[];
extern const char* EAX30_MISC_PRESET_NAMES[];
//////////////////////////////////////////////////////
// Misc effects matrix //

View file

@ -129,7 +129,7 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
// Create associations from hierarchies for a given clump
void
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, char **animNames, int numAssocs)
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs)
{
int i;
CAnimBlock *animBlock;
@ -157,5 +157,5 @@ STARTPATCHES
InjectHook(0x401420, (CAnimBlendAssociation *(CAnimBlendAssocGroup::*)(uint32))&CAnimBlendAssocGroup::CopyAnimation, PATCH_JUMP);
InjectHook(0x4013E0, (CAnimBlendAssociation *(CAnimBlendAssocGroup::*)(const char*))&CAnimBlendAssocGroup::CopyAnimation, PATCH_JUMP);
InjectHook(0x401130, (void (CAnimBlendAssocGroup::*)(const char*))&CAnimBlendAssocGroup::CreateAssociations, PATCH_JUMP);
InjectHook(0x401220, (void (CAnimBlendAssocGroup::*)(const char*, RpClump*, char**, int))&CAnimBlendAssocGroup::CreateAssociations, PATCH_JUMP);
InjectHook(0x401220, (void (CAnimBlendAssocGroup::*)(const char*, RpClump*, const char**, int))&CAnimBlendAssocGroup::CreateAssociations, PATCH_JUMP);
ENDPATCHES

View file

@ -16,5 +16,5 @@ public:
CAnimBlendAssociation *CopyAnimation(uint32 id);
CAnimBlendAssociation *CopyAnimation(const char *name);
void CreateAssociations(const char *name);
void CreateAssociations(const char *blockName, RpClump *clump, char **animNames, int numAssocs);
void CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs);
};

View file

@ -185,7 +185,7 @@ CAnimBlendAssociation::UpdateBlend(float timeDelta)
if(blendAmount <= 0.0f && blendDelta < 0.0f){
// We're faded out and are not fading in
blendAmount = 0.0f;
blendDelta = max(0.0, blendDelta);
blendDelta = max(0.0f, blendDelta);
if(flags & ASSOC_DELETEFADEDOUT){
if(callbackType == CB_FINISH || callbackType == CB_DELETE)
callback(this, callbackArg);
@ -197,7 +197,7 @@ CAnimBlendAssociation::UpdateBlend(float timeDelta)
if(blendAmount > 1.0f){
// Maximally faded in, clamp values
blendAmount = 1.0f;
blendDelta = min(0.0, blendDelta);
blendDelta = min(0.0f, blendDelta);
}
return true;

View file

@ -198,7 +198,7 @@ AnimAssocDesc aStdAnimDescsSide[] = {
{ ANIM_IDLE_STANCE, ASSOC_REPEAT },
{ ANIM_WALK_START, ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION },
};
char *aStdAnimations[] = {
char const *aStdAnimations[] = {
"walk_civi",
"run_civi",
"sprint_panic",
@ -373,162 +373,162 @@ char *aStdAnimations[] = {
"PHONE_out",
"PHONE_talk",
};
char *aPlayerAnimations[] = {
char const *aPlayerAnimations[] = {
"walk_player",
"run_player",
"SPRINT_civi",
"IDLE_STANCE",
"walk_start",
};
char *aPlayerWithRocketAnimations[] = {
char const *aPlayerWithRocketAnimations[] = {
"walk_rocket",
"run_rocket",
"run_rocket",
"idle_rocket",
"walk_start_rocket",
};
char *aPlayer1ArmedAnimations[] = {
char const *aPlayer1ArmedAnimations[] = {
"walk_player",
"run_1armed",
"SPRINT_civi",
"IDLE_STANCE",
"walk_start",
};
char *aPlayer2ArmedAnimations[] = {
char const *aPlayer2ArmedAnimations[] = {
"walk_player",
"run_armed",
"run_armed",
"idle_stance",
"walk_start",
};
char *aPlayerBBBatAnimations[] = {
char const *aPlayerBBBatAnimations[] = {
"walk_player",
"run_player",
"run_player",
"IDLE_STANCE",
"walk_start",
};
char *aShuffleAnimations[] = {
char const *aShuffleAnimations[] = {
"WALK_shuffle",
"RUN_civi",
"SPRINT_civi",
"IDLE_STANCE",
};
char *aOldAnimations[] = {
char const *aOldAnimations[] = {
"walk_old",
"run_civi",
"sprint_civi",
"idle_stance",
};
char *aGang1Animations[] = {
char const *aGang1Animations[] = {
"walk_gang1",
"run_gang1",
"sprint_civi",
"idle_stance",
};
char *aGang2Animations[] = {
char const *aGang2Animations[] = {
"walk_gang2",
"run_gang1",
"sprint_civi",
"idle_stance",
};
char *aFatAnimations[] = {
char const *aFatAnimations[] = {
"walk_fat",
"run_civi",
"woman_runpanic",
"idle_stance",
};
char *aOldFatAnimations[] = {
char const *aOldFatAnimations[] = {
"walk_fatold",
"run_fatold",
"woman_runpanic",
"idle_stance",
};
char *aStdWomanAnimations[] = {
char const *aStdWomanAnimations[] = {
"woman_walknorm",
"woman_run",
"woman_runpanic",
"woman_idlestance",
};
char *aWomanShopAnimations[] = {
char const *aWomanShopAnimations[] = {
"woman_walkshop",
"woman_run",
"woman_run",
"woman_idlestance",
};
char *aBusyWomanAnimations[] = {
char const *aBusyWomanAnimations[] = {
"woman_walkbusy",
"woman_run",
"woman_runpanic",
"woman_idlestance",
};
char *aSexyWomanAnimations[] = {
char const *aSexyWomanAnimations[] = {
"woman_walksexy",
"woman_run",
"woman_runpanic",
"woman_idlestance",
};
char *aOldWomanAnimations[] = {
char const *aOldWomanAnimations[] = {
"woman_walkold",
"woman_run",
"woman_runpanic",
"woman_idlestance",
};
char *aFatWomanAnimations[] = {
char const *aFatWomanAnimations[] = {
"walk_fat",
"woman_run",
"woman_runpanic",
"woman_idlestance",
};
char *aPanicChunkyAnimations[] = {
char const *aPanicChunkyAnimations[] = {
"run_fatold",
"woman_runpanic",
"woman_runpanic",
"idle_stance",
};
char *aPlayerStrafeBackAnimations[] = {
char const *aPlayerStrafeBackAnimations[] = {
"walk_player_back",
"run_player_back",
"run_player_back",
"IDLE_STANCE",
"walk_start_back",
};
char *aPlayerStrafeLeftAnimations[] = {
char const *aPlayerStrafeLeftAnimations[] = {
"walk_player_left",
"run_left",
"run_left",
"IDLE_STANCE",
"walk_start_left",
};
char *aPlayerStrafeRightAnimations[] = {
char const *aPlayerStrafeRightAnimations[] = {
"walk_player_right",
"run_right",
"run_right",
"IDLE_STANCE",
"walk_start_right",
};
char *aRocketStrafeBackAnimations[] = {
char const *aRocketStrafeBackAnimations[] = {
"walk_rocket_back",
"run_rocket_back",
"run_rocket_back",
"idle_rocket",
"walkst_rocket_back",
};
char *aRocketStrafeLeftAnimations[] = {
char const *aRocketStrafeLeftAnimations[] = {
"walk_rocket_left",
"run_rocket_left",
"run_rocket_left",
"idle_rocket",
"walkst_rocket_left",
};
char *aRocketStrafeRightAnimations[] = {
char const *aRocketStrafeRightAnimations[] = {
"walk_rocket_right",
"run_rocket_right",
"run_rocket_right",
"idle_rocket",
"walkst_rocket_right",
};
AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS] = {
const AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS] = {
{ "man", "ped", MI_COP, 173, aStdAnimations, aStdAnimDescs },
{ "player", "ped", MI_COP, 5, aPlayerAnimations, aStdAnimDescs },
{ "playerrocket", "ped", MI_COP, 5, aPlayerWithRocketAnimations, aStdAnimDescs },
@ -749,7 +749,7 @@ CAnimManager::LoadAnimFiles(void)
RpClump *clump = (RpClump*)mi->CreateInstance();
RpAnimBlendClumpInit(clump);
CAnimBlendAssocGroup *group = &CAnimManager::ms_aAnimAssocGroups[i];
AnimAssocDefinition *def = &CAnimManager::ms_aAnimAssocDefinitions[i];
const AnimAssocDefinition *def = &CAnimManager::ms_aAnimAssocDefinitions[i];
group->CreateAssociations(def->blockName, clump, def->animNames, def->numAnims);
for(j = 0; j < group->numAssociations; j++)
group->GetAnimation(j)->flags |= def->animDescs[j].flags;

View file

@ -231,17 +231,17 @@ struct AnimAssocDesc
struct AnimAssocDefinition
{
char *name;
char *blockName;
char const *name;
char const *blockName;
int32 modelIndex;
int32 numAnims;
char **animNames;
char const **animNames;
AnimAssocDesc *animDescs;
};
class CAnimManager
{
static AnimAssocDefinition ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS];
static const AnimAssocDefinition ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS];
static CAnimBlock *ms_aAnimBlocks; //[2]
static CAnimBlendHierarchy *ms_aAnimations; //[250]
static int32 &ms_numAnimBlocks;

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "AudioSamples.h"
#include "DMAudio.h"
@ -8,7 +8,7 @@ class tActiveSample
{
public:
int32 m_nEntityIndex;
int32 field_4;
int32 m_counter;
int32 m_nSampleIndex;
uint8 m_bBankIndex;
uint8 m_bIsDistant;
@ -49,9 +49,11 @@ public:
uint8 field_89;
uint8 field_90;
uint8 field_91;
// no methods
};
static_assert(sizeof(tActiveSample) == 0x5c, "tActiveSample: error");
static_assert(sizeof(tActiveSample) == 92, "tActiveSample: error");
enum eAudioType : int32 {
AUDIOTYPE_PHYSICAL = 0,
@ -72,6 +74,7 @@ enum eAudioType : int32 {
};
class CPhysical;
class CAutomobile;
class tAudioEntity
{
@ -83,37 +86,45 @@ public:
int16 m_awAudioEvent[4];
uint8 gap_18[2];
float m_afVolume[4];
uint8 field_24;
uint8 m_Loops;
uint8 field_25[3];
// no methods
};
static_assert(sizeof(tAudioEntity) == 0x28, "tAudioEntity: error");
static_assert(sizeof(tAudioEntity) == 40, "tAudioEntity: error");
class tPedComment
{
public:
int m_nSampleIndex;
int field_4;
int32 m_nSampleIndex;
int32 m_entityIndex;
CVector m_vecPos;
float m_fDistance;
uint8 m_bVolume;
uint8 field_25;
int8 field_25; // allocated time?
uint8 gap_26[2];
// no methods
};
static_assert(sizeof(tPedComment) == 0x1c, "tPedComment: error");
static_assert(sizeof(tPedComment) == 28, "tPedComment: error");
class cPedComments
{
public:
tPedComment m_asPedComments[40];
uint8 field_1120[40];
uint8 field_1160[2];
uint8 field_1162;
tPedComment m_asPedComments[2][20];
uint8 indexMap[2][20];
uint8 nrOfCommentsInBank[2];
uint8 activeBank;
uint8 gap_1163[1];
// reversed all methods
void Add(tPedComment *com); /// ok
void Process(); /// ok
};
static_assert(sizeof(cPedComments) == 0x48c, "cPedComments: error");
static_assert(sizeof(cPedComments) == 1164, "cPedComments: error");
class CEntity;
@ -131,9 +142,11 @@ public:
CVector m_vecPosition;
float m_fDistance;
int32 m_nBaseVolume;
// no methods
};
static_assert(sizeof(cAudioCollision) == 0x28, "cAudioCollision: error");
static_assert(sizeof(cAudioCollision) == 40, "cAudioCollision: error");
class cAudioCollisionManager
{
@ -144,9 +157,11 @@ public:
uint8 m_bCollisionsInQueue;
uint8 gap_811;
cAudioCollision m_sQueue;
void AddCollisionToRequestedQueue(); // todo
};
static_assert(sizeof(cAudioCollisionManager) == 0x354, "cAudioCollisionManager: error");
static_assert(sizeof(cAudioCollisionManager) == 852, "cAudioCollisionManager: error");
class cMissionAudio
{
@ -164,16 +179,20 @@ public:
uint8 field_29;
uint8 field_30;
uint8 field_31;
// no methods
};
static_assert(sizeof(cMissionAudio) == 0x20, "cMissionAudio: error");
static_assert(sizeof(cMissionAudio) == 32, "cMissionAudio: error");
class cVehicleParams;
class CPlane;
class CVehicle;
class CPed;
class cPedParams;
class cTransmission;
class cAudioScriptObject {
class cAudioScriptObject
{
public:
int16 AudioId;
char _pad0[2];
@ -182,14 +201,13 @@ public:
static void *operator new(size_t);
static void *operator new(size_t, int);
static void operator delete(void*, size_t);
static void operator delete(void*, int);
static void operator delete(void *, size_t);
static void operator delete(void *, int);
};
static_assert(sizeof(cAudioScriptObject) == 0x14, "cAudioScriptObject: error");
static_assert(sizeof(cAudioScriptObject) == 20, "cAudioScriptObject: error");
enum
{
enum {
/*
REFLECTION_YMAX = 0, top
REFLECTION_YMIN = 1, bottom
@ -206,8 +224,7 @@ enum
MAX_REFLECTIONS,
};
enum AudioEntityHandle
{
enum AudioEntityHandle {
AEHANDLE_NONE = -5,
AEHANDLE_ERROR_NOAUDIOSYS = -4,
AEHANDLE_ERROR_NOFREESLOT = -3,
@ -215,10 +232,6 @@ enum AudioEntityHandle
AEHANDLE_ERROR_BADAUDIOTYPE = -1,
};
#define AEHANDLE_IS_FAILED(h) ((h)<0)
#define AEHANDLE_IS_OK(h) ((h)>=0)
class cAudioManager
{
public:
@ -265,122 +278,40 @@ public:
uint8 field_19192;
uint8 m_bUserPause;
uint8 m_bPreviousUserPause;
uint8 field_19195;
uint8 field_19195; // time?
uint32 m_FrameCounter;
inline uint32 GetFrameCounter(void) { return m_FrameCounter; }
float GetReflectionsDistance(int32 idx) { return m_afReflectionsDistances[idx]; }
int32 GetRandomNumber(int32 idx) { return m_anRandomTable[idx]; }
//
// getters
uint32 GetFrameCounter() const { return m_FrameCounter; }
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
// "Should" be in alphabetic order, except "getXTalkSfx"
void AddDetailsToRequestedOrderList(uint8 sample); /// ok
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 unk1,
uint8 unk2, bool notLooping); /// ok
uint8 counter, bool notLooping); /// ok
void AddReflectionsToRequestedQueue(); /// ok (check value)
void AddReleasingSounds(); // todo (difficult)
void AddSampleToRequestedQueue(); /// ok
void AgeCrimes(); // todo
int8 GetCurrent3DProviderIndex(); /// ok
void CalculateDistance(bool *ptr, float dist); /// ok
bool CheckForAnAudioFileOnCD(); /// ok
bool CheckForAnAudioFileOnCD() const; /// ok
void ClearMissionAudio(); /// ok
void ClearRequestedQueue(); /// ok
int32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2,
float speedMultiplier); /// ok
float speedMultiplier) const; /// ok
int32 ComputePan(float, CVector *); // todo
uint32 ComputeVolume(int emittingVolume, float soundIntensity, float distance); /// ok
int32 CreateEntity(int32 type, void *entity); /// ok
uint32 ComputeVolume(int emittingVolume, float soundIntensity, float distance) const; /// ok
int32 CreateEntity(int32 type, CPhysical *entity); /// ok
void DestroyAllGameCreatedEntities(); /// ok
void DestroyEntity(int32 id); /// ok
void DoJumboVolOffset() const; /// ok
void DoPoliceRadioCrackle(); /// ok
void GenerateIntegerRandomNumberTable(); /// ok
float GetDistanceSquared(CVector *v); /// ok
void TranslateEntity(CVector *v1, CVector *v2); /// ok
// done
void Initialise();
void PostInitialiseGameSpecificSetup();
void InitialisePoliceRadioZones(); // todo
void ResetAudioLogicTimers(int32 timer); // todo
void Terminate();
char GetMissionScriptPoliceAudioPlayingStatus();
bool GetMissionAudioLoadingStatus();
uint8 GetNum3DProvidersAvailable();
bool IsMP3RadioChannelAvailable();
uint8 GetCDAudioDriveLetter();
void SetEffectsMasterVolume(uint8 volume);
void SetMusicMasterVolume(uint8 volume);
void SetEffectsFadeVolume(uint8 volume);
void SetMusicFadeVolume(uint8 volume);
void SetSpeakerConfig(int32 conf);
bool SetupJumboEngineSound(uint8, int32); // todo
void PreInitialiseGameSpecificSetup();
void SetMissionScriptPoliceAudio(int32 sfx);
bool UsesSiren(int32 model);
bool UsesSirenSwitching(int32 model);
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission);
char* Get3DProviderName(uint8 id);
bool SetupJumboFlySound(uint8 emittingVol); /// ok
bool SetupJumboRumbleSound(uint8 emittingVol); /// ok
bool SetupJumboTaxiSound(uint8 vol); /// ok
bool SetupJumboWhineSound(uint8 emittingVol, int32 freq); /// ok
void PlayLoadedMissionAudio();
void SetMissionAudioLocation(float x, float y, float z);
void ResetPoliceRadio();
void InterrogateAudioEntities();
bool UsesReverseWarning(int32 model);
bool HasAirBrakes(int32 model);
int32 GetJumboTaxiFreq();
bool IsMissionAudioSampleFinished();
void InitialisePoliceRadio(); // todo
int32 RandomDisplacement(uint32 seed);
void ReleaseDigitalHandle();
void ReacquireDigitalHandle();
void SetDynamicAcousticModelingStatus(bool status);
bool IsAudioInitialised() const;
void SetEntityStatus(int32 id, bool status);
void PreTerminateGameSpecificShutdown();
void PostTerminateGameSpecificShutdown();
void PlayerJustGotInCar();
void PlayerJustLeftCar();
void Service();
void GetPhrase(uint32 *phrase, uint32 *prevPhrase, uint32 sample, uint32 maxOffset);
void DoJumboVolOffset();
int32 GetPedCommentSfx(CPed *ped, int32 sound);
// functions returning talk sfx,
// order from GetPedCommentSfx
uint32 GetPlayerTalkSfx(int16 sound);
uint32 GetCopTalkSfx(int16 sound);
uint32 GetSwatTalkSfx(int16 sound);
@ -457,29 +388,71 @@ public:
uint32 GetGenericMaleTalkSfx(int16 sound);
uint32 GetGenericFemaleTalkSfx(int16 sound);
// end of functions returning talk sfx
void GenerateIntegerRandomNumberTable(); /// ok
char *Get3DProviderName(uint8 id) const;
uint8 GetCDAudioDriveLetter() const;
int8 GetCurrent3DProviderIndex() const; /// ok
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
float GetCollisionOneShotRatio(uint32 a, float b) const; /// ok
float GetCollisionRatio(float a, float b, float c, float d) const; /// ok
float GetDistanceSquared(CVector *v) const; /// ok
int32 GetJumboTaxiFreq() const; /// ok
bool GetMissionAudioLoadingStatus() const; /// ok
char GetMissionScriptPoliceAudioPlayingStatus() const; /// ok
uint8 GetNum3DProvidersAvailable() const;
int32 GetPedCommentSfx(CPed *ped, int32 sound);
void GetPhrase(uint32 *phrase, uint32 *prevPhrase, uint32 sample, uint32 maxOffset) const;
float GetVehicleDriveWheelSkidValue(uint8 a1, CAutomobile *a2, cTransmission *a3,
float a4); // todo
int32 GetVehicleNonDriveWheelSkidValue(float a1, int a2, int a3, int a4, float a5); // todo
bool HasAirBrakes(int32 model) const; /// ok
void Initialise(); /// ok
void InitialisePoliceRadio(); // todo
void InitialisePoliceRadioZones(); // todo
void InterrogateAudioEntities(); /// ok
bool IsAudioInitialised() const; /// ok
bool IsMissionAudioSampleFinished(); /// ok
bool IsMP3RadioChannelAvailable() const;
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; /// ok
void PlayLoadedMissionAudio(); /// ok
void PlayOneShot(int32 index, int16 sound, float vol); // todo
uint32 PlaySuspectLastSeen(float x, float y, float z); // todo
void PlayerJustGotInCar() const; /// ok
void PlayerJustLeftCar() const; /// ok
void PostInitialiseGameSpecificSetup(); /// ok
void PostTerminateGameSpecificShutdown(); /// ok
void PreInitialiseGameSpecificSetup() const;
void PreloadMissionAudio(char *); // todo
void PreTerminateGameSpecificShutdown(); /// ok
/// processX - main logic of adding new sounds
void ProcessActiveQueues(); // todo
bool ProcessAirBrakes(cVehicleParams *params); /// ok
void ProcessAirportScriptObject(uint8 sound); /// ok
bool ProcessBoatEngine(cVehicleParams *params); // todo requires CBoat
bool ProcessBoatMovingOverWater(cVehicleParams *params); // todo requires CBoat
void ProcessBridge(); // todo requires CBridge
bool ProcessBoatEngine(cVehicleParams *params); /// ok
bool ProcessBoatMovingOverWater(cVehicleParams *params); /// ok
void ProcessBridge(); /// ok
void ProcessBridgeMotor(); /// ok
void ProcessBridgeOneShots(); // todo requires CBridge
void ProcessBridgeOneShots(); /// ok
void ProcessBridgeWarning(); /// ok
bool ProcessCarBombTick(void *); // todo requires CVehicle
bool ProcessCarBombTick(cVehicleParams *params); /// ok
void ProcessCesna(void *); // todo requires CPlane
void ProcessCinemaScriptObject(uint8 sound); /// ok
void ProcessCrane(); // todo requires CCrane
void ProcessDocksScriptObject(uint8 sound); /// ok
// bool ProcessEngineDamage(void *); //todo requires CVehicle
bool ProcessEngineDamage(cVehicleParams *params); /// ok
void ProcessEntity(int32 sound); /// ok
void ProcessExplosions(int32 explosion); // todo requires CExplosion
void ProcessExplosions(int32 explosion); /// ok
void ProcessFireHydrant(); /// ok
void ProcessFires(int32 entity); // todo requires gFireManager
void ProcessFrontEnd(); /// ok
void ProcessGarages(); // todo requires CGarages::aGarages
// bool ProcessHelicopter(void *); // todo requires CVehicle
bool ProcessHelicopter(cVehicleParams *params); /// ok
void ProcessHomeScriptObject(uint8 sound); /// ok
void ProcessJumbo(cVehicleParams *); /// ok
void ProcessJumboAccel(CPlane *plane); /// ok
@ -490,52 +463,88 @@ public:
void ProcessJumboTaxi(); /// ok
void ProcessLaunderetteScriptObject(uint8 sound); /// ok
void ProcessLoopingScriptObject(uint8 sound); /// ok
// void ProcessMissionAudio();
// void ProcessModelVehicle(void *);
// void ProcessOneShotScriptObject(uint8 sound);
void ProcessPed(CPhysical *p); // todo
// void ProcessPedHeadphones(void *);
// void ProcessPedOneShots(void *);
void ProcessMissionAudio(); /// ok
void ProcessModelCarEngine(cVehicleParams *params); /// ok (check float comparisons)
void ProcessOneShotScriptObject(uint8 sound); /// ok
void ProcessPed(CPhysical *ped); /// ok
void ProcessPedHeadphones(cPedParams *params); /// ok
void ProcessPedOneShots(cPedParams *params); // todo later (weird)
void ProcessPhysical(int32 id); /// ok
void ProcessPlane(void *); // todo
// void ProcessPlayersVehicleEngine(void *, void *);
void ProcessPlane(cVehicleParams *params); /// ok
void ProcessPlayersVehicleEngine(cVehicleParams *params,
CAutomobile *automobile); /// ok (check float comparisons)
void ProcessPoliceCellBeatingScriptObject(uint8 sound); // todo
void ProcessPornCinema(uint8 sound); /// ok
void ProcessProjectiles(); // todo
// void ProcessRainOnVehicle(void *);
// void ProcessReverb();
// bool ProcessReverseGear(void *);
void ProcessProjectiles(); // todo requires CProjectileInfo
void ProcessRainOnVehicle(cVehicleParams *params); /// ok
void ProcessReverb() const; /// ok
bool ProcessReverseGear(cVehicleParams *a2); /// ok
void ProcessSawMillScriptObject(uint8 sound); /// ok
void ProcessScriptObject(int32 id); // todo
void ProcessScriptObject(int32 id); /// ok
void ProcessShopScriptObject(uint8 sound); /// ok
void ProcessSpecial(); /// ok
// bool ProcessTrainNoise(void *);
bool ProcessTrainNoise(cVehicleParams *params); /// ok
void ProcessVehicle(CVehicle *); // todo
// bool ProcessVehicleDoors(void *);
bool ProcessVehicleDoors(cVehicleParams *params); /// ok
// bool ProcessVehicleEngine(void *);
// void ProcessVehicleHorn(void *);
// void ProcessVehicleHorn(cVehicleParams *params);
// void ProcessVehicleOneShots(void *);
// bool ProcessVehicleReverseWarning(void *);
// bool ProcessVehicleRoadNoise(void *);
bool ProcessVehicleReverseWarning(cVehicleParams *params); /// ok
bool ProcessVehicleRoadNoise(cVehicleParams *params); /// ok
// void ProcessVehicleSirenOrAlarm(void *);
// void ProcessVehicleSkidding(void *);
void ProcessWaterCannon(int32); // todo
void ProcessWeather(int32 id); // todo
// bool ProcessWetRoadNoise(void *);
void ProcessWeather(int32 id); /// ok
bool ProcessWetRoadNoise(cVehicleParams *params); /// ok
void ProcessWorkShopScriptObject(uint8 sound); /// ok
int32 RandomDisplacement(uint32 seed) const;
void ReacquireDigitalHandle() const;
void ReleaseDigitalHandle() const;
int32 ReportCollision(CEntity *a2, CEntity *a3, uint8 a4, uint8 a5, float a6,
float a7); // todo
int32 ReportCrime(eCrimeType crime, const CVector *pos); // todo
void ResetAudioLogicTimers(int32 timer); /// ok
void ResetPoliceRadio(); /// ok
void ResetTimers(uint32 a2); // todo
void PlayOneShot(int, unsigned short, float);
void SetEffectsFadeVol(unsigned char);
void SetMusicFadeVol(unsigned char);
int8 SetCurrent3DProvider(unsigned char);
void ReportCrime(eCrimeType, CVector const &);
void PlaySuspectLastSeen(float, float, float);
void ReportCollision(CEntity *, CEntity *, unsigned char, unsigned char, float, float);
void ResetTimers(unsigned int);
void PreloadMissionAudio(char *);
void Service(); // todo
void ServiceCollisions(); // todo
void ServicePoliceRadio(); // todo
void ServicePoliceRadioChannel(int a2); // todo
void ServiceSoundEffects(); // todo
int8 SetCurrent3DProvider(uint8); // todo
void SetDynamicAcousticModelingStatus(bool status);
void SetEffectsFadeVolume(uint8 volume) const;
void SetEffectsMasterVolume(uint8 volume) const;
void SetEntityStatus(int32 id, bool status);
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(int32); // todo
void SetMissionAudioLocation(float x, float y, float z);
void SetMissionScriptPoliceAudio(int32 sfx) const;
void SetMonoMode(uint8); // todo
void SetMusicFadeVolume(uint8 volume) const;
void SetMusicMasterVolume(uint8 volume) const;
void SetSpeakerConfig(int32 conf) const;
void SetUpLoopingCollisionSound(int a2, int a3); // todo
void SetUpOneShotCollisionSound(int a2); // todo
void SetupCrimeReport(); // todo
bool SetupJumboEngineSound(uint8, int32); // todo
bool SetupJumboFlySound(uint8 emittingVol); /// ok
bool SetupJumboRumbleSound(uint8 emittingVol); /// ok
bool SetupJumboTaxiSound(uint8 vol); /// ok
bool SetupJumboWhineSound(uint8 emittingVol, int32 freq); /// ok
void SetupPedComments(cPedParams *params, uint32 sound); /// ok
void SetupSuspectLastSeenReport(); // todo
void Terminate();
void TranslateEntity(CVector *v1, CVector *v2) const; /// ok
void UpdateGasPedalAudio(CAutomobile *automobile); // todo hook
bool UsesReverseWarning(int32 model) const;
bool UsesSiren(int32 model) const;
bool UsesSirenSwitching(int32 model) const;
};
static_assert(sizeof(cAudioManager) == 0x4B14, "cAudioManager: error");
static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
extern cAudioManager &AudioManager;

View file

@ -7,7 +7,6 @@
cDMAudio &DMAudio = *(cDMAudio*)0x95CDBE;
void
cDMAudio::Initialise(void)
{
@ -29,7 +28,7 @@ cDMAudio::Service(void)
int32
cDMAudio::CreateEntity(eAudioType type, void *UID)
{
return AudioManager.CreateEntity(type, UID);
return AudioManager.CreateEntity(type, (CPhysical *)UID);
}
void
@ -80,7 +79,7 @@ cDMAudio::SetEffectsFadeVol(uint8 volume)
uint8 vol = volume;
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
AudioManager.SetEffectsFadeVol(vol);
AudioManager.SetEffectsFadeVolume(vol);
}
void
@ -89,7 +88,7 @@ cDMAudio::SetMusicFadeVol(uint8 volume)
uint8 vol = volume;
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
AudioManager.SetMusicFadeVol(vol);
AudioManager.SetMusicFadeVolume(vol);
}
uint8
@ -165,15 +164,15 @@ cDMAudio::IsAudioInitialised(void)
}
void
cDMAudio::ReportCrime(eCrimeType crime, CVector const &pos)
cDMAudio::ReportCrime(eCrimeType crime, const CVector &pos)
{
AudioManager.ReportCrime(crime, pos);
AudioManager.ReportCrime(crime, &pos);
}
int32
cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject)
{
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
AudioManager.SetEntityStatus(audioEntity, true);
@ -190,7 +189,7 @@ cDMAudio::DestroyLoopingScriptObject(int32 audioEntity)
void
cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject)
{
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
{

View file

@ -1,4 +1,7 @@
#pragma once
#include "Wanted.h"
enum eSound : int16
{
SOUND_CAR_DOOR_CLOSE_BONNET = 0,
@ -171,6 +174,9 @@ enum eSound : int16
SOUND_TOTAL_PED_SOUNDS = 167,
};
#define AEHANDLE_IS_FAILED(h) ((h)<0)
#define AEHANDLE_IS_OK(h) ((h)>=0)
class cAudioScriptObject;
class CEntity;
enum eCrimeType;

View file

@ -1,27 +1,24 @@
#pragma once
#include "Entity.h"
class CBridge
{
private:
enum bridgeStates
{
enum bridgeStates {
STATE_BRIDGE_LOCKED,
STATE_LIFT_PART_IS_UP,
STATE_LIFT_PART_MOVING_DOWN,
STATE_LIFT_PART_IS_DOWN,
STATE_LIFT_PART_ABOUT_TO_MOVE_UP,
STATE_LIFT_PART_MOVING_UP
};
};
class CBridge
{
public:
static CEntity *&pLiftRoad, *&pLiftPart, *&pWeight;
static int &State, &OldState;
static float &DefaultZLiftPart, &DefaultZLiftRoad, &DefaultZLiftWeight;
static float& OldLift;
static uint32& TimeOfBridgeBecomingOperational;
static float &OldLift;
static uint32 &TimeOfBridgeBecomingOperational;
public:
static void Init();
static void Update();
static bool ShouldLightsBeFlashing();

View file

@ -68,7 +68,7 @@ bool CGarages::HasCarBeenCrushed(int32 handle)
return CrushedCarId == handle;
}
WRAPPER void CGarages::TriggerMessage(char *text, int16, uint16 time, int16) { EAXJMP(0x426B20); }
WRAPPER void CGarages::TriggerMessage(const char *text, int16, uint16 time, int16) { EAXJMP(0x426B20); }
WRAPPER bool CGarages::IsPointWithinHideOutGarage(CVector*) { EAXJMP(0x428260); }
#if 0
@ -97,7 +97,7 @@ void CGarages::PrintMessages()
CMessages::InsertNumberInString(TheText.Get(MessageIDString), MessageNumberInString, -1, -1, -1, -1, -1, gUString);
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0 - 40.0f), gUString);
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0f - 40.0f), gUString);
CFont::SetColor(CRGBA(89, 115, 150, 255));
CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f - 40.0f), gUString);
@ -107,7 +107,7 @@ void CGarages::PrintMessages()
CMessages::InsertNumberInString(TheText.Get(MessageIDString), MessageNumberInString, MessageNumberInString2, -1, -1, -1, -1, gUString);
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0 - 40.0f), gUString);
CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f + 2.0f - 40.0f), gUString);
CFont::SetColor(CRGBA(89, 115, 150, 255));
CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(-84.0f - 40.0f), gUString);

View file

@ -22,7 +22,7 @@ public:
public:
static bool IsModelIndexADoor(uint32 id);
static void TriggerMessage(char *text, int16, uint16 time, int16);
static void TriggerMessage(const char *text, int16, uint16 time, int16);
static void PrintMessages(void);
static bool HasCarBeenCrushed(int32);
static bool IsPointWithinHideOutGarage(CVector*);

View file

@ -1,8 +1,9 @@
#pragma once
#include "Game.h"
class CPed;
class CVehicle;
enum eLevelName;
struct PedGroup
{

View file

@ -342,7 +342,7 @@ void CReplay::StorePedUpdate(CPed *ped, int id)
tPedUpdatePacket* pp = (tPedUpdatePacket*)&Record.m_pBase[Record.m_nOffset];
pp->type = REPLAYPACKET_PED_UPDATE;
pp->index = id;
pp->heading = 128.0f / M_PI * ped->m_fRotationCur;
pp->heading = 128.0f / PI * ped->m_fRotationCur;
pp->matrix.CompressFromFullMatrix(ped->GetMatrix());
pp->assoc_group_id = ped->m_animGroup;
/* Would be more sane to use GetJustIndex(ped->m_pMyVehicle) in following assignment */
@ -464,8 +464,8 @@ void CReplay::ProcessPedUpdate(CPed *ped, float interpolation, CAddressInReplayB
buffer->m_nOffset += sizeof(tPedUpdatePacket);
return;
}
ped->m_fRotationCur = pp->heading * M_PI / 128.0f;
ped->m_fRotationDest = pp->heading * M_PI / 128.0f;
ped->m_fRotationCur = pp->heading * PI / 128.0f;
ped->m_fRotationDest = pp->heading * PI / 128.0f;
CMatrix ped_matrix;
pp->matrix.DecompressIntoFullMatrix(ped_matrix);
ped->GetMatrix() = ped->GetMatrix() * CMatrix(1.0f - interpolation);
@ -632,17 +632,17 @@ void CReplay::StoreCarUpdate(CVehicle *vehicle, int id)
vp->primary_color = vehicle->m_currentColour1;
vp->secondary_color = vehicle->m_currentColour2;
if (vehicle->GetModelIndex() == MI_RHINO)
vp->car_gun = 128.0f / M_PI * ((CAutomobile*)vehicle)->m_fCarGunLR;
vp->car_gun = 128.0f / PI * ((CAutomobile*)vehicle)->m_fCarGunLR;
else
vp->wheel_state = 50.0f * vehicle->m_fSteerAngle;
if (vehicle->IsCar()){
CAutomobile* car = (CAutomobile*)vehicle;
for (int i = 0; i < 4; i++){
vp->wheel_susp_dist[i] = 50.0f * car->m_aSuspensionSpringRatio[i];
vp->wheel_rotation[i] = 128.0f / M_PI * car->m_aWheelRotation[i];
vp->wheel_rotation[i] = 128.0f / PI * car->m_aWheelRotation[i];
}
vp->door_angles[0] = 127.0f / M_PI * car->Doors[2].m_fAngle;
vp->door_angles[1] = 127.0f / M_PI * car->Doors[3].m_fAngle;
vp->door_angles[0] = 127.0f / PI * car->Doors[2].m_fAngle;
vp->door_angles[1] = 127.0f / PI * car->Doors[3].m_fAngle;
vp->door_status = 0;
for (int i = 0; i < 6; i++){
if (car->Damage.GetDoorStatus(i) == 3)
@ -675,7 +675,7 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
ApplyPanelDamageToCar(vp->panels, (CAutomobile*)vehicle, true);
vehicle->m_vecMoveSpeed = CVector(vp->velocityX / 8000.0f, vp->velocityY / 8000.0f, vp->velocityZ / 8000.0f);
if (vehicle->GetModelIndex() == MI_RHINO) {
((CAutomobile*)vehicle)->m_fCarGunLR = vp->car_gun * M_PI / 128.0f;
((CAutomobile*)vehicle)->m_fCarGunLR = vp->car_gun * PI / 128.0f;
vehicle->m_fSteerAngle = 0.0f;
}else{
vehicle->m_fSteerAngle = vp->wheel_state / 50.0f;
@ -684,10 +684,10 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
CAutomobile* car = (CAutomobile*)vehicle;
for (int i = 0; i < 4; i++) {
car->m_aSuspensionSpringRatio[i] = vp->wheel_susp_dist[i] / 50.0f;
car->m_aWheelRotation[i] = vp->wheel_rotation[i] * M_PI / 128.0f;
car->m_aWheelRotation[i] = vp->wheel_rotation[i] * PI / 128.0f;
}
car->Doors[2].m_fAngle = car->Doors[2].m_fPrevAngle = vp->door_angles[0] * M_PI / 127.0f;
car->Doors[3].m_fAngle = car->Doors[3].m_fPrevAngle = vp->door_angles[1] * M_PI / 127.0f;
car->Doors[2].m_fAngle = car->Doors[2].m_fPrevAngle = vp->door_angles[0] * PI / 127.0f;
car->Doors[3].m_fAngle = car->Doors[3].m_fPrevAngle = vp->door_angles[1] * PI / 127.0f;
if (vp->door_angles[0])
car->Damage.SetDoorStatus(2, 2);
if (vp->door_angles[1])

View file

@ -442,7 +442,7 @@ int m_iModeObbeCamIsInForCar;
static bool &m_bUseMouse3rdPerson;
bool Get_Just_Switched_Status() { return m_bJust_Switched; }
inline const CMatrix GetCameraMatrix(void) { return m_cameraMatrix; }
inline const CMatrix& GetCameraMatrix(void) { return m_cameraMatrix; }
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
bool IsPointVisible(const CVector &center, const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius, const CMatrix *mat);

View file

@ -5,8 +5,8 @@
#include "rwcore.h"
#include "RwHelper.h"
#define CDDEBUG(f, ...) debug ("%s: " f "\n", "cdvd_stream", __VA_ARGS__)
#define CDTRACE(f, ...) printf("%s: " f "\n", "cdvd_stream", __VA_ARGS__)
#define CDDEBUG(f, ...) debug ("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__)
#define CDTRACE(f, ...) printf("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__)
struct CdReadInfo
{

View file

@ -4,7 +4,7 @@
#include "ModelIndices.h"
#include "World.h"
#include "Wanted.h"
#include "Eventlist.h"
#include "EventList.h"
int32 CEventList::ms_nFirstFreeSlotIndex;
//CEvent gaEvent[NUMEVENTS];

View file

@ -3,3 +3,27 @@
#include "Explosion.h"
WRAPPER void CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32) { EAXJMP(0x5591C0); }
WRAPPER
int8 CExplosion::GetExplosionActiveCounter(uint8 id)
{
EAXJMP(0x559140);
}
WRAPPER
CVector *CExplosion::GetExplosionPosition(uint8 id)
{
EAXJMP(0x5591A0);
}
WRAPPER
uint8 CExplosion::GetExplosionType(uint8 id)
{
EAXJMP(0x559180);
}
WRAPPER
void CExplosion::ResetExplosionActiveCounter(uint8 id)
{
EAXJMP(0x559160);
}

View file

@ -1,6 +1,7 @@
#pragma once
class CEntity;
class CVector;
enum eExplosionType
{
@ -19,5 +20,11 @@ enum eExplosionType
class CExplosion
{
public:
static void AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32);
static void AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type,
const CVector &pos, uint32);
static int8 GetExplosionActiveCounter(uint8 id);
static CVector *GetExplosionPosition(uint8 id);
static uint8 GetExplosionType(uint8 id);
static void ResetExplosionActiveCounter(uint8 id);
};

View file

@ -248,15 +248,15 @@ CFileMgr::OpenFileForWriting(const char *file)
}
int
CFileMgr::Read(int fd, char *buf, int len)
CFileMgr::Read(int fd, const char *buf, int len)
{
return myfread(buf, 1, len, fd);
return myfread((void*)buf, 1, len, fd);
}
int
CFileMgr::Write(int fd, char *buf, int len)
CFileMgr::Write(int fd, const char *buf, int len)
{
return myfwrite(buf, 1, len, fd);
return myfwrite((void*)buf, 1, len, fd);
}
bool

View file

@ -12,8 +12,8 @@ public:
static int LoadFile(const char *file, uint8 *buf, int unused, const char *mode);
static int OpenFile(const char *file, const char *mode);
static int OpenFileForWriting(const char *file);
static int Read(int fd, char *buf, int len);
static int Write(int fd, char *buf, int len);
static int Read(int fd, const char *buf, int len);
static int Write(int fd, const char *buf, int len);
static bool Seek(int fd, int offset, int whence);
static bool ReadLine(int fd, char *buf, int len);
static int CloseFile(int fd);

View file

@ -95,7 +95,7 @@ bool GetMouseMoveRight();
bool GetPadInput();
bool GetMouseInput();
char *FrontendFilenames[] = {
const char *FrontendFilenames[] = {
"fe2_mainpanel_ul",
"fe2_mainpanel_ur",
"fe2_mainpanel_dl",
@ -126,7 +126,7 @@ char *FrontendFilenames[] = {
"fe_radio9", // CHATTERBOX
};
char *MenuFilenames[] = {
const char *MenuFilenames[] = {
"connection24", "",
"findgame24", "",
"hostgame24", "",

View file

@ -1,7 +1,7 @@
#include "common.h"
#include "patcher.h"
#include "Game.h"
#include "Main.h"
#include "main.h"
#include "CdStream.h"
#include "FileMgr.h"

View file

@ -97,7 +97,7 @@ public:
}
// should return direction in 0-8 range. fits perfectly to peds' path directions.
static int CGeneral::GetNodeHeadingFromVector(float x, float y)
static int GetNodeHeadingFromVector(float x, float y)
{
float angle = CGeneral::GetRadianAngleBetweenPoints(x, y, 0.0f, 0.0f);
if (angle < 0.0f)

View file

@ -7,4 +7,5 @@
class CInstance : CPlaceable
{
public:
~CInstance() = default;
};

View file

@ -7,7 +7,7 @@ CPlaceable::CPlaceable(void)
m_matrix.SetScale(1.0f);
}
CPlaceable::~CPlaceable(void) { }
CPlaceable::~CPlaceable(void) = default;
void
CPlaceable::SetHeading(float angle)

View file

@ -156,7 +156,7 @@ public:
inline float sq(float x) { return x*x; }
#define SQR(x) ((x) * (x))
#define PI M_PI
#define PI (float)M_PI
#define TWOPI (PI*2)
#define HALFPI (PI/2)
#define DEGTORAD(x) ((x) * PI / 180.0f)
@ -171,16 +171,16 @@ inline float sq(float x) { return x*x; }
int myrand(void);
void mysrand(unsigned int seed);
void re3_debug(char *format, ...);
void re3_trace(const char *filename, unsigned int lineno, const char *func, char *format, ...);
void re3_debug(const char *format, ...);
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func);
#define DEBUGBREAK() __debugbreak();
#define debug(f, ...) re3_debug("[DBG]: " f, __VA_ARGS__)
#define DEV(f, ...) re3_debug("[DEV]: " f, __VA_ARGS__)
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, __VA_ARGS__)
#define Error(f, ...) re3_debug("[ERROR]: " f, __VA_ARGS__)
#define debug(f, ...) re3_debug("[DBG]: " f, ## __VA_ARGS__)
#define DEV(f, ...) re3_debug("[DEV]: " f, ## __VA_ARGS__)
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
#define ASSERT assert
@ -200,7 +200,6 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
#define ABS(a) (((a) < 0) ? (-(a)) : (a))
#define norm(value, min, max) (((value) < (min)) ? 0 : (((value) > (max)) ? 1 : (((value) - (min)) / ((max) - (min)))))
#define STRINGIFY(x) #x
#define STR(x) STRINGIFY(x)
#define CONCAT_(x,y) x##y

View file

@ -425,7 +425,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
abort();
}
void re3_debug(char *format, ...)
void re3_debug(const char *format, ...)
{
va_list va;
va_start(va, format);
@ -435,7 +435,7 @@ void re3_debug(char *format, ...)
printf("%s", re3_buff);
}
void re3_trace(const char *filename, unsigned int lineno, const char *func, char *format, ...)
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...)
{
char buff[re3_buffsize *2];
va_list va;

View file

@ -4,14 +4,14 @@
struct RwObjectNameIdAssocation
{
char *name;
const char *name;
int32 hierId;
uint32 flags;
};
struct RwObjectNameAssociation
{
char *name;
const char *name;
RwFrame *frame;
};

View file

@ -1038,7 +1038,7 @@ CVehicleModelInfo::SetEnvironmentMap(void)
void
CVehicleModelInfo::LoadEnvironmentMaps(void)
{
char *texnames[] = {
const char *texnames[] = {
"reflection01", // only one used
"reflection02",
"reflection03",

View file

@ -3172,7 +3172,7 @@ CPed::CheckIfInTheAir(void)
CEntity *foundEntity;
float startZ = pos.z - 1.54f;
bool foundGround = CWorld::ProcessVerticalLine(pos, startZ, foundColPoint, foundEntity, true, true, false, true, false, false, false);
bool foundGround = CWorld::ProcessVerticalLine(pos, startZ, foundColPoint, foundEntity, true, true, false, true, false, false, nil);
if (!foundGround && m_nPedState != PED_JUMP)
{
pos.z -= 1.04f;
@ -4622,7 +4622,7 @@ CPed::LoadFightData(void)
// Actually GetLocalDirectionTo(Turn/Look)
int
CPed::GetLocalDirection(CVector2D const &posOffset)
CPed::GetLocalDirection(const CVector2D &posOffset)
{
float direction;

View file

@ -575,7 +575,7 @@ public:
void StartFightAttack(uint8);
void SetWaitState(eWaitState, void*);
bool FightStrike(CVector&);
int GetLocalDirection(CVector2D const &);
int GetLocalDirection(const CVector2D &);
void StartFightDefend(uint8, uint8, uint8);
void PlayHitSound(CPed*);
void SetFall(int, AnimationId, uint8);
@ -718,6 +718,15 @@ public:
#endif
};
class cPedParams
{
public:
char m_bDistanceCalculated;
char gap_1[3];
float m_fDistance;
CPed *m_pPed;
};
void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg);
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");

View file

@ -38,7 +38,7 @@ CPedPlacement::FindZCoorForPed(CVector* pos)
CEntity*
CPedPlacement::IsPositionClearOfCars(CVector* pos)
{
return CWorld::TestSphereAgainstWorld(*pos, 0.25f, false, true, true, false, false, false, false);
return CWorld::TestSphereAgainstWorld(*pos, 0.25f, nil, true, true, false, false, false, false);
}
STARTPATCHES

View file

@ -10,7 +10,7 @@
#include "Clock.h"
#include "Weather.h"
#include "Stats.h"
#include "math/maths.h"
#include "maths.h"
#include "Frontend.h"
uint8 ScrollCharSet[59][5] = {

View file

@ -1,6 +1,6 @@
#pragma once
#include "common.h"
#include "math/Vector.h"
#include "Vector.h"
class CMovingThings
{

View file

@ -1128,7 +1128,7 @@ void CHud::DrawAfterFade()
switch (OddJob2On) {
case 0:
OddJob2On = 1;
OddJob2XOffset = 380.0;
OddJob2XOffset = 380.0f;
break;
case 1:
if (OddJob2XOffset <= 2.0f) {
@ -1136,27 +1136,27 @@ void CHud::DrawAfterFade()
OddJob2On = 2;
}
else {
fStep = 40.0;
if ((OddJob2XOffset * 0.16667) <= 40.0)
fStep = OddJob2XOffset * 0.16667;
fStep = 40.0f;
if ((OddJob2XOffset * 0.16667f) <= 40.0f)
fStep = OddJob2XOffset * 0.16667f;
OddJob2XOffset = OddJob2XOffset - fStep;
}
break;
case 2:
OddJob2Timer += (20.0 * CTimer::GetTimeStep());
OddJob2Timer += (20.0f * CTimer::GetTimeStep());
if (OddJob2Timer > 1500) {
OddJob2On = 3;
}
break;
case 3:
fStep = 30.0;
if ((OddJob2XOffset * 0.2) >= 30.0)
fStep = OddJob2XOffset * 0.2;
fStep = 30.0f;
if ((OddJob2XOffset * 0.2f) >= 30.0f)
fStep = OddJob2XOffset * 0.2f;
OddJob2XOffset = OddJob2XOffset - fStep;
if (OddJob2XOffset < -380.0) {
OddJob2OffTimer = 5000.0;
if (OddJob2XOffset < -380.0f) {
OddJob2OffTimer = 5000.0f;
OddJob2On = 0;
}
break;

View file

@ -4,7 +4,7 @@
#include "TxdStore.h"
#include "Timer.h"
#include "Camera.h"
#include "TimeCycle.h"
#include "Timecycle.h"
#include "CutsceneMgr.h"
#include "Automobile.h"
#include "Ped.h"

View file

@ -103,14 +103,14 @@ CVisibilityPlugins::SetRenderWareCamera(RwCamera *camera)
else
ms_cullCompsDist = sq(TheCamera.LODDistMultiplier * 20.0f);
ms_vehicleLod0Dist = sq(70.0 * TheCamera.GenerationDistMultiplier);
ms_vehicleLod1Dist = sq(90.0 * TheCamera.GenerationDistMultiplier);
ms_vehicleFadeDist = sq(100.0 * TheCamera.GenerationDistMultiplier);
ms_bigVehicleLod0Dist = sq(60.0 * TheCamera.GenerationDistMultiplier);
ms_bigVehicleLod1Dist = sq(150.0 * TheCamera.GenerationDistMultiplier);
ms_pedLod0Dist = sq(25.0 * TheCamera.LODDistMultiplier);
ms_pedLod1Dist = sq(60.0 * TheCamera.LODDistMultiplier);
ms_pedFadeDist = sq(70.0 * TheCamera.LODDistMultiplier);
ms_vehicleLod0Dist = sq(70.0f * TheCamera.GenerationDistMultiplier);
ms_vehicleLod1Dist = sq(90.0f * TheCamera.GenerationDistMultiplier);
ms_vehicleFadeDist = sq(100.0f * TheCamera.GenerationDistMultiplier);
ms_bigVehicleLod0Dist = sq(60.0f * TheCamera.GenerationDistMultiplier);
ms_bigVehicleLod1Dist = sq(150.0f * TheCamera.GenerationDistMultiplier);
ms_pedLod0Dist = sq(25.0f * TheCamera.LODDistMultiplier);
ms_pedLod1Dist = sq(60.0f * TheCamera.LODDistMultiplier);
ms_pedFadeDist = sq(70.0f * TheCamera.LODDistMultiplier);
}
RpMaterial*

View file

@ -9,7 +9,7 @@
#include "Boat.h"
#include "World.h"
#include "General.h"
#include "TimeCycle.h"
#include "Timecycle.h"
#include "ZoneCull.h"
#include "Clock.h"
#include "Particle.h"

View file

@ -1661,7 +1661,7 @@ void CenterVideo(void)
/*
*****************************************************************************
*/
void PlayMovieInWindow(int cmdShow, LPTSTR szFile)
void PlayMovieInWindow(int cmdShow, const char* szFile)
{
WCHAR wFileName[256];
HRESULT hr;

View file

@ -8,7 +8,7 @@
#include "VisibilityPlugins.h"
#include "DMAudio.h"
#include "Clock.h"
#include "TimeCycle.h"
#include "Timecycle.h"
#include "ZoneCull.h"
#include "Camera.h"
#include "Darkel.h"
@ -128,7 +128,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
m_fGasPedal = 0.0f;
m_fBrakePedal = 0.0f;
m_pSetOnFireEntity = nil;
field_594 = 0;
m_fGasPedalAudio = 0;
bNotDamagedUpsideDown = false;
bMoreResistantToDamage = false;
m_fVelocityChangeForAudio = 0.0f;
@ -316,7 +316,7 @@ CAutomobile::ProcessControl(void)
// Set Center of Mass to make car more stable
if(strongGrip1 || bCheat3)
m_vecCentreOfMass.z = 0.3f*m_aSuspensionSpringLength[0] + -1.0*m_fHeightAboveRoad;
m_vecCentreOfMass.z = 0.3f*m_aSuspensionSpringLength[0] + -1.0f*m_fHeightAboveRoad;
else if(pHandling->Flags & HANDLING_NONPLAYER_STABILISER && m_status == STATUS_PHYSICS)
m_vecCentreOfMass.z = pHandling->CentreOfMass.z - 0.2f*pHandling->Dimension.z;
else
@ -1591,10 +1591,11 @@ CAutomobile::PreRender(void)
break;
}
if(GetModelIndex() == MI_RCBANDIT ||
GetModelIndex() == MI_DODO ||
GetModelIndex() == MI_RHINO)
goto nolights;
if(GetModelIndex() == MI_RCBANDIT || GetModelIndex() == MI_DODO ||
GetModelIndex() == MI_RHINO) {
CShadows::StoreShadowForCar(this);
return;
}
// Turn lights on/off
bool shouldLightsBeOn =
@ -1739,7 +1740,7 @@ CAutomobile::PreRender(void)
// Taillight coronas
if(behindness > 0.0f){
// Behind car
float intensity = 0.4f*behindness + 0.4;
float intensity = 0.4f*behindness + 0.4f;
float size = (behindness + 1.0f)/2.0f;
if(m_fGasPedal < 0.0f){
@ -1757,7 +1758,7 @@ CAutomobile::PreRender(void)
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
}else{
if(m_fBrakePedal > 0.0){
if(m_fBrakePedal > 0.0f){
intensity += 0.4f;
size += 0.3f;
}
@ -1843,8 +1844,10 @@ CAutomobile::PreRender(void)
}else{
// Lights off
if(m_status == STATUS_ABANDONED || m_status == STATUS_WRECKED)
goto nolights;
if(m_status == STATUS_ABANDONED || m_status == STATUS_WRECKED) {
CShadows::StoreShadowForCar(this);
return;
}
CVector lightPos = mi->m_positions[CAR_POS_TAILLIGHTS];
CVector lightR = GetMatrix() * lightPos;
@ -1903,7 +1906,6 @@ CAutomobile::PreRender(void)
}
}
nolights:
CShadows::StoreShadowForCar(this);
}
@ -2877,7 +2879,7 @@ CAutomobile::ProcessBuoyancy(void)
static RwRGBA black;
if(pos.z >= 0.0f){
nGenerateRaindrops = 0;
pos.z += 0.5;
pos.z += 0.5f;
CParticleObject::AddObject(POBJECT_SPLASHES_AROUND,
pos, CVector(0.0f, 0.0f, 0.0f), 6.5f, 2500, black, true);
}

View file

@ -117,7 +117,7 @@ public:
uint8 m_nWheelsOnGround;
uint8 m_nDriveWheelsOnGround;
uint8 m_nDriveWheelsOnGroundPrev;
int32 field_594;
int32 m_fGasPedalAudio;
tWheelState m_aWheelState[4];
static bool &m_sAllTaxiLights;

View file

@ -6,9 +6,9 @@
cHandlingDataMgr &mod_HandlingManager = *(cHandlingDataMgr*)0x728060;
char *HandlingFilename = "HANDLING.CFG";
const char *HandlingFilename = "HANDLING.CFG";
char VehicleNames[NUMHANDLINGS][14] = {
const char VehicleNames[NUMHANDLINGS][14] = {
"LANDSTAL",
"IDAHO",
"STINGER",
@ -199,7 +199,7 @@ cHandlingDataMgr::ConvertDataToGameUnits(tHandlingData *handling)
if(handling->fTurnMass < 10.0f)
handling->fTurnMass *= 5.0f;
handling->fInvMass = 1.0f/handling->fMass;
handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * 0.008*handling->fMass;
handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * 0.008f*handling->fMass;
// What the hell is going on here?
specificVolume = handling->Dimension.x*handling->Dimension.z*0.5f / handling->fMass; // ?
@ -207,7 +207,7 @@ cHandlingDataMgr::ConvertDataToGameUnits(tHandlingData *handling)
b = 100.0f;
velocity = handling->Transmission.fMaxVelocity;
while(a < b && velocity > 0.0f){
velocity -= 0.01;
velocity -= 0.01f;
a = handling->Transmission.fEngineAcceleration/6.0f;
b = -velocity * (1.0f/(specificVolume * sq(velocity) + 1.0f) - 1.0f);
}

View file

@ -14,7 +14,7 @@
#include "Shadows.h"
#include "Coronas.h"
#include "Explosion.h"
#include "TimeCycle.h"
#include "Timecycle.h"
#include "TempColModels.h"
#include "World.h"
#include "WaterLevel.h"

View file

@ -397,7 +397,7 @@ CPlane::ProcessControl(void)
planePathSpeed = PlanePath3Speed;
numPathNodes = NumPath3Nodes;
if(CesnaMissionStatus == CESNA_STATUS_LANDED){
pDrugRunCesna = false;
pDrugRunCesna = nil;
FlagToDestroyWhenNextProcessed();
}
}else if(m_bIsDropOffCesna){
@ -407,7 +407,7 @@ CPlane::ProcessControl(void)
planePathSpeed = PlanePath4Speed;
numPathNodes = NumPath4Nodes;
if(DropOffCesnaMissionStatus == CESNA_STATUS_LANDED){
pDropOffCesna = false;
pDropOffCesna = nil;
FlagToDestroyWhenNextProcessed();
}
}else{

View file

@ -97,8 +97,8 @@ CVehicle::CVehicle(uint8 CreatedBy)
DMAudio.SetEntityStatus(m_audioEntityId, true);
m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK;
m_pCurGroundEntity = nil;
field_22A = 0;
field_22B = 0;
m_bRainAudioCounter = 0;
m_bRainSamplesCounter = 0;
m_comedyControlState = 0;
m_aCollPolys[0].valid = false;
m_aCollPolys[1].valid = false;

View file

@ -191,8 +191,8 @@ public:
eCarLock m_nDoorLock;
int8 m_nLastWeaponDamage; // see eWeaponType, -1 if no damage
int8 m_nRadioStation;
int8 field_22A;
int8 field_22B;
uint8 m_bRainAudioCounter;
uint8 m_bRainSamplesCounter;
uint8 m_nCarHornTimer;
int8 field_22D;
bool m_bSirenOrAlarm;