summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-06-26 23:24:45 +0200
committereray orçunus <erayorcunus@gmail.com>2019-06-26 23:24:45 +0200
commit15da9beff10f44abaa4015920df412bb8cdc7d4a (patch)
treecc4203c9266b450e393c179c8d528f71c5957f01 /src/entities
parentMerge branch 'master' of git://github.com/GTAmodding/re3 into erorcun (diff)
parentMerge pull request #48 from Nick007J/master (diff)
downloadre3-15da9beff10f44abaa4015920df412bb8cdc7d4a.tar
re3-15da9beff10f44abaa4015920df412bb8cdc7d4a.tar.gz
re3-15da9beff10f44abaa4015920df412bb8cdc7d4a.tar.bz2
re3-15da9beff10f44abaa4015920df412bb8cdc7d4a.tar.lz
re3-15da9beff10f44abaa4015920df412bb8cdc7d4a.tar.xz
re3-15da9beff10f44abaa4015920df412bb8cdc7d4a.tar.zst
re3-15da9beff10f44abaa4015920df412bb8cdc7d4a.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.cpp24
-rw-r--r--src/entities/Ped.h32
6 files changed, 74 insertions, 6 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 5a4c736e..c4109312 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -1463,6 +1463,30 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
}
+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::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); }
+
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 187bd08c..34c7a485 100644
--- a/src/entities/Ped.h
+++ b/src/entities/Ped.h
@@ -303,10 +303,32 @@ public:
static void GetPositionToOpenCarDoor(CVector* output, CVehicle* veh, uint32 enterType);
static RwObject *SetPedAtomicVisibilityCB(RwObject *object, void *data);
static RwFrame *RecurseFrameChildrenVisibilityCB(RwFrame *frame, void *data);
- static void FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg);
- static void PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg);
- static void PedSetQuickDraggedOutCarPositionCB(CAnimBlendAssociation *dragAssoc, void *arg);
- static void PedSetDraggedOutCarPositionCB(CAnimBlendAssociation *dragAssoc, 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]; }
@@ -320,6 +342,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");