Skip to content
This repository has been archived by the owner. It is now read-only.

rem all refs #459

Merged
merged 1 commit into from Apr 17, 2020
Merged
Changes from all commits
Commits
File filter
Filter file types
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.

Always

Just for now

rem refs
  • Loading branch information
Fire-Head committed Apr 17, 2020
commit a4922d5cb77e31657768d5da4b286a2e67ee0e6f
@@ -8,7 +8,7 @@
#include "AnimBlendAssociation.h"
#include "RpAnimBlend.h"

RwInt32 &ClumpOffset = *(RwInt32*)0x8F1B84;
RwInt32 ClumpOffset;

enum
{
@@ -11,7 +11,7 @@ struct AnimBlendFrameUpdateData
CAnimBlendNode *nodes[16];
};

extern RwInt32 &ClumpOffset;
extern RwInt32 ClumpOffset;
#define RPANIMBLENDCLUMPDATA(o) (RWPLUGINOFFSET(CAnimBlendClumpData*, o, ClumpOffset))

bool RpAnimBlendPluginAttach(void);
@@ -40,18 +40,18 @@
#include "sampman.h"

cAudioManager AudioManager;
uint32 gPornNextTime; // = *(uint32*)0x6508A0;
uint32 gSawMillNextTime; // = *(uint32*)0x6508A4;
uint32 gShopNextTime; // = *(uint32*)0x6508A8;
uint32 gAirportNextTime; // = *(uint32*)0x6508AC;
uint32 gCinemaNextTime; //= *(uint32*)0x6508B0;
uint32 gDocksNextTime; // = *(uint32*)0x6508B4;
uint32 gHomeNextTime; // = *(uint32*)0x6508B8;
uint32 gCellNextTime; // = *(uint32*)0x6508BC;
uint32 gNextCryTime; // = *(uint32*)0x6508C0;
uint8 gJumboVolOffsetPercentage; // = *(uint8 *)0x6508ED;
bool bPlayerJustEnteredCar; // = *(bool *)0x6508C4;
bool g_bMissionAudioLoadFailed; // = *(bool *)0x95CD8E;
uint32 gPornNextTime;
uint32 gSawMillNextTime;
uint32 gShopNextTime;
uint32 gAirportNextTime;
uint32 gCinemaNextTime;
uint32 gDocksNextTime;
uint32 gHomeNextTime;
uint32 gCellNextTime;
uint32 gNextCryTime;
uint8 gJumboVolOffsetPercentage;
bool bPlayerJustEnteredCar;
bool g_bMissionAudioLoadFailed;

const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
const int policeChannel = channels + 1;
@@ -6,7 +6,7 @@
#include "AudioScriptObject.h"
#include "sampman.h"

cDMAudio &DMAudio = *(cDMAudio*)0x95CDBE;
cDMAudio DMAudio;

void
cDMAudio::Initialise(void)
@@ -256,4 +256,4 @@ class cDMAudio
void SetRadioInCar(uint32 radio);
void SetRadioChannel(int8 radio, int32 pos);
};
extern cDMAudio &DMAudio;
extern cDMAudio DMAudio;
@@ -21,14 +21,14 @@ struct tPoliceRadioZone {
int32 field_12;
};

tPoliceRadioZone (&ZoneSfx)[NUMAUDIOZONES] = *(tPoliceRadioZone(*)[NUMAUDIOZONES])*(uintptr*)0x880240;
char *SubZo2Label = (char*)0x6E9918;
char *SubZo3Label = (char*)0x6E9870;

int32 &g_nMissionAudioSfx = *(int32*)0x60ED84;
int8 &g_nMissionAudioPlayingStatus = *(int8*)0x60ED88;
uint8 &gSpecialSuspectLastSeenReport = *(uint8*)0x95CD4D;
uint32 (&gMinTimeToNextReport)[NUM_CRIME_TYPES] = *(uint32(*)[NUM_CRIME_TYPES])*(uintptr*)0x8E2828;
tPoliceRadioZone ZoneSfx[NUMAUDIOZONES];
char SubZo2Label[8];
char SubZo3Label[8];

