CDome::CDome

This commit is contained in:
krystalgamer 2024-09-28 18:29:43 +02:00
parent eb3023c9ba
commit f3e7bba982
3 changed files with 43 additions and 10 deletions

View File

@ -178,7 +178,7 @@ class CPlayer : public CSuper
u8 field_EA4;
u8 padAFterEA4[(0xEA8-0xEA4)-0x1];
i16 field_EA8;
u16 field_EA8;
u8 padBottomPlayer[(0xEFC-0xEA8)-0x2];

44
web.cpp
View File

@ -10,15 +10,14 @@
#include "validate.h"
i32 gFireDomes;
i32 gNumDomes;
CBody* WebList;
EXPORT SLineInfo gLineInfo;
EXPORT i32 gGetGroundRelated;
EXPORT i32 gGetGroundDefaultValue;
EXPORT i32 gDomeRelated;
EXPORT i32 gDomeRelatedTwo;
extern CBody* MiscList;
// @Ok
@ -80,10 +79,36 @@ CDomePiece::~CDomePiece(void)
this->DeleteFrom(&MiscList);
}
// @SMALLTODO
CDome::CDome(CPlayer*, i32)
// @Ok
CDome::CDome(
CPlayer* pSpidey,
i32 a3)
{
printf("CDome::CDome(CPlayer*, i32)");
print_if_false(pSpidey != 0, "NULL pSpidey");
this->hPlayer = Mem_MakeHandle(pSpidey);
this->mPos = pSpidey->mPos;
this->mPos.vy += pSpidey->field_EA8 << 12;
this->field_104 = a3;
if ( a3 )
{
this->InitItem("firedome");
this->mModel = 1;
gFireDomes++;
this->mFlags |= 0x200;
this->field_2A = 0;
}
else
{
this->InitItem("webdome2");
}
this->mFlags |= 1;
this->AttachTo(&MiscList);
this->field_100 = 0;
++gNumDomes;
}
// @NotOk
@ -99,8 +124,8 @@ CDome::~CDome(void)
delete reinterpret_cast<CClass*>(this->field_118);
if (this->field_104)
gDomeRelated--;
gDomeRelatedTwo--;
gFireDomes--;
gNumDomes--;
}
// @NotOk
@ -166,6 +191,9 @@ void validate_CDomePiece(void){
void validate_CDome(void){
VALIDATE_SIZE(CDome, 0x11C);
VALIDATE(CDome, hPlayer, 0xF8);
VALIDATE(CDome, field_100, 0x100);
VALIDATE(CDome, field_104, 0x104);
VALIDATE(CDome, field_108, 0x108);
VALIDATE(CDome, field_10C, 0x10C);

7
web.h
View File

@ -7,6 +7,8 @@
#include "export.h"
#include "spidey.h"
EXPORT extern i32 gFireDomes;
EXPORT extern i32 gNumDomes;
EXPORT extern CBody* WebList;
class CImpactWeb : public CFlatBit{
@ -31,8 +33,11 @@ class CDome : public CBody
EXPORT CDome(CPlayer*, i32);
EXPORT virtual ~CDome(void);
u8 padTop[0x10];
u8 padTop[0x4];
SHandle hPlayer;
i32 field_100;
i32 field_104;
// @FIXME types