1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-14 19:10:25 +00:00

Document func_80034F54 and related data

new name: `UpdateLimbOverrides`
reason:
- `0x814` and `0x940` constants
- `*_OverrideLimbDraw` functions

additionally:
- move constants into `z64animation.h`
- use these constant for existing formulas
- properly name corresponding actors' fields
- add occasional explicit limbs limit constants
This commit is contained in:
feacur 2024-11-06 14:00:13 +01:00
parent 0d04f51e8e
commit 6f59f4f146
27 changed files with 118 additions and 88 deletions

View file

@ -917,7 +917,7 @@ void func_80034BA0(struct PlayState* play, SkelAnime* skelAnime, OverrideLimbDra
void func_80034CC4(struct PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
s16 func_80034DD4(Actor* actor, struct PlayState* play, s16 arg2, f32 arg3);
void func_80034F54(struct PlayState* play, s16* arg1, s16* arg2, s32 arg3);
void UpdateLimbOverrides(struct PlayState* play, s16* tableY, s16* tableZ, s32 count);
void Actor_Noop(Actor* actor, struct PlayState* play);
void Gfx_DrawDListOpa(struct PlayState* play, Gfx* dlist);

View file

@ -16,6 +16,13 @@ struct SkelAnime;
#define LIMB_DONE 0xFF
// These constants are ubiqutous limb override formulas parameters.
// Some actors call `UpdateLimbOverrides` function and cache their results in `limbOverrides*` tables.
// Others compute them on the fly. Both variants are applied inside `*_OverrideLimbDraw` as input angles.
#define LIMB_OVERRIDE_BASE_Y 0x814
#define LIMB_OVERRIDE_BASE_Z 0x940
#define LIMB_OVERRIDE_PER_I 0x32
typedef struct StandardLimb {
/* 0x00 */ Vec3s jointPos; // Root is position in model space, children are relative to parent
/* 0x06 */ u8 child;