User:CrookedPoe/Link Animations
From CloudModding OoT Wiki
/*** Link's Face Textures; Left and Right are from our point-of-view. ***/
enum
{
LINKEYE_AUTO, /* Automatic Eyes */
LINKEYE_OPEN, /* Open Eyes */
LINKEYE_HALF, /* Half Open Eyes */
LINKEYE_CLOSED, /* Closed Eyes */
LINKEYE_LEFT, /* Look Left */
LINKEYE_RIGHT, /* Look Right */
LINKEYE_SHOCK, /* Shocked / Surprised */
LINKEYE_DOWN, /* Look Down */
LINKEYE_CLTIGHT /* Tightly Closed Eyes */
};
/*** Link's Mouth Textures ***/
enum
{
LINKMOUTH_AUTO, /* Automatic Mouth */
LINKMOUTH_CLOSED, /* Closed Mouth */
LINKMOUTH_SLIGHT, /* Open Mouth (Slight, Playing Ocarina) */
LINKMOUTH_WIDE, /* Open Mouth (Wide, Shouting) */
LINKMOUTH_SMILE /* Open Mouth (Smile, Item Get) */
};
/*** Link's Limbs; Left and Right are from Link's point-of-view. ***/
enum
{
LINKLIMB_ROOT, /* Limb 0 : Root */
LINKLIMB_WAIST, /* Limb 1 : Waist */
LINKLIMB_BODY_LO, /* Limb 2 : Lower-Body Affector */
LINKLIMB_THIGH_R, /* Limb 3 : Right Thigh */
LINKLIMB_SHIN_R, /* Limb 4 : Right Shin */
LINKLIMB_FOOT_R, /* Limb 5 : Right Foot */
LINKLIMB_THIGH_L, /* Limb 6 : Left Thigh */
LINKLIMB_SHIN_L, /* Limb 7 : Left Shin */
LINKLIMB_FOOT_L, /* Limb 8 : Left Foot */
LINKLIMB_BODY_HI, /* Limb 9 : Upper-Body Affector */
LINKLIMB_HEAD, /* Limb 10 : Head */
LINKLIMB_HAT, /* Limb 11 : Hat */
LINKLIMB_COLLAR, /* Limb 12 : Collar */
LINKLIMB_SHOULDER_L, /* Limb 13 : Left Shoulder */
LINKLIMB_FOREARM_L, /* Limb 14 : Left Forarm */
LINKLIMB_HAND_L, /* Limb 15 : Left Hand */
LINKLIMB_SHOULDER_R, /* Limb 16 : Right Shoulder */
LINKLIMB_FOREARM_R, /* Limb 17 : Right Forearm */
LINKLIMB_HAND_R, /* Limb 18 : Right Hand */
LINKLIMB_SHEATH, /* Limb 19 : Sheath / Sheathed Sword */
LINKLIMB_TORSO /* Limb 20 : Torso */
};
/*** 3-Vector Structure (Signed 16-bit Integers) ***/
typedef struct
{
int16_t x;
int16_t y;
int16_t z;
} vec3s_t;
/*** Animation Header for Link's Animations (located inside gameplay_keep). ***/
typedef struct
{
uint16_t frame_count;
uint16_t pad; /* Padding / Unused */
uint32_t addr; /* The address of the animation data (includes the RAM segment as its left-most byte). */
} link_animetion_header_t;
/*** Link's Facial Expression ***/
typedef struct
{
uint8_t mouth: 4;
uint8_t eyes : 4;
} link_animetion_face_t;
/*** Animation Frame Structure ***/
typedef struct
{
vec3s_t loc; /* Root Translation */
vec3s_t[21] rot; /* Rotation of each limb. */
uint8_t pad; /* Padding / Unused */
link_animetion_face_t face; /* Facial Expression */
} link_animetion_frame_t;