summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-06-25 00:42:23 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-06-25 00:42:23 +0200
commitcc731f47324cf58c899b242e34d661b651d3acef (patch)
treea096e4563ff09b208ff4697635baab2ec85395b4 /src/entities
parentCReplay::StorePedAnimation (diff)
downloadre3-cc731f47324cf58c899b242e34d661b651d3acef.tar
re3-cc731f47324cf58c899b242e34d661b651d3acef.tar.gz
re3-cc731f47324cf58c899b242e34d661b651d3acef.tar.bz2
re3-cc731f47324cf58c899b242e34d661b651d3acef.tar.lz
re3-cc731f47324cf58c899b242e34d661b651d3acef.tar.xz
re3-cc731f47324cf58c899b242e34d661b651d3acef.tar.zst
re3-cc731f47324cf58c899b242e34d661b651d3acef.zip
Diffstat (limited to '')
-rw-r--r--src/entities/Automobile.cpp5
-rw-r--r--src/entities/Automobile.h16
-rw-r--r--src/entities/Object.cpp2
-rw-r--r--src/entities/Object.h1
-rw-r--r--src/entities/Ped.cpp27
-rw-r--r--src/entities/Ped.h29
-rw-r--r--src/entities/Vehicle.h13
7 files changed, 86 insertions, 7 deletions
diff --git a/src/entities/Automobile.cpp b/src/entities/Automobile.cpp
new file mode 100644
index 00000000..89fac33e
--- /dev/null
+++ b/src/entities/Automobile.cpp
@@ -0,0 +1,5 @@
+#include "common.h"
+#include "patcher.h"
+#include "Automobile.h"
+
+WRAPPER void CAutomobile::SetDoorDamage(int32, uint32, bool) { EAXJMP(0x530200); } \ No newline at end of file
diff --git a/src/entities/Automobile.h b/src/entities/Automobile.h
index 379124e6..7422112b 100644
--- a/src/entities/Automobile.h
+++ b/src/entities/Automobile.h
@@ -1,14 +1,26 @@
#pragma once
+#include "DamageManager.h"
+#include "Door.h"
+#include "RwHelper.h"
#include "Vehicle.h"
class CAutomobile : public CVehicle
{
public:
// 0x288
- uint8 stuff1[484];
+ CDamageManager m_DamageManager;
+ CDoor m_aDoors[6];
+ RwFrame *m_apModelNodes[20];
+ uint8 stuff1[160];
float m_afWheelSuspDist[4];
- uint8 stuff2[300];
+ uint8 stuff2[44];
+ float m_afWheelRotation[4];
+ uint8 stuff3[200];
+ float m_fCarGunLR;
+ uint8 stuff4[36];
+
+ void SetDoorDamage(int32, uint32, bool); /* TODO: eDoors */
};
static_assert(sizeof(CAutomobile) == 0x5A8, "CAutomobile: error");
static_assert(offsetof(CAutomobile, m_afWheelSuspDist) == 0x46C, "CAutomobile: error");
diff --git a/src/entities/Object.cpp b/src/entities/Object.cpp
index 35a64604..8c7cc4c9 100644
--- a/src/entities/Object.cpp
+++ b/src/entities/Object.cpp
@@ -63,6 +63,8 @@ CObject::Render(void)
CEntity::Render();
}
+WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); }
+
STARTPATCHES
InjectHook(0x4BB1E0, &CObject::Render_, PATCH_JUMP);
ENDPATCHES
diff --git a/src/entities/Object.h b/src/entities/Object.h
index 2079ff0e..a156609c 100644
--- a/src/entities/Object.h
+++ b/src/entities/Object.h
@@ -71,6 +71,7 @@ public:
void ObjectDamage(float amount);
+ static void DeleteAllTempObjectInArea(CVector, float);
void Render_(void) { CObject::Render(); }
};
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp
index f3e212d4..20a5b48c 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -975,6 +975,33 @@ CPed::ClearPointGunAt(void)
}
}
+WRAPPER void CPed::PedGetupCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4CE810); }
+WRAPPER void CPed::PedStaggerCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4CE8D0); }
+WRAPPER void CPed::PedEvadeCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4D36E0); }
+WRAPPER void CPed::FinishDieAnimCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4D3950); }
+WRAPPER void CPed::FinishedWaitCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4D6520); }
+WRAPPER void CPed::FinishLaunchCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4D7490); }
+WRAPPER void CPed::FinishHitHeadCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4D7A80); }
+WRAPPER void CPed::PedAnimGetInCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4DEC80); }
+WRAPPER void CPed::PedAnimDoorOpenCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4DE500); }
+WRAPPER void CPed::PedAnimPullPedOutCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4DEAF0); }
+WRAPPER void CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4DF1B0); }
+WRAPPER void CPed::SetInCarCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4CF220); }
+WRAPPER void CPed::PedSetOutCarCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4CE8F0); }
+WRAPPER void CPed::PedAnimAlignCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4DE130); }
+WRAPPER void CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4CF000); }
+WRAPPER void CPed::PedAnimStepOutCarCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4DF5C0); }
+WRAPPER void CPed::PedSetInTrainCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4E3290); }
+WRAPPER void CPed::PedSetOutTrainCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4E36E0); }
+WRAPPER void CPed::FinishFightMoveCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4E9830); }
+WRAPPER void CPed::PedAnimDoorCloseRollingCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4E4B90); }
+WRAPPER void CPed::FinishJumpCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4D7A50); }
+WRAPPER void CPed::PedLandCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4CE8A0); }
+WRAPPER void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4C6620); }
+WRAPPER void CPed::RestoreHeadingRateCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4D6550); }
+WRAPPER void CPed::PedSetQuickDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4E2480); }
+WRAPPER void CPed::PedSetDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg) { EAXJMP(0x4E2920); }
+
STARTPATCHES
InjectHook(0x4CF8F0, &CPed::AddWeaponModel, PATCH_JUMP);
InjectHook(0x4C6AA0, &CPed::AimGun, PATCH_JUMP);
diff --git a/src/entities/Ped.h b/src/entities/Ped.h
index 800c5bb9..43131533 100644
--- a/src/entities/Ped.h
+++ b/src/entities/Ped.h
@@ -280,7 +280,32 @@ public:
void ClearPointGunAt(void);
static RwObject *SetPedAtomicVisibilityCB(RwObject *object, void *data);
static RwFrame *RecurseFrameChildrenVisibilityCB(RwFrame *frame, void *data);
- static void FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg);
+ static void PedGetupCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedStaggerCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedEvadeCB(CAnimBlendAssociation *assoc, void *arg);
+ static void FinishDieAnimCB(CAnimBlendAssociation *assoc, void *arg);
+ static void FinishedWaitCB(CAnimBlendAssociation *assoc, void *arg);
+ static void FinishLaunchCB(CAnimBlendAssociation *assoc, void *arg);
+ static void FinishHitHeadCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedAnimGetInCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedAnimDoorOpenCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedAnimPullPedOutCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedAnimDoorCloseCB(CAnimBlendAssociation *assoc, void *arg);
+ static void SetInCarCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedSetOutCarCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedAnimAlignCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedSetDraggedOutCarCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedAnimStepOutCarCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedSetInTrainCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedSetOutTrainCB(CAnimBlendAssociation *assoc, void *arg);
+ static void FinishedAttackCB(CAnimBlendAssociation *assoc, void *arg);
+ static void FinishFightMoveCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedAnimDoorCloseRollingCB(CAnimBlendAssociation *assoc, void *arg);
+ static void FinishJumpCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedLandCB(CAnimBlendAssociation *assoc, void *arg);
+ static void RestoreHeadingRateCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedSetQuickDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedSetDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg);
bool HasWeapon(eWeaponType weaponType) { return m_weapons[weaponType].m_eWeaponType == weaponType; }
CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; }
@@ -291,6 +316,8 @@ public:
static bool &bPedCheat3;
};
+void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg);
+
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");
static_assert(offsetof(CPed, m_pCurSurface) == 0x2FC, "CPed: error");
static_assert(offsetof(CPed, m_pMyVehicle) == 0x310, "CPed: error");
diff --git a/src/entities/Vehicle.h b/src/entities/Vehicle.h
index e5d1cfb3..fea15d35 100644
--- a/src/entities/Vehicle.h
+++ b/src/entities/Vehicle.h
@@ -11,14 +11,17 @@ public:
uint8 stuff1[116];
uint8 m_currentColour1;
uint8 m_currentColour2;
-uint8 m_extra1;
-uint8 m_extra2;
+ uint8 m_extra1;
+ uint8 m_extra2;
int16 m_nAlarmState;
CPed *pDriver;
CPed *pPassengers[8];
uint8 stuff2[24];
CEntity *m_pCurSurface;
- uint8 stuff3[17];
+ void* m_pFire;
+ float m_fWheelState;
+ float m_fAcceleration;
+ uint8 stuff4[5];
uint8 m_veh_flagA1 : 1;
uint8 m_veh_flagA2 : 1;
uint8 m_veh_flagA4 : 1;
@@ -51,7 +54,9 @@ uint8 m_extra2;
uint8 m_veh_flagD20 : 1;
uint8 m_veh_flagD40 : 1;
uint8 m_veh_flagD80 : 1;
- uint8 stuff4[139];
+ uint8 stuff5[7];
+ float m_fHealth;
+ uint8 stuff6[128];
int32 m_vehType;
static void *operator new(size_t);