Skip to content

Commit

Permalink
GTA3 CPools fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkingGitHub committed Nov 21, 2017
1 parent 4ef6e2b commit fd30dab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions plugin_III/game_III/CPools.cpp
Expand Up @@ -32,29 +32,29 @@ void CPools::CheckPoolsEmpty() {
plugin::Call<0x4A1A50>();
}

// Converted from cdecl void CPools::GetPedRef(CPed *ped) 0x4A1A80
void CPools::GetPedRef(CPed* ped) {
plugin::Call<0x4A1A80, CPed*>(ped);
// Converted from cdecl int CPools::GetPedRef(CPed *ped) 0x4A1A80
int CPools::GetPedRef(CPed* ped) {
return plugin::CallAndReturn<int, 0x4A1A80, CPed*>(ped);
}

// Converted from cdecl CPed* CPools::GetPed(int handle) 0x4A1AA0
CPed* CPools::GetPed(int handle) {
return plugin::CallAndReturn<CPed*, 0x4A1AA0, int>(handle);
}

// Converted from cdecl CVehicle* CPools::GetVehicleRef(CVehicle *vehicle) 0x4A1AC0
CVehicle* CPools::GetVehicleRef(CVehicle* vehicle) {
return plugin::CallAndReturn<CVehicle*, 0x4A1AC0, CVehicle*>(vehicle);
// Converted from cdecl int CPools::GetVehicleRef(CVehicle *vehicle) 0x4A1AC0
int CPools::GetVehicleRef(CVehicle* vehicle) {
return plugin::CallAndReturn<int, 0x4A1AC0, CVehicle*>(vehicle);
}

// Converted from cdecl void CPools::GetVehicle(int handle) 0x4A1AE0
void CPools::GetVehicle(int handle) {
plugin::Call<0x4A1AE0, int>(handle);
// Converted from cdecl CVehicle* CPools::GetVehicle(int handle) 0x4A1AE0
CVehicle* CPools::GetVehicle(int handle) {
return plugin::CallAndReturn<CVehicle*, 0x4A1AE0, int>(handle);
}

// Converted from cdecl void CPools::GetObjectRef(CObject *object) 0x4A1B00
void CPools::GetObjectRef(CObject* object) {
plugin::Call<0x4A1B00, CObject*>(object);
// Converted from cdecl int CPools::GetObjectRef(CObject *object) 0x4A1B00
int CPools::GetObjectRef(CObject* object) {
return plugin::CallAndReturn<int, 0x4A1B00, CObject*>(object);
}

// Converted from cdecl CObject* CPools::GetObject(int handle) 0x4A1B20
Expand Down
8 changes: 4 additions & 4 deletions plugin_III/game_III/CPools.h
Expand Up @@ -34,11 +34,11 @@ class CPools {
static void Initialise();
static void ShutDown();
static void CheckPoolsEmpty();
static void GetPedRef(CPed* ped);
static int GetPedRef(CPed* ped);
static CPed* GetPed(int handle);
static CVehicle* GetVehicleRef(CVehicle* vehicle);
static void GetVehicle(int handle);
static void GetObjectRef(CObject* object);
static int GetVehicleRef(CVehicle* vehicle);
static CVehicle* GetVehicle(int handle);
static int GetObjectRef(CObject* object);
static CObject* GetObject(int handle);
static void LoadVehiclePool(unsigned char* buffer, unsigned int size);
static void SaveVehiclePool(unsigned char* buffer, unsigned int* outSize);
Expand Down

1 comment on commit fd30dab

@quiret
Copy link
Collaborator

@quiret quiret commented on fd30dab Nov 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. I hope that the reference IS really a signed integer and NOT an unsigned integer. ;)

Please sign in to comment.