int32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
int8 g_nMissionAudioPlayingStatus = 2;
uint8 gSpecialSuspectLastSeenReport;
uint32 gMinTimeToNextReport[NUM_CRIME_TYPES];

void
cAudioManager::InitialisePoliceRadioZones()
@@ -33,7 +33,6 @@ float CCarAI::FindSwitchDistanceFar(CVehicle* pVehicle)

void CCarAI::UpdateCarAI(CVehicle* pVehicle)
{
//((void(*)(CVehicle*))(0x413E50))(pVehicle);
//return;
if (pVehicle->bIsLawEnforcer){
if (pVehicle->AutoPilot.m_nCarMission == MISSION_BLOCKCAR_FARAWAY ||
@@ -67,25 +67,25 @@
#define MIN_ANGLE_TO_APPLY_HANDBRAKE 0.7f
#define MIN_SPEED_TO_APPLY_HANDBRAKE 0.3f

int &CCarCtrl::NumLawEnforcerCars = *(int*)0x8F1B38;
int &CCarCtrl::NumAmbulancesOnDuty = *(int*)0x885BB0;
int &CCarCtrl::NumFiretrucksOnDuty = *(int*)0x9411F0;
bool &CCarCtrl::bCarsGeneratedAroundCamera = *(bool*)0x95CD8A;
float& CCarCtrl::CarDensityMultiplier = *(float*)0x5EC8B4;
int32 &CCarCtrl::NumMissionCars = *(int32*)0x8F1B54;
int32 &CCarCtrl::NumRandomCars = *(int32*)0x943118;
int32 &CCarCtrl::NumParkedCars = *(int32*)0x8F29E0;
int32 &CCarCtrl::NumPermanentCars = *(int32*)0x8F29F0;
int8 &CCarCtrl::CountDownToCarsAtStart = *(int8*)0x95CD63;
int32 &CCarCtrl::MaxNumberOfCarsInUse = *(int32*)0x5EC8B8;
uint32 &CCarCtrl::LastTimeLawEnforcerCreated = *(uint32*)0x8F5FF0;
uint32 &CCarCtrl::LastTimeFireTruckCreated = *(uint32*)0x880F5C;
uint32 &CCarCtrl::LastTimeAmbulanceCreated = *(uint32*)0x941450;
int32 (&CCarCtrl::TotalNumOfCarsOfRating)[TOTAL_CUSTOM_CLASSES] = *(int32(*)[TOTAL_CUSTOM_CLASSES])*(uintptr*)0x8F1A60;
int32 (&CCarCtrl::NextCarOfRating)[TOTAL_CUSTOM_CLASSES] = *(int32(*)[TOTAL_CUSTOM_CLASSES])*(uintptr*)0x9412AC;
int32 (&CCarCtrl::CarArrays)[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY] = *(int32(*)[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY])*(uintptr*)0x6EB860;
CVehicle* (&apCarsToKeep)[MAX_CARS_TO_KEEP] = *(CVehicle*(*)[MAX_CARS_TO_KEEP])*(uintptr*)0x70D830;
uint32 (&aCarsToKeepTime)[MAX_CARS_TO_KEEP] = *(uint32(*)[MAX_CARS_TO_KEEP])*(uintptr*)0x87F9A8;
int CCarCtrl::NumLawEnforcerCars;
int CCarCtrl::NumAmbulancesOnDuty;
int CCarCtrl::NumFiretrucksOnDuty;
bool CCarCtrl::bCarsGeneratedAroundCamera;
float CCarCtrl::CarDensityMultiplier = 1.0f;
int32 CCarCtrl::NumMissionCars;
int32 CCarCtrl::NumRandomCars;
int32 CCarCtrl::NumParkedCars;
int32 CCarCtrl::NumPermanentCars;
int8 CCarCtrl::CountDownToCarsAtStart;
int32 CCarCtrl::MaxNumberOfCarsInUse = 12;
uint32 CCarCtrl::LastTimeLawEnforcerCreated;
uint32 CCarCtrl::LastTimeFireTruckCreated;
uint32 CCarCtrl::LastTimeAmbulanceCreated;
int32 CCarCtrl::TotalNumOfCarsOfRating[TOTAL_CUSTOM_CLASSES];
int32 CCarCtrl::NextCarOfRating[TOTAL_CUSTOM_CLASSES];
int32 CCarCtrl::CarArrays[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY];
CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP];
uint32 aCarsToKeepTime[MAX_CARS_TO_KEEP];

void
CCarCtrl::GenerateRandomCars()
@@ -120,23 +120,23 @@ class CCarCtrl
return angle;
}

static int32 &NumLawEnforcerCars;
static int32 &NumAmbulancesOnDuty;
static int32 &NumFiretrucksOnDuty;
static int32 &NumRandomCars;
static int32 &NumMissionCars;
static int32 &NumParkedCars;
static int32 &NumPermanentCars;
static bool &bCarsGeneratedAroundCamera;
static float &CarDensityMultiplier;
static int8 &CountDownToCarsAtStart;
static int32 &MaxNumberOfCarsInUse;
static uint32 &LastTimeLawEnforcerCreated;
static uint32 &LastTimeFireTruckCreated;
static uint32 &LastTimeAmbulanceCreated;
static int32 (&TotalNumOfCarsOfRating)[TOTAL_CUSTOM_CLASSES];
static int32 (&NextCarOfRating)[TOTAL_CUSTOM_CLASSES];
static int32 (&CarArrays)[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY];
static int32 NumLawEnforcerCars;
static int32 NumAmbulancesOnDuty;
static int32 NumFiretrucksOnDuty;
static int32 NumRandomCars;
static int32 NumMissionCars;
static int32 NumParkedCars;
static int32 NumPermanentCars;
static bool bCarsGeneratedAroundCamera;
static float CarDensityMultiplier;
static int8 CountDownToCarsAtStart;
static int32 MaxNumberOfCarsInUse;
static uint32 LastTimeLawEnforcerCreated;
static uint32 LastTimeFireTruckCreated;
static uint32 LastTimeAmbulanceCreated;
static int32 TotalNumOfCarsOfRating[TOTAL_CUSTOM_CLASSES];
static int32 NextCarOfRating[TOTAL_CUSTOM_CLASSES];
static int32 CarArrays[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY];
};

