CCarnage::~CCarnage

This commit is contained in:
krystalgamer 2024-07-29 18:41:07 +02:00
parent f0949dfe97
commit 0eff5e040f
2 changed files with 36 additions and 8 deletions

View File

@ -5,8 +5,22 @@
#include "spool.h"
extern const char *gObjFile;
extern CBaddy *BaddyList;
EXPORT u8 gObjFileRegion;
// @Ok
CCarnage::~CCarnage(void)
{
this->DeleteFrom(reinterpret_cast<CBody**>(&BaddyList));
Panel_DestroyHealthbar();
if (this->field_32C)
delete reinterpret_cast<CItem*>(this->field_32C);
if (this->field_344)
Mem_Delete(this->field_344);
}
// @NotOk
// globals
CCarnage::CCarnage(int* a2, int a3)
@ -110,9 +124,15 @@ void CCarnage::DoPhysics(void)
void validate_CCarnage(void){
VALIDATE_SIZE(CCarnage, 0x37C);
VALIDATE(CCarnage, field_32C, 0x32C);
VALIDATE(CCarnage, field_334, 0x334);
VALIDATE(CCarnage, field_338, 0x338);
VALIDATE(CCarnage, field_33C, 0x33C);
VALIDATE(CCarnage, field_344, 0x344);
VALIDATE(CCarnage, field_354, 0x354);
VALIDATE(CCarnage, field_358, 0x358);
VALIDATE(CCarnage, field_35C, 0x35C);

View File

@ -9,19 +9,27 @@
class CCarnage : public CBaddy {
public:
EXPORT CCarnage(int*, int);
EXPORT ~CCarnage(void);
EXPORT void Shouldnt_DoPhysics_Be_Virtual(void);
EXPORT void DoPhysics(void);
unsigned char carnageStartPad[0x10];
u8 carnageStartPad[0x8];
int field_334;
int field_338;
int field_33C;
unsigned char padAfter33c[0x18 - 4];
void* field_32C;
u8 padAfter32C[0x334-0x32C-4];
int field_354;
int field_358;
int field_35C;
i32 field_334;
i32 field_338;
i32 field_33C;
u8 padAfter33c[0x344-0x33C-4];
void* field_344;
u8 padAfter344[0x354-0x344-4];
i32 field_354;
i32 field_358;
i32 field_35C;
unsigned char padAfter35C[0x10-4];
int field_36C;