[saco] Implement CEntity::sub_1009EC80()

This commit is contained in:
RD42 2024-02-16 22:27:57 +08:00
parent 7565bc1bc1
commit f854edac06
3 changed files with 29 additions and 0 deletions

View File

@ -42,6 +42,7 @@ typedef struct _ENTITY_TYPE
char _pad4[16];
MATRIX4X4 *mat; // 20-24
DWORD *pdwRenderWare; // 24-28
} ENTITY_TYPE;

View File

@ -51,3 +51,29 @@ void CEntity::SetMatrix(MATRIX4X4 Matrix)
//-----------------------------------------------------------
void CEntity::sub_1009EC80()
{
if(!m_pEntity || m_pEntity->vtable == 0x863C40) return;
DWORD dwRenderWare = (DWORD)m_pEntity->pdwRenderWare;
DWORD dwMatrix = (DWORD)m_pEntity->mat;
DWORD dwEntity = (DWORD)m_pEntity;
if(dwEntity && dwRenderWare && dwMatrix)
{
_asm mov edx, dwRenderWare
_asm mov eax, [edx+4]
_asm add eax, 16
_asm push eax
_asm mov ecx, dwMatrix
_asm mov edx, 0x59AD70
_asm call edx
_asm mov ecx, dwEntity
_asm mov edx, 0x532B00
_asm call edx
}
}
//-----------------------------------------------------------

View File

@ -13,6 +13,8 @@ public:
void GetMatrix(PMATRIX4X4 Matrix);
void SetMatrix(MATRIX4X4 Matrix);
void sub_1009EC80();
char field_4[60];
ENTITY_TYPE *m_pEntity;
DWORD m_dwGTAId;