En_Kaizoku and object_kz documented: the pirate fighter miniboss (#1788)

* Kaizoku: some docs

* Kaizoku: more docs

* Kaizoku: more docs

* Kaizoku: all object labeled

* Kaizoku: more docs

* More docs

* Kaizoku: more docs

* Kaizoku: more docs

* Kaizoku: more docs

* Kaizoku: first pass complete

* format

* Kaizoku: minor tweaks

* Kaizoku: Anghelos requested changes pass1

* Kaizoku: minor docs

* Kaizoku: get'n't

* Kaizoku: format

* Apply suggestions from code review

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Kaizoku: back to OK

* Kaizoku: more requested changes

* Kaizoku: outfit and lipstick color enums

* Kaizoku: rename object assets from gKaizoku to gFighterPirate

* Kaizoku: LIMB_FULL

* Kaizoku: some requested changes

* Kaizoku: more requested changes

* Apply suggestions from code review

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Kaizoku: back to matching

* Kaizoku: requested changes

* Kaizoku: missed change

* Apply suggestions from code review

Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>

* Kaizoku: back to matching and more requested changes

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>
This commit is contained in:
Isghj
2025-02-26 16:59:58 -08:00
committed by GitHub
parent 679ae89099
commit fde2b78a92
6 changed files with 981 additions and 926 deletions
File diff suppressed because it is too large Load Diff
@@ -12,29 +12,32 @@ typedef void (*EnKaizokuActionFunc)(struct EnKaizoku*, PlayState*);
#define KAIZOKU_GET_EXIT_INDEX(thisx) ((thisx)->params & 0x3F)
#define KAIZOKU_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 6) & 0x7F)
// used for text and for outfit color
#define KAIZOKU_GET_TYPE(this) ((this)->picto.actor.world.rot.z)
#define KAIZOKU_SWITCH_FLAG_NONE 0x7F
typedef enum EnKaizokuAnimation {
/* 0 */ EN_KAIZOKU_ANIM_0,
/* 1 */ EN_KAIZOKU_ANIM_1,
/* 2 */ EN_KAIZOKU_ANIM_2,
/* 3 */ EN_KAIZOKU_ANIM_3,
/* 4 */ EN_KAIZOKU_ANIM_4,
/* 5 */ EN_KAIZOKU_ANIM_5,
/* 6 */ EN_KAIZOKU_ANIM_6,
/* 7 */ EN_KAIZOKU_ANIM_7,
/* 8 */ EN_KAIZOKU_ANIM_8,
/* 9 */ EN_KAIZOKU_ANIM_9,
/* 10 */ EN_KAIZOKU_ANIM_10,
/* 11 */ EN_KAIZOKU_ANIM_11,
/* 12 */ EN_KAIZOKU_ANIM_12,
/* 13 */ EN_KAIZOKU_ANIM_13,
/* 14 */ EN_KAIZOKU_ANIM_14,
/* 15 */ EN_KAIZOKU_ANIM_15,
/* 16 */ EN_KAIZOKU_ANIM_16,
/* 17 */ EN_KAIZOKU_ANIM_17,
/* 18 */ EN_KAIZOKU_ANIM_18,
/* 19 */ EN_KAIZOKU_ANIM_MAX
/* 0 */ KAIZOKU_ANIM_FIGHTING_IDLE,
/* 1 */ KAIZOKU_ANIM_UNUSED_CONVERSATION, // from OOT: giving player membership card
/* 2 */ KAIZOKU_ANIM_UNUSED_JUMP, // from OOT: when the enemy would escape by jumping up
/* 3 */ KAIZOKU_ANIM_SIDESTEP,
/* 4 */ KAIZOKU_ANIM_WALK,
/* 5 */ KAIZOKU_ANIM_DAMAGE,
/* 6 */ KAIZOKU_ANIM_UNUSED_DEFEAT, // from OOT: replaced with KAIZOKU_ANIM_DEFEAT
/* 7 */ KAIZOKU_ANIM_BLOCK,
/* 8 */ KAIZOKU_ANIM_FLIP,
/* 9 */ KAIZOKU_ANIM_SLASH_ATTCK,
/* 10 */ KAIZOKU_ANIM_SPIN_ATTACK,
/* 11 */ KAIZOKU_ANIM_LAND,
/* 12 */ KAIZOKU_ANIM_CHALLENGE,
/* 13 */ KAIZOKU_ANIM_UNSHEATHE,
/* 14 */ KAIZOKU_ANIM_LOWER_WEAPONS,
/* 15 */ KAIZOKU_ANIM_DEMONSTRATIVE_SWORD_SWING,
/* 16 */ KAIZOKU_ANIM_DEFEAT,
/* 17 */ KAIZOKU_ANIM_DEFEAT_IDLE,
/* 18 */ KAIZOKU_ANIM_THROW_FLASH,
/* 19 */ KAIZOKU_ANIM_MAX
} EnKaizokuAnimation;
typedef enum EnKaizokuBodyPart {
@@ -56,6 +59,13 @@ typedef enum EnKaizokuBodyPart {
/* 15 */ KAIZOKU_BODYPART_MAX
} EnKaizokuBodyPart;
typedef enum KaizokuTextOffset {
/* 0 */ KAIZOKU_TALK_SHOUT_FROM_ABOVE, // shout before landing
/* 1 */ KAIZOKU_TALK_INTRO, // after landing
/* 2 */ KAIZOKU_TALK_PLAYER_VICTORY, // after losing to player
/* 3 */ KAIZOKU_TALK_PLAYER_DEFEAT // after defeating player
} KaizokuTextOffset;
typedef struct EnKaizoku {
/* 0x000 */ PictoActor picto;
/* 0x148 */ SkelAnime skelAnime;
@@ -63,36 +73,35 @@ typedef struct EnKaizoku {
/* 0x21C */ Vec3s morphTable[KAIZOKU_LIMB_MAX];
/* 0x2AC */ EnKaizokuActionFunc actionFunc;
/* 0x2B0 */ s16 action;
/* 0x2B2 */ s16 unk_2B2;
/* 0x2B2 */ s16 combatTimer;
/* 0x2B4 */ s16 lookTimer;
/* 0x2B6 */ s16 unk_2B6;
/* 0x2B8 */ s16 unk_2B8;
/* 0x2B6 */ s16 iceTimer;
/* 0x2B8 */ s16 drawDmgEffTimer;
/* 0x2BA */ s16 drawDmgEffType;
/* 0x2BC */ s16 switchFlag;
/* 0x2BE */ s16 unk_2BE;
/* 0x2C0 */ f32 drawDmgEffScale;
/* 0x2C4 */ f32 drawDmgEffFrozenSteamScale;
/* 0x2C8 */ s16 unk_2C8;
/* 0x2CA */ s16 unk_2CA;
/* 0x2C8 */ s16 textIdOffset; // which of the 4 text states during interaction
/* 0x2CA */ s16 textType;
/* 0x2CC */ s16 eyeIndex;
/* 0x2CE */ s16 blinkTimer;
/* 0x2D0 */ s16 unk_2D0;
/* 0x2D0 */ s16 spinAttackState;
/* 0x2D2 */ s16 swordState;
/* 0x2D4 */ s16 exitIndex;
/* 0x2D6 */ s16 csId;
/* 0x2D8 */ u8 unk_2D8;
/* 0x2D9 */ u8 unk_2D9;
/* 0x2D8 */ u8 animationsDisabled;
/* 0x2D9 */ u8 defeatBreathingStarted;
/* 0x2DC */ f32 animEndFrame;
/* 0x2E0 */ f32 unk_2E0;
/* 0x2E0 */ f32 circlingRate;
/* 0x2E4 */ EnKaizokuAnimation animIndex;
/* 0x2E8 */ s32 bodyPartIndex;
/* 0x2EC */ s32 unk_2EC;
/* 0x2F0 */ f32 unk_2F0;
/* 0x2F4 */ s16 unk_2F4;
/* 0x2F8 */ Vec3f unk_2F8;
/* 0x304 */ Vec3f unk_304;
/* 0x2EC */ s32 colorType;
/* 0x2F0 */ f32 boyoBounceVelocity;
/* 0x2F4 */ s16 boyoBounceAngle;
/* 0x2F8 */ Vec3f swordScaleRight;
/* 0x304 */ Vec3f swordScaleLeft;
/* 0x310 */ Vec3f bodyPartsPos[KAIZOKU_BODYPART_MAX];
/* 0x3C4 */ Vec3f unk_3C4;
/* 0x3C4 */ Vec3f velocity;
/* 0x3D0 */ s32 blureIndex;
/* 0x3D4 */ ColliderCylinder bodyCollider;
/* 0x420 */ ColliderQuad swordCollider;
@@ -101,20 +110,19 @@ typedef struct EnKaizoku {
/* 0x578 */ Vec3s headRot;
/* 0x580 */ Vec3f rightFootPos;
/* 0x58C */ Vec3f leftFootPos;
/* 0x598 */ s32 unk_598;
/* 0x59C */ s16 unk_59C;
/* 0x598 */ s32 cutsceneTimer;
/* 0x59C */ s16 cutsceneState;
/* 0x59E */ s16 subCamId;
/* 0x5A0 */ s16 unk_5A0;
/* 0x5A2 */ s16 unk_5A2;
/* 0x5A0 */ s16 flashTimer;
/* 0x5A4 */ Vec3f subCamEye;
/* 0x5B0 */ Vec3f subCamAt;
/* 0x5BC */ Vec3f subCamUp;
/* 0x5C8 */ Vec3f unk_5C8;
/* 0x5D4 */ Vec3f unk_5D4;
/* 0x5E0 */ f32 unk_5E0;
/* 0x5E4 */ f32 unk_5E4;
/* 0x5E8 */ f32 unk_5E8;
/* 0x5EC */ f32 unk_5EC;
/* 0x5C8 */ Vec3f subCamEyeTarget;
/* 0x5D4 */ Vec3f subCamAtTarget;
/* 0x5E0 */ f32 subCamVelocity;
/* 0x5E4 */ f32 unk_5E4; // unused
/* 0x5E8 */ f32 flashScreenAlpha;
/* 0x5EC */ f32 flashScreenAlphaTarget;
} EnKaizoku; // size = 0x5F0
#endif // Z_EN_KAIZOKU_H
@@ -100,8 +100,8 @@ void ObjBoyo_PushPlayer(ObjBoyo* this, Actor* actor) {
void ObjBoyo_PushPirate(ObjBoyo* this, Actor* actor) {
EnKaizoku* kaizoku = (EnKaizoku*)actor;
kaizoku->unk_2F0 = 30.0f;
kaizoku->unk_2F4 = Actor_WorldYawTowardActor(&this->actor, &kaizoku->picto.actor);
kaizoku->boyoBounceVelocity = 30.0f;
kaizoku->boyoBounceAngle = Actor_WorldYawTowardActor(&this->actor, &kaizoku->picto.actor);
}
void ObjBoyo_ExplodeBomb(ObjBoyo* this, Actor* actor) {