extern CVehicle* (&apCarsToKeep)[MAX_CARS_TO_KEEP];
extern CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP];
@@ -20,7 +20,7 @@
#include "Script.h"
#include "Garages.h"

uint8 CGameLogic::ActivePlayers; // 0x95CD5E
uint8 CGameLogic::ActivePlayers;

void
CGameLogic::InitAtStartOfGame()
@@ -12,7 +12,7 @@ bool gbShowPedPaths;
bool gbShowCarPaths;
bool gbShowCarPathsLinks;

CPathFind &ThePaths = *(CPathFind*)0x8F6754;
CPathFind ThePaths;

#define MAX_DIST INT16_MAX-1
#define MIN_PED_ROUTE_DISTANCE 23.8f
@@ -21,11 +21,11 @@ CPathFind &ThePaths = *(CPathFind*)0x8F6754;
// 1 UseInRoadBlock
// 2 east/west road(?)

CPathInfoForObject *&InfoForTileCars = *(CPathInfoForObject**)0x8F1A8C;
CPathInfoForObject *&InfoForTilePeds = *(CPathInfoForObject**)0x8F1AE4;
CPathInfoForObject *InfoForTileCars;
CPathInfoForObject *InfoForTilePeds;
// unused
CTempDetachedNode *&DetachedNodesCars = *(CTempDetachedNode**)0x8E2824;
CTempDetachedNode *&DetachedNodesPeds = *(CTempDetachedNode**)0x8E28A0;
CTempDetachedNode *DetachedNodesCars;
CTempDetachedNode *DetachedNodesPeds;

