From ce4e1aed9f3ee1235b1166f026fc598155a503c8 Mon Sep 17 00:00:00 2001 From: Kevyn Date: Sun, 13 Apr 2025 01:39:07 -0400 Subject: [PATCH 1/9] Fix zNPCFXCinematic implementation --- src/SB/Game/zNPCFXCinematic.cpp | 15 ++++++++++ src/SB/Game/zNPCFXCinematic.h | 52 +++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/src/SB/Game/zNPCFXCinematic.cpp b/src/SB/Game/zNPCFXCinematic.cpp index ab3ca25c4..84e8edfa9 100644 --- a/src/SB/Game/zNPCFXCinematic.cpp +++ b/src/SB/Game/zNPCFXCinematic.cpp @@ -10,6 +10,16 @@ void zNPCFXShutdown() { } +static S32 init = 0; +void zNPCFXCinematic_Init() +{ + if (!init) + { + init = 1; + } + //g_noz_ncin = &nozey_npc_cinematics; +} + void clamp_bone_index(NCINEntry*, RpAtomic*) { } @@ -23,3 +33,8 @@ void NPCCone::RadiusSet(F32 conefloat) { rad_cone = conefloat; } + +void NPARMgmt::KillAll() +{ + this->cnt_active = 0; +} \ No newline at end of file diff --git a/src/SB/Game/zNPCFXCinematic.h b/src/SB/Game/zNPCFXCinematic.h index 9a520b442..2fd61cf8e 100644 --- a/src/SB/Game/zNPCFXCinematic.h +++ b/src/SB/Game/zNPCFXCinematic.h @@ -15,6 +15,58 @@ S32 zNPCFXCutscenePrep(const xScene*, F32, const zCutsceneMgr* csnmgr); void zNPCFXCutscene(const xScene*, F32, const zCutsceneMgr* csnmgr); void zNPCFXCutsceneDone(const xScene*, F32, const zCutsceneMgr* csnmgr); +enum en_nparptyp +{ + NPAR_TYP_UNKNOWN, + NPAR_TYP_OILBUB, + NPAR_TYP_TUBESPIRAL, + NPAR_TYP_TUBECONFETTI, + NPAR_TYP_GLOVEDUST , + NPAR_TYP_MONSOONRAIN, + NPAR_TYP_SLEEPYZEEZ, + NPAR_TYP_CHUCKSPLASH, + NPAR_TYP_TARTARGUNK, + NPAR_TYP_DOGBREATH, + NPAR_TYP_VISSPLASH, + NPAR_TYP_FIREWORKS, + NPAR_TYP_NOMORE, + NPAR_TYP_FORCE = 2147483647 +}; + +struct NPARData +{ +public: + xVec3 pos; + F32 xy_size[2]; + F32 uv_tl[2]; + F32 uv_br[2]; + RwRGBA color; + F32 tmr_remain; + F32 tym_exist; + F32 fac_abuse; + xVec3 vel; + S32 flg_popts : 24; + S32 nparmode : 8; + F32 unused[3]; +}; + +struct NPARXtraData +{ + +}; + +struct NPARMgmt +{ + en_nparptyp typ_npar; + S32 flg_npar; + NPARData * par_buf; + S32 cnt_active; + S32 num_max; + RwTexture * txtr; + NPARXtraData * xtra_data; + void KillAll(); +}; + struct NCINLyt { zLightning* lyt_zap; From ed0c49d6955855bc3ad9e8a8d57982af099006e5 Mon Sep 17 00:00:00 2001 From: Kevyn Date: Sun, 13 Apr 2025 03:41:43 -0400 Subject: [PATCH 2/9] All NPCCone functions 100% --- src/SB/Game/zNPCFXCinematic.cpp | 27 ++++++++++++++++++++++++++- src/SB/Game/zNPCFXCinematic.h | 8 +++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/SB/Game/zNPCFXCinematic.cpp b/src/SB/Game/zNPCFXCinematic.cpp index 84e8edfa9..5bceceb70 100644 --- a/src/SB/Game/zNPCFXCinematic.cpp +++ b/src/SB/Game/zNPCFXCinematic.cpp @@ -29,6 +29,24 @@ void NPCCone::TextureSet(RwRaster* raster) rast_cone = raster; } +void NPCCone::UVSliceSet(F32 u, F32 v) +{ + this->uv_tip[2] = u; + this->uv_slice[1] = v; +} + +void NPCCone::UVBaseSet(F32 u, F32 v) +{ + this->uv_tip[0] = u; + this->uv_tip[1] = v; +} + +void NPCCone::ColorSet(RwRGBA top, RwRGBA bot) +{ + this->rgba_top = top; + this->rgba_bot = bot; +} + void NPCCone::RadiusSet(F32 conefloat) { rad_cone = conefloat; @@ -37,4 +55,11 @@ void NPCCone::RadiusSet(F32 conefloat) void NPARMgmt::KillAll() { this->cnt_active = 0; -} \ No newline at end of file +} + +//zNPCB_SB2* zNPCB_SB2::singleton() +//{ + //return _singleton__9zNPCB_SB2; +//} + + diff --git a/src/SB/Game/zNPCFXCinematic.h b/src/SB/Game/zNPCFXCinematic.h index 2fd61cf8e..09e47bb32 100644 --- a/src/SB/Game/zNPCFXCinematic.h +++ b/src/SB/Game/zNPCFXCinematic.h @@ -8,6 +8,10 @@ #include "zNPCHazard.h" #include "zParEmitter.h" #include "zShrapnel.h" +#include "rwcore.h" + + +//#include "iColor.h" void zNPCFXStartup(); void zNPCFXShutdown(); @@ -35,7 +39,6 @@ enum en_nparptyp struct NPARData { -public: xVec3 pos; F32 xy_size[2]; F32 uv_tl[2]; @@ -242,6 +245,9 @@ struct NPCCone F32 uv_tip[2]; F32 uv_slice[2]; void TextureSet(RwRaster* raster); + void UVSliceSet(F32, F32); + void UVBaseSet(F32, F32); + void ColorSet(RwRGBA, RwRGBA); void RadiusSet(F32); }; From 6a792967e7ebdd3121b5e36440fc6d3c360e4255 Mon Sep 17 00:00:00 2001 From: Kevyn Date: Sun, 13 Apr 2025 03:43:54 -0400 Subject: [PATCH 3/9] forgot one change. --- git | 0 src/SB/Game/zNPCFXCinematic.cpp | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 git diff --git a/git b/git new file mode 100644 index 000000000..e69de29bb diff --git a/src/SB/Game/zNPCFXCinematic.cpp b/src/SB/Game/zNPCFXCinematic.cpp index 5bceceb70..0d79d9bfe 100644 --- a/src/SB/Game/zNPCFXCinematic.cpp +++ b/src/SB/Game/zNPCFXCinematic.cpp @@ -32,13 +32,13 @@ void NPCCone::TextureSet(RwRaster* raster) void NPCCone::UVSliceSet(F32 u, F32 v) { this->uv_tip[2] = u; - this->uv_slice[1] = v; + this->uv_slice[1] = v; } void NPCCone::UVBaseSet(F32 u, F32 v) { this->uv_tip[0] = u; - this->uv_tip[1] = v; + this->uv_tip[1] = v; } void NPCCone::ColorSet(RwRGBA top, RwRGBA bot) From d382c2e9d27528285921923642f9a6ff7d26b8b1 Mon Sep 17 00:00:00 2001 From: Red <53205920+Redberd36@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:43:08 -0400 Subject: [PATCH 4/9] Moved Static S32 init to the top of file in zNPCFXCinematic.cpp --- src/SB/Game/zNPCFXCinematic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SB/Game/zNPCFXCinematic.cpp b/src/SB/Game/zNPCFXCinematic.cpp index 0d79d9bfe..c872b08c1 100644 --- a/src/SB/Game/zNPCFXCinematic.cpp +++ b/src/SB/Game/zNPCFXCinematic.cpp @@ -6,11 +6,12 @@ #include #include "xCutscene.h" +static S32 init = 0; + void zNPCFXShutdown() { } -static S32 init = 0; void zNPCFXCinematic_Init() { if (!init) From 684981bd8e96846a3e7460a653fdc5fe388125c2 Mon Sep 17 00:00:00 2001 From: Red <53205920+Redberd36@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:44:05 -0400 Subject: [PATCH 5/9] Removed commented code in zNPCFXCinematic.cpp --- src/SB/Game/zNPCFXCinematic.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SB/Game/zNPCFXCinematic.cpp b/src/SB/Game/zNPCFXCinematic.cpp index c872b08c1..0e6820031 100644 --- a/src/SB/Game/zNPCFXCinematic.cpp +++ b/src/SB/Game/zNPCFXCinematic.cpp @@ -18,7 +18,6 @@ void zNPCFXCinematic_Init() { init = 1; } - //g_noz_ncin = &nozey_npc_cinematics; } void clamp_bone_index(NCINEntry*, RpAtomic*) From cbe27cc29b742f6a11a64ef01443581117cf9d90 Mon Sep 17 00:00:00 2001 From: Red <53205920+Redberd36@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:45:24 -0400 Subject: [PATCH 6/9] Removed commented code at the bottom of zNPCFXCinematic.cpp --- src/SB/Game/zNPCFXCinematic.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/SB/Game/zNPCFXCinematic.cpp b/src/SB/Game/zNPCFXCinematic.cpp index 0e6820031..47d64ad7e 100644 --- a/src/SB/Game/zNPCFXCinematic.cpp +++ b/src/SB/Game/zNPCFXCinematic.cpp @@ -57,9 +57,3 @@ void NPARMgmt::KillAll() this->cnt_active = 0; } -//zNPCB_SB2* zNPCB_SB2::singleton() -//{ - //return _singleton__9zNPCB_SB2; -//} - - From 4ff0424459398832b557a44f7efb2d4df1660bcf Mon Sep 17 00:00:00 2001 From: Red <53205920+Redberd36@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:46:43 -0400 Subject: [PATCH 7/9] Removed commented code at the top of zNPCFXCinematic.h --- src/SB/Game/zNPCFXCinematic.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/SB/Game/zNPCFXCinematic.h b/src/SB/Game/zNPCFXCinematic.h index 09e47bb32..798b14735 100644 --- a/src/SB/Game/zNPCFXCinematic.h +++ b/src/SB/Game/zNPCFXCinematic.h @@ -11,8 +11,6 @@ #include "rwcore.h" -//#include "iColor.h" - void zNPCFXStartup(); void zNPCFXShutdown(); S32 zNPCFXCutscenePrep(const xScene*, F32, const zCutsceneMgr* csnmgr); From c6a9785a765655258149781d59ed1773c3efc899 Mon Sep 17 00:00:00 2001 From: Kevyn Date: Sun, 13 Apr 2025 16:27:23 -0400 Subject: [PATCH 8/9] Added parameter names for UVSliceSet, UVBaseSet, ColorSet --- src/SB/Game/zNPCFXCinematic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SB/Game/zNPCFXCinematic.h b/src/SB/Game/zNPCFXCinematic.h index 798b14735..8cc5e0b09 100644 --- a/src/SB/Game/zNPCFXCinematic.h +++ b/src/SB/Game/zNPCFXCinematic.h @@ -243,9 +243,9 @@ struct NPCCone F32 uv_tip[2]; F32 uv_slice[2]; void TextureSet(RwRaster* raster); - void UVSliceSet(F32, F32); - void UVBaseSet(F32, F32); - void ColorSet(RwRGBA, RwRGBA); + void UVSliceSet(F32 u, F32 v); + void UVBaseSet(F32 u, F32 v); + void ColorSet(RwRGBA top, RwRGBA bot); void RadiusSet(F32); }; From 04bf2d39a13ee52ca5cd32b06194bb2c38bf3efc Mon Sep 17 00:00:00 2001 From: Kevyn Date: Sun, 13 Apr 2025 16:38:10 -0400 Subject: [PATCH 9/9] Removed the blank git file --- git | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 git diff --git a/git b/git deleted file mode 100644 index e69de29bb..000000000