1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-15 03:20:35 +00:00

port over the MM "fidget" naming

* remove redundant comments
* move and rename `FIDGET_*` constants
* introduce a `FIDGET_SCALE` constant, as no other value is applied
This commit is contained in:
feacur 2024-11-07 01:02:55 +01:00
parent 6f59f4f146
commit 1fcacd202e
27 changed files with 97 additions and 92 deletions

View file

@ -14,6 +14,14 @@
#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC colliders
#define MASS_HEAVY 0xFE // Can only be pushed by OC colliders from actors with IMMOVABLE or HEAVY mass.
// These constants are the [default] parameters for the ubiqutous "fidgeting" formulas.
// Some actors call `Actor_UpdateFidgetTables` function and cache their results in `fidgetTable*` fields.
// Others compute them on the fly. Both variants are applied inside `*_OverrideLimbDraw` as input angles.
#define FIDGET_ADD_Y 0x814
#define FIDGET_ADD_Z 0x940
#define FIDGET_MUL_I 0x32
#define FIDGET_SCALE 200.0f
struct Actor;
struct ActorEntry;
struct CollisionPoly;
@ -917,7 +925,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 UpdateLimbOverrides(struct PlayState* play, s16* tableY, s16* tableZ, s32 count);
void Actor_UpdateFidgetTables(struct PlayState* play, s16* fidgetTableY, s16* fidgetTableZ, s32 tableLen);
void Actor_Noop(Actor* actor, struct PlayState* play);
void Gfx_DrawDListOpa(struct PlayState* play, Gfx* dlist);

View file

@ -16,13 +16,6 @@ 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;