Skip to content

Commit

Permalink
reformat tiki
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbruv committed Jun 22, 2024
1 parent 8c70423 commit 775cc52
Showing 1 changed file with 21 additions and 108 deletions.
129 changes: 21 additions & 108 deletions src/SB/Game/zNPCTypeTiki.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#define ANIM_COUNT 2

extern const char* g_strz_tikianim[ANIM_COUNT];
extern const char *g_strz_tikianim[ANIM_COUNT];
extern uint32 g_hash_tikianim[ANIM_COUNT];
extern zParEmitter* cloudEmitter;
extern zParEmitter *cloudEmitter;
extern xParEmitterCustomSettings thunderEmitterInfo;
extern char zNPCTypeTiki_stringBase0[];
extern float32 _862;
Expand All @@ -32,12 +32,6 @@ void ZNPC_Tiki_Shutdown()
{
}







/* need to do more of this
void zNPCTiki_InitFX(zScene* scene)
{
Expand All @@ -57,21 +51,9 @@ void zNPCTiki_InitFX(zScene* scene)
}
*/













xFactoryInst* ZNPC_Create_Tiki(int32 who, RyzMemGrow* grow, void*)
xFactoryInst *ZNPC_Create_Tiki(int32 who, RyzMemGrow *grow, void *)
{
zNPCTiki* tiki = NULL;
zNPCTiki *tiki = NULL;

switch (who)
{
Expand All @@ -94,29 +76,33 @@ xFactoryInst* ZNPC_Create_Tiki(int32 who, RyzMemGrow* grow, void*)
return tiki;
}

void ZNPC_Destroy_Tiki(xFactoryInst* inst)
void ZNPC_Destroy_Tiki(xFactoryInst *inst)
{
delete inst;
}

xAnimTable* ZNPC_AnimTable_Tiki()
xAnimTable *ZNPC_AnimTable_Tiki()
{
xAnimTable* table;
xAnimTable *table;

table = xAnimTableNew(zNPCTypeTiki_stringBase0 + 0x3a, NULL, 0);
xAnimTableNewState(table, g_strz_tikianim[1], 0x110, 1, _862, NULL, NULL, _858_2, NULL, NULL,
xAnimDefaultBeforeEnter, NULL, NULL);
return table;
}

void zNPCTiki::Damage(en_NPC_DAMAGE_TYPE damtype, xBase *who, const xVec3 *vec_hit)
{
}

void zNPCTiki::Reset()
{
zNPCCommon::Reset();

xVec3Add((xVec3*)&bound.sph.r, (xVec3*)&origLocalBound.sph.r, (xVec3*)&model->Mat->pos);
xVec3Add((xVec3*)&bound.box.box.lower, (xVec3*)&origLocalBound.box.box.lower,
(xVec3*)&model->Mat->pos);
xVec3Add((xVec3*)&bound.pad[3], (xVec3*)&origLocalBound.pad[3], (xVec3*)&model->Mat->pos);
xVec3Add((xVec3 *)&bound.sph.r, (xVec3 *)&origLocalBound.sph.r, (xVec3 *)&model->Mat->pos);
xVec3Add((xVec3 *)&bound.box.box.lower, (xVec3 *)&origLocalBound.box.box.lower,
(xVec3 *)&model->Mat->pos);
xVec3Add((xVec3 *)&bound.pad[3], (xVec3 *)&origLocalBound.pad[3], (xVec3 *)&model->Mat->pos);

xNPCBasic::RestoreColFlags();

Expand Down Expand Up @@ -154,7 +140,7 @@ void zNPCTiki::Reset()
t1 = _858_2;
t2 = _1084;
t3 = _1084;
xVec3Copy((xVec3*)&v1, (xVec3*)&model->Mat->pos);
xVec3Copy((xVec3 *)&v1, (xVec3 *)&model->Mat->pos);
break;
case 0x4e545433:
t1 = xurand();
Expand All @@ -175,96 +161,23 @@ void zNPCTiki::Setup()
{
zNPCCommon::Setup();

xVec3Copy((xVec3*)&lastAt, (xVec3*)&model->Mat->at);
xVec3Copy((xVec3 *)&lastAt, (xVec3 *)&model->Mat->at);
}














void zNPCTiki::ParseINI()
{
zNPCCommon::ParseINI();
cfg_npc->snd_traxShare = g_sndTrax_TikiShared;
NPCS_SndTablePrepare((NPCSndTrax*)&g_sndTrax_TikiShared);
NPCS_SndTablePrepare((NPCSndTrax *)&g_sndTrax_TikiShared);
switch (xNPCBasic::SelfType())
{
case 'NTT3':
cfg_npc->snd_trax = g_sndTrax_TikiThunder;
NPCS_SndTablePrepare((NPCSndTrax*)&g_sndTrax_TikiThunder);
NPCS_SndTablePrepare((NPCSndTrax *)&g_sndTrax_TikiThunder);
break;
}
}





























































int32 zNPCTiki::CanRope()
{
return 1;
Expand All @@ -275,11 +188,11 @@ void AnimPick()
xStrHash(zNPCTypeTiki_stringBase0 + 0x51);
}

void zNPCTiki::Move(xScene* xscn, float32 dt, xEntFrame*)
void zNPCTiki::Move(xScene *xscn, float32 dt, xEntFrame *)
{
}

void zNPCTiki::BUpdate(xVec3* pos)
void zNPCTiki::BUpdate(xVec3 *pos)
{
xEntDefaultBoundUpdate(this, pos);
}
Expand Down

0 comments on commit 775cc52

Please sign in to comment.