zNPC related matches (#368)
Some checks failed
Build / build (GQPE78) (push) Failing after 1s
Build / website (push) Has been skipped

* zNPC related matches

* More stuff

* More things

* Slightly more stuff

* Last bits for now
This commit is contained in:
escape209 2024-09-20 12:19:31 +01:00 committed by GitHub
parent d9b1876dcc
commit 394551ddd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 1446 additions and 76 deletions

View File

@ -109,6 +109,7 @@ void xFXFireworksUpdate(F32 dt);
void xFXStreakInit();
void xFXStreakUpdate(F32 dt);
void xFXStreakRender();
void xFXStreakStop(U32);
void xFXShineInit();
void xFXShineUpdate(F32 dt);
void xFXShineRender();

View File

@ -37,6 +37,7 @@ struct xVec3
xVec3& invert();
F32 dot(const xVec3& c) const;
xVec3& normalize();
xVec3& assign(F32 val);
};
F32 xVec3Normalize(xVec3* o, const xVec3* v);

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,10 @@
class zNPCGoalNotice : public zNPCGoalPushAnim
{
public:
zNPCGoalNotice(S32);
zNPCGoalNotice(S32 id) : zNPCGoalPushAnim(id)
{
SetFlags(2);
}
};
void ROBO_PrepRoboCop();

View File

