1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-05 04:15:55 +00:00
re3/src/control/PedType.cpp

35 lines
890 B
C++
Raw Normal View History

2019-06-17 08:30:02 +00:00
#include "common.h"
#include "patcher.h"
#include "PedType.h"
2019-06-19 12:06:13 +00:00
CPedType *(&CPedType::ms_apPedType)[NUM_PEDTYPES] = *(CPedType *(*)[NUM_PEDTYPES]) *(int*)0x941594;
WRAPPER void CPedType::LoadPedData(void) { EAXJMP(0x4EE8D0); }
2019-06-19 12:06:13 +00:00
WRAPPER int32 CPedType::FindPedType(char *type) { EAXJMP(0x4EEC10); }
void
2019-06-19 12:06:13 +00:00
CPedType::Initialise(void)
{
2019-06-19 12:06:13 +00:00
int i;
debug("Initialising CPedType...\n");
2019-06-19 12:06:13 +00:00
for(i = 0; i < NUM_PEDTYPES; i++){
ms_apPedType[i] = new CPedType;
2019-06-19 12:06:13 +00:00
ms_apPedType[i]->m_flag = PED_FLAG_PLAYER1;
ms_apPedType[i]->field_4 = 0;
ms_apPedType[i]->field_8 = 0;
// Why field_C not initialized?
ms_apPedType[i]->field_10 = 0;
ms_apPedType[i]->field_14 = 0;
2019-06-19 12:06:13 +00:00
ms_apPedType[i]->m_threats = 0;
ms_apPedType[i]->m_avoid = 0;
}
debug("Loading ped data...\n");
LoadPedData();
debug("CPedType ready\n");
}
STARTPATCHES
InjectHook(0x4EE7E0, &CPedType::Initialise, PATCH_JUMP);
2019-06-19 12:06:13 +00:00
ENDPATCHES