summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2022-10-15 19:12:01 -0300
committerGitHub <noreply@github.com>2022-10-15 19:12:01 -0300
commitbd373940ac7bb230b4a135a5c5675ca8f42cd700 (patch)
treeefa23eb003ff945fd8ab1d78b8c357dceda3c39c /include
parent638f5062cbf6e9289f624cbdeee918d35642fb3a (diff)
`z_player_lib`: Part 2 (#938)
* preparations * import data * PLAYER_STATE1 * PLAYER_STATE2 * PLAYER_STATE3 * import bss * format stuff * bss cleanup * more cleaning and some naming * face * cleaning up link human object a bit * Remove PHYSICAL_TO_VIRTUAL2 * Update src/code/z_player_lib.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * review Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * format * /* CAT */ Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com> * naming some stuff on objects * format * invert flags endian * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * format * drawmask Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com> * naming * another round of human object naming * enum renames * sActionModelGroups and use enum as types * PlayerAnimType * PLAYER_MODELTYPE_ * determined ranges of PlayerModelType * name PLAYER_MODELGROUP_DEFAULT * format * sheath * dlist groups placeholder namse * PLAYER_MODELGROUP_BOTTLE * Some fierce deity naming * Right hands * zora skel dlists * deku limb dlists * left hands * name most modelgroups * more hand naming * regs as dec * fix in horse * Use BUTTON_ITEM_EQUIP macro * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * reformat D_801AED58 * Sword sheaths * swords and shields * Update src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * playerForm on Player_DrawImpl * fomat * Update src/code/z_player_lib.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update assets/xml/objects/gameplay_keep.xml Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * VIRTUAL_TO_PHYSICAL(SEGMENTED_TO_VIRTUAL(gEffBubble1Tex)) Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * singular limb enum names * fix bss * Update src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * name goron shielding limbs * name limb * Update src/code/z_player_lib.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * bss * bss * format * namefixer * bss * bss * bss * bss * format * bss * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * fix bss Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/functions.h24
-rw-r--r--include/variables.h159
-rw-r--r--include/z64.h6
-rw-r--r--include/z64message.h3
-rw-r--r--include/z64object.h4
-rw-r--r--include/z64player.h159
6 files changed, 175 insertions, 180 deletions
diff --git a/include/functions.h b/include/functions.h
index 0e7808642..f0a96080a 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -1800,15 +1800,15 @@ s32 func_80123448(PlayState* play);
s32 Player_IsGoronOrDeku(Player* player);
s32 func_801234D4(PlayState* play);
s32 func_80123590(PlayState* play, Actor* actor);
-s32 func_8012364C(PlayState* play, Player* player, s32 arg2);
+ItemId func_8012364C(PlayState* play, Player* player, s32 arg2);
s32 func_80123810(PlayState* play);
-s32 Player_ActionToModelGroup(Player* player, s32 actionParam);
-void func_801239AC(Player* player);
-void Player_SetModels(Player* player, s32 modelGroup);
-void Player_SetModelGroup(Player* player, s32 modelGroup);
+PlayerModelGroup Player_ActionToModelGroup(Player* player, PlayerActionParam actionParam);
+void Player_SetModelsForHoldingShield(Player* player);
+void Player_SetModels(Player* player, PlayerModelGroup modelGroup);
+void Player_SetModelGroup(Player* player, PlayerModelGroup modelGroup);
void func_80123C58(Player* player);
void Player_SetEquipmentData(PlayState* play, Player* player);
-void func_80123D50(PlayState* play, Player* player, s32 itemId, s32 actionParam);
+void func_80123D50(PlayState* play, Player* player, ItemId itemId, PlayerActionParam actionParam);
void func_80123DA4(Player* player);
void func_80123DC0(Player* player);
void func_80123E90(PlayState* play, Actor* actor);
@@ -1821,21 +1821,21 @@ s32 Player_HasMirrorShieldEquipped(PlayState* play);
s32 Player_IsHoldingMirrorShield(PlayState* play);
s32 Player_IsHoldingHookshot(Player* player);
s32 func_801240DC(Player* player);
-s32 func_80124110(Player* player, s32 actionParam);
+s32 func_80124110(Player* player, PlayerActionParam actionParam);
s32 func_80124148(Player* player);
-s32 Player_ActionToMeleeWeapon(s32 actionParam);
+s32 Player_ActionToMeleeWeapon(PlayerActionParam actionParam);
s32 Player_GetMeleeWeaponHeld(Player* player);
s32 Player_IsHoldingTwoHandedWeapon(Player* player);
-s32 Player_ActionToBottle(Player* player, s32 actionParam);
+s32 Player_ActionToBottle(Player* player, PlayerActionParam actionParam);
s32 Player_GetBottleHeld(Player* Player);
-s32 Player_ActionToExplosive(Player* player, s32 actionParam);
+s32 Player_ActionToExplosive(Player* player, PlayerActionParam actionParam);
s32 Player_GetExplosiveHeld(Player* player);
-s32 func_80124278(Actor* actor, s32 actionParam);
+s32 Player_ActionToSword(Actor* actor, PlayerActionParam actionParam);
s32 func_801242B4(Player* player);
s32 Player_GetEnvTimerType(PlayState* play);
void func_80124420(Player* player);
void func_80124618(struct_80124618 arg0[], f32 curFrame, Vec3f* arg2);
-void func_801246F4(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, s32 boots, s32 face, OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor);
+void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, PlayerTransformation playerForm, s32 boots, s32 face, OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor);
void func_80125318(Vec3f* arg0, Vec3s* arg1);
void Player_DrawZoraShield(PlayState* play, Player* player);
void func_80125500(PlayState* play, Player* player, s32 limbIndex, Vec3f* pos, Vec3s* rot);
diff --git a/include/variables.h b/include/variables.h
index 5b40e1161..88758c50b 100644
--- a/include/variables.h
+++ b/include/variables.h
@@ -1,5 +1,5 @@
-#ifndef _VARIABLES_H_
-#define _VARIABLES_H_
+#ifndef VARIABLES_H
+#define VARIABLES_H
#include "z64.h"
#include "segment_symbols.h"
@@ -412,7 +412,6 @@ extern EffectSsOverlay gParticleOverlayTable[39];
extern f32 actorMovementScale;
extern TargetRangeParams gTargetRanges[];
extern s16 D_801AED48[8];
-// extern UNK_TYPE4 D_801AED58;
extern Color_RGBA8 actorDefaultHitColor;
// extern UNK_TYPE1 D_801AED8C;
// extern UNK_TYPE4 D_801AED98;
@@ -773,141 +772,12 @@ extern UNK_PTR D_801BF5C0;
// extern UNK_TYPE1 D_801BFD94;
// extern UNK_TYPE2 D_801BFD98;
-// extern UNK_TYPE1 D_801BFDD0;
-// extern UNK_TYPE1 D_801BFE00;
-// extern UNK_TYPE1 D_801BFE14;
-// extern UNK_TYPE2 D_801BFF34;
-// extern UNK_TYPE1 D_801BFF90;
-extern u8 gPlayerModelTypes[][5];
-// extern UNK_TYPE1 D_801BFFFC;
-// extern UNK_TYPE1 D_801C0024;
-// extern UNK_TYPE1 D_801C0034;
-// extern UNK_TYPE1 D_801C005C;
-// extern UNK_TYPE1 D_801C0084;
-// extern UNK_TYPE1 D_801C00AC;
-// extern UNK_TYPE1 D_801C00BC;
-// extern UNK_TYPE1 D_801C00D4;
-// extern UNK_TYPE1 D_801C00EC;
-// extern UNK_TYPE1 D_801C0114;
-// extern UNK_TYPE1 D_801C013C;
-// extern UNK_TYPE1 D_801C0164;
-// extern UNK_TYPE1 D_801C018C;
-// extern UNK_TYPE1 D_801C01A4;
-// extern UNK_TYPE1 D_801C01CC;
-// extern UNK_TYPE1 D_801C01F4;
-// extern UNK_TYPE1 D_801C021C;
-// extern UNK_TYPE1 D_801C0244;
-// extern UNK_TYPE1 D_801C026C;
-// extern UNK_TYPE1 D_801C0294;
-// extern UNK_TYPE1 D_801C02A8;
-// extern UNK_TYPE1 D_801C02BC;
-// extern UNK_TYPE1 D_801C02D0;
-// extern UNK_TYPE1 D_801C02E4;
-// extern UNK_TYPE1 D_801C0340;
-// extern UNK_TYPE1 D_801C0368;
-// extern UNK_TYPE1 D_801C03A0;
-// extern UNK_TYPE1 D_801C03C0;
-// extern UNK_TYPE1 D_801C03E0;
-// extern UNK_TYPE1 D_801C0410;
-// extern UNK_TYPE1 D_801C0428;
-// extern UNK_TYPE1 D_801C0460;
-// extern UNK_TYPE1 D_801C0490;
-// extern UNK_TYPE1 D_801C0510;
-// extern UNK_TYPE1 D_801C0538;
-// extern UNK_TYPE1 D_801C0560;
-// extern UNK_TYPE1 D_801C0580;
-// extern UNK_TYPE1 D_801C05A8;
-// extern UNK_TYPE1 D_801C05C8;
-// extern UNK_TYPE1 D_801C05D8;
-// extern UNK_TYPE1 D_801C05F0;
-// extern UNK_TYPE1 D_801C0608;
-// extern UNK_TYPE1 D_801C0628;
-// extern UNK_TYPE1 D_801C0678;
-// extern UNK_TYPE1 D_801C0698;
-// extern UNK_TYPE1 D_801C06B8;
-// extern UNK_TYPE1 D_801C06E0;
-// extern UNK_TYPE1 D_801C06F8;
-// extern UNK_TYPE1 D_801C0718;
-// extern UNK_TYPE1 D_801C0730;
-// extern UNK_TYPE1 D_801C0740;
-// extern UNK_TYPE1 D_801C0750;
-// extern UNK_TYPE1 D_801C0778;
-// extern UNK_TYPE1 D_801C0784;
-// extern UNK_TYPE1 D_801C07AC;
-// extern UNK_TYPE1 D_801C07C0;
-// extern UNK_TYPE1 D_801C07F0;
-// extern UNK_TYPE1 D_801C0820;
-// extern UNK_TYPE1 D_801C0838;
-extern Gfx D_801C0850[];
-// extern UNK_TYPE1 D_801C0860;
-extern UNK_PTR D_801C0870;
-// extern UNK_TYPE1 D_801C0890;
-// extern UNK_TYPE1 D_801C08A0;
-// extern UNK_TYPE1 D_801C08C0;
-// extern UNK_TYPE1 D_801C08FC;
-// extern UNK_TYPE1 D_801C0910;
-// extern UNK_TYPE1 D_801C0924;
-// extern UNK_TYPE1 D_801C0938;
-// extern UNK_TYPE1 D_801C094C;
-// extern UNK_TYPE4 D_801C0958;
-extern UNK_PTR D_801C095C;
-// extern UNK_TYPE1 D_801C0964;
-// extern UNK_TYPE1 D_801C096C;
-// extern UNK_TYPE1 D_801C0970;
-// extern UNK_TYPE4 D_801C0994;
-// extern UNK_TYPE1 D_801C09B8;
-// extern UNK_TYPE1 D_801C09DC;
-// extern UNK_TYPE1 D_801C0A00;
-// extern UNK_TYPE1 D_801C0A24;
-// extern UNK_TYPE1 D_801C0A48;
-// extern UNK_TYPE1 D_801C0A6C;
-// extern UNK_TYPE1 D_801C0A90;
-// extern UNK_TYPE1 D_801C0AB4;
-// extern UNK_TYPE1 D_801C0ABC;
-// extern UNK_TYPE1 D_801C0AC4;
-// extern UNK_TYPE1 D_801C0ADC;
-extern UNK_PTR D_801C0AF4;
-extern UNK_PTR D_801C0AFC;
-extern UNK_PTR D_801C0B04;
-extern UNK_PTR D_801C0B0C;
-// extern UNK_TYPE1 D_801C0B14;
-// extern UNK_TYPE1 D_801C0B1C;
-// extern UNK_TYPE1 D_801C0B20;
-// extern UNK_TYPE1 D_801C0B90;
-// extern UNK_TYPE4 D_801C0BA8;
-// extern UNK_TYPE1 D_801C0BB4;
-// extern UNK_TYPE1 D_801C0BC0;
-// extern UNK_TYPE1 D_801C0BD0;
-// extern UNK_TYPE4 D_801C0BE0;
-// extern UNK_TYPE4 D_801C0BEC;
-// extern UNK_TYPE1 D_801C0BF8;
-// extern UNK_TYPE1 D_801C0BFC;
-// extern UNK_TYPE1 D_801C0C00;
-// extern UNK_TYPE4 D_801C0C0C;
-// extern UNK_TYPE1 D_801C0C30;
-// extern UNK_TYPE1 D_801C0C54;
-// extern UNK_TYPE1 D_801C0CA8;
-// extern UNK_TYPE4 D_801C0CE8;
-// extern UNK_TYPE1 D_801C0D24;
-// extern UNK_TYPE1 D_801C0D60;
-// extern UNK_TYPE1 D_801C0D6C;
-// extern UNK_TYPE1 D_801C0D78;
-// extern UNK_TYPE4 D_801C0D94;
-// extern UNK_TYPE4 D_801C0D98;
-// extern UNK_TYPE4 D_801C0D9C;
-// extern UNK_TYPE4 D_801C0DA0;
-// extern UNK_TYPE1 D_801C0DA8;
-// extern UNK_TYPE1 D_801C0DD8;
-// extern UNK_TYPE1 D_801C0DE4;
-// extern UNK_TYPE4 D_801C0DF0;
-// extern UNK_TYPE1 D_801C0E04;
-// extern UNK_TYPE4 D_801C0E2C;
-// extern UNK_TYPE4 D_801C0E40;
-// extern UNK_TYPE1 D_801C0E7C;
-// extern UNK_TYPE1 D_801C0E94;
-// extern UNK_TYPE1 D_801C0EA0;
-// extern UNK_TYPE1 D_801C0EAC;
-// extern UNK_TYPE1 D_801C0EB8;
+extern FlexSkeletonHeader* gPlayerSkeletons[PLAYER_FORM_MAX];
+extern PlayerModelIndices gPlayerModelTypes[];
+extern struct_80124618 D_801C03A0[];
+extern struct_80124618 D_801C0490[];
+extern Gfx gCullBackDList[];
+extern Gfx gCullFrontDList[];
extern Gfx sSetupDL[438];
extern Gfx sFillSetupDL[12];
@@ -2750,18 +2620,7 @@ extern s16 D_801F4E7A;
// extern UNK_TYPE1 D_801F57B4;
// extern UNK_TYPE1 D_801F5834;
// extern NmiBuff* gNMIBuffer;
-// extern UNK_TYPE1 sPostmanTimerInput;
-// extern UNK_TYPE1 D_801F58B0;
-// extern UNK_TYPE1 D_801F59AC;
-// extern UNK_TYPE1 D_801F59B0;
-// extern UNK_TYPE1 D_801F59C8;
-// extern UNK_TYPE1 D_801F59D0;
-// extern UNK_TYPE1 D_801F59DC;
-// extern UNK_TYPE1 D_801F59E0;
-// extern UNK_TYPE1 D_801F59E4;
-// extern UNK_TYPE1 D_801F59E8;
-// extern UNK_TYPE1 D_801F59F4;
-// extern UNK_TYPE1 D_801F59F8;
+
// extern UNK_TYPE1 sSkyboxDrawMatrix;
// extern UNK_TYPE1 D_801F6AF0;
// extern UNK_TYPE1 D_801F6AF2;
diff --git a/include/z64.h b/include/z64.h
index 4b2682b1b..7552cbe66 100644
--- a/include/z64.h
+++ b/include/z64.h
@@ -724,7 +724,7 @@ typedef struct {
#define TRANS_TRIGGER_START 20 // start transition (exiting an area)
#define TRANS_TRIGGER_END -20 // transition is ending (arriving in a new area)
-typedef enum {
+typedef enum TransitionMode {
/* 0 */ TRANS_MODE_OFF,
/* 1 */ TRANS_MODE_01,
/* 2 */ TRANS_MODE_02,
@@ -745,7 +745,7 @@ typedef enum {
/* 17 */ TRANS_MODE_17
} TransitionMode;
-typedef enum {
+typedef enum TransitionType {
/* 0 */ TRANS_TYPE_00,
/* 1 */ TRANS_TYPE_01,
/* 2 */ TRANS_TYPE_02,
@@ -1048,7 +1048,7 @@ struct PlayState {
/* 0x18788 */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor);
/* 0x1878C */ void (*unk_1878C)(struct PlayState* play);
/* 0x18790 */ void (*unk_18790)(struct PlayState* play, s16 arg1, Actor* actor);
- /* 0x18794 */ s32 (*unk_18794)(struct PlayState* play, Player* player, s32 arg2, s32 arg3);
+ /* 0x18794 */ s32 (*unk_18794)(struct PlayState* play, Player* player, s32 itemId, s32 arg3);
/* 0x18798 */ s32 (*setPlayerTalkAnim)(struct PlayState* play, void* talkAnim, s32 arg2);
/* 0x1879C */ s16 playerActorCsIds[10];
/* 0x187B0 */ MtxF viewProjectionMtxF;
diff --git a/include/z64message.h b/include/z64message.h
index 590074339..7d4723e7b 100644
--- a/include/z64message.h
+++ b/include/z64message.h
@@ -160,7 +160,8 @@ typedef struct MessageContext {
/* 0x120A4 */ s16 unk120A4[6];
/* 0x120B0 */ u8 unk120B0;
/* 0x120B1 */ u8 unk120B1;
- /* 0x120B2 */ u8 unk120B2[0xC];
+ /* 0x120B2 */ u8 unk120B2[0xA];
+ /* 0x120BC */ u16 unk_120BC;
/* 0x120BE */ s16 unk120BE;
/* 0x120C0 */ s16 unk120C0;
/* 0x120C2 */ s16 unk120C2;
diff --git a/include/z64object.h b/include/z64object.h
index 306f84ebd..e800e9138 100644
--- a/include/z64object.h
+++ b/include/z64object.h
@@ -1,5 +1,5 @@
-#ifndef _Z64OBJECT_H_
-#define _Z64OBJECT_H_
+#ifndef Z64OBJECT_H
+#define Z64OBJECT_H
#define OBJECT_SPACE_SIZE_DEFAULT 1413120
#define OBJECT_SPACE_SIZE_CLOCK_TOWN 1566720
diff --git a/include/z64player.h b/include/z64player.h
index 2f101b558..1d7261aa2 100644
--- a/include/z64player.h
+++ b/include/z64player.h
@@ -97,7 +97,8 @@ typedef enum PlayerActionParam {
/* 0x0E */ PLAYER_AP_BOMB,
/* 0x0F */ PLAYER_AP_POWDER_KEG,
/* 0x10 */ PLAYER_AP_BOMBCHU,
- /* 0x12 */ PLAYER_AP_NUT = 0x12,
+ /* 0x11 */ PLAYER_AP_11,
+ /* 0x12 */ PLAYER_AP_NUT,
/* 0x13 */ PLAYER_AP_PICTO_BOX,
/* 0x14 */ PLAYER_AP_OCARINA,
/* 0x15 */ PLAYER_AP_BOTTLE,
@@ -107,7 +108,8 @@ typedef enum PlayerActionParam {
/* 0x19 */ PLAYER_AP_BOTTLE_ZORA_EGG,
/* 0x1A */ PLAYER_AP_BOTTLE_DEKU_PRINCESS,
/* 0x1B */ PLAYER_AP_BOTTLE_GOLD_DUST,
- /* 0x1D */ PLAYER_AP_BOTTLE_SEAHORSE = 0x1D,
+ /* 0x1C */ PLAYER_AP_BOTTLE_1C,
+ /* 0x1D */ PLAYER_AP_BOTTLE_SEAHORSE,
/* 0x1E */ PLAYER_AP_BOTTLE_MUSHROOM,
/* 0x1F */ PLAYER_AP_BOTTLE_HYLIAN_LOACH,
/* 0x20 */ PLAYER_AP_BOTTLE_BUG,
@@ -128,9 +130,15 @@ typedef enum PlayerActionParam {
/* 0x2F */ PLAYER_AP_DEED_SWAMP,
/* 0x30 */ PLAYER_AP_DEED_MOUNTAIN,
/* 0x31 */ PLAYER_AP_DEED_OCEAN,
- /* 0x33 */ PLAYER_AP_LETTER_MAMA = 0x33,
- /* 0x36 */ PLAYER_AP_PENDANT_OF_MEMORIES = 0x36,
- /* 0x3A */ PLAYER_AP_MASK_TRUTH = 0x3A,
+ /* 0x32 */ PLAYER_AP_32,
+ /* 0x33 */ PLAYER_AP_LETTER_MAMA,
+ /* 0x34 */ PLAYER_AP_34,
+ /* 0x35 */ PLAYER_AP_35,
+ /* 0x36 */ PLAYER_AP_PENDANT_OF_MEMORIES,
+ /* 0x37 */ PLAYER_AP_37,
+ /* 0x38 */ PLAYER_AP_38,
+ /* 0x39 */ PLAYER_AP_39,
+ /* 0x3A */ PLAYER_AP_MASK_TRUTH,
/* 0x3B */ PLAYER_AP_MASK_KAFEIS_MASK,
/* 0x3C */ PLAYER_AP_MASK_ALL_NIGHT,
/* 0x3D */ PLAYER_AP_MASK_BUNNY,
@@ -155,7 +163,7 @@ typedef enum PlayerActionParam {
/* 0x50 */ PLAYER_AP_MASK_ZORA,
/* 0x51 */ PLAYER_AP_MASK_DEKU,
/* 0x52 */ PLAYER_AP_LENS,
- /* 0xFD */ PLAYER_AP_MAX = 0xFD
+ /* 0x53 */ PLAYER_AP_MAX
} PlayerActionParam;
typedef enum {
@@ -196,6 +204,134 @@ typedef enum {
/* 34 */ PLAYER_MWA_MAX
} PlayerMeleeWeaponAnimation;
+typedef enum PlayerAnimType {
+ /* 0 */ PLAYER_ANIMTYPE_0,
+ /* 1 */ PLAYER_ANIMTYPE_1,
+ /* 2 */ PLAYER_ANIMTYPE_2,
+ /* 3 */ PLAYER_ANIMTYPE_3,
+ /* 4 */ PLAYER_ANIMTYPE_4,
+ /* 5 */ PLAYER_ANIMTYPE_5,
+ /* 6 */ PLAYER_ANIMTYPE_MAX
+} PlayerAnimType;
+
+typedef enum PlayerModelType {
+ // left hand
+ /* 0 */ PLAYER_MODELTYPE_LH_OPEN,
+ /* 1 */ PLAYER_MODELTYPE_LH_CLOSED,
+ /* 2 */ PLAYER_MODELTYPE_LH_ONE_HAND_SWORD,
+ /* 3 */ PLAYER_MODELTYPE_LH_TWO_HAND_SWORD,
+ /* 4 */ PLAYER_MODELTYPE_LH_4,
+ /* 5 */ PLAYER_MODELTYPE_LH_BOTTLE,
+ // right hand
+ /* 6 */ PLAYER_MODELTYPE_RH_OPEN,
+ /* 7 */ PLAYER_MODELTYPE_RH_CLOSED,
+ /* 8 */ PLAYER_MODELTYPE_RH_SHIELD,
+ /* 9 */ PLAYER_MODELTYPE_RH_BOW,
+ /* 10 */ PLAYER_MODELTYPE_RH_INSTRUMENT,
+ /* 11 */ PLAYER_MODELTYPE_RH_HOOKSHOT,
+ // sheath
+ /* 12 */ PLAYER_MODELTYPE_SHEATH_12,
+ /* 13 */ PLAYER_MODELTYPE_SHEATH_13,
+ /* 14 */ PLAYER_MODELTYPE_SHEATH_14,
+ /* 15 */ PLAYER_MODELTYPE_SHEATH_15,
+ // waist
+ /* 16 */ PLAYER_MODELTYPE_WAIST,
+ /* 17 */ PLAYER_MODELTYPE_17, // NULL?
+ /* 18 */ PLAYER_MODELTYPE_MAX
+} PlayerModelType;
+
+typedef struct PlayerModelIndices {
+ /* 0x0 */ u8 modelAnimType; // PlayerAnimType enum
+ /* 0x1 */ u8 leftHandType; // PlayerModelType enum
+ /* 0x2 */ u8 rightHandType; // PlayerModelType enum
+ /* 0x3 */ u8 sheathType; // PlayerModelType enum
+ /* 0x4 */ u8 waistType; // PlayerModelType enum
+} PlayerModelIndices; // size = 0x5
+
+typedef enum PlayerModelGroup {
+ /* 0 */ PLAYER_MODELGROUP_0,
+ /* 1 */ PLAYER_MODELGROUP_1,
+ /* 2 */ PLAYER_MODELGROUP_ONE_HAND_SWORD,
+ /* 3 */ PLAYER_MODELGROUP_DEFAULT, // non-specific models, for items that don't have particular link models
+ /* 4 */ PLAYER_MODELGROUP_4,
+ /* 5 */ PLAYER_MODELGROUP_TWO_HAND_SWORD,
+ /* 6 */ PLAYER_MODELGROUP_BOW,
+ /* 7 */ PLAYER_MODELGROUP_EXPLOSIVES,
+ /* 8 */ PLAYER_MODELGROUP_8,
+ /* 9 */ PLAYER_MODELGROUP_HOOKSHOT,
+ /* 10 */ PLAYER_MODELGROUP_STICK,
+ /* 11 */ PLAYER_MODELGROUP_INSTRUMENT,
+ /* 12 */ PLAYER_MODELGROUP_BOTTLE,
+ /* 13 */ PLAYER_MODELGROUP_13,
+ /* 14 */ PLAYER_MODELGROUP_ZORA_FINS,
+ /* 15 */ PLAYER_MODELGROUP_MAX
+} PlayerModelGroup;
+
+typedef enum {
+ /* 0 */ PLAYER_EYES_OPEN,
+ /* 1 */ PLAYER_EYES_HALF,
+ /* 2 */ PLAYER_EYES_CLOSED,
+ /* 3 */ PLAYER_EYES_ROLL_RIGHT,
+ /* 4 */ PLAYER_EYES_ROLL_LEFT,
+ /* 5 */ PLAYER_EYES_ROLL_UP,
+ /* 6 */ PLAYER_EYES_ROLL_DOWN,
+ /* 7 */ PLAYER_EYES_7,
+ /* 8 */ PLAYER_EYES_MAX
+} PlayerEyeIndex;
+
+typedef enum {
+ /* 0 */ PLAYER_MOUTH_CLOSED,
+ /* 1 */ PLAYER_MOUTH_TEETH,
+ /* 2 */ PLAYER_MOUTH_ANGRY,
+ /* 3 */ PLAYER_MOUTH_HAPPY,
+ /* 4 */ PLAYER_MOUTH_MAX
+} PlayerMouthIndex;
+
+typedef enum {
+ /* 0 */ PLAYER_FACE_0,
+ /* 1 */ PLAYER_FACE_1,
+ /* 2 */ PLAYER_FACE_2,
+ /* 3 */ PLAYER_FACE_3,
+ /* 4 */ PLAYER_FACE_4,
+ /* 5 */ PLAYER_FACE_5,
+ /* 6 */ PLAYER_FACE_6,
+ /* 7 */ PLAYER_FACE_7,
+ /* 8 */ PLAYER_FACE_8,
+ /* 9 */ PLAYER_FACE_9,
+ /* 10 */ PLAYER_FACE_10,
+ /* 11 */ PLAYER_FACE_11,
+ /* 12 */ PLAYER_FACE_12,
+ /* 13 */ PLAYER_FACE_13,
+ /* 14 */ PLAYER_FACE_14,
+ /* 15 */ PLAYER_FACE_15
+} PlayerFacialExpression;
+
+typedef enum {
+ /* 0x00 */ PLAYER_LIMB_NONE,
+ /* 0x01 */ PLAYER_LIMB_ROOT,
+ /* 0x02 */ PLAYER_LIMB_WAIST,
+ /* 0x03 */ PLAYER_LIMB_LOWER_ROOT,
+ /* 0x04 */ PLAYER_LIMB_RIGHT_THIGH,
+ /* 0x05 */ PLAYER_LIMB_RIGHT_SHIN,
+ /* 0x06 */ PLAYER_LIMB_RIGHT_FOOT,
+ /* 0x07 */ PLAYER_LIMB_LEFT_THIGH,
+ /* 0x08 */ PLAYER_LIMB_LEFT_SHIN,
+ /* 0x09 */ PLAYER_LIMB_LEFT_FOOT,
+ /* 0x0A */ PLAYER_LIMB_UPPER_ROOT,
+ /* 0x0B */ PLAYER_LIMB_HEAD,
+ /* 0x0C */ PLAYER_LIMB_HAT,
+ /* 0x0D */ PLAYER_LIMB_COLLAR,
+ /* 0x0E */ PLAYER_LIMB_LEFT_SHOULDER,
+ /* 0x0F */ PLAYER_LIMB_LEFT_FOREARM,
+ /* 0x10 */ PLAYER_LIMB_LEFT_HAND,
+ /* 0x11 */ PLAYER_LIMB_RIGHT_SHOULDER,
+ /* 0x12 */ PLAYER_LIMB_RIGHT_FOREARM,
+ /* 0x13 */ PLAYER_LIMB_RIGHT_HAND,
+ /* 0x14 */ PLAYER_LIMB_SHEATH,
+ /* 0x15 */ PLAYER_LIMB_TORSO,
+ /* 0x16 */ PLAYER_LIMB_MAX
+} PlayerLimb;
+
typedef struct {
/* 0x00 */ f32 unk_00;
/* 0x04 */ f32 unk_04;
@@ -245,7 +381,6 @@ typedef void (*PlayerFuncD58)(struct PlayState*, struct Player*);
typedef struct {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 alpha;
- /* 0x02 */ char unk_02[2]; // probably alignment padding
/* 0x04 */ MtxF mf;
} struct_80122D44_arg1_unk_04; // size = 0x44
@@ -420,7 +555,7 @@ typedef struct struct_80122744_arg1 {
#define PLAYER_STATE3_400 (1 << 10)
//
#define PLAYER_STATE3_800 (1 << 11)
-//
+// being curled?
#define PLAYER_STATE3_1000 (1 << 12)
//
#define PLAYER_STATE3_2000 (1 << 13)
@@ -467,15 +602,15 @@ typedef struct Player {
/* 0x144 */ s8 currentShield;
/* 0x145 */ s8 currentBoots;
/* 0x146 */ s8 heldItemButton;
- /* 0x147 */ s8 itemActionParam;
- /* 0x148 */ u8 heldItemId;
+ /* 0x147 */ s8 itemActionParam; // PlayerActionParam enum
+ /* 0x148 */ u8 heldItemId; // ItemId enum
/* 0x149 */ s8 prevBoots;
/* 0x14A */ s8 heldItemActionParam;
/* 0x14B */ u8 transformation;
- /* 0x14C */ u8 modelGroup;
+ /* 0x14C */ u8 modelGroup; // PlayerModelGroup enum
/* 0x14D */ u8 nextModelGroup;
/* 0x14E */ s8 unk_14E;
- /* 0x14F */ u8 modelAnimType;
+ /* 0x14F */ u8 modelAnimType; // PlayerAnimType enum
/* 0x150 */ u8 leftHandType;
/* 0x151 */ u8 rightHandType;
/* 0x152 */ u8 sheathType;