@ -271,7 +271,13 @@ class zNPCGoalAttackChuck : public zNPCGoalPushAnim
{
// total size: 0x58
public:
zNPCGoalAttackChuck(S32);
zNPCGoalAttackChuck(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
}
S32 BombzAway(F32);
S32 Exit(F32 dt, void* updCtxt);
S32 idx_launch; // offset 0x54, size 0x4
};
@ -279,21 +285,35 @@ class zNPCGoalLassoBase : public zNPCGoalCommon
{
// total size: 0x4C
public:
zNPCGoalLassoBase(S32);
zNPCGoalLassoBase(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(12);
}
S32 Exit(F32 dt, void* updCtxt);
};
class zNPCGoalLassoGrab : public zNPCGoalCommon
{
// total size: 0x4C
public:
zNPCGoalLassoGrab(S32);
zNPCGoalLassoGrab(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(2);
}
};
class zNPCGoalLassoThrow : public zNPCGoalCommon
{
// total size: 0x58
public:
zNPCGoalLassoThrow(S32);
zNPCGoalLassoThrow(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(2);
flg_npcgable |= 1;
}
S32 Exit(F32 dt, void* updCtxt);
S32 flg_throw; // offset 0x4C, size 0x4
S32 floorBounce; // offset 0x50, size 0x4
F32 tmr_colDelay; // offset 0x54, size 0x4
@ -303,7 +323,12 @@ class zNPCGoalAttackSlick : public zNPCGoalLoopAnim
{
// total size: 0x70
public:
zNPCGoalAttackSlick(S32);
zNPCGoalAttackSlick(S32 id) : zNPCGoalLoopAnim(id)
{
xGoal::SetFlags(6);
}
S32 FireOne(S32);
S32 idx_launch; // offset 0x6C, size 0x4
};
@ -311,7 +336,16 @@ class zNPCGoalAttackArfMelee : public zNPCGoalPushAnim
{
// total size: 0x64
public:
zNPCGoalAttackArfMelee(S32);
zNPCGoalAttackArfMelee(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(6);
}
S32 Enter(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
S32 FXStreakPrep();
void FXStreakDone();
U32 streakID[4]; // offset 0x54, size 0x10
};
@ -319,7 +353,14 @@ class zNPCGoalAttackArf : public zNPCGoalPushAnim
{
// total size: 0x58
public:
zNPCGoalAttackArf(S32);
zNPCGoalAttackArf(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(6);
}
S32 LaunchBone(F32 dt, S32 param_2);
S32 Exit(F32 dt, void* updCtxt);
S32 SetAttackMode(S32 a, S32 b);
S32 flg_attack; // offset 0x54, size 0x4
};
@ -384,34 +425,62 @@ class zNPCGoalEvilPat : public zNPCGoalCommon
{
// total size: 0x4C
public:
zNPCGoalEvilPat(S32);
zNPCGoalEvilPat(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(12);
}
S32 Enter(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
F32 GlyphStart();
void GlyphStop();
S32 NPCMessage(NPCMsg* mail);
S32 Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* scene);
S32 InputStun(NPCStunInfo* info);
};
class zNPCGoalPatCarry : public zNPCGoalCommon
{
// total size: 0x4C
public:
zNPCGoalPatCarry(S32);
zNPCGoalPatCarry(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(2);
}
};
class zNPCGoalStunned : public zNPCGoalCommon
{
// total size: 0x4C
public:
zNPCGoalStunned(S32);
zNPCGoalStunned(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(2);
}
S32 InputInfo(NPCStunInfo* info);
S32 Enter(F32 dt, void* updCtxt);
};
class zNPCGoalEvade : public zNPCGoalCommon
{
public:
zNPCGoalEvade(S32);
zNPCGoalEvade(S32 id) : zNPCGoalCommon(id)
{
SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
S32 flg_evade; // offset 0x4C, size 0x4
};
class zNPCGoalGoHome : public zNPCGoalCommon
{
public:
zNPCGoalGoHome(S32);
zNPCGoalGoHome(S32 id) : zNPCGoalCommon(id)
{
SetFlags(2);
}
};
enum en_slepatak
@ -436,7 +505,16 @@ class zNPCGoalAlertArf : public zNPCGoalCommon
{
// total size: 0x54
public:
zNPCGoalAlertArf(S32);
zNPCGoalAlertArf(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
xGoal::AddFlags(8);
flg_npcgauto &= 0xfffffff9;
}
S32 Enter(F32 dt, void* updCtxt);
S32 Resume(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
en_alertarf alertarf; // offset 0x4C, size 0x4
F32 tmr_reload; // offset 0x50, size 0x4
};
@ -455,7 +533,13 @@ class zNPCGoalAlertPuppy : public zNPCGoalCommon
{
// total size: 0x50
public:
zNPCGoalAlertPuppy(S32);
zNPCGoalAlertPuppy(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 Resume(F32 dt, void* updCtxt);
S32 Enter(F32 dt, void* updCtxt);
enum en_alertpuppy alertpup; // offset 0x4C, size 0x4
};
@ -463,7 +547,11 @@ class zNPCGoalAlertSleepy : public zNPCGoalCommon
{
// total size: 0x64
public:
zNPCGoalAlertSleepy(S32);
zNPCGoalAlertSleepy(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
xVec3 dir_attack; // offset 0x4C, size 0xC
S32 flg_attack; // offset 0x58, size 0x4
en_slepatak sleepattack; // offset 0x5C, size 0x4
@ -474,20 +562,31 @@ class zNPCGoalChase : public zNPCGoalCommon
{
// total size: 0x50
public:
zNPCGoalChase(S32);
zNPCGoalChase(S32 id) : zNPCGoalCommon(id)
{
SetFlags(2);
}
S32 flg_chase; // offset 0x4C, size 0x4
};
struct zNPCGoalTaunt : zNPCGoalLoopAnim
{
zNPCGoalTaunt(S32);
zNPCGoalTaunt(S32 id) : zNPCGoalLoopAnim(id)
{
SetFlags(2);
}
S32 Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn);
S32 Enter(F32 dt, void* updCtxt);
};
struct zNPCGoalPatThrow : zNPCGoalCommon
{
zNPCGoalPatThrow(S32);
zNPCGoalPatThrow(S32 id) : zNPCGoalCommon(id)
{
flg_npcgable = 1;
}
S32 Enter(F32 dt, void* updCtxt);
U8 CollReview(void*);
@ -510,7 +609,12 @@ class zNPCGoalAttackCQC : public zNPCGoalPushAnim
{
// total size: 0x64
public:
zNPCGoalAttackCQC(S32);
zNPCGoalAttackCQC(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
xVec3 dir_attack; // offset 0x54, size 0xC
S32 flg_attack; // offset 0x60, size 0x4
};
@ -522,7 +626,11 @@ struct zNPCGoalAlertSlick : zNPCGoalCommon
F32 tmr_reload;
xVec3 pos_corner;
zNPCGoalAlertSlick(S32);
zNPCGoalAlertSlick(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
void MoveCorner(F32 dt);
void GetInArena(F32 dt);
S32 NPCMessage(NPCMsg* mail);
@ -535,7 +643,16 @@ class zNPCGoalAlertTubelet : public zNPCGoalCommon
{
// total size: 0x5C
public:
zNPCGoalAlertTubelet(S32);
zNPCGoalAlertTubelet(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 PeteAttackBegin();
S32 Exit(F32 dt, void* updCtxt);
S32 Enter(F32 dt, void* updCtxt);
S32 Resume(F32 dt, void* updCtxt);
S32 PeteAttackBegin(F32 dt, void* updCtxt);
S32 flg_attack; // offset 0x4C, size 0x4
S32 cnt_nextlos; // offset 0x50, size 0x4
F32 len_laser; // offset 0x54, size 0x4
@ -552,7 +669,11 @@ struct zNPCGoalAlertChuck : zNPCGoalCommon
xVec3 dir_zoom;
F32 dst_zoom;
zNPCGoalAlertChuck(S32);
zNPCGoalAlertChuck(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 ZoomMove(F32 dt);
void GetInArena(F32 dt);
S32 Process(en_trantype* trantype, F32 dt, void* updCtxt);
@ -564,7 +685,14 @@ class zNPCGoalAlertMonsoon : public zNPCGoalCommon
{
// total size: 0x70
public:
zNPCGoalAlertMonsoon(S32);
zNPCGoalAlertMonsoon(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 Resume(F32 dt, void* updCtxt);
S32 Enter(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
xVec3 dir_attack; // offset 0x4C, size 0xC
S32 flg_attack; // offset 0x58, size 0x4
en_alertmony alertmony; // offset 0x5C, size 0x4
@ -576,7 +704,13 @@ class zNPCGoalAlertGlove : public zNPCGoalCommon
{
// total size: 0x84
public:
zNPCGoalAlertGlove(S32);
zNPCGoalAlertGlove(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
flg_npcgable |= 1;
}
S32 Suspend(F32 dt, void* updCtxt);
S32 Resume(F32 dt, void* updCtxt);
F32 tmr_attack; // offset 0x4C, size 0x4
F32 tmr_minAttack; // offset 0x50, size 0x4
xVec3 pos_began; // offset 0x54, size 0xC
@ -594,7 +728,11 @@ struct zNPCGoalAlertTarTar : zNPCGoalCommon
en_hoppy hoppy;
F32 tmr_reload;
zNPCGoalAlertTarTar(S32);
zNPCGoalAlertTarTar(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
void GetInArena(F32 dt);
S32 HoppyUpdate(en_trantype* trantype, F32 dt);
S32 NPCMessage(NPCMsg* mail);
@ -609,7 +747,11 @@ struct zNPCGoalAlertChomper : zNPCGoalCommon
xVec3 pos_evade;
F32 tmr_evade;
zNPCGoalAlertChomper(S32);
zNPCGoalAlertChomper(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 CheckSpot();
S32 MoveEvadePos(xVec3* pos, F32 dt);
S32 CalcEvadePos(xVec3* pos);
@ -623,7 +765,13 @@ class zNPCGoalAlertHammer : public zNPCGoalCommon
{
// total size: 0x58
public:
zNPCGoalAlertHammer(S32);
zNPCGoalAlertHammer(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 Enter(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
S32 flg_attack; // offset 0x4C, size 0x4
en_alertham alertham; // offset 0x50, size 0x4
F32 tmr_alertham; // offset 0x54, size 0x4
@ -641,33 +789,35 @@ struct zNPCGoalAlertFodBzzt : zNPCGoalCommon
RwRGBA rgba_deathRay;
S32 cnt_inContact;
zNPCGoalAlertFodBzzt(S32);
zNPCGoalAlertFodBzzt(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
void DeathRayRender();
void DeathRayUpdate(F32 dt);
void OrbitPlayer(F32 dt);
S32 Process(en_trantype* trantype, F32 dt, void* updCtxt);
S32 Resume(F32 dt, void* updCtxt);
S32 Suspend();
S32 Exit();
S32 Suspend(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
S32 Enter(F32 dt, void* updCtxt);
void GetInArena(F32 dt);
void ToggleOrbit();
};
struct zNPCGoalAttackFodder;
struct CattleNotify : HAZNotify
{
zNPCGoalAttackFodder* goal;
CattleNotify(S32 myType);
S32 Notify(en_haznote note);
};
class zNPCGoalAttackMonsoon : public zNPCGoalPushAnim
{
// total size: 0x58
public:
zNPCGoalAttackMonsoon(S32);
zNPCGoalAttackMonsoon(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
S32 idx_launch; // offset 0x54, size 0x4
};
@ -675,7 +825,12 @@ class zNPCGoalAttackTarTar : public zNPCGoalPushAnim
{
// total size: 0x68
public:
zNPCGoalAttackTarTar(S32);
zNPCGoalAttackTarTar(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
S32 flg_attack; // offset 0x54, size 0x4
S32 idx_launch; // offset 0x58, size 0x4
xVec3 pos_aimbase; // offset 0x5C, size 0xC
@ -685,27 +840,59 @@ class zNPCGoalAttackHammer : public zNPCGoalPushAnim
{
// total size: 0x78
public:
zNPCGoalAttackHammer(S32);
zNPCGoalAttackHammer(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
}
void ModifyAnimSpeed();
S32 Exit(F32 dt, void* updCtxt);
S32 FXStreakPrep();
S32 FXStreakDone();
void TellBunnies();
S32 Enter(F32 dt, void* updCtxt);
S32 flg_attack; // offset 0x54, size 0x4
xVec3 pos_lastVert; // offset 0x58, size 0xC
xVec3 pos_oldVert; // offset 0x64, size 0xC
U32 streakID[2]; // offset 0x70, size 0x8
};
class zNPCGoalAttackChomper : public zNPCGoalPushAnim
{
// total size: 0x54
public:
zNPCGoalAttackChomper(S32);
zNPCGoalAttackChomper(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
};
struct zNPCGoalAttackFodder : zNPCGoalPushAnim
{
struct CattleNotify : HAZNotify
{
zNPCGoalAttackFodder* goal;
CattleNotify()
{
}
S32 Notify(en_haznote note, NPCHazard*);
};
xVec3 dir_attack;
S32 flg_attack;
CattleNotify cbNotify;
NPCHazard* haz_cattle; // 0x6C
zNPCGoalAttackFodder(S32);
zNPCGoalAttackFodder(S32 id) : zNPCGoalPushAnim(id), cbNotify()
{
xGoal::SetFlags(2);
}
S32 Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn);
S32 Exit(F32 dt, void* updCtxt);
S32 Enter(F32 dt, void* updCtxt);
@ -716,7 +903,13 @@ class zNPCGoalAlert : public zNPCGoalCommon
{
// total size: 0x50
public:
zNPCGoalAlert(S32);
zNPCGoalAlert(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(0x0000C);
xGoal::AddFlags(0x20000);
flg_npcgauto &= 0xfffffff9;
}
S32 flg_alert; // offset 0x4C, size 0x4
};
@ -724,7 +917,12 @@ class zNPCGoalAlertFodBomb : public zNPCGoalCommon
{
// total size: 0x5C
public:
zNPCGoalAlertFodBomb(S32);
zNPCGoalAlertFodBomb(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 Resume(F32 dt, void* updCtxt);
S32 flg_attack; // offset 0x4C, size 0x4
en_alertbomb alertbomb; // offset 0x50, size 0x4
F32 tmr_nextping; // offset 0x54, size 0x4
@ -734,7 +932,11 @@ public:
class zNPCGoalAlertFodder : public zNPCGoalCommon
{
public:
zNPCGoalAlertFodder(S32);
zNPCGoalAlertFodder(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(6);
}
S32 flg_attack; // offset 0x4C, size 0x4
en_alertfod alertfod; // offset 0x50, size 0x4
F32 tmr_alertfod; // offset 0x54, size 0x4
@ -755,7 +957,12 @@ struct zNPCGoalDogLaunch : zNPCGoalCommon
xParabola parabinfo;
F32 tmr_remain;
zNPCGoalDogLaunch(S32);
zNPCGoalDogLaunch(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(2);
flg_npcgable = 1;
}
void BubTrailCone(xVec3* pos, S32 num, xVec3* pos_rand, xVec3* vel_rand, xMat3x3* mat);
S32 BallisticUpdate(F32 dt);
void PreCollide();
@ -770,14 +977,23 @@ class zNPCGoalDogBark : public zNPCGoalLoopAnim
{
// total size: 0x6C
public:
zNPCGoalDogBark(S32);
zNPCGoalDogBark(S32 id) : zNPCGoalLoopAnim(id)
{
xGoal::SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
};
class zNPCGoalDamage : public zNPCGoalCommon
{
// total size: 0x50
public:
zNPCGoalDamage(S32);
zNPCGoalDamage(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(12);
}
S32 NPCMessage(NPCMsg*);
S32 flg_howtodie; // offset 0x4C, size 0x4
};
@ -785,14 +1001,22 @@ class zNPCGoalBashed : public zNPCGoalLoopAnim
{
// total size: 0x6C
public:
zNPCGoalBashed(S32);
zNPCGoalBashed(S32 id) : zNPCGoalLoopAnim(id)
{
xGoal::SetFlags(2);
}
S32 Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* scene);
};
class zNPCGoalAfterlife : public zNPCGoalDead
{
// total size: 0x54
public:
zNPCGoalAfterlife(S32);
zNPCGoalAfterlife(S32 id) : zNPCGoalDead(id)
{
SetFlags(12);
}
};
class NPCBullseye
@ -816,21 +1040,37 @@ class zNPCGoalTubeLasso : public zNPCGoalCommon
{
// total size: 0x4C
public:
zNPCGoalTubeLasso(S32);
zNPCGoalTubeLasso(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(4);
}
S32 Enter(F32 dt, void* updCtxt);
void ChkPrelimTran(en_trantype* trantype, int* nextgoal);
};
class zNPCGoalTubeDead : public zNPCGoalDead
{
// total size: 0x54
public:
zNPCGoalTubeDead(S32);
zNPCGoalTubeDead(S32 id) : zNPCGoalDead(id)
{
}
void ChkPrelimTran(en_trantype*, int*);
};
class zNPCGoalTubeDying : public zNPCGoalCommon
{
// total size: 0x6C
public:
zNPCGoalTubeDying(S32);
zNPCGoalTubeDying(S32 id) : zNPCGoalCommon(id)
{
}
S32 DeathByLasso(const xVec3*);
S32 flg_tubedying; // offset 0x4C, size 0x4
F32 spd_gothatway; // offset 0x50, size 0x4
S32 cnt_loop; // offset 0x54, size 0x4
@ -843,7 +1083,11 @@ class zNPCGoalTubeBonked : public zNPCGoalCommon
{
// total size: 0x60
public:
zNPCGoalTubeBonked(S32);
zNPCGoalTubeBonked(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(2);
}
F32 tmr_recover; // offset 0x4C, size 0x4
F32 ang_spinrate; // offset 0x50, size 0x4
xVec3 vec_offsetPete; // offset 0x54, size 0xC
@ -852,7 +1096,13 @@ public:
class zNPCGoalTubeBirth : public zNPCGoalCommon
{
public:
zNPCGoalTubeBirth(S32);
zNPCGoalTubeBirth(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(4);
}
S32 Enter(F32 dt, void* updCtxt);
void ChkPrelimTran(en_trantype* trantype, int* nextgoal);
// total size: 0x4C
};
@ -860,7 +1110,18 @@ class zNPCGoalTubeAttack : public zNPCGoalCommon
{
// total size: 0x84
public:
zNPCGoalTubeAttack(S32);
zNPCGoalTubeAttack(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(4);
}
void AttackDataReset();
S32 Enter(F32 dt, void* updCtxt);
S32 Resume(F32 dt, void* updCtxt);
S32 LaserRender();
void MaryzBlessing();
S32 MarySpinDown(F32 dt);
void ChkPrelimTran(en_trantype* trantype, int* nextgoal);
S32 flg_attack; // offset 0x4C, size 0x4
union
{
@ -889,7 +1150,13 @@ class zNPCGoalTubeDuckling : public zNPCGoalCommon
{
// total size: 0x70
public:
zNPCGoalTubeDuckling(S32);
zNPCGoalTubeDuckling(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(4);
}
void ChkPrelimTran(en_trantype* trantype, int* nextgoal);
S32 flg_duckling; // offset 0x4C, size 0x4
F32 tmr_running; // offset 0x50, size 0x4
F32 tmr_hoverCycle; // offset 0x54, size 0x4
@ -903,14 +1170,25 @@ class zNPCGoalTubePal : public zNPCGoalCommon
{
// total size: 0x4C
public:
zNPCGoalTubePal(S32);
zNPCGoalTubePal(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(0x0000C);
xGoal::AddFlags(0x20000);
flg_npcgauto &= 0xfffffff9;
}
void ChkPrelimTran(en_trantype* trantype, int* nextgoal);
};
class zNPCGoalDeflate : public zNPCGoalCommon
{
// total size: 0x58
public:
zNPCGoalDeflate(S32);
zNPCGoalDeflate(S32 id) : zNPCGoalCommon(id)
{
SetFlags(2);
}
F32 spd_gothatway; // offset 0x4C, size 0x4
S32 cnt_loop; // offset 0x50, size 0x4
F32 scl_shrink; // offset 0x54, size 0x4
@ -920,7 +1198,12 @@ class zNPCGoalRespawn : public zNPCGoalCommon
{
// total size: 0x64
public:
zNPCGoalRespawn(S32);
zNPCGoalRespawn(S32 id) : zNPCGoalCommon(id)
{
SetFlags(2);
}
S32 InputInfo(NPCSpawnInfo* info);
F32 tmr_respawn; // offset 0x4C, size 0x4
F32 tmr_robobits; // offset 0x50, size 0x4
S32 cnt_ring; // offset 0x54, size 0x4
@ -931,7 +1214,15 @@ class zNPCGoalKnock : public zNPCGoalCommon
{
// total size: 0x64
public:
zNPCGoalKnock(S32);
zNPCGoalKnock(S32 id) : zNPCGoalCommon(id)
{
SetFlags(2);
flg_npcgable |= 1;
}
void StreakDone();
S32 StreakPrep();
S32 Exit(F32 dt, void* updCtxt);
S32 flg_knock; // offset 0x4C, size 0x4
xVec3 pos_bumper; // offset 0x50, size 0xC
S32 floorBounce; // offset 0x5C, size 0x4
@ -942,7 +1233,13 @@ class zNPCGoalWound : public zNPCGoalPushAnim
{
// total size: 0x64
public:
zNPCGoalWound(S32);
zNPCGoalWound(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
flg_npcgable |= 1;
}
S32 NPCMessage(NPCMsg*);
xVec3 dir_fling; // offset 0x54, size 0xC
S32 flg_knock; // offset 0x60, size 0x4
};
@ -951,7 +1248,12 @@ class zNPCGoalHokeyPokey : public zNPCGoalLoopAnim
{
// total size: 0x74
public:
zNPCGoalHokeyPokey(S32);
zNPCGoalHokeyPokey(S32 id) : zNPCGoalLoopAnim(id)
{
xGoal::SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
S32 flg_hokey; // offset 0x6C, size 0x4
F32 ang_spinrate; // offset 0x70, size 0x4
};
@ -960,7 +1262,12 @@ class zNPCGoalTeleport : public zNPCGoalCommon
{
// total size: 0x50
public:
zNPCGoalTeleport(S32);
zNPCGoalTeleport(S32 id) : zNPCGoalCommon(id)
{
xGoal::SetFlags(2);
}
S32 NPCMessage(NPCMsg* msg);
F32 tmr_countdown; // offset 0x4C, size 0x4
};
@ -968,14 +1275,27 @@ class zNPCGoalDogPounce : public zNPCGoalPushAnim
{
// total size: 0x54
public:
zNPCGoalDogPounce(S32);
zNPCGoalDogPounce(S32 id) : zNPCGoalPushAnim(id)
{
xGoal::SetFlags(2);
}
S32 NPCMessage(NPCMsg* mail);
S32 Enter(F32 dt, void* updCtxt);
S32 Exit(F32 dt, void* updCtxt);
void Detonate();
};
class zNPCGoalDogDash : public zNPCGoalLoopAnim
{
// total size: 0x6C
public:
zNPCGoalDogDash(S32);
zNPCGoalDogDash(S32 id) : zNPCGoalLoopAnim(id)
{
xGoal::SetFlags(2);
}
S32 Enter(F32 dt, void* updCtxt);
};
xFactoryInst* GOALCreate_Standard(S32 who, RyzMemGrow* grow, void*);

View File

@ -116,6 +116,7 @@ void NPCC_ShadowCacheReset();
void NPAR_Timestep(F32 dt);
void NPCC_MakeStreakInfo(en_npcstreak styp, StreakInfo* info);
void xFXStreakStart(en_npcstreak* styp);
S32 NPCC_StreakCreate(en_npcstreak styp);
void UpdateAndRender(NPARMgmt param_1, F32 dt);
F32 BOWL3(F32 param_1);
F32 QUB(F32 param_1);

View File

@ -15,6 +15,16 @@ enum en_npctgt
NPC_TGT_FORCEINT = 0x7fffffff
};
enum _tageNPCSnd
{
eNPCSnd_GloveAttack,
eNPCSnd_SleepyAttack,
eNPCSnd_TubeAttack,
eNPCSnd_FodBzztAttack,
eNPCSnd_JellyfishAttack,
eNPCSnd_Total
};
struct NPCTarget
{
en_npctgt typ_target;
@ -48,5 +58,7 @@ 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_ds2_toCam(const xVec3* pos_from, xVec3* delta);
void zNPC_SNDStop(_tageNPCSnd snd);
void zNPC_SNDPlay3D(_tageNPCSnd snd, xEnt*);
#endif

View File

@ -407,9 +407,11 @@ struct zNPCCommon : xNPCBasic
void ModelScaleSet(F32 x, F32 y, F32 z);
void ModelScaleSet(F32 unk);
void ModelScaleSet(const xVec3* vec);
xModelInstance* ModelAtomicHide(int index, xModelInstance* mdl);
S32 AnimStart(U32 animID, S32 forceRestart);
xAnimState* AnimFindState(U32 animID);
xAnimState* AnimCurState();
xAnimSingle* AnimCurSingle();
U32 AnimCurStateID();
void GiveReward();
S32 SndPlayFromSFX(xSFX* sfx, U32* sid_played);

View File

@ -27,6 +27,7 @@ struct NPCArena
F32 DstSqFromHome(xVec3* pos, xVec3* delt);
F32 PctFromHome(xVec3* pos);
S32 IncludesPos(xVec3* pos, F32 rad_thresh, xVec3* vec);
void IncludesNPC(zNPCCommon*, float, xVec3*);
F32 Radius(F32 unk);
xVec3* Pos();
S32 IncludesPlayer(F32 rad_thresh, xVec3* vec);
@ -44,6 +45,7 @@ struct NPCLaser
void ColorSet(const RwRGBA*, const RwRGBA*);
U32 TextureGet();
static void Render(xVec3&, xVec3&);
};
struct NPCBattle
@ -171,6 +173,8 @@ struct zNPCFodBomb : zNPCRobot
struct zNPCFodBzzt : zNPCRobot
{
volatile static S32 cnt_alerthokey;
RwRGBA rgba_discoLight;
F32 tmr_discoLight;
xVec3 pos_discoLight;
@ -178,6 +182,7 @@ struct zNPCFodBzzt : zNPCRobot
zNPCFodBzzt(S32 myType);
zNPCLassoInfo* PRIV_GetLassoData();
void DiscoReset();
};
struct zNPCChomper : zNPCRobot
@ -358,6 +363,8 @@ enum en_tubespot
struct zNPCTubeSlave : zNPCRobot
{
static NPCLaser laser;
en_tubespot tubespot;
zNPCTubelet* tub_pete;