From 779970b544ec0c9cbe09c3575a0eb2ba421fce5b Mon Sep 17 00:00:00 2001 From: Livewire Date: Tue, 11 Mar 2025 20:47:04 -0400 Subject: [PATCH 01/12] zNPCSupport - added NPCSupport_Startup --- src/SB/Game/zNPCSupplement.h | 1 + src/SB/Game/zNPCSupport.cpp | 15 ++++++++++++++- src/SB/Game/zNPCSupport.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/SB/Game/zNPCSupplement.h b/src/SB/Game/zNPCSupplement.h index 02350575d..bdd2efaa5 100644 --- a/src/SB/Game/zNPCSupplement.h +++ b/src/SB/Game/zNPCSupplement.h @@ -107,6 +107,7 @@ struct StreakInfo }; void NPCC_MakeASplash(const xVec3* pos, F32 radius); +void NPCSupplement_Startup (); void NPCSupplement_Shutdown(); void NPAR_ScenePrepare(); void NPAR_SceneFinish(); diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index 69b44fafd..8bd6e9c8f 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -8,6 +8,16 @@ #include "xMathInlines.h" +void NPCSupport_Startup() + +{ + zNPCHazard_Startup(); + zNPCGlyph_Startup(); + NPCWidget_Startup(); + NPCSupplement_Startup(); + return; +} + void NPCSupport_Shutdown() { zNPCHazard_Shutdown(); @@ -16,6 +26,9 @@ void NPCSupport_Shutdown() NPCSupplement_Shutdown(); } +void NPCWidget_Startup() +{ +} void NPCWidget_Shutdown() { } @@ -42,4 +55,4 @@ F32 NPCC_TmrCycle(float* tmr, float dt, float interval) } return parameterized; -} \ No newline at end of file +} diff --git a/src/SB/Game/zNPCSupport.h b/src/SB/Game/zNPCSupport.h index 74199baaa..da86ac444 100644 --- a/src/SB/Game/zNPCSupport.h +++ b/src/SB/Game/zNPCSupport.h @@ -46,6 +46,7 @@ struct NPCBlinker void Reset(); }; +void NPCWidget_Startup() ; void NPCWidget_Shutdown(); void NPCSupport_Startup(); void NPCSupport_ScenePrepare(); From 8ad094acfee2304e724771333f435d2b9896bfd8 Mon Sep 17 00:00:00 2001 From: Livewire Date: Tue, 11 Mar 2025 20:58:48 -0400 Subject: [PATCH 02/12] clang format pass --- src/SB/Game/zNPCSupplement.h | 2 +- src/SB/Game/zNPCSupport.cpp | 16 ++++++++-------- src/SB/Game/zNPCSupport.h | 5 +++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/SB/Game/zNPCSupplement.h b/src/SB/Game/zNPCSupplement.h index bdd2efaa5..7856eac2c 100644 --- a/src/SB/Game/zNPCSupplement.h +++ b/src/SB/Game/zNPCSupplement.h @@ -107,7 +107,7 @@ struct StreakInfo }; void NPCC_MakeASplash(const xVec3* pos, F32 radius); -void NPCSupplement_Startup (); +void NPCSupplement_Startup(); void NPCSupplement_Shutdown(); void NPAR_ScenePrepare(); void NPAR_SceneFinish(); diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index 8bd6e9c8f..ac21e005c 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -11,11 +11,11 @@ void NPCSupport_Startup() { - zNPCHazard_Startup(); - zNPCGlyph_Startup(); - NPCWidget_Startup(); - NPCSupplement_Startup(); - return; + zNPCHazard_Startup(); + zNPCGlyph_Startup(); + NPCWidget_Startup(); + NPCSupplement_Startup(); + return; } void NPCSupport_Shutdown() @@ -26,8 +26,8 @@ void NPCSupport_Shutdown() NPCSupplement_Shutdown(); } -void NPCWidget_Startup() -{ +void NPCWidget_Startup() +{ } void NPCWidget_Shutdown() { @@ -51,7 +51,7 @@ F32 NPCC_TmrCycle(float* tmr, float dt, float interval) if (*tmr > interval) { - *tmr = xfmod(*tmr,interval); + *tmr = xfmod(*tmr, interval); } return parameterized; diff --git a/src/SB/Game/zNPCSupport.h b/src/SB/Game/zNPCSupport.h index da86ac444..f8573a82b 100644 --- a/src/SB/Game/zNPCSupport.h +++ b/src/SB/Game/zNPCSupport.h @@ -46,7 +46,7 @@ struct NPCBlinker void Reset(); }; -void NPCWidget_Startup() ; +void NPCWidget_Startup(); void NPCWidget_Shutdown(); void NPCSupport_Startup(); void NPCSupport_ScenePrepare(); @@ -60,7 +60,8 @@ F32 NPCC_TmrCycle(float* tmr, float dt, float interval); xVec3* NPCC_rightDir(xEnt* ent); xVec3* NPCC_faceDir(xEnt* ent); void NPCC_ang_toXZDir(F32 angle, xVec3* dir); -F32 NPCC_aimVary(xVec3* dir_aim, xVec3* pos_src, xVec3* pos_tgt, F32 dst_vary, S32 flg_vary, xVec3* pos_aimPoint); +F32 NPCC_aimVary(xVec3* dir_aim, xVec3* pos_src, xVec3* pos_tgt, F32 dst_vary, S32 flg_vary, + xVec3* pos_aimPoint); F32 NPCC_ds2_toCam(const xVec3* pos_from, xVec3* delta); void zNPC_SNDStop(_tageNPCSnd snd); void zNPC_SNDPlay3D(_tageNPCSnd snd, xEnt*); From fd5746232d0d6210be3828bb0b32410fe972ed4f Mon Sep 17 00:00:00 2001 From: Livewire Date: Tue, 11 Mar 2025 23:50:07 -0400 Subject: [PATCH 03/12] zNPCSupport - completed some functions --- src/SB/Game/zNPCSupplement.h | 5 ++ src/SB/Game/zNPCSupport.cpp | 91 ++++++++++++++++++++++++++++++++++++ src/SB/Game/zNPCSupport.h | 14 +++++- 3 files changed, 108 insertions(+), 2 deletions(-) diff --git a/src/SB/Game/zNPCSupplement.h b/src/SB/Game/zNPCSupplement.h index 7856eac2c..38219ab51 100644 --- a/src/SB/Game/zNPCSupplement.h +++ b/src/SB/Game/zNPCSupplement.h @@ -109,6 +109,11 @@ struct StreakInfo void NPCC_MakeASplash(const xVec3* pos, F32 radius); void NPCSupplement_Startup(); void NPCSupplement_Shutdown(); +void NPCSupplement_ScenePrepare(); +void NPCSupplement_SceneFinish(); +void NPCSupplement_SceneReset(); +void NPCSupplement_ScenePostInit(); +void NPCSupplement_Timestep(F32 dt); void NPAR_ScenePrepare(); void NPAR_SceneFinish(); NPARMgmt* NPAR_PartySetup(en_nparptyp parType, void** userData, NPARXtraData* xtraData); diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index ac21e005c..17ed8c330 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -26,6 +26,56 @@ void NPCSupport_Shutdown() NPCSupplement_Shutdown(); } + +bool NPCSupport_ScenePrepare() +{ + zNPCHazard_ScenePrepare(); + zNPCGlyph_ScenePrepare(); + NPCWidget_ScenePrepare(); + NPCSupplement_ScenePrepare(); + Firework_ScenePrepare(); + return NPCC_ForceTalkOk(); +} + +void NPCSupport_SceneFinish() +{ + zNPCHazard_SceneFinish(); + zNPCGlyph_SceneFinish(); + NPCWidget_SceneFinish(); + NPCSupplement_SceneFinish(); + Firework_SceneFinish(); + return; +} + +void NPCSupport_ScenePostInit() +{ + zNPCHazard_ScenePostInit(); + zNPCGlyph_ScenePostInit(); + NPCWidget_ScenePostInit(); + NPCSupplement_ScenePostInit(); + zNPC_SNDInit(); + return; +} + +void NPCSupport_SceneReset() +{ + zNPCHazard_SceneReset(); + zNPCGlyph_SceneReset(); + NPCWidget_SceneReset(); + NPCSupplement_SceneReset(); + Firework_SceneReset(0); + return; +} + +void NPCSupport_Timestep(F32 dt) +{ + zNPCGlyph_Timestep(dt); + zNPCHazard_Timestep(dt); + NPCSupplement_Timestep(dt); + Firework_Timestep(dt); +} + + void NPCWidget_Startup() { } @@ -37,6 +87,47 @@ void NPCWidget_ScenePrepare() { } +void NPCWidget_SceneFinish() +{ +} + +void NPCWidget_SceneReset() +{ +} + +void NPCWidget_ScenePostInit() +{ +} + +void Firework_ScenePrepare() +{ + NPAR_PartySetup(NPAR_TYP_FIREWORKS, NULL, NULL); + Firework_SceneReset(0); +} + +void Firework_SceneFinish() +{ +} + +void Firework_SceneReset(int) +{ +} + +void Firework_Timestep(F32 dt) +{ +} + +bool NPCC_ForceTalkOk() +{ + return false; +} + +void zNPC_SNDInit() +{ +} + + + F32 NPCC_TmrCycle(float* tmr, float dt, float interval) { F32 parameterized; diff --git a/src/SB/Game/zNPCSupport.h b/src/SB/Game/zNPCSupport.h index f8573a82b..bd3d9fd29 100644 --- a/src/SB/Game/zNPCSupport.h +++ b/src/SB/Game/zNPCSupport.h @@ -46,17 +46,27 @@ struct NPCBlinker void Reset(); }; +bool NPCC_ForceTalkOk() ; void NPCWidget_Startup(); void NPCWidget_Shutdown(); +void NPCWidget_ScenePrepare(); +void NPCWidget_SceneFinish(); +void NPCWidget_SceneReset(); +void NPCWidget_ScenePostInit(); void NPCSupport_Startup(); -void NPCSupport_ScenePrepare(); +bool NPCSupport_ScenePrepare(); void NPCSupport_SceneFinish(); void NPCSupport_Timestep(F32 dt); void NPCSupport_SceneReset(); void NPCSupport_Shutdown(); void NPCSupport_ScenePostInit(); +void Firework_SceneReset(S32); +void Firework_ScenePrepare(); +void Firework_SceneFinish(); +void Firework_Timestep(F32 dt); +void zNPC_SNDInit(); S32 NPCC_LampStatus(); -F32 NPCC_TmrCycle(float* tmr, float dt, float interval); +F32 NPCC_TmrCycle(F32* tmr, F32 dt, F32 interval); xVec3* NPCC_rightDir(xEnt* ent); xVec3* NPCC_faceDir(xEnt* ent); void NPCC_ang_toXZDir(F32 angle, xVec3* dir); From c7b0c4cb6b85beec79d77ec3231d930a0d6ed761 Mon Sep 17 00:00:00 2001 From: Livewire Date: Tue, 11 Mar 2025 23:52:56 -0400 Subject: [PATCH 04/12] clang pass --- src/SB/Game/zNPCSupport.cpp | 52 +++++++++++++++++-------------------- src/SB/Game/zNPCSupport.h | 2 +- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index 17ed8c330..8dc7fc151 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -26,45 +26,44 @@ void NPCSupport_Shutdown() NPCSupplement_Shutdown(); } - bool NPCSupport_ScenePrepare() { - zNPCHazard_ScenePrepare(); - zNPCGlyph_ScenePrepare(); - NPCWidget_ScenePrepare(); - NPCSupplement_ScenePrepare(); - Firework_ScenePrepare(); - return NPCC_ForceTalkOk(); + zNPCHazard_ScenePrepare(); + zNPCGlyph_ScenePrepare(); + NPCWidget_ScenePrepare(); + NPCSupplement_ScenePrepare(); + Firework_ScenePrepare(); + return NPCC_ForceTalkOk(); } void NPCSupport_SceneFinish() { - zNPCHazard_SceneFinish(); - zNPCGlyph_SceneFinish(); - NPCWidget_SceneFinish(); - NPCSupplement_SceneFinish(); - Firework_SceneFinish(); - return; + zNPCHazard_SceneFinish(); + zNPCGlyph_SceneFinish(); + NPCWidget_SceneFinish(); + NPCSupplement_SceneFinish(); + Firework_SceneFinish(); + return; } void NPCSupport_ScenePostInit() { - zNPCHazard_ScenePostInit(); - zNPCGlyph_ScenePostInit(); - NPCWidget_ScenePostInit(); - NPCSupplement_ScenePostInit(); - zNPC_SNDInit(); - return; + zNPCHazard_ScenePostInit(); + zNPCGlyph_ScenePostInit(); + NPCWidget_ScenePostInit(); + NPCSupplement_ScenePostInit(); + zNPC_SNDInit(); + return; } void NPCSupport_SceneReset() { - zNPCHazard_SceneReset(); - zNPCGlyph_SceneReset(); - NPCWidget_SceneReset(); - NPCSupplement_SceneReset(); - Firework_SceneReset(0); - return; + zNPCHazard_SceneReset(); + zNPCGlyph_SceneReset(); + NPCWidget_SceneReset(); + NPCSupplement_SceneReset(); + Firework_SceneReset(0); + return; } void NPCSupport_Timestep(F32 dt) @@ -75,7 +74,6 @@ void NPCSupport_Timestep(F32 dt) Firework_Timestep(dt); } - void NPCWidget_Startup() { } @@ -126,8 +124,6 @@ void zNPC_SNDInit() { } - - F32 NPCC_TmrCycle(float* tmr, float dt, float interval) { F32 parameterized; diff --git a/src/SB/Game/zNPCSupport.h b/src/SB/Game/zNPCSupport.h index bd3d9fd29..115428388 100644 --- a/src/SB/Game/zNPCSupport.h +++ b/src/SB/Game/zNPCSupport.h @@ -46,7 +46,7 @@ struct NPCBlinker void Reset(); }; -bool NPCC_ForceTalkOk() ; +bool NPCC_ForceTalkOk(); void NPCWidget_Startup(); void NPCWidget_Shutdown(); void NPCWidget_ScenePrepare(); From 8c254f113bcc450e0521516472af38b1de7c06b6 Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Wed, 12 Mar 2025 00:44:47 -0400 Subject: [PATCH 05/12] 2 rwrasters --- src/SB/Game/zNPCSupport.cpp | 24 ++++++++++++++++++++++++ src/SB/Game/zNPCSupport.h | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index 8dc7fc151..de26c843a 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -120,6 +120,30 @@ bool NPCC_ForceTalkOk() return false; } +RwRaster* NPCC_FindRWRaster(const char* txtrname) +{ + RwTexture* txtr = NPCC_FindRWTexture(txtrname); + if (txtr != NULL) + { + return txtr->raster; + } + return NULL; +} + +RwTexture* NPCC_FindRWTexture(const char*) +{ + return NULL; +} + +RwRaster* NPCC_FindRWRaster(RwTexture* txtr) +{ + if (txtr != NULL) + { + return txtr->raster; + } + return NULL; +} + void zNPC_SNDInit() { } diff --git a/src/SB/Game/zNPCSupport.h b/src/SB/Game/zNPCSupport.h index 115428388..c30bd99ce 100644 --- a/src/SB/Game/zNPCSupport.h +++ b/src/SB/Game/zNPCSupport.h @@ -64,6 +64,10 @@ void Firework_SceneReset(S32); void Firework_ScenePrepare(); void Firework_SceneFinish(); void Firework_Timestep(F32 dt); +RwTexture* NPCC_FindRWTexture(U32 hashid); +RwTexture* NPCC_FindRWTexture(const char* txtrname); +RwRaster* NPCC_FindRWRaster(const char* txtrname); +RwRaster* NPCC_FindRWRaster(RwTexture* txtr); void zNPC_SNDInit(); S32 NPCC_LampStatus(); F32 NPCC_TmrCycle(F32* tmr, F32 dt, F32 interval); From b80600eb65fe575b8e12c163bd0beda5f841ae53 Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Wed, 12 Mar 2025 00:58:06 -0400 Subject: [PATCH 06/12] more changes --- src/SB/Game/zNPCSupport.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index de26c843a..90c325f0b 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -105,6 +105,7 @@ void Firework_ScenePrepare() void Firework_SceneFinish() { + Firework_SceneReset(1); } void Firework_SceneReset(int) From f33d36221b13d8d5df337fbbab558f2cbf018166 Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Wed, 12 Mar 2025 23:28:50 -0400 Subject: [PATCH 07/12] worked through npcwidget_scenereset and npcwidget_startup --- src/SB/Game/zNPCSupport.cpp | 11 +++++++++-- src/SB/Game/zNPCSupport.h | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index 90c325f0b..546cb8d89 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -9,7 +9,6 @@ #include "xMathInlines.h" void NPCSupport_Startup() - { zNPCHazard_Startup(); zNPCGlyph_Startup(); @@ -76,7 +75,9 @@ void NPCSupport_Timestep(F32 dt) void NPCWidget_Startup() { + g_hash_uiwidgets[0] = xStrHash((const char*)g_strz_uiwidgets); } + void NPCWidget_Shutdown() { } @@ -87,9 +88,15 @@ void NPCWidget_ScenePrepare() void NPCWidget_SceneFinish() { + NPCWidget_SceneReset(); +} + +void NPCWidget_SceneReset() // Come back after more data is in +{ + g_npc_widgets->Reset(); } -void NPCWidget_SceneReset() +void NPCWidget::Reset() { } diff --git a/src/SB/Game/zNPCSupport.h b/src/SB/Game/zNPCSupport.h index c30bd99ce..d6a889fb7 100644 --- a/src/SB/Game/zNPCSupport.h +++ b/src/SB/Game/zNPCSupport.h @@ -25,6 +25,11 @@ enum _tageNPCSnd eNPCSnd_Total }; +enum en_NPC_UI_WIDGETS +{ + NPC_UI_WIDGETS_unk // Come back after more data is put in +}; + struct NPCTarget { en_npctgt typ_target; @@ -46,13 +51,29 @@ struct NPCBlinker void Reset(); }; +struct NPCWidget +{ + en_NPC_UI_WIDGETS idxID; + xBase* base_widge; + zNPCCommon* npc_ownerlock; + + U32 NPCIsTheLocker(zNPCCommon* npc_lock); + U32 IsVisible(); + U32 Off(zNPCCommon* npc, U32 theman); + U32 On(zNPCCommon* npc, U32 theman); + void Reset(); +}; + bool NPCC_ForceTalkOk(); void NPCWidget_Startup(); +static U32 g_hash_uiwidgets[1]; +static char* g_strz_uiwidgets[1] = {}; void NPCWidget_Shutdown(); void NPCWidget_ScenePrepare(); void NPCWidget_SceneFinish(); void NPCWidget_SceneReset(); void NPCWidget_ScenePostInit(); +NPCWidget g_npc_widgets[1] = {}; void NPCSupport_Startup(); bool NPCSupport_ScenePrepare(); void NPCSupport_SceneFinish(); From 3d070afa80f4260add3151b5fd77231a9f31a47e Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Wed, 12 Mar 2025 23:37:07 -0400 Subject: [PATCH 08/12] ficed the nonbuilding --- src/SB/Game/zNPCSupport.cpp | 4 ++++ src/SB/Game/zNPCSupport.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SB/Game/zNPCSupport.cpp b/src/SB/Game/zNPCSupport.cpp index 546cb8d89..8d5e43ce3 100644 --- a/src/SB/Game/zNPCSupport.cpp +++ b/src/SB/Game/zNPCSupport.cpp @@ -8,6 +8,10 @@ #include "xMathInlines.h" +NPCWidget g_npc_widgets[1] = {}; +static U32 g_hash_uiwidgets[1]; +static char* g_strz_uiwidgets[1] = {}; + void NPCSupport_Startup() { zNPCHazard_Startup(); diff --git a/src/SB/Game/zNPCSupport.h b/src/SB/Game/zNPCSupport.h index d6a889fb7..e10cd9bab 100644 --- a/src/SB/Game/zNPCSupport.h +++ b/src/SB/Game/zNPCSupport.h @@ -66,14 +66,11 @@ struct NPCWidget bool NPCC_ForceTalkOk(); void NPCWidget_Startup(); -static U32 g_hash_uiwidgets[1]; -static char* g_strz_uiwidgets[1] = {}; void NPCWidget_Shutdown(); void NPCWidget_ScenePrepare(); void NPCWidget_SceneFinish(); void NPCWidget_SceneReset(); void NPCWidget_ScenePostInit(); -NPCWidget g_npc_widgets[1] = {}; void NPCSupport_Startup(); bool NPCSupport_ScenePrepare(); void NPCSupport_SceneFinish(); From a5031b45d33896d3fb8b1ed064f4ff32a75fa5f0 Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Thu, 13 Mar 2025 02:34:48 -0400 Subject: [PATCH 09/12] Multiple simple exit functions and others --- src/SB/Game/zNPCTypeDutchman.cpp | 60 ++++++++++++++++++++++++++++++++ src/SB/Game/zNPCTypeDutchman.h | 15 +++++++- 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/SB/Game/zNPCTypeDutchman.cpp b/src/SB/Game/zNPCTypeDutchman.cpp index 232977380..db6a368f0 100644 --- a/src/SB/Game/zNPCTypeDutchman.cpp +++ b/src/SB/Game/zNPCTypeDutchman.cpp @@ -4,6 +4,10 @@ #include +namespace +{ +} + void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) { F32 x = m->right.x * v->x + m->up.x * v->y + m->at.x * v->z; @@ -15,6 +19,22 @@ void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) o->z = z; } +void zNPCDutchman::Setup() +{ + zNPCSubBoss::Setup(); +} + +void zNPCDutchman::Destroy() +{ + zNPCCommon::Destroy(); + dutchman_count--; +} + +void zNPCDutchman::Render() +{ + zNPCDutchman::render_debug(); +} + void zNPCDutchman::render_debug() { } @@ -27,6 +47,46 @@ void zNPCDutchman::add_splash(const xVec3&, float) { } +void zNPCDutchman::vanish() +{ +} + +void zNPCDutchman::reset_speed() +{ +} + +//S32 zNPCGoalDutchmanInitiate::Exit(F32 dt, void* updCtxt) +//{ +// owner; +// return xGoal::Exit(dt, updCtxt); +//} + +S32 zNPCGoalDutchmanIdle::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + +S32 zNPCGoalDutchmanDisappear::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + +S32 zNPCGoalDutchmanTeleport::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + +S32 zNPCGoalDutchmanReappear::Exit(F32 dt, void* updCtxt) +{ + owner.reset_speed(); + return xGoal::Exit(dt, updCtxt); +} + +S32 zNPCGoalDutchmanBeam::Exit(F32 dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + U8 zNPCDutchman::PhysicsFlags() const { return 3; diff --git a/src/SB/Game/zNPCTypeDutchman.h b/src/SB/Game/zNPCTypeDutchman.h index b5f383126..c4cdc06ea 100644 --- a/src/SB/Game/zNPCTypeDutchman.h +++ b/src/SB/Game/zNPCTypeDutchman.h @@ -137,9 +137,14 @@ struct zNPCDutchman : zNPCSubBoss RwRaster* laser_raster; zNPCDutchman(S32 myType); + void Setup(); + void Destroy(); + void Render(); void render_debug(); void update_animation(float); void add_splash(const xVec3&, float); + void vanish(); + void reset_speed(); U8 PhysicsFlags() const; U8 ColPenByFlags() const; U8 ColChkByFlags() const; @@ -155,6 +160,7 @@ struct zNPCGoalDutchmanNil : zNPCGoalCommon struct zNPCGoalDutchmanInitiate : zNPCGoalCommon { zNPCDutchman& owner; + S32 Exit(float, void*); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -162,6 +168,7 @@ struct zNPCGoalDutchmanInitiate : zNPCGoalCommon struct zNPCGoalDutchmanIdle : zNPCGoalCommon { zNPCDutchman& owner; + S32 Exit(float, void*); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -169,6 +176,7 @@ struct zNPCGoalDutchmanIdle : zNPCGoalCommon struct zNPCGoalDutchmanDisappear : zNPCGoalCommon { zNPCDutchman& owner; + S32 Exit(float, void*); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -176,6 +184,7 @@ struct zNPCGoalDutchmanDisappear : zNPCGoalCommon struct zNPCGoalDutchmanTeleport : zNPCGoalCommon { zNPCDutchman& owner; + S32 Exit(float, void*); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -183,6 +192,8 @@ struct zNPCGoalDutchmanTeleport : zNPCGoalCommon struct zNPCGoalDutchmanReappear : zNPCGoalCommon { zNPCDutchman& owner; + S32 Exit(float, void*); + void reset_speed(); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -215,7 +226,7 @@ struct zNPCGoalDutchmanBeam : zNPCGoalCommon S32 shots; beam_data beam[2]; zNPCDutchman& owner; - + S32 Exit(float, void*); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -280,5 +291,7 @@ struct zNPCGoalDutchmanDeath : zNPCGoalCommon }; xAnimTable* ZNPC_AnimTable_Dutchman(); +U32 dutchman_count; +void Exit(); #endif From 7aa4b6fb37dfeb33c1993f9762696d8c60322b6d Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:15:35 -0400 Subject: [PATCH 10/12] completed functions and added some mem offsets --- src/SB/Core/x/xBehaviour.h | 2 +- src/SB/Game/zNPCSndTable.h | 12 +++++----- src/SB/Game/zNPCTypeCommon.h | 21 ++++++++--------- src/SB/Game/zNPCTypeDutchman.cpp | 39 ++++++++++++++++++++++++++++++++ src/SB/Game/zNPCTypeDutchman.h | 26 ++++++++++++++++----- src/SB/Game/zNPCTypeSubBoss.h | 4 ++-- 6 files changed, 78 insertions(+), 26 deletions(-) diff --git a/src/SB/Core/x/xBehaviour.h b/src/SB/Core/x/xBehaviour.h index b878f6517..0db2b7249 100644 --- a/src/SB/Core/x/xBehaviour.h +++ b/src/SB/Core/x/xBehaviour.h @@ -215,7 +215,7 @@ struct xGoal : xListItem, xFactoryInst virtual S32 Process(en_trantype* trantype, float dt, void* ctxt, xScene* scene); virtual S32 SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, - xBase* toParamWidget, S32* handled) + xBase* toParamWidget, S32* handled) { return 1; } diff --git a/src/SB/Game/zNPCSndTable.h b/src/SB/Game/zNPCSndTable.h index ed89a46c3..717d41611 100644 --- a/src/SB/Game/zNPCSndTable.h +++ b/src/SB/Game/zNPCSndTable.h @@ -43,13 +43,13 @@ struct NPCSndTrax U32 aid_sound; }; -struct NPCSndQueue +struct NPCSndQueue //0x14 { - U32 sndDirect; - en_NPC_SOUND sndtype; - S32 flg_snd; - F32 tmr_delay; - F32 radius; + U32 sndDirect; //0x0 + en_NPC_SOUND sndtype; //0x4 + S32 flg_snd; //0x8 + F32 tmr_delay; //0xC + F32 radius; //0x10 }; void NPCS_Startup(); diff --git a/src/SB/Game/zNPCTypeCommon.h b/src/SB/Game/zNPCTypeCommon.h index 1cb628024..3e7a5d806 100644 --- a/src/SB/Game/zNPCTypeCommon.h +++ b/src/SB/Game/zNPCTypeCommon.h @@ -363,7 +363,7 @@ struct zNPCLassoInfo xModelInstance* grabGuideModel; }; -struct zNPCCommon : xNPCBasic +struct zNPCCommon : xNPCBasic //Size of zNPCCommon: 0x2A0 { xEntAsset* entass; // 0x1BC xEntNPCAsset* npcass; // 0x1C0 @@ -388,11 +388,11 @@ struct zNPCCommon : xNPCBasic S32 flg_xtrarend; F32 tmr_fidget; F32 tmr_invuln; // 0x23C - zShrapnelAsset* explosion; - xModelAssetParam* parmdata; - U32 pdatsize; - zNPCLassoInfo* lassdata; - NPCSndQueue snd_queue[4]; + zShrapnelAsset* explosion; // 0x240 + xModelAssetParam* parmdata; // 0x244 + U32 pdatsize; //0x248 + zNPCLassoInfo* lassdata; //0x24C + NPCSndQueue snd_queue[4]; //0x250 zNPCCommon(S32 myType); @@ -436,8 +436,7 @@ struct zNPCCommon : xNPCBasic S32 LassoUseGuides(S32 idx_grabmdl, S32 idx_holdmdl); S32 GetVertPos(en_mdlvert vid, xVec3* pos); void Vibrate(en_npcvibe vibe, F32 duration); - void AddScripting(xPsyche* psy, - S32 (*eval_script)(xGoal*, void*, en_trantype*, F32, void*), + void AddScripting(xPsyche* psy, S32 (*eval_script)(xGoal*, void*, en_trantype*, F32, void*), S32 (*eval_playanim)(xGoal*, void*, en_trantype*, F32, void*), S32 (*eval_attack)(xGoal*, void*, en_trantype*, F32, void*), S32 (*eval_move)(xGoal*, void*, en_trantype*, F32, void*), @@ -488,7 +487,7 @@ struct zNPCCommon : xNPCBasic virtual void NewTime(xScene* xscn, F32 dt); virtual void Move(xScene* xscn, F32 dt, xEntFrame*); virtual S32 SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, - xBase* toParamWidget, S32* handled); + xBase* toParamWidget, S32* handled); virtual void CollideReview(); virtual void Destroy(); @@ -642,8 +641,8 @@ void ZNPC_Common_Shutdown(); void NPCC_BuildStandardAnimTran(xAnimTable* table, char** namelist, S32* ourAnims, S32 idx_dflt, F32 blend); -xAnimTable * ZNPC_AnimTable_Common(); -xAnimTable * ZNPC_AnimTable_LassoGuide(); +xAnimTable* ZNPC_AnimTable_Common(); +xAnimTable* ZNPC_AnimTable_LassoGuide(); S32 NPCC_NPCIsConversing(); void zNPCCommon_EjectPhlemOnPawz(); U32 xSndIsPlaying(U32 assetID, U32 parid); diff --git a/src/SB/Game/zNPCTypeDutchman.cpp b/src/SB/Game/zNPCTypeDutchman.cpp index db6a368f0..56a0ae46d 100644 --- a/src/SB/Game/zNPCTypeDutchman.cpp +++ b/src/SB/Game/zNPCTypeDutchman.cpp @@ -6,6 +6,7 @@ namespace { + delay_goal sequence[16][3]; } void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v) @@ -35,6 +36,19 @@ void zNPCDutchman::Render() zNPCDutchman::render_debug(); } +void zNPCDutchman::Damage(en_NPC_DAMAGE_TYPE, xBase*, const xVec3*) +{ + xPsyche* psy = this->psy_instinct; + psy->GIDOfActive(); +} + +// double zNPCDutchman::goal_delay() +// { +// move_info* tempR4; +// tempR4 = &this->move; +// move = *tempR4; +// } + void zNPCDutchman::render_debug() { } @@ -43,10 +57,18 @@ void zNPCDutchman::update_animation(float) { } +void zNPCDutchman::stop_hand_trail() +{ +} + void zNPCDutchman::add_splash(const xVec3&, float) { } +void zNPCDutchman::stop_flames() +{ +} + void zNPCDutchman::vanish() { } @@ -87,6 +109,23 @@ S32 zNPCGoalDutchmanBeam::Exit(F32 dt, void* updCtxt) return xGoal::Exit(dt, updCtxt); } +S32 zNPCGoalDutchmanFlame::Exit(F32 dt, void* updCtxt) +{ + S32 tempR0; + tempR0 = this->owner.flg_vuln; + tempR0 = tempR0 &= 0xFEFFFFFF; + this->owner.flg_vuln = tempR0; + + owner.stop_flames(); + owner.stop_hand_trail(); + return xGoal::Exit(dt, updCtxt); +} + +S32 zNPCGoalDutchmanCaught::Exit(float dt, void* updCtxt) +{ + return xGoal::Exit(dt, updCtxt); +} + U8 zNPCDutchman::PhysicsFlags() const { return 3; diff --git a/src/SB/Game/zNPCTypeDutchman.h b/src/SB/Game/zNPCTypeDutchman.h index c4cdc06ea..a8302f4fa 100644 --- a/src/SB/Game/zNPCTypeDutchman.h +++ b/src/SB/Game/zNPCTypeDutchman.h @@ -4,6 +4,8 @@ #include "zNPCTypeSubBoss.h" #include "zNPCGoalCommon.h" #include "containers.h" +#include "xBehaviour.h" +#include "zNPCTypeCommon.h" struct zNPCDutchman : zNPCSubBoss { @@ -80,11 +82,11 @@ struct zNPCDutchman : zNPCSubBoss move_enum move; fade_enum fade; } flag; - S32 life; - S32 round; - S32 stage; - F32 delay; - F32 alpha; + S32 life; //0x2B4 + S32 round; //0x2B8 + S32 stage; //0x2BC + F32 delay; //0x2C0 + F32 alpha; //0x2C4 struct { xVec2 dir; @@ -92,7 +94,7 @@ struct zNPCDutchman : zNPCSubBoss F32 accel; F32 max_vel; } turn; - move_info move; + move_info move; //0x2C8 struct { U8 moreFlags; @@ -145,6 +147,10 @@ struct zNPCDutchman : zNPCSubBoss void add_splash(const xVec3&, float); void vanish(); void reset_speed(); + void stop_flames(); + void stop_hand_trail(); + void Damage(en_NPC_DAMAGE_TYPE, xBase*, const xVec3*); + double goal_delay(); U8 PhysicsFlags() const; U8 ColPenByFlags() const; U8 ColChkByFlags() const; @@ -244,6 +250,7 @@ struct zNPCGoalDutchmanFlame : zNPCGoalCommon xVec2 move_dir; U8 stopped; zNPCDutchman& owner; + S32 Exit(float, void*); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -259,6 +266,7 @@ struct zNPCGoalDutchmanCaught : zNPCGoalCommon { U8 grabbed; zNPCDutchman& owner; + S32 Exit(float, void*); static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; @@ -271,6 +279,12 @@ struct zNPCGoalDutchmanDamage : zNPCGoalCommon static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info); }; +struct delay_goal +{ + U32 goal; + F32 delay; +}; + struct zNPCGoalDutchmanDeath : zNPCGoalCommon { enum substate_enum diff --git a/src/SB/Game/zNPCTypeSubBoss.h b/src/SB/Game/zNPCTypeSubBoss.h index b46649270..a597c5375 100644 --- a/src/SB/Game/zNPCTypeSubBoss.h +++ b/src/SB/Game/zNPCTypeSubBoss.h @@ -4,9 +4,9 @@ #include "zNPCTypeCommon.h" #include "zNPCSupport.h" -struct zNPCSubBoss : zNPCCommon +struct zNPCSubBoss : zNPCCommon //Size of zNPCSubBoss: 0x2B4 { - NPCTarget tgt_cur; + NPCTarget tgt_cur; //0x2A0 zNPCSubBoss(S32 myType); From 8097de9057318d50e9fac07fbc42e0369c042cca Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:41:55 -0400 Subject: [PATCH 11/12] 2nd try --- src/SB/Game/zNPCTypeDutchman.cpp | 1 - src/SB/Game/zNPCTypeDutchman.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SB/Game/zNPCTypeDutchman.cpp b/src/SB/Game/zNPCTypeDutchman.cpp index fcfd783bb..fb441e0a1 100644 --- a/src/SB/Game/zNPCTypeDutchman.cpp +++ b/src/SB/Game/zNPCTypeDutchman.cpp @@ -64,7 +64,6 @@ void zNPCDutchman::add_splash(const xVec3&, float) { } - void zNPCDutchman::stop_flames() { } diff --git a/src/SB/Game/zNPCTypeDutchman.h b/src/SB/Game/zNPCTypeDutchman.h index 9e7d96029..c8459a764 100644 --- a/src/SB/Game/zNPCTypeDutchman.h +++ b/src/SB/Game/zNPCTypeDutchman.h @@ -146,7 +146,10 @@ struct zNPCDutchman : zNPCSubBoss void update_animation(float); void add_splash(const xVec3&, float); void vanish(); + void stop_flames(); + void stop_hand_trail(); void reset_speed(); + void Damage(en_NPC_DAMAGE_TYPE, xBase*, const xVec3*); U8 PhysicsFlags() const; U8 ColPenByFlags() const; U8 ColChkByFlags() const; From 4101f96b5694703260b6cbe3d2e3020dc247cb98 Mon Sep 17 00:00:00 2001 From: Livewire <87439290+LivewireCB@users.noreply.github.com> Date: Fri, 14 Mar 2025 00:53:03 -0400 Subject: [PATCH 12/12] quite a few functions, updated some memory offsets --- src/SB/Core/x/xEnt.h | 14 +-- src/SB/Game/zNPCTypeKingJelly.cpp | 150 ++++++++++++++++++++++++++++++ src/SB/Game/zNPCTypeKingJelly.h | 48 +++++++--- 3 files changed, 191 insertions(+), 21 deletions(-) diff --git a/src/SB/Core/x/xEnt.h b/src/SB/Core/x/xEnt.h index b52eefc52..602b38524 100644 --- a/src/SB/Core/x/xEnt.h +++ b/src/SB/Core/x/xEnt.h @@ -41,7 +41,7 @@ struct xEntAsset : xBaseAsset F32 greenMult; F32 blueMult; F32 seeThru; - + // Offset: 0x48 F32 seeThruSpeed; U32 modelInfoID; @@ -87,7 +87,7 @@ struct xEntCollis U8 pen; U8 env_sidx; U8 env_eidx; - + U8 npc_sidx; U8 npc_eidx; U8 dyn_sidx; @@ -96,7 +96,7 @@ struct xEntCollis U8 stat_sidx; U8 stat_eidx; U8 idx; - + xCollis colls[18]; void (*post)(xEnt*, xScene*, F32, xEntCollis*); U32 (*depenq)(xEnt*, xEnt*, xScene*, F32, xCollis*); @@ -137,7 +137,7 @@ struct xEnt : xBase // Offset: 0x1B U8 pflags; // p -> physics flags - U8 moreFlags; + U8 moreFlags; //0x1c U8 isCulled; U8 driving_count; U8 num_ffx; @@ -163,7 +163,7 @@ struct xEnt : xBase // Offset: 0x44 xEntRenderCallback render; xEntFrame* frame; - xEntCollis* collis; + xEntCollis* collis; //0x4c // Offset: 0x50 xGridBound gridb; @@ -172,8 +172,8 @@ struct xEnt : xBase xBound bound; // Offset: 0xB0 - xEntTranslateCallback transl; - xFFX* ffx; + xEntTranslateCallback transl; //0xb0 + xFFX* ffx; //0xb4 xEnt* driver; S32 driveMode; diff --git a/src/SB/Game/zNPCTypeKingJelly.cpp b/src/SB/Game/zNPCTypeKingJelly.cpp index 20258e311..6b95c0b11 100644 --- a/src/SB/Game/zNPCTypeKingJelly.cpp +++ b/src/SB/Game/zNPCTypeKingJelly.cpp @@ -2,6 +2,93 @@ #include +namespace +{ + void tweak() + { + } +} // namespace + +void lightning_ring::create() +{ +} + +xVec3* zNPCKingJelly::get_bottom() +{ + return (xVec3*)&this->model->Mat->pos; +} + +void zNPCKingJelly::Setup() +{ + this->children_size = 0; //Called for address 0x88C, Started plugging things in till it matched. + load_model(); + load_curtain_model(); + zNPCSubBoss::Setup(); +} + +void zNPCKingJelly::Destroy() +{ + decompose(); + post_decompose(); + zNPCCommon::Destroy(); +} + +void zNPCKingJelly::BUpdate(xVec3* pos) +{ + // Original stack variables: + //xVec3& subloc; + //xVec3 loc; + + // Something like this... + // Some vec is being added to another on the stack (probably) + // (xVec3&)this->model->Mat->pos = (xVec3&)this->model->Mat->pos + *pos; + + zNPCCommon::BUpdate(pos); +} + +// probably how many times the jellyfish can hit the player for that round +// whatever round it is, add one. +// Round = 0, max strikes = 1 +// Round = 1, max strikes = 2 +// Round = 2, max strikes = 3 +S32 zNPCKingJelly::max_strikes() +{ + return round + 1; +} + +//void zNPCKingJelly::update_round() +//{ +// if (life == 0) +// { +// store zero in something?? +// 0x2bc +// round = 0; +// return; +// } + +//round = life-- * 3; + +// updating 0x2bc +// round = + +/* + // Done + if (*(int *)(param_1 + 0x2c4) == 0) { + *(undefined4 *)(param_1 + 700) = 0; + return; + } + // 0x2BC + + ???? + *(int *)(param_1 + 700) = 2 - ((*(int *)(param_1 + 0x2c4) + -1) * 3) / DAT_80328544; + round = 2 - ((life) + -1) * 3) / DAT_80328544; + */ +// life--; +// tweak(); +// tweak(); +//tweak(); +//} + void zNPCKingJelly::on_change_ambient_ring(const tweak_info&) { } @@ -14,6 +101,69 @@ void zNPCKingJelly::render_debug() { } +void zNPCKingJelly::decompose() +{ +} + +void zNPCKingJelly::post_decompose() +{ +} + +void zNPCKingJelly::vanish() +{ + old.moreFlags = moreFlags; + pflags = 0; + moreFlags = 0; + flags2.flg_colCheck = 0; + flags2.flg_penCheck = 0; + chkby = 0; + penby = 0; + xEntHide(this); +} + +void zNPCKingJelly::reappear() +{ + moreFlags = old.moreFlags; + this->RestoreColFlags(); + xEntShow(this); +} + void zNPCKingJelly::create_tentacle_lightning() { } + +void zNPCKingJelly::generate_spawn_particles() +{ +} + +void zNPCKingJelly::load_model() +{ +} + +void zNPCKingJelly::load_curtain_model() +{ +} + +S32 zNPCGoalKJDamage::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn) +{ + // TODO + return 0; +} + +S32 zNPCGoalKJDamage::Enter(F32 dt, void* updCtxt) +{ + // TODO + return 0; +} + +S32 zNPCGoalKJDamage::Exit(F32 dt, void* updCtxt) +{ + // Needs to be a reference, casting as a pointer doesn't work. + // Would never have gotten this if not for DWARF data. + zNPCKingJelly& kj = *(zNPCKingJelly*)this->psyche->clt_owner; + + kj.update_round(); + kj.disable_tentacle_damage = false; + + return xGoal::Exit(dt, updCtxt); +} diff --git a/src/SB/Game/zNPCTypeKingJelly.h b/src/SB/Game/zNPCTypeKingJelly.h index 336be168c..70ba294ad 100644 --- a/src/SB/Game/zNPCTypeKingJelly.h +++ b/src/SB/Game/zNPCTypeKingJelly.h @@ -3,6 +3,7 @@ #include "zNPCTypeSubBoss.h" #include "zNPCGoalCommon.h" +#include "xEnt.h" struct lightning_ring { @@ -36,6 +37,8 @@ struct lightning_ring zLightning* arcs[8]; U32 arcs_size; void (*update_callback)(lightning_ring&, F32); + + void create(); }; struct zNPCKingJelly : zNPCSubBoss @@ -79,7 +82,7 @@ struct zNPCKingJelly : zNPCSubBoss struct { - U8 moreFlags; + U8 moreFlags; //0x2B4 } old; struct { @@ -89,19 +92,19 @@ struct zNPCKingJelly : zNPCSubBoss bool stop_moving; bool updated; } flag; - S32 round; - S32 attack; - S32 life; - U32 player_life; - S32 show_vertex; - U8 enabled; - shockstate_enum shockstate; - F32 spawn_particle_vel; + S32 round; //0x2BC + S32 attack; //0x2C0 + S32 life; // 0x2C4 + U32 player_life; // + S32 show_vertex; // + U8 enabled; // + shockstate_enum shockstate; // + F32 spawn_particle_vel; //0x2D8 xModelInstance* submodel[4]; struct { - U8 active; - S32 count; + U8 active; //0x2EC + S32 count; //0x2f0 F32 intensity; F32 delay; } blink; @@ -111,24 +114,37 @@ struct zNPCKingJelly : zNPCSubBoss xVec3 last_target; } camera; child_data children[32]; - U32 children_size; + U32 children_size; //0x88C F32 last_tentacle_shock; zLightning* tentacle_lightning[7]; xVec3 tentacle_points[13][7]; lightning_ring ambient_rings[3]; lightning_ring wave_rings[4]; - U8 disable_tentacle_damage; + U8 disable_tentacle_damage; // 0x1090 F32 next_pulse; F32 last_pulse; zEnt* curtain_ent; xModelInstance* curtain_model[5]; - U8 first_update; + U8 first_update; //0x10B4 zNPCKingJelly(S32 myType); + void Setup(); + void Destroy(); + void BUpdate(xVec3*); + S32 max_strikes(); + void load_model(); + void load_curtain_model(); + void decompose(); + void post_decompose(); + void vanish(); + void reappear(); + xVec3* get_bottom(); void on_change_ambient_ring(const tweak_info&); void on_change_fade_obstructions(const tweak_info&); void render_debug(); void create_tentacle_lightning(); + void generate_spawn_particles(); + void update_round(); }; struct zNPCGoalKJIdle : zNPCGoalCommon @@ -183,6 +199,10 @@ struct zNPCGoalKJDamage : zNPCGoalCommon zNPCGoalKJDamage(S32 goalID) : zNPCGoalCommon(goalID) { } + + S32 Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn); + S32 Exit(F32 dt, void* updCtxt); + S32 Enter(F32 dt, void* updCtxt); }; struct zNPCGoalKJDeath : zNPCGoalCommon