bool
CPedPath::CalcPedRoute(int8 pathType, CVector position, CVector destination, CVector *pointPoses, int16 *pointsFound, int16 maxPoints)
@@ -138,8 +138,8 @@ struct CPathInfoForObject
int8 numRightLanes;
uint8 crossing : 1;
};
extern CPathInfoForObject *&InfoForTileCars;
extern CPathInfoForObject *&InfoForTilePeds;
extern CPathInfoForObject *InfoForTileCars;
extern CPathInfoForObject *InfoForTilePeds;

struct CTempNode
{
@@ -234,7 +234,7 @@ class CPathFind
};
static_assert(sizeof(CPathFind) == 0x49bf4, "CPathFind: error");

extern CPathFind &ThePaths;
extern CPathFind ThePaths;

extern bool gbShowPedPaths;
extern bool gbShowCarPaths;
@@ -13,13 +13,13 @@
#include "RpAnimBlend.h"
#include "AnimBlendAssociation.h"

CPhoneInfo &gPhoneInfo = *(CPhoneInfo*)0x732A20;
CPhoneInfo gPhoneInfo;

bool &CPhoneInfo::bDisplayingPhoneMessage = *(bool*)0x6283AC; // is phone picked up
uint32 &CPhoneInfo::PhoneEnableControlsTimer = *(uint32*)0x6283A8;
CPhone *&CPhoneInfo::pPhoneDisplayingMessages = *(CPhone**)0x6283B0;
bool &CPhoneInfo::bPickingUpPhone = *(bool*)0x6283B4;
CPed *&CPhoneInfo::pCallBackPed = *(CPed**)0x6283B8; // ped who picking up the phone (reset after pickup cb)
bool CPhoneInfo::bDisplayingPhoneMessage; // is phone picked up
uint32 CPhoneInfo::PhoneEnableControlsTimer;
CPhone *CPhoneInfo::pPhoneDisplayingMessages;
bool CPhoneInfo::bPickingUpPhone;
CPed *CPhoneInfo::pCallBackPed; // ped who picking up the phone (reset after pickup cb)

