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
2 changes: 1 addition & 1 deletion src/SB/Game/zFX.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void on_spawn_bubble_wall(const tweak_info& tweak);
void zFX_SceneEnter(RpWorld* world);
void zFX_SceneExit(RpWorld* world);
void zFX_SceneReset();
void zFXHammer(xVec3* pos);
void zFXHammer(const xVec3* pos);
void zFXPorterWave(const xVec3* pos);

void zFXGooEnable(RpAtomic* atomic, S32 freezeGroup);
Expand Down
63 changes: 27 additions & 36 deletions src/SB/Game/zNPCFXCinematic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,11 @@

#include <types.h>

static S32 init = 0;

void zNPCFXShutdown()
{
}

void zNPCFXCinematic_Init()
{
if (!init)
{
init = 1;
}
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_JET_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -58,6 +49,7 @@ void NCIN_Par_BPLANK_JET_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_JET_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -96,6 +88,7 @@ void NCIN_Par_BPLANK_JET_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_SBB_FLAMES_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -134,6 +127,7 @@ void NCIN_Par_BPLANK_SBB_FLAMES_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_SBB_FLAMES_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -172,6 +166,7 @@ void NCIN_Par_BPLANK_SBB_FLAMES_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_SBB_JET_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -210,6 +205,7 @@ void NCIN_Par_BPLANK_SBB_JET_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 pa
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_SBB_JET_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -248,6 +244,7 @@ void NCIN_Par_BPLANK_SBB_JET_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 pa
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_SBB_SMOKE_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -286,6 +283,7 @@ void NCIN_Par_BPLANK_SBB_SMOKE_1_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_BPLANK_SBB_SMOKE_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -324,6 +322,7 @@ void NCIN_Par_BPLANK_SBB_SMOKE_2_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_CIN_BIGDUP_SMOKE_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -362,6 +361,7 @@ void NCIN_Par_CIN_BIGDUP_SMOKE_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 pa
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_CIN_BIGDUP_SPAWN_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -400,6 +400,7 @@ void NCIN_Par_CIN_BIGDUP_SPAWN_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 pa
fxrec->pos_B[0] = 5.0f;
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Par_CIN_PLATFORM_JETS_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -446,15 +447,15 @@ void NCINBeNosey::CanRenderNow()
NCINEntry* fxrec;
}

void NCIN_Generic_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
void NCIN_Generic_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 killit)
{
if (param != 0)
if (killit != 0)
{
fxrec->flg_stat |= 4;
return;
}
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_BubSlam(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand All @@ -471,10 +472,10 @@ void NCIN_BubSlam(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
switch (fxrec->typ_ncinfx)
{
case 3:
zFX_SpawnBubbleSlam(&fxrec->pos_A[0], 64, fxrec->tym_beg, fxrec->tym_end, fxrec->tym_end);
zFX_SpawnBubbleSlam(&fxrec->pos_A[0], 64, PI, 2.0f, 2.0f);
break;
case 2:
zFX_SpawnBubbleSlam(&fxrec->pos_A[0], 128, fxrec->tym_beg, fxrec->tym_end, fxrec->tym_end);
zFX_SpawnBubbleSlam(&fxrec->pos_A[0], 128, PI, 5.0f, 5.0f);
break;
default:
break;
Expand Down Expand Up @@ -503,25 +504,23 @@ void NCIN_BubTrailBone_AR(const zCutsceneMgr*, NCINEntry* fxrec, RpAtomic*, RwMa
zFX_SpawnBubbleTrail(&pos, 1);
}

void NCIN_BubHit(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
void NCIN_BubHit(const zCutsceneMgr*, NCINEntry* fxrec, S32 killit)
{
if (param != 0)
if (killit != 0)
{
fxrec->flg_stat |= 4;
return;
}

else
{
if (fxrec->flg_stat & 2)
{
zFX_SpawnBubbleHit(&fxrec->pos_A[0], 16);
}

zFX_SpawnBubbleHit(&fxrec->pos_A[0], 3);
}
}

// TODO: NEEDS REWRITEN / CORRECTED
void NCIN_Zapper(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
{
if (param != 0)
Expand Down Expand Up @@ -558,17 +557,16 @@ void NCIN_HammerShock(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
fxrec->flg_stat |= 4;
return;
}

if (fxrec->flg_stat & 2)
else if (fxrec->flg_stat & 2)
{
zFXHammer(&fxrec->pos_A[0]);
fxrec->flg_stat |= 4;
}
}

void NCIN_HammerStreak_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
static void NCIN_HammerStreak_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 killit)
{
if (param != 0)
if (killit != 0)
{
fxrec->flg_stat |= 4;

Expand All @@ -577,11 +575,8 @@ void NCIN_HammerStreak_Upd(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)

fxrec->fxdata.strkdata.sid_horz = 57005;
fxrec->fxdata.strkdata.sid_vert = 57005;

return;
}

if (fxrec->flg_stat & 2)
else if (fxrec->flg_stat & 2)
{
en_npcstreak styp_h = NPC_STRK_HAMMERSMASH_HORZ;
en_npcstreak styp_v = NPC_STRK_HAMMERSMASH_VERT;
Expand All @@ -603,19 +598,15 @@ void NCIN_HammerStreak_AR(const zCutsceneMgr*, NCINEntry* fxrec, RpAtomic*, RwMa
U32 sid_horz = fxrec->fxdata.strkdata.sid_horz;
}

void NCIN_WaterSplash(const zCutsceneMgr*, NCINEntry* fxrec, S32 param)
void NCIN_WaterSplash(const zCutsceneMgr*, NCINEntry* fxrec, S32 killit)
{
if (param != 0)
if (killit != 0)
{
fxrec->flg_stat |= 4;
return;
}

if (fxrec->flg_stat & 2)
else if (fxrec->flg_stat & 2)
{
const F32 splash_radius = -1.0f;

NPCC_MakeASplash(&fxrec->pos_A[0], splash_radius);
NPCC_MakeASplash(&fxrec->pos_A[0], -1.0f);
fxrec->flg_stat |= 4;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/SB/Game/zNPCFXCinematic.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ struct NCINEntry
void (*cb_fxanim)(zCutsceneMgr*, NCINEntry*, RpAtomic*, RwMatrixTag*, U32, U32);
void (*cb_fxrend)(zCutsceneMgr*, NCINEntry*);
F32 tym_beg;
F32 tym_end;
F32 tym_end; // 0x14
xVec3 pos_A[2];
xVec3 pos_B[2];
S8* twk_name;
S32 idx_anim;
S32 idx_anim; // 0x4c
S32 idx_bone;
S32 flg_stat;
NCINData fxdata;
Expand Down