CBlackCat::CBlackCat and BlackCat_CreateBlackCat

This commit is contained in:
krystalgamer 2024-05-16 18:27:41 +02:00
parent fad2afac3f
commit 433a0e1e73
2 changed files with 45 additions and 1 deletions

View File

@ -1,5 +1,47 @@
#include "blackcat.h"
#include "validate.h"
#include "trig.h"
// @NotOk
// globals
CBlackCat::CBlackCat(int* a2, int a3)
{
if (Trig_GetLevelId() != 2051)
{
this->InitItem("blackcat");
}
else
{
this->InitItem("bc2");
}
__int16 *v5 = this->SquirtAngles(reinterpret_cast<__int16*>(this->SquirtPos(a2)));
this->field_21E = 100;
this->RunAnim(0xC, 0, -1);
this->mFlags |= 0x480;
this->field_3C = 0x548728;
this->AttachTo(reinterpret_cast<CBody**>(0x56E9900));
this->field_38 = 319;
this->field_31C.bothFlags = 1;
this->field_DE = a3;
this->field_DC = 0;
this->field_34C = reinterpret_cast<int>(v5);
if (*submarinerDieRelated && Trig_GetLevelId() != 2051)
this->Die(0);
}
// @Ok
void BlackCat_CreateBlackCat(const unsigned int *stack, unsigned int *result)
{
int* v2 = reinterpret_cast<int*>(*stack);
int v3 = static_cast<int>(stack[1]);
*result = reinterpret_cast<unsigned int>(new CBlackCat(v2, v3));
}
void validate_CBlackCat(void){
VALIDATE_SIZE(CBlackCat, 0x354);

View File

@ -6,6 +6,7 @@
class CBlackCat : public CBaddy {
public:
EXPORT CBlackCat(int*, int);
int field_324;
int field_328;
int field_32C;
@ -20,4 +21,5 @@ public:
int field_350;
};
void validate_CBlackCat(void);
void validate_CBlackCat(void);
EXPORT void BlackCat_CreateBlackCat(const unsigned int *stack, unsigned int *result);