/*
Entering phonebooth cutscene, showing messages and triggering these things
@@ -36,11 +36,11 @@ static_assert(sizeof(CPhone) == 0x34, "CPhone: error");

class CPhoneInfo {
public:
static bool &bDisplayingPhoneMessage;
static uint32 &PhoneEnableControlsTimer;
static CPhone *&pPhoneDisplayingMessages;
static bool &bPickingUpPhone;
static CPed *&pCallBackPed;
static bool bDisplayingPhoneMessage;
static uint32 PhoneEnableControlsTimer;
static CPhone *pPhoneDisplayingMessages;
static bool bPickingUpPhone;
static CPed *pCallBackPed;

int32 m_nMax;
int32 m_nScriptPhonesMax;
@@ -63,7 +63,7 @@ class CPhoneInfo {
void Update(void);
};

extern CPhoneInfo &gPhoneInfo;
extern CPhoneInfo gPhoneInfo;

void PhonePutDownCB(CAnimBlendAssociation *assoc, void *arg);
void PhonePickUpCB(CAnimBlendAssociation *assoc, void *arg);
@@ -31,16 +31,16 @@
#include "WaterLevel.h"
#include "World.h"

CPickup(&CPickups::aPickUps)[NUMPICKUPS] = *(CPickup(*)[NUMPICKUPS])*(uintptr*)0x878C98;
int16 CPickups::NumMessages;// = *(int16*)0x95CC98;
int32 CPickups::aPickUpsCollected[NUMCOLLECTEDPICKUPS];// = *(int32(*)[NUMCOLLECTEDPICKUPS])*(uintptr*)0x87C538;
int16 CPickups::CollectedPickUpIndex;// = *(int16*)0x95CC8A;
CPickup CPickups::aPickUps[NUMPICKUPS];
int16 CPickups::NumMessages;
int32 CPickups::aPickUpsCollected[NUMCOLLECTEDPICKUPS];
int16 CPickups::CollectedPickUpIndex;

// unused
bool &CPickups::bPickUpcamActivated = *(bool*)0x95CD71;
CVehicle *&CPickups::pPlayerVehicle = *(CVehicle**)0x8F29E8;
CVector &CPickups::StaticCamCoors = *(CVector*)0x9404C8;
uint32 &CPickups::StaticCamStartTime = *(uint32*)0x8E289C;
bool CPickups::bPickUpcamActivated;
CVehicle *CPickups::pPlayerVehicle;
CVector CPickups::StaticCamCoors;
uint32 CPickups::StaticCamStartTime;

tPickupMessage CPickups::aMessages[NUMPICKUPMESSAGES];

@@ -89,13 +89,13 @@ class CPickups
static void Load(uint8 *buf, uint32 size);
static void Save(uint8 *buf, uint32 *size);

static CPickup(&aPickUps)[NUMPICKUPS];
static CPickup aPickUps[NUMPICKUPS];

// unused
static bool &bPickUpcamActivated;
static CVehicle *&pPlayerVehicle;
static CVector &StaticCamCoors;
static uint32 &StaticCamStartTime;
static bool bPickUpcamActivated;
static CVehicle *pPlayerVehicle;
static CVector StaticCamCoors;
static uint32 StaticCamStartTime;
};

extern uint16 AmmoForWeapon[20];
@@ -10,11 +10,11 @@
#include "VehicleModelInfo.h"
#include "World.h"

uint16 &CRecordDataForGame::RecordingState = *(uint16*)0x95CC24;
uint8*& CRecordDataForGame::pDataBuffer = *(uint8**)0x8F1B70;
uint8*& CRecordDataForGame::pDataBufferPointer = *(uint8**)0x8F1AB0;
int& CRecordDataForGame::FId = *(int*)0x885BA4;
tGameBuffer& CRecordDataForGame::pDataBufferForFrame = *(tGameBuffer*)0x72CED0;
uint16 CRecordDataForGame::RecordingState;
uint8* CRecordDataForGame::pDataBuffer;
uint8* CRecordDataForGame::pDataBufferPointer;
int CRecordDataForGame::FId;
tGameBuffer CRecordDataForGame::pDataBufferForFrame;

#define MEMORY_FOR_GAME_RECORD (150000)

@@ -176,15 +176,15 @@ uint16 CRecordDataForGame::CalcGameChecksum(void)
return checksum ^ checksum >> 16;
}

uint8& CRecordDataForChase::Status = *(uint8*)0x95CDCE;
int& CRecordDataForChase::PositionChanges = *(int*)0x8F59C8;
uint8& CRecordDataForChase::CurrentCar = *(uint8*)0x95CDC9;
CAutomobile* (&CRecordDataForChase::pChaseCars)[NUM_CHASE_CARS] = *(CAutomobile * (*)[NUM_CHASE_CARS])*(uintptr*)0x6F46A8;
uint32& CRecordDataForChase::AnimStartTime = *(uint32*)0x8F1AEC;
float& CRecordDataForChase::AnimTime = *(float*)0x880F88;
CCarStateEachFrame* (&CRecordDataForChase::pBaseMemForCar)[NUM_CHASE_CARS] = *(CCarStateEachFrame * (*)[NUM_CHASE_CARS])*(uintptr*)0x70EA18;
float& CRecordDataForChase::TimeMultiplier = *(float*)0x8E2A94;
int& CRecordDataForChase::FId2 = *(int*)0x8E2C18;
uint8 CRecordDataForChase::Status;
int CRecordDataForChase::PositionChanges;
uint8 CRecordDataForChase::CurrentCar;
CAutomobile* CRecordDataForChase::pChaseCars[NUM_CHASE_CARS];
uint32 CRecordDataForChase::AnimStartTime;
float CRecordDataForChase::AnimTime;
CCarStateEachFrame* CRecordDataForChase::pBaseMemForCar[NUM_CHASE_CARS];
float CRecordDataForChase::TimeMultiplier;
int CRecordDataForChase::FId2;

#define CHASE_SCENE_LENGTH_IN_SECONDS (80)
#define CHASE_SCENE_FRAMES_PER_SECOND (15) // skipping every second frame