Scorption_GetCurrentTarget and CScorpion::GetCurrentTarget

This commit is contained in:
krystalgamer 2024-05-29 20:07:31 +02:00
parent af62af61b2
commit b612eac2f8
2 changed files with 38 additions and 1 deletions

View File

@ -7,6 +7,26 @@ void __inline CScorpion::NextRoom(void)
this->field_218 &= 0xFFFFFFE7;
}
// @Ok
__inline void* CScorpion::GetCurrentTarget(void)
{
if (!this->field_BF8)
{
return NULL;
}
return Mem_RecoverPointer(&this->field_BF0);
}
// @Ok
void Scorpion_GetCurrentTarget(unsigned int* pScorp, unsigned int* pTarget)
{
*pTarget = reinterpret_cast<unsigned int>((*reinterpret_cast<CScorpion**>(pScorp))->GetCurrentTarget());
}
void validate_CScorpion(void){
VALIDATE_SIZE(CScorpion, 0xC28);
VALIDATE(CScorpion, field_BF0, 0xBF0);
VALIDATE(CScorpion, field_BF8, 0xBF8);
}

View File

@ -1,5 +1,8 @@
#pragma once
#ifndef SCORPION_H
#define SCORPION_H
#include "export.h"
#include "baddy.h"
@ -7,7 +10,21 @@
class CScorpion : public CBaddy {
public:
EXPORT void NextRoom(void);
unsigned char padScoprtion[0xC28-0x324];
EXPORT void* GetCurrentTarget(void);
unsigned char padTop[0xBF0-0x324];
SHandle field_BF0;
unsigned char padAfterBF0[0xBF8-0xBF0 - sizeof(SHandle)];
int field_BF8;
unsigned char padScoprtion[0xC28-0xBF8-4];
};
EXPORT void Scorpion_GetCurrentTarget(unsigned int*, unsigned int*);
void validate_CScorpion(void);
#endif