Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SB/Core/x/xCutscene.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ struct xCutscene
U32 SndHandle[2];
XCSNNosey* cb_nosey;
void NoseySet(XCSNNosey* nosey);
void NoseyClear();
};

struct CutsceneShadowModel
Expand Down
90 changes: 86 additions & 4 deletions src/SB/Game/zNPCFXCinematic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
#include "xParEmitter.h"

#include "zNPCFXCinematic.h"
#include "zParPTank.h"
#include "zNPCTypeBossSB2.h"

#include <types.h>

void zNPCFXShutdown()
{
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_JET_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
Expand Down Expand Up @@ -447,6 +445,24 @@ void NCINBeNosey::CanRenderNow()
NCINEntry* fxrec;
}

void zNPCFXShutdown()
{
}

void NCINBeNosey::Init(const zCutsceneMgr* m, NCINEntry* e, S32 i)
{
this->use_fxtab = e;
this->x = i;
this->use_csnmgr = (zCutsceneMgr*)m;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked if the use_csnmgr field on this class can be const zCutsceneMgr* here instead of zCutsceneMgr* to avoid the need to cast away constness here?

}

void NCINBeNosey::Done()
{
this->use_fxtab = 0;
this->x = 0;
this->use_csnmgr = 0;
}

void NCIN_Generic_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 killit)
{
if (killit != 0)
Expand Down Expand Up @@ -698,10 +714,76 @@ void NCIN_ShieldPop(const zCutsceneMgr*, NCINEntry*, S32)
{
}

void NCIN_MidFish_Upd(const zCutsceneMgr* mgr, NCINEntry* e, S32 i)
{
if (i != 0)
{
e->flg_stat |= 4;
}
}

void NCIN_BombTrail_Upd(const zCutsceneMgr* mgr, NCINEntry* e, S32 i)
{
if (i != 0)
{
e->flg_stat |= 4;
}
}

void NCIN_BombTrail_AR(const zCutsceneMgr* mgr, NCINEntry* e, RpAtomic* a, RwMatrixTag* t, U32 i1, U32 i2)
{
if (i1 == 0x4)
{
zFX_SpawnBubbleTrail((const xVec3*)&t->pos, 0x4);
}
}

void NCIN_BoneTrail_Upd(const zCutsceneMgr* mgr, NCINEntry* e, S32 i)
{
if (i != 0)
{
e->flg_stat |= 4;
}
}

void NCIN_BoneTrail_AR(const zCutsceneMgr* mgr, NCINEntry* e, RpAtomic* a, RwMatrixTag* t, U32 i1, U32 i2)
{
if (i1 == 0x7)
{
zFX_SpawnBubbleTrail((const xVec3*)&t->pos, 0x4);
}
}

void NCIN_HookRecoil_Upd(const zCutsceneMgr* mgr, NCINEntry* e, S32 i)
{
if (i != 0)
{
e->flg_stat |= 4;
}
}

void NCIN_SpatGlow_Upd(const zCutsceneMgr* mgr, NCINEntry* e, S32 i)
{
if (i != 0)
{
e->flg_stat |= 4;
}
}

void clamp_bone_index(NCINEntry*, RpAtomic*)
{
}

void xCutscene::NoseyClear()
{
this->NoseySet(0);
}

void xCutscene::NoseySet(XCSNNosey* nosey)
{
this->cb_nosey = nosey;
}

void NPCCone::TextureSet(RwRaster* raster)
{
rast_cone = raster;
Expand Down
5 changes: 4 additions & 1 deletion src/SB/Game/zNPCFXCinematic.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,12 @@ struct NCINBeNosey : XCSNNosey
{
zCutsceneMgr* use_csnmgr;
NCINEntry* use_fxtab;
S32 x;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this field in the dwarf for this class. Let's review the asm that's accessing this field and see if we can figure out what's really going on.


void UpdatedAnimated(RpAtomic* model, RwMatrixTag* animMat, U32 animIndex, U32 dataIndex);
void CanRenderNow();
void Init(const zCutsceneMgr* csnmgr, NCINEntry* fxtab, S32 x);
void Done();
void UpdatedAnimated(RpAtomic* model, RwMatrixTag* animMat, U32 animIndex, U32 dataIndex);
};

#endif
Loading