CSubmariner::CSubmariner

This commit is contained in:
krystalgamer 2024-08-05 19:38:57 +02:00
parent 02c8fdda94
commit b56e14d2d4
5 changed files with 29 additions and 8 deletions

View File

@ -2,6 +2,7 @@
#include "validate.h"
#include "trig.h"
extern u8 submarinerDieRelated;
extern CBaddy* BaddyList;
// @SMALLTODO
@ -78,7 +79,7 @@ CBlackCat::CBlackCat(int* a2, int a3)
this->field_DC = 0;
this->field_34C = reinterpret_cast<int>(v5);
if (*submarinerDieRelated && Trig_GetLevelId() != 2051)
if (submarinerDieRelated && Trig_GetLevelId() != 2051)
this->Die(0);
}

View File

@ -9,7 +9,7 @@ static int *Animations = (int*)0x006B245C;
static int * const dword_5FCCF4 = (int*)0x5FCCF4;
static unsigned char * const submarinerDieRelated = (unsigned char*)0x0060CFC4;
//static unsigned char * const submarinerDieRelated = (unsigned char*)0x0060CFC4;
static unsigned __int16 * const word_6B2478 = (unsigned __int16*)0x6B2478;
static int * const gTimerRelated = (int*)0x006B4CA8;

4
mj.cpp
View File

@ -2,6 +2,8 @@
#include "validate.h"
#include "ps2m3d.h"
extern u8 submarinerDieRelated;
// @SMALLTODO
CMJ::~CMJ(void)
{
@ -47,7 +49,7 @@ CMJ::CMJ(int* a2, __int16 a3)
this->field_DE = a3;
this->field_DC = 0;
if (*submarinerDieRelated)
if (submarinerDieRelated)
this->Die(0);
}

View File

@ -2,12 +2,28 @@
#include "validate.h"
#include "ps2m3d.h"
EXPORT u8 submarinerDieRelated;
extern CBaddy* BaddyList;
// @SMALLTODO
CSubmariner::CSubmariner(i16 *,i32)
// @NotOk
// fix the address for 3C
CSubmariner::CSubmariner(i16 * a2, i32 a3)
{
printf("CSubmariner::CSubmariner(i16 *,i32)");
this->InitItem("mariner");
this->SquirtAngles(this->SquirtPos(a2));
this->CycleAnim(0, 1);
this->mFlags |= 0x480u;
// @FIXME actual address
this->field_3C = 0x5573D0;
this->AttachTo(reinterpret_cast<CBody**>(&BaddyList));
this->field_38 = 326;
this->field_DE = a3;
this->field_DC = 0;
if ( submarinerDieRelated )
this->Die(0);
}
// @Ok
@ -33,7 +49,7 @@ void Submariner_RelocatableModuleClear(void)
// @Ok
void CSubmariner::AI(void){
if (*submarinerDieRelated){
if (submarinerDieRelated){
this->Die(0);
}
else{

View File

@ -3,6 +3,8 @@
#include "validate.h"
#include "trig.h"
extern u8 submarinerDieRelated;
// @NotOk
// Globals
CTorch::CTorch(int* a2, int a3)
@ -27,7 +29,7 @@ CTorch::CTorch(int* a2, int a3)
this->field_DC = 0;
this->field_34C = reinterpret_cast<int>(v5);
if (*submarinerDieRelated && Trig_GetLevelId() != 2051)
if (submarinerDieRelated && Trig_GetLevelId() != 2051)
this->Die(0);
}