summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-11-18 23:55:04 +1100
committerGitHub <noreply@github.com>2023-11-18 23:55:04 +1100
commitfaba61d9b8bd01c8cf8ff070cdb14f63fba253c8 (patch)
tree5445172aa9bea1b5ba756222a8642230de20bbae /include
parentdbb6410ba3a1b756a0ee073d3e1445db494b9f85 (diff)
Player doc: anim wrappers (#1434)
* player cs docs setup * more docs * more docs * missed enums * more docs, but broken. Need to fix sPlayerCsModeAnimFuncs * fix * rm enum * more minor docs * PR suggestion * typo * csActionFunc * PR Suggestion * player animation * cleanup * cleanup * comments * macro * fix bss * another comment * better macro * move macro * fix bss * adjust names * simplify enum * missed flags * PR Review * adjust comment * missed defines
Diffstat (limited to 'include')
-rw-r--r--include/z64animation.h6
-rw-r--r--include/z64player.h7
2 files changed, 12 insertions, 1 deletions
diff --git a/include/z64animation.h b/include/z64animation.h
index 3ee160c00..4c255a739 100644
--- a/include/z64animation.h
+++ b/include/z64animation.h
@@ -12,6 +12,10 @@ struct Actor;
struct SkelAnime;
struct PlayerAnimationFrame;
+// for indexing `jointTable[]` and `morphTable[]`
+#define LIMB_ROOT_POS 0 // Translation/Offset of the root limb
+#define LIMB_ROOT_ROT 1 // Rotation of the root limb
+
#define LIMB_DONE 0xFF
#define BODYPART_NONE -1
@@ -186,7 +190,7 @@ typedef struct SkelAnime {
} update;
/* 0x34 */ s8 initFlags; // Flags used when initializing Player's skeleton
/* 0x35 */ u8 moveFlags; // Flags used for animations that move the actor in worldspace.
- /* 0x36 */ s16 prevRot; // Previous rotation in worldspace.
+ /* 0x36 */ s16 prevYaw; // Previous rotation in worldspace.
/* 0x38 */ Vec3s prevTransl; // Previous modelspace translation.
/* 0x3E */ Vec3s baseTransl; // Base modelspace translation.
} SkelAnime; // size = 0x44
diff --git a/include/z64player.h b/include/z64player.h
index 8adf2247a..bfc5b91ff 100644
--- a/include/z64player.h
+++ b/include/z64player.h
@@ -317,6 +317,13 @@ typedef enum PlayerDoorType {
/* 5 */ PLAYER_DOORTYPE_PROXIMITY
} PlayerDoorType;
+// Some player animations are played at this reduced speed, for reasons yet unclear.
+// Perhaps to compress animation data?
+// This is called "adjusted" for now.
+// z_en_horse also has many instances of this adjusted speed
+#define PLAYER_ANIM_ADJUSTED_SPEED (2.0f / 3.0f)
+#define PLAYER_ANIM_NORMAL_SPEED (3.0f / 3.0f)
+
typedef enum PlayerAnimType {
/* 0 */ PLAYER_ANIMTYPE_DEFAULT, // DEFAULT
/* 1 */ PLAYER_ANIMTYPE_1,