CScorpion::FindJonah

This commit is contained in:
krystalgamer 2024-06-02 17:52:08 +02:00
parent 8c376b070d
commit aba895f2c0
2 changed files with 28 additions and 1 deletions

View File

@ -24,9 +24,33 @@ void Scorpion_GetCurrentTarget(unsigned int* pScorp, unsigned int* pTarget)
*pTarget = reinterpret_cast<unsigned int>((*reinterpret_cast<CScorpion**>(pScorp))->GetCurrentTarget());
}
static CSuper* BaddyList;
// @NotOk
// globals
CSuper* CScorpion::FindJonah(void)
{
if (this->field_BEC)
return field_BEC;
for (CSuper* cur = BaddyList; cur; cur = reinterpret_cast<CSuper*>(cur->field_20))
{
if (cur->field_38 == 316)
{
this->field_BEC = cur;
return this->field_BEC;
}
}
return NULL;
}
void validate_CScorpion(void){
VALIDATE_SIZE(CScorpion, 0xC28);
VALIDATE(CScorpion, field_BEC, 0xBEC);
VALIDATE(CScorpion, field_BF0, 0xBF0);
VALIDATE(CScorpion, field_BF8, 0xBF8);
}

View File

@ -11,9 +11,12 @@ class CScorpion : public CBaddy {
public:
EXPORT void NextRoom(void);
EXPORT void* GetCurrentTarget(void);
EXPORT CSuper* FindJonah(void);
unsigned char padTop[0xBF0-0x324];
unsigned char padTop[0xBEC-0x324];
CSuper* field_BEC;
SHandle field_BF0;
unsigned char padAfterBF0[0xBF8-0xBF0 - sizeof(SHandle)];