Skip to content
2 changes: 1 addition & 1 deletion src/SB/Core/x/xBehaviour.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ struct xGoal : xListItem<xGoal>, 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;
}
Expand Down
12 changes: 6 additions & 6 deletions src/SB/Game/zNPCSndTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
21 changes: 10 additions & 11 deletions src/SB/Game/zNPCTypeCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ struct zNPCLassoInfo
xModelInstance* grabGuideModel;
};

struct zNPCCommon : xNPCBasic
struct zNPCCommon : xNPCBasic //Size of zNPCCommon: 0x2A0
{
xEntAsset* entass; // 0x1BC
xEntNPCAsset* npcass; // 0x1C0
Expand All @@ -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);

Expand Down Expand Up @@ -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*),
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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);
Expand Down
38 changes: 38 additions & 0 deletions src/SB/Game/zNPCTypeDutchman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,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()
{
}
Expand All @@ -43,10 +56,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()
{
}
Expand Down Expand Up @@ -87,6 +108,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;
Expand Down
25 changes: 19 additions & 6 deletions src/SB/Game/zNPCTypeDutchman.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "zNPCTypeSubBoss.h"
#include "zNPCGoalCommon.h"
#include "containers.h"
#include "xBehaviour.h"
#include "zNPCTypeCommon.h"

struct zNPCDutchman : zNPCSubBoss
{
Expand Down Expand Up @@ -80,19 +82,19 @@ 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;
F32 vel;
F32 accel;
F32 max_vel;
} turn;
move_info move;
move_info move; //0x2C8
struct
{
U8 moreFlags;
Expand Down Expand Up @@ -144,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;
Expand Down Expand Up @@ -244,6 +249,7 @@ struct zNPCGoalDutchmanFlame : zNPCGoalCommon
xVec2 move_dir;
U8 stopped;
zNPCDutchman& owner;
S32 Exit(float, void*);

static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info);
};
Expand All @@ -259,6 +265,7 @@ struct zNPCGoalDutchmanCaught : zNPCGoalCommon
{
U8 grabbed;
zNPCDutchman& owner;
S32 Exit(float, void*);

static xFactoryInst* create(S32 who, RyzMemGrow* grow, void* info);
};
Expand All @@ -271,6 +278,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
Expand Down
4 changes: 2 additions & 2 deletions src/SB/Game/zNPCTypeSubBoss.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down