Add Load/Save functions
This commit is contained in:
parent
4fee2cbdd9
commit
28342405d3
@ -9,4 +9,6 @@ WRAPPER bool CCranes::HaveAllCarsBeenCollectedByMilitaryCrane() { EAXJMP(0x544BE
|
|||||||
WRAPPER void CCranes::ActivateCrane(float, float, float, float, float, float, float, float, bool, bool, float, float) { EAXJMP(0x543650); }
|
WRAPPER void CCranes::ActivateCrane(float, float, float, float, float, float, float, float, bool, bool, float, float) { EAXJMP(0x543650); }
|
||||||
WRAPPER void CCranes::DeActivateCrane(float, float) { EAXJMP(0x543890); }
|
WRAPPER void CCranes::DeActivateCrane(float, float) { EAXJMP(0x543890); }
|
||||||
WRAPPER void CCranes::InitCranes(void) { EAXJMP(0x543360); }
|
WRAPPER void CCranes::InitCranes(void) { EAXJMP(0x543360); }
|
||||||
WRAPPER void CCranes::UpdateCranes(void) { EAXJMP(0x5439E0); }
|
WRAPPER void CCranes::UpdateCranes(void) { EAXJMP(0x5439E0); }
|
||||||
|
WRAPPER void CCranes::Save(uint8*, uint32*) { EAXJMP(0x545210); }
|
||||||
|
WRAPPER void CranesLoad(uint8*, uint32) { EAXJMP(0x5454d0); }
|
||||||
|
@ -14,4 +14,7 @@ public:
|
|||||||
static void DeActivateCrane(float, float);
|
static void DeActivateCrane(float, float);
|
||||||
static void InitCranes(void);
|
static void InitCranes(void);
|
||||||
static void UpdateCranes(void);
|
static void UpdateCranes(void);
|
||||||
|
static void Save(uint8*, uint32*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void CranesLoad(uint8*, uint32); // is this really outside CCranes?
|
||||||
|
@ -31,6 +31,8 @@ CGarage(&CGarages::Garages)[NUM_GARAGES] = *(CGarage(*)[NUM_GARAGES])(uintptr*)0
|
|||||||
|
|
||||||
WRAPPER void CGarages::Init(void) { EAXJMP(0x421C60); }
|
WRAPPER void CGarages::Init(void) { EAXJMP(0x421C60); }
|
||||||
WRAPPER void CGarages::Update(void) { EAXJMP(0x421E40); }
|
WRAPPER void CGarages::Update(void) { EAXJMP(0x421E40); }
|
||||||
|
WRAPPER void CGarages::Load(uint8* buf, uint32 size) { EAXJMP(0x428940); }
|
||||||
|
WRAPPER void CGarages::Save(uint8* buf, uint32 *size) { EAXJMP(0x4284e0); }
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CGarages::IsModelIndexADoor(uint32 id)
|
CGarages::IsModelIndexADoor(uint32 id)
|
||||||
|
@ -147,6 +147,8 @@ public:
|
|||||||
static void PlayerArrestedOrDied();
|
static void PlayerArrestedOrDied();
|
||||||
static void Init(void);
|
static void Init(void);
|
||||||
static void Update(void);
|
static void Update(void);
|
||||||
|
static void Load(uint8 *buf, uint32 size);
|
||||||
|
static void Save(uint8 *buf, uint32 *size);
|
||||||
static int16 AddOne(float, float, float, float, float, float, uint8, uint32);
|
static int16 AddOne(float, float, float, float, float, float, uint8, uint32);
|
||||||
static void SetTargetCarForMissonGarage(int16, CVehicle*);
|
static void SetTargetCarForMissonGarage(int16, CVehicle*);
|
||||||
static bool HasCarBeenDroppedOffYet(int16);
|
static bool HasCarBeenDroppedOffYet(int16);
|
||||||
|
@ -11212,8 +11212,8 @@ void CTheScripts::RenderTheScriptDebugLines()
|
|||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)0);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRAPPER void CTheScripts::SaveAllScripts(uint8*, uint32*) { EAXJMP(0x4535E0); }
|
WRAPPER void CTheScripts::SaveAllScripts(uint8 *buf, uint32 *size) { EAXJMP(0x4535E0); }
|
||||||
WRAPPER void CTheScripts::LoadAllScripts(uint8*, uint32) { EAXJMP(0x453B30); }
|
WRAPPER void CTheScripts::LoadAllScripts(uint8 *buf, uint32 size) { EAXJMP(0x453B30); }
|
||||||
WRAPPER void CTheScripts::ClearSpaceForMissionEntity(const CVector&, CEntity*) { EAXJMP(0x454060); }
|
WRAPPER void CTheScripts::ClearSpaceForMissionEntity(const CVector&, CEntity*) { EAXJMP(0x454060); }
|
||||||
WRAPPER void CTheScripts::HighlightImportantArea(uint32, float, float, float, float, float) { EAXJMP(0x454320); }
|
WRAPPER void CTheScripts::HighlightImportantArea(uint32, float, float, float, float, float) { EAXJMP(0x454320); }
|
||||||
WRAPPER void CTheScripts::HighlightImportantAngledArea(uint32, float, float, float, float, float, float, float, float, float) { EAXJMP(0x454430); }
|
WRAPPER void CTheScripts::HighlightImportantAngledArea(uint32, float, float, float, float, float, float, float, float, float) { EAXJMP(0x454430); }
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
class CClock
|
class CClock
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
static uint8 &ms_nGameClockHours;
|
static uint8 &ms_nGameClockHours;
|
||||||
static uint8 &ms_nGameClockMinutes;
|
static uint8 &ms_nGameClockMinutes;
|
||||||
static uint16 &ms_nGameClockSeconds;
|
static uint16 &ms_nGameClockSeconds;
|
||||||
@ -11,7 +12,6 @@ class CClock
|
|||||||
static uint32 &ms_nMillisecondsPerGameMinute;
|
static uint32 &ms_nMillisecondsPerGameMinute;
|
||||||
static uint32 &ms_nLastClockTick;
|
static uint32 &ms_nLastClockTick;
|
||||||
static bool &ms_bClockHasBeenStored;
|
static bool &ms_bClockHasBeenStored;
|
||||||
public:
|
|
||||||
|
|
||||||
static void Initialise(uint32 scale);
|
static void Initialise(uint32 scale);
|
||||||
static void Update(void);
|
static void Update(void);
|
||||||
|
@ -14,6 +14,13 @@ CObjectPool *&CPools::ms_pObjectPool = *(CObjectPool**)0x880E28;
|
|||||||
CDummyPool *&CPools::ms_pDummyPool = *(CDummyPool**)0x8F2C18;
|
CDummyPool *&CPools::ms_pDummyPool = *(CDummyPool**)0x8F2C18;
|
||||||
CAudioScriptObjectPool *&CPools::ms_pAudioScriptObjectPool = *(CAudioScriptObjectPool**)0x8F1B6C;
|
CAudioScriptObjectPool *&CPools::ms_pAudioScriptObjectPool = *(CAudioScriptObjectPool**)0x8F1B6C;
|
||||||
|
|
||||||
|
WRAPPER void CPools::LoadObjectPool(uint8* buf, uint32 size) { EAXJMP(0x4a2550); }
|
||||||
|
WRAPPER void CPools::LoadPedPool(uint8* buf, uint32 size) { EAXJMP(0x4a2b50); }
|
||||||
|
WRAPPER void CPools::LoadVehiclePool(uint8* buf, uint32 size) { EAXJMP(0x4a1b40); }
|
||||||
|
WRAPPER void CPools::SaveObjectPool(uint8* buf, uint32 *size) { EAXJMP(0x4a22d0); }
|
||||||
|
WRAPPER void CPools::SavePedPool(uint8* buf, uint32 *size) { EAXJMP(0x4a29b0); }
|
||||||
|
WRAPPER void CPools::SaveVehiclePool(uint8* buf, uint32 *size) { EAXJMP(0x4a2080); }
|
||||||
|
|
||||||
void
|
void
|
||||||
CPools::Initialise(void)
|
CPools::Initialise(void)
|
||||||
{
|
{
|
||||||
@ -30,16 +37,16 @@ CPools::Initialise(void)
|
|||||||
|
|
||||||
void
|
void
|
||||||
CPools::ShutDown(void)
|
CPools::ShutDown(void)
|
||||||
{
|
{
|
||||||
debug("PtrNodes left %d\n", ms_pPtrNodePool->GetNoOfUsedSpaces());
|
debug("PtrNodes left %d\n", ms_pPtrNodePool->GetNoOfUsedSpaces());
|
||||||
debug("EntryInfoNodes left %d\n", ms_pEntryInfoNodePool->GetNoOfUsedSpaces());
|
debug("EntryInfoNodes left %d\n", ms_pEntryInfoNodePool->GetNoOfUsedSpaces());
|
||||||
debug("Peds left %d\n", ms_pPedPool->GetNoOfUsedSpaces());
|
debug("Peds left %d\n", ms_pPedPool->GetNoOfUsedSpaces());
|
||||||
debug("Vehicles left %d\n", ms_pVehiclePool->GetNoOfUsedSpaces());
|
debug("Vehicles left %d\n", ms_pVehiclePool->GetNoOfUsedSpaces());
|
||||||
debug("Buildings left %d\n", ms_pBuildingPool->GetNoOfUsedSpaces());
|
debug("Buildings left %d\n", ms_pBuildingPool->GetNoOfUsedSpaces());
|
||||||
debug("Treadables left %d\n", ms_pTreadablePool->GetNoOfUsedSpaces());
|
debug("Treadables left %d\n", ms_pTreadablePool->GetNoOfUsedSpaces());
|
||||||
debug("Objects left %d\n", ms_pObjectPool->GetNoOfUsedSpaces());
|
debug("Objects left %d\n", ms_pObjectPool->GetNoOfUsedSpaces());
|
||||||
debug("Dummys left %d\n", ms_pDummyPool->GetNoOfUsedSpaces());
|
debug("Dummys left %d\n", ms_pDummyPool->GetNoOfUsedSpaces());
|
||||||
debug("AudioScriptObjects left %d\n", ms_pAudioScriptObjectPool->GetNoOfUsedSpaces());
|
debug("AudioScriptObjects left %d\n", ms_pAudioScriptObjectPool->GetNoOfUsedSpaces());
|
||||||
printf("Shutdown pool started\n");
|
printf("Shutdown pool started\n");
|
||||||
|
|
||||||
delete ms_pPtrNodePool;
|
delete ms_pPtrNodePool;
|
||||||
@ -62,12 +69,12 @@ CVehicle *CPools::GetVehicle(int32 handle) { return ms_pVehiclePool->GetAt(handl
|
|||||||
int32 CPools::GetObjectRef(CObject *object) { return ms_pObjectPool->GetIndex(object); }
|
int32 CPools::GetObjectRef(CObject *object) { return ms_pObjectPool->GetIndex(object); }
|
||||||
CObject *CPools::GetObject(int32 handle) { return ms_pObjectPool->GetAt(handle); }
|
CObject *CPools::GetObject(int32 handle) { return ms_pObjectPool->GetAt(handle); }
|
||||||
|
|
||||||
void
|
void
|
||||||
CPools::CheckPoolsEmpty()
|
CPools::CheckPoolsEmpty()
|
||||||
{
|
{
|
||||||
assert(ms_pPedPool->GetNoOfUsedSpaces() == 0);
|
assert(ms_pPedPool->GetNoOfUsedSpaces() == 0);
|
||||||
assert(ms_pVehiclePool->GetNoOfUsedSpaces() == 0);
|
assert(ms_pVehiclePool->GetNoOfUsedSpaces() == 0);
|
||||||
printf("pools have beem cleared \n");
|
printf("pools have been cleared\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,4 +52,10 @@ public:
|
|||||||
static CObject *GetObject(int32 handle);
|
static CObject *GetObject(int32 handle);
|
||||||
static void CheckPoolsEmpty();
|
static void CheckPoolsEmpty();
|
||||||
static void MakeSureSlotInObjectPoolIsEmpty(int32 slot);
|
static void MakeSureSlotInObjectPoolIsEmpty(int32 slot);
|
||||||
|
static void LoadObjectPool(uint8 *buf, uint32 size);
|
||||||
|
static void LoadPedPool(uint8 *buf, uint32 size);
|
||||||
|
static void LoadVehiclePool(uint8 *buf, uint32 size);
|
||||||
|
static void SaveObjectPool(uint8 *buf, uint32 *size);
|
||||||
|
static void SavePedPool(uint8 *buf, uint32 *size);
|
||||||
|
static void SaveVehiclePool(uint8 *buf, uint32 *size);
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
class CTimer
|
class CTimer
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
static uint32 &m_snTimeInMilliseconds;
|
static uint32 &m_snTimeInMilliseconds;
|
||||||
static uint32 &m_snTimeInMillisecondsPauseMode;
|
static uint32 &m_snTimeInMillisecondsPauseMode;
|
||||||
static uint32 &m_snTimeInMillisecondsNonClipped;
|
static uint32 &m_snTimeInMillisecondsNonClipped;
|
||||||
@ -12,7 +13,7 @@ class CTimer
|
|||||||
static float &ms_fTimeStepNonClipped;
|
static float &ms_fTimeStepNonClipped;
|
||||||
static bool &m_UserPause;
|
static bool &m_UserPause;
|
||||||
static bool &m_CodePause;
|
static bool &m_CodePause;
|
||||||
public:
|
|
||||||
static float GetTimeStep(void) { return ms_fTimeStep; }
|
static float GetTimeStep(void) { return ms_fTimeStep; }
|
||||||
static void SetTimeStep(float ts) { ms_fTimeStep = ts; }
|
static void SetTimeStep(float ts) { ms_fTimeStep = ts; }
|
||||||
static float GetTimeStepInSeconds() { return ms_fTimeStep / 50.0f; }
|
static float GetTimeStepInSeconds() { return ms_fTimeStep / 50.0f; }
|
||||||
|
Loading…
Reference in New Issue
Block a user