Body Parts Docs (#1333)

* body parts WIP

* continue WIP

* finish body parts

* cleanup

* missed one

* Missed Enum

* PR Review

* next PR review

* s32 cast

* TRUNCF_BINANG

* rm unnecessary shadow

* PR Review

* missed some

* oops
This commit is contained in:
engineer124
2023-08-15 00:08:45 +10:00
committed by GitHub
parent 05c2221769
commit affb1eaf0f
132 changed files with 2563 additions and 1243 deletions
+2 -2
View File
@@ -657,8 +657,8 @@ void func_800BE504(Actor* actor, ColliderCylinder* collider);
void func_800BE568(Actor* actor, ColliderSphere* collider);
void func_800BE5CC(Actor* actor, ColliderJntSph* collider, s32 colliderIndex);
s32 Actor_IsSmallChest(struct EnBox* chest);
void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f limbPos[], s16 limbPosCount, f32 effectScale, f32 frozenSteamScale, f32 effectAlpha, u8 type);
void Actor_SpawnIceEffects(PlayState* play, Actor* actor, Vec3f limbPos[], s32 limbPosCount, s32 effectsPerLimb, f32 scale, f32 scaleRange);
void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[], s16 bodyPartsCount, f32 effectScale, f32 frozenSteamScale, f32 effectAlpha, u8 type);
void Actor_SpawnIceEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[], s32 bodyPartsCount, s32 effectsPerBodyPart, f32 scale, f32 scaleRange);
void ActorOverlayTable_FaultClient(void* arg0, void* arg1);
uintptr_t ActorOverlayTable_FaultAddrConv(uintptr_t address, void* param);
+1
View File
@@ -12,6 +12,7 @@ struct SkelAnime;
struct PlayerAnimationFrame;
#define LIMB_DONE 0xFF
#define BODYPART_NONE -1
#define ANIM_FLAG_1 (1 << 0)
#define ANIM_FLAG_UPDATE_Y (1 << 1)
+43 -4
View File
@@ -6,7 +6,27 @@
struct EnHy;
#define ENHY_LIMB_MAX 16
//! @note: any actor that uses the EnHy system should
//! have a skeleton that aligns with the enum below.
typedef enum EnHyLimb {
/* 0x00 */ ENHY_LIMB_NONE,
/* 0x01 */ ENHY_LIMB_PELVIS,
/* 0x02 */ ENHY_LIMB_LEFT_THIGH,
/* 0x03 */ ENHY_LIMB_LEFT_SHIN,
/* 0x04 */ ENHY_LIMB_LEFT_FOOT,
/* 0x05 */ ENHY_LIMB_RIGHT_THIGH,
/* 0x06 */ ENHY_LIMB_RIGHT_SHIN,
/* 0x07 */ ENHY_LIMB_RIGHT_FOOT,
/* 0x08 */ ENHY_LIMB_TORSO,
/* 0x09 */ ENHY_LIMB_LEFT_UPPER_ARM,
/* 0x0A */ ENHY_LIMB_LEFT_FOREARM,
/* 0x0B */ ENHY_LIMB_LEFT_HAND,
/* 0x0C */ ENHY_LIMB_RIGHT_UPPER_ARM,
/* 0x0D */ ENHY_LIMB_RIGHT_FOREARM,
/* 0x0E */ ENHY_LIMB_RIGHT_HAND,
/* 0x0F */ ENHY_LIMB_HEAD,
/* 0x10 */ ENHY_LIMB_MAX
} EnHyLimb;
//! TODO: Better animaion enum names when animations are documented
typedef enum {
@@ -36,6 +56,25 @@ typedef enum {
typedef void (*EnHyActionFunc)(struct EnHy*, PlayState*);
typedef enum EnHyBodyPart {
/* 0 */ ENHY_BODYPART_0,
/* 1 */ ENHY_BODYPART_1,
/* 2 */ ENHY_BODYPART_2,
/* 3 */ ENHY_BODYPART_3,
/* 4 */ ENHY_BODYPART_4,
/* 5 */ ENHY_BODYPART_5,
/* 6 */ ENHY_BODYPART_6,
/* 7 */ ENHY_BODYPART_7,
/* 8 */ ENHY_BODYPART_8,
/* 9 */ ENHY_BODYPART_9,
/* 10 */ ENHY_BODYPART_10,
/* 11 */ ENHY_BODYPART_11,
/* 12 */ ENHY_BODYPART_12,
/* 13 */ ENHY_BODYPART_13,
/* 14 */ ENHY_BODYPART_14,
/* 15 */ ENHY_BODYPART_MAX
} EnHyBodyPart;
typedef struct EnHy {
/* 0x000 */ Actor actor;
/* 0x144 */ EnHyActionFunc actionFunc;
@@ -65,14 +104,14 @@ typedef struct EnHy {
/* 0x2E4 */ Vec3s prevTorsoRot;
/* 0x2EA */ s16 fidgetTableY[ENHY_LIMB_MAX];
/* 0x30A */ s16 fidgetTableZ[ENHY_LIMB_MAX];
/* 0x32C */ Vec3f bodyPartsPos[15];
/* 0x32C */ Vec3f bodyPartsPos[ENHY_BODYPART_MAX];
/* 0x3E0 */ UNK_TYPE1 unk_3E0[0x6];
/* 0x3E6 */ s16 eyeTexIndex;
/* 0x3E8 */ s16 blinkTimer;
} EnHy; // size = 0x3EC
extern s8 gEnHyBodyParts[];
extern s8 gEnHyParentBodyParts[];
extern s8 gEnHyLimbToBodyParts[];
extern s8 gEnHyParentShadowBodyParts[];
extern u8 gEnHyShadowSizes[];
s32 EnHy_ChangeAnim(SkelAnime* skelAnime, s16 animIndex);