CBackground::CBackground

This commit is contained in:
krystalgamer 2024-09-02 19:56:41 +01:00
parent cd71267482
commit a5ea2a0e58
4 changed files with 20 additions and 6 deletions

View File

@ -1,4 +1,5 @@
#include "backgrnd.h"
#include "spool.h"
#include "validate.h"
@ -11,10 +12,19 @@ void CBackground::AI(void)
printf("CBackground::AI(void)");
}
// @SMALLTODO
CBackground::CBackground(u32, CSVector*)
// @Ok
// @Matching
CBackground::CBackground(
u32 checksum,
CSVector* ang_vel)
{
printf("CBackground::CBackground(u32, CSVector*)");
this->InitItem(gObjFile);
this->mModel = Spool_GetModel(checksum, this->mRegion);
this->mFlags &= ~2u;
this->mCBodyFlags &= ~2u;
this->field_38 = 502;
this->AttachTo(reinterpret_cast<CBody**>(&BackgroundList));
this->field_F8 = gBackgroundIndex++;
}
// @Ok
@ -74,4 +84,6 @@ void Backgrnd_Off(unsigned __int16 a1)
void validate_CBackground(void)
{
VALIDATE_SIZE(CBackground, 0xFC);
VALIDATE(CBackground, field_F8, 0xF8);
}

View File

@ -17,8 +17,9 @@ class CBackground : public CBody
EXPORT void AI(void) OVERRIDE;
u8 padBottom[8];
u8 padTop[4];
i16 field_F8;
u8 padBottom[2];
};
void validate_CBackground(void);

2
ob.cpp
View File

@ -8,7 +8,7 @@
#include "m3dutils.h"
#include "spool.h"
EXPORT const char *gObjFile;
const char *gObjFile;
EXPORT CBody* EnvironmentalObjectList;
EXPORT CBody* SuspendedList;
CItem* EnviroList;

1
ob.h
View File

@ -257,5 +257,6 @@ void validate_SHitInfo(void);
static CSuper *globalSuper = (CSuper*)0x006A9038;
EXPORT extern CItem* EnviroList;
EXPORT extern const char *gObjFile;
#endif