From a47d26a763c2a24368b79b44c86815480cd50bb5 Mon Sep 17 00:00:00 2001 From: Louis Stockdale-Lees Date: Wed, 8 Oct 2025 19:43:11 +0100 Subject: [PATCH 1/7] Small ones --- src/SB/Game/zNPCTypePrawn.cpp | 40 ++++++++++++++++++++++++++--------- src/SB/Game/zNPCTypePrawn.h | 12 +++++++---- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index f0035e4ad..40b423a80 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -366,10 +366,6 @@ void zNPCPrawn::SelfSetup() psy->SetSafety(NPC_GOAL_PRAWNIDLE); } -void zNPCPrawn::render_debug() -{ -} - void zNPCPrawn::Render() { xNPCBasic::Render(); @@ -608,6 +604,15 @@ void xDebugAddTweak(const char*, xVec3*, const tweak_callback*, void*, U32) { } +xVec3& zNPCPrawn::get_center() const +{ + return reinterpret_cast(this->model->Mat->pos); +} + +void zNPCPrawn::render_debug() +{ +} + // void zNPCPrawn::turning() const // { // } @@ -628,14 +633,19 @@ void zNPCPrawn::turning() const temp_f3 = this->turn.vel; } -U8 zNPCPrawn::PhysicsFlags() const +xVec3& zNPCPrawn::get_facing() const { - return 3; + return reinterpret_cast(this->model->Mat->at); } -U8 zNPCPrawn::ColPenByFlags() const +U8 zNPCPrawn::ColChkFlags() const { - return 16; + return 0; +} + +U8 zNPCPrawn::ColPenFlags() const +{ + return 0; } U8 zNPCPrawn::ColChkByFlags() const @@ -643,7 +653,17 @@ U8 zNPCPrawn::ColChkByFlags() const return 16; } -U8 zNPCPrawn::ColPenFlags() const +U8 zNPCPrawn::ColPenByFlags() const { - return 0; + return 16; +} + +U8 zNPCPrawn::PhysicsFlags() const +{ + return 3; +} + +S32 zNPCPrawn::IsAlive() +{ + return this->life != 0; } diff --git a/src/SB/Game/zNPCTypePrawn.h b/src/SB/Game/zNPCTypePrawn.h index 3e9bb2b93..4c2496500 100644 --- a/src/SB/Game/zNPCTypePrawn.h +++ b/src/SB/Game/zNPCTypePrawn.h @@ -261,11 +261,15 @@ struct zNPCPrawn : zNPCSubBoss void decompose(); void set_floor_state(zNPCPrawn::floor_state_enum, bool, bool); void Damage(en_NPC_DAMAGE_TYPE, xBase*, const xVec3*); - - U8 PhysicsFlags() const; - U8 ColPenByFlags() const; - U8 ColChkByFlags() const; + + xVec3& get_center() const; + xVec3& get_facing() const; + U8 ColChkFlags() const; U8 ColPenFlags() const; + U8 ColChkByFlags() const; + U8 ColPenByFlags() const; + U8 PhysicsFlags() const; + S32 IsAlive(); }; struct zNPCGoalPrawnIdle : zNPCGoalCommon From 23f3d9d714031dc5782a6958226b64da44411f28 Mon Sep 17 00:00:00 2001 From: Louis Stockdale-Lees Date: Wed, 8 Oct 2025 23:43:13 +0100 Subject: [PATCH 2/7] Television stuff --- src/SB/Game/zNPCTypePrawn.cpp | 86 +++++++++++++++++++++++++++++++++++ src/SB/Game/zNPCTypePrawn.h | 1 + 2 files changed, 87 insertions(+) diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index 40b423a80..5800819de 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -1,7 +1,9 @@ #include "zNPCTypePrawn.h" +#include "rwcore.h" #include "xDebug.h" +#include "zNPCTypeCommon.h" #include #define f1052 1.0f @@ -82,6 +84,84 @@ namespace void kill_sound(S32, U32) { } + + struct television + { + RwCamera* cam; + RwRaster* raster; + RwRaster* bgraster; + RpWorld* world; + RwTexture* texture; + U32 vert_buffer_used; + RwRGBA bgcolor; + F32 rcz; + F32 w; + F32 h; + + void create(S32, S32); + void destroy(); + void set_background(iColor_tag); + void set_model_texture(xModelInstance&); + void update(xModelInstance&, xLightKit*); + void render_static(); + void render_background(); + void set_vert(rwGameCube2DVertex&, F32, F32, F32, F32); + void move(const xVec3&, const xVec3&); + }; + + void create(S32 i1, S32 i2) + { + } + + void destroy() + { + } + + void television::set_background(iColor_tag t) + { + this->bgraster = 0; + this->bgcolor.red = t.r; + this->bgcolor.green = t.g; + this->bgcolor.blue = t.b; + this->bgcolor.alpha = t.a; + } + + void set_model_texture(xModelInstance& m) + { + } + + void television::update(xModelInstance& m, xLightKit* l) + { + } + + void television::render_static() + { + } + + void television::render_background() + { + } + + void television::set_vert(rwGameCube2DVertex& vert, F32 f1, F32 f2, F32 f3, F32 f4) + { + vert.x = f1; + vert.y = f2; + vert.z = 1.0f; + vert.u = f3; + vert.v = f4; + vert.emissiveColor.red = 0xff; + vert.emissiveColor.green = 0xff; + vert.emissiveColor.blue = 0xff; + vert.emissiveColor.alpha = 0xff; + } + + void television::move(const xVec3& v1, const xVec3& v2) + { + RwFrameTranslate((RwFrame*)this->cam->object.object.parent, (const RwV3d*)&v1, rwCOMBINEREPLACE); + } + + static television closeup[9]; // Unconfirmed size + } // namespace /* @@ -341,6 +421,12 @@ xAnimTable* ZNPC_AnimTable_Prawn() return table; } +void zNPCPrawn::Destroy() +{ + zNPCCommon::Destroy(); + closeup[0].destroy(); +} + void zNPCPrawn::NewTime(xScene* xscn, float dt) { zNPCCommon::NewTime(xscn, dt); diff --git a/src/SB/Game/zNPCTypePrawn.h b/src/SB/Game/zNPCTypePrawn.h index 4c2496500..29e10d104 100644 --- a/src/SB/Game/zNPCTypePrawn.h +++ b/src/SB/Game/zNPCTypePrawn.h @@ -250,6 +250,7 @@ struct zNPCPrawn : zNPCSubBoss void render_debug(); void Render(); void update_particles(float); + void Destroy(); void NewTime(xScene*, float); void SelfSetup(); void apply_pending(); From 3c90bb96090bd9983563a2d5ec6eb2e0cd4e5e68 Mon Sep 17 00:00:00 2001 From: Louis Stockdale-Lees Date: Fri, 10 Oct 2025 23:18:04 +0100 Subject: [PATCH 3/7] parseini --- src/SB/Game/zNPCTypePrawn.cpp | 121 +++++++++++++++++++++++++++++----- src/SB/Game/zNPCTypePrawn.h | 1 + 2 files changed, 107 insertions(+), 15 deletions(-) diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index 5800819de..79b023b45 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -78,9 +78,12 @@ namespace tweak_callback cb_sound; tweak_callback cb_sound_asset; - void register_tweaks(bool init, xModelAssetParam* ap, U32 apsize); + void load(xModelAssetParam* p, U32 i); + void register_tweaks(bool init, xModelAssetParam* ap, U32 apsiz, const char* c); }; // namespace tweak_group + static tweak_group tweak; + void kill_sound(S32, U32) { } @@ -109,24 +112,24 @@ namespace void move(const xVec3&, const xVec3&); }; - void create(S32 i1, S32 i2) + void television::create(S32 i1, S32 i2) { } - void destroy() + void television::destroy() { } - void television::set_background(iColor_tag t) + void television::set_background(iColor_tag color) { this->bgraster = 0; - this->bgcolor.red = t.r; - this->bgcolor.green = t.g; - this->bgcolor.blue = t.b; - this->bgcolor.alpha = t.a; + this->bgcolor.red = color.r; + this->bgcolor.green = color.g; + this->bgcolor.blue = color.b; + this->bgcolor.alpha = color.a; } - void set_model_texture(xModelInstance& m) + void television::set_model_texture(xModelInstance& m) { } @@ -142,13 +145,13 @@ namespace { } - void television::set_vert(rwGameCube2DVertex& vert, F32 f1, F32 f2, F32 f3, F32 f4) + void television::set_vert(rwGameCube2DVertex& vert, F32 x, F32 y, F32 u, F32 v) { - vert.x = f1; - vert.y = f2; + vert.x = x; + vert.y = y; vert.z = 1.0f; - vert.u = f3; - vert.v = f4; + vert.u = u; + vert.v = v; vert.emissiveColor.red = 0xff; vert.emissiveColor.green = 0xff; vert.emissiveColor.blue = 0xff; @@ -158,19 +161,32 @@ namespace void television::move(const xVec3& v1, const xVec3& v2) { RwFrameTranslate((RwFrame*)this->cam->object.object.parent, (const RwV3d*)&v1, rwCOMBINEREPLACE); + xMat3x3LookAt((xMat3x3*)this->cam->object.object.parent, &v2, &v1); + //RwV3d::operator=(this->cam->object.object.parent); } static television closeup[9]; // Unconfirmed size + //S32 load_patterns(xModelAssetParam*, U32, const char*, zNPCPrawn::range_type*, S32); } // namespace +S32 load_patterns(xModelAssetParam*, U32, const char*, zNPCPrawn::range_type*, S32) +{ + return 0; +} + +void tweak_group::load(xModelAssetParam* p, U32 i) +{ + this->register_tweaks(TRUE, p, i, 0); +} + /* TODO: 42%, needs quite a bit of work still. Thought this function was going to be an easy copy/paste like other register_tweak fn, but turning out to be harder to decipher than I anticipated so leaving it like this for now. */ -void tweak_group::register_tweaks(bool init, xModelAssetParam* ap, U32 apsize) +void tweak_group::register_tweaks(bool init, xModelAssetParam* ap, U32 apsize, const char* c) { if (init) { @@ -433,6 +449,81 @@ void zNPCPrawn::NewTime(xScene* xscn, float dt) zNPCPrawn::render_closeup(); } + + +void zNPCPrawn::ParseINI() // do other parse function after +{ + zNPCCommon::ParseINI(); + tweak.load(this->parmdata, this->pdatsize); + tweak.turn_accel = zParamGetFloat(this->parmdata, this->pdatsize, "turn_accel", 5.0f); + tweak.spawn_delay = zParamGetFloat(this->parmdata, this->pdatsize, "spawn_delay", 1.0f); + tweak.repel_radius = zParamGetFloat(this->parmdata, this->pdatsize, "repel_radius", 4.2f); + tweak.safe.pattern.min = zParamGetInt(this->parmdata, this->pdatsize, "safe.pattern.min", 0); + tweak.safe.pattern.max = zParamGetInt(this->parmdata, this->pdatsize, "safe.pattern.max", 0); + tweak.begin.pattern.min = zParamGetInt(this->parmdata, this->pdatsize, "begin.pattern.min", 0); + tweak.begin.pattern.max = zParamGetInt(this->parmdata, this->pdatsize, "begin.pattern.max", 1); + tweak.begin.state_delay = zParamGetFloat(this->parmdata, this->pdatsize, "begin.state_delay", 0.0f); + tweak.begin.transition_delay = zParamGetFloat(this->parmdata, this->pdatsize, "begin.transition_delay", 1.0f); + tweak.beam.delay[0] = zParamGetFloat(this->parmdata, this->pdatsize, "beam.delay[0]", 2.5f); + tweak.beam.delay[1] = zParamGetFloat(this->parmdata, this->pdatsize, "beam.delay[1]", 4.5f); + tweak.beam.delay[2] = zParamGetFloat(this->parmdata, this->pdatsize, "beam.delay[2]", 6.5f); + tweak.beam.pattern.min = zParamGetInt(this->parmdata, this->pdatsize, "beam.pattern.min", 3); + tweak.beam.pattern.max = zParamGetInt(this->parmdata, this->pdatsize, "beam.pattern.max", 0x13); + tweak.beam.state_delay = zParamGetFloat(this->parmdata, this->pdatsize, "beam.state_delay", 0.05f); + tweak.beam.transition_delay = zParamGetFloat(this->parmdata, this->pdatsize, "beam.transition_delay", 0.05f); + tweak.beam.exhaust_vel = zParamGetFloat(this->parmdata, this->pdatsize, "beam.exhaust_vel", 15.0f); + tweak.beam.knock_back = zParamGetFloat(this->parmdata, this->pdatsize, "beam.knock_back", 1.0f); + tweak.beam.sweep.amount[0] = zParamGetInt(this->parmdata, this->pdatsize, "beam.sweep.amount[0]", 2); + tweak.beam.sweep.amount[1] = zParamGetInt(this->parmdata, this->pdatsize, "beam.sweep.amount[1]", 3); + tweak.beam.sweep.amount[2] = zParamGetInt(this->parmdata, this->pdatsize, "beam.sweep.amount[2]", 4); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.sweep.arc", 20.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.sweep.delay", 0.5f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.sweep.accel", 60.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.sweep.max_vel", 26.5f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.size", 0.4f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.alpha", 1.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.vel", 9.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.accel", 10.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.emit_delay", 0.1f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.grow", 0.15f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.fade_dist", 15.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.kill_dist", 20.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.follow", 0.0f); + tweak.beam.sweep.arc = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.ring.hit_radius", 0.3f); + tweak.beam.fire.ring.hit_offset = zParamGetVector(this->parmdata, this->pdatsize, "beam.fire.ring.hit_offset", xVec3::create(0.0f, 0.0f, 0.0f), &tweak.beam.fire.ring.hit_offset); + tweak.beam.fire.emit_bone = zParamGetInt(this->parmdata, this->pdatsize, "beam.fire.emit_bone", 0x2b); + tweak.beam.fire.offset = zParamGetVector(this->parmdata, this->pdatsize, "beam.fire.offset", xVec3::create(0.0f, 0.0f, 0.0f), &tweak.beam.fire.offset); + tweak.beam.fire.yaw = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.yaw", 0.0f); + tweak.beam.fire.pitch = zParamGetFloat(this->parmdata, this->pdatsize, "beam.fire.pitch", 5.5f); + isin(tweak.beam.fire.pitch); + icos(tweak.beam.fire.pitch); + tweak.aim_lane.duration = zParamGetFloat(this->parmdata, this->pdatsize, "aim_lane.duration", 2.0f); + tweak.aim_lane.state_delay = zParamGetFloat(this->parmdata, this->pdatsize, "aim_lane.state_delay", 0.1f); + tweak.aim_lane.transition_delay = zParamGetFloat(this->parmdata, this->pdatsize, "aim_lane.transition_delay", 0.1f); + tweak.aim_lane.pattern.first = zParamGetInt(this->parmdata, this->pdatsize, "aim_lane.pattern.first", 0x15); + tweak.aim_lane.pattern.range = zParamGetInt(this->parmdata, this->pdatsize, "aim_lane.pattern.range", 0x8); + tweak.aim_lane.pattern.offset = zParamGetInt(this->parmdata, this->pdatsize, "aim_lane.pattern.offset", 0x9); + tweak.aim_lane.pattern.size = zParamGetInt(this->parmdata, this->pdatsize, "aim_lane.pattern.size", 0x4); + tweak.lane.duration[0] = zParamGetFloat(this->parmdata, this->pdatsize, "lane.duration[0]", 8.0f); + tweak.lane.duration[1] = zParamGetFloat(this->parmdata, this->pdatsize, "lane.duration[1]", 7.0f); + tweak.lane.duration[2] = zParamGetFloat(this->parmdata, this->pdatsize, "lane.duration[2]", 6.0f); + tweak.lane.state_delay = zParamGetFloat(this->parmdata, this->pdatsize, "lane.state_delay", 0.0f); + tweak.lane.transition_delay = zParamGetFloat(this->parmdata, this->pdatsize, "lane.transition_delay", 0.1f); + tweak.lane.pattern.first = zParamGetInt(this->parmdata, this->pdatsize, "lane.pattern.first", 0x39); + tweak.lane.pattern.range = zParamGetInt(this->parmdata, this->pdatsize, "lane.pattern.range", 0x8); + tweak.lane.pattern.offset = zParamGetInt(this->parmdata, this->pdatsize, "lane.pattern.offset", 0x9); + tweak.lane.pattern.size = zParamGetInt(this->parmdata, this->pdatsize, "lane.pattern.size", 0x4); + tweak.danger.state_delay = zParamGetFloat(this->parmdata, this->pdatsize, "danger.state_delay", 0.2f); + tweak.danger.transition_delay = zParamGetFloat(this->parmdata, this->pdatsize, "danger.transition_delay", 0.2f); + tweak.danger.cycle_delay = zParamGetFloat(this->parmdata, this->pdatsize, "danger.cycle_delay", 6.0f); + tweak.danger.pattern_offset = zParamGetInt(this->parmdata, this->pdatsize, "danger.pattern_offset", 0x5d); + + memcpy(tweak.context, tweak.context, 0); + + + tweak.danger.pattern_size = load_patterns(this->parmdata, 0, "tweak.danger.pattern[%d]", &this->pending.pattern, 0x14); +} + void zNPCPrawn::SelfSetup() { xBehaveMgr* bmgr; diff --git a/src/SB/Game/zNPCTypePrawn.h b/src/SB/Game/zNPCTypePrawn.h index 29e10d104..9da41a486 100644 --- a/src/SB/Game/zNPCTypePrawn.h +++ b/src/SB/Game/zNPCTypePrawn.h @@ -252,6 +252,7 @@ struct zNPCPrawn : zNPCSubBoss void update_particles(float); void Destroy(); void NewTime(xScene*, float); + void ParseINI(); void SelfSetup(); void apply_pending(); void vanish(); From 6502af82438a13fb0eccf7e27076ef95a06d64e0 Mon Sep 17 00:00:00 2001 From: Louis Stockdale-Lees Date: Sun, 12 Oct 2025 21:27:25 +0100 Subject: [PATCH 4/7] aqua load, init --- src/SB/Game/zNPCTypePrawn.cpp | 51 ++++++++++++++++++++++++++--------- src/SB/Game/zNPCTypePrawn.h | 3 +++ 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index 79b023b45..7d9d69867 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -3,7 +3,10 @@ #include "rwcore.h" #include "xDebug.h" +#include "xMemMgr.h" +#include "zEntCruiseBubble.h" #include "zNPCTypeCommon.h" +#include "zRenderState.h" #include #define f1052 1.0f @@ -84,6 +87,10 @@ namespace static tweak_group tweak; + void init_sound() + { + } + void kill_sound(S32, U32) { } @@ -143,6 +150,8 @@ namespace void television::render_background() { + zRenderState(SDRS_Fill); + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, this->bgraster); } void television::set_vert(rwGameCube2DVertex& vert, F32 x, F32 y, F32 u, F32 v) @@ -162,18 +171,16 @@ namespace { RwFrameTranslate((RwFrame*)this->cam->object.object.parent, (const RwV3d*)&v1, rwCOMBINEREPLACE); xMat3x3LookAt((xMat3x3*)this->cam->object.object.parent, &v2, &v1); - //RwV3d::operator=(this->cam->object.object.parent); + + //this->cam->frustumCorners[0] = this->world->worldOrigin; } static television closeup[9]; // Unconfirmed size - //S32 load_patterns(xModelAssetParam*, U32, const char*, zNPCPrawn::range_type*, S32); -} // namespace + xBinaryCamera boss_cam; -S32 load_patterns(xModelAssetParam*, U32, const char*, zNPCPrawn::range_type*, S32) -{ - return 0; -} + S32 load_patterns(xModelAssetParam*, U32, const char*, zNPCPrawn::range_type*, S32); +} // namespace void tweak_group::load(xModelAssetParam* p, U32 i) { @@ -332,6 +339,17 @@ void tweak_group::register_tweaks(bool init, xModelAssetParam* ap, U32 apsize, c */ } +void aqua_beam::load(const aqua_beam::config& c, U32 i) +{ + void* a = xSTFindAsset(i, 0); + + aqua_beam::load(c, *(RpAtomic*)a); +} + +void aqua_beam::load(const aqua_beam::config& c, RpAtomic& a) +{ +} + void aqua_beam::reset() // I don't know whats wrong here. Probably a simple error { firing = 0; @@ -437,6 +455,20 @@ xAnimTable* ZNPC_AnimTable_Prawn() return table; } +void zNPCPrawn::Init(xEntAsset* a) +{ + boss_cam.init(); + init_sound(); + zNPCCommon::Init(a); + memset(&this->flag, 0, 1); + this->flg_move = 1; + this->flg_vuln = 0x11; + this->chkby = 0x10; + this->penby = 0x10; + this->beam.load(this->beam.cfg, xStrHash("glow_ring_add.dff")); + closeup[0].create(0x100, 0x100); +} + void zNPCPrawn::Destroy() { zNPCCommon::Destroy(); @@ -517,11 +549,6 @@ void zNPCPrawn::ParseINI() // do other parse function after tweak.danger.transition_delay = zParamGetFloat(this->parmdata, this->pdatsize, "danger.transition_delay", 0.2f); tweak.danger.cycle_delay = zParamGetFloat(this->parmdata, this->pdatsize, "danger.cycle_delay", 6.0f); tweak.danger.pattern_offset = zParamGetInt(this->parmdata, this->pdatsize, "danger.pattern_offset", 0x5d); - - memcpy(tweak.context, tweak.context, 0); - - - tweak.danger.pattern_size = load_patterns(this->parmdata, 0, "tweak.danger.pattern[%d]", &this->pending.pattern, 0x14); } void zNPCPrawn::SelfSetup() diff --git a/src/SB/Game/zNPCTypePrawn.h b/src/SB/Game/zNPCTypePrawn.h index 9da41a486..b59078469 100644 --- a/src/SB/Game/zNPCTypePrawn.h +++ b/src/SB/Game/zNPCTypePrawn.h @@ -177,6 +177,8 @@ struct aqua_beam } squiggle; S32 ring_sounds; //0xf54 + void load(const aqua_beam::config&, U32); + void load(const aqua_beam::config&, RpAtomic&); void reset(); void start(); void stop(); @@ -250,6 +252,7 @@ struct zNPCPrawn : zNPCSubBoss void render_debug(); void Render(); void update_particles(float); + void Init(xEntAsset*); void Destroy(); void NewTime(xScene*, float); void ParseINI(); From c687418800d0b449cd413a9ee40b7255dcdb04c8 Mon Sep 17 00:00:00 2001 From: Louis Stockdale-Lees Date: Sun, 12 Oct 2025 21:38:21 +0100 Subject: [PATCH 5/7] format --- src/SB/Game/zNPCTypePrawn.cpp | 3 --- src/SB/Game/zNPCTypePrawn.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index 7d9d69867..352e292ee 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -171,8 +171,6 @@ namespace { RwFrameTranslate((RwFrame*)this->cam->object.object.parent, (const RwV3d*)&v1, rwCOMBINEREPLACE); xMat3x3LookAt((xMat3x3*)this->cam->object.object.parent, &v2, &v1); - - //this->cam->frustumCorners[0] = this->world->worldOrigin; } static television closeup[9]; // Unconfirmed size @@ -342,7 +340,6 @@ void tweak_group::register_tweaks(bool init, xModelAssetParam* ap, U32 apsize, c void aqua_beam::load(const aqua_beam::config& c, U32 i) { void* a = xSTFindAsset(i, 0); - aqua_beam::load(c, *(RpAtomic*)a); } diff --git a/src/SB/Game/zNPCTypePrawn.h b/src/SB/Game/zNPCTypePrawn.h index b59078469..0fadab480 100644 --- a/src/SB/Game/zNPCTypePrawn.h +++ b/src/SB/Game/zNPCTypePrawn.h @@ -266,7 +266,7 @@ struct zNPCPrawn : zNPCSubBoss void decompose(); void set_floor_state(zNPCPrawn::floor_state_enum, bool, bool); void Damage(en_NPC_DAMAGE_TYPE, xBase*, const xVec3*); - + xVec3& get_center() const; xVec3& get_facing() const; U8 ColChkFlags() const; From bf70025eeeebc46025d57fe83880ea070e800ac5 Mon Sep 17 00:00:00 2001 From: Louis Stockdale-Lees Date: Mon, 13 Oct 2025 16:16:16 +0100 Subject: [PATCH 6/7] Fix closeup size --- src/SB/Game/zNPCTypePrawn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index 352e292ee..de7ee40a0 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -173,7 +173,7 @@ namespace xMat3x3LookAt((xMat3x3*)this->cam->object.object.parent, &v2, &v1); } - static television closeup[9]; // Unconfirmed size + static television closeup[1]; xBinaryCamera boss_cam; @@ -480,7 +480,7 @@ void zNPCPrawn::NewTime(xScene* xscn, float dt) -void zNPCPrawn::ParseINI() // do other parse function after +void zNPCPrawn::ParseINI() { zNPCCommon::ParseINI(); tweak.load(this->parmdata, this->pdatsize); From 609f27cf82f78c0631c2a9f49d589c062c053305 Mon Sep 17 00:00:00 2001 From: Louis Stockdale-Lees Date: Mon, 13 Oct 2025 17:20:59 +0100 Subject: [PATCH 7/7] :) --- src/SB/Game/zNPCTypePrawn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SB/Game/zNPCTypePrawn.cpp b/src/SB/Game/zNPCTypePrawn.cpp index de7ee40a0..9fe94be83 100644 --- a/src/SB/Game/zNPCTypePrawn.cpp +++ b/src/SB/Game/zNPCTypePrawn.cpp @@ -173,7 +173,7 @@ namespace xMat3x3LookAt((xMat3x3*)this->cam->object.object.parent, &v2, &v1); } - static television closeup[1]; + static television closeup; xBinaryCamera boss_cam; @@ -463,13 +463,13 @@ void zNPCPrawn::Init(xEntAsset* a) this->chkby = 0x10; this->penby = 0x10; this->beam.load(this->beam.cfg, xStrHash("glow_ring_add.dff")); - closeup[0].create(0x100, 0x100); + closeup.create(0x100, 0x100); } void zNPCPrawn::Destroy() { zNPCCommon::Destroy(); - closeup[0].destroy(); + closeup.destroy(); } void zNPCPrawn::NewTime(xScene* xscn, float dt)