Dm_Stk (Skull Kid) documented, object_stk and object_stk3 fully documented, object_stk2 mostly documented (#827)

* Most of object_stk done

* Document the original name for every animation

* First pass names on every single animation

* Enum for animations

* Enum for limbs

* Very low hanging fruit in dm_stk

* Document a lot more in dm_stk

* Name most remaining struct vars

* Name a bunch of functions

* First pass names to all sound functions

* Name most functions

* Name all other object symbols used by dm_stk

* Name all remaining functions and struct vars

* Much better animation names and documentation

* Lots more function documentation

* Document some stuff

* Name the title cutscene thing

* Last little bit of cleanup

* Format

* Rename SFX functions

* Fix typo in header comment

* Respond to Elliptic's review

* Respond to Elliptic's clarification about Version1/2

* hitCount -> deflectCount

* Take into account some of the feedback that was given for DmZl4
This commit is contained in:
Tom Overton
2022-06-18 18:51:58 -07:00
committed by GitHub
parent d1b75e4c4b
commit 03ba917853
7 changed files with 1087 additions and 776 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ const ActorInit Dm_Sa_InitVars = {
(ActorFunc)DmSa_Draw,
};
static AnimationInfo D_80A2ED00[] = { { &object_stk_Anim_00CC94, 1.0f, 0, -1.0f, ANIMMODE_LOOP, 0 } };
static AnimationInfo D_80A2ED00[] = { { &gSkullKidTPoseAnim, 1.0f, 0, -1.0f, ANIMMODE_LOOP, 0 } };
void func_80A2E960(SkelAnime* arg0, AnimationInfo* animations, u16 index) {
f32 frameCount;
@@ -52,7 +52,7 @@ void DmSa_Init(Actor* thisx, GlobalContext* globalCtx) {
this->alpha = 0xFF;
this->actor.targetArrowOffset = 3000.0f;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_stk_Skel_013328, NULL, NULL, NULL, 0);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gSkullKidSkel, NULL, NULL, NULL, 0);
func_80A2E960(&this->skelAnime, D_80A2ED00, 0);
Actor_SetScale(&this->actor, 0.01f);
this->actionFunc = DmSa_DoNothing;
File diff suppressed because it is too large Load Diff
+41 -32
View File
@@ -2,44 +2,53 @@
#define Z_DM_STK_H
#include "global.h"
#include "objects/object_stk/object_stk.h"
struct DmStk;
typedef void (*DmStkActionFunc)(struct DmStk*, GlobalContext*);
#define DM_STK_GET_TYPE(thisx) ((thisx)->params)
typedef enum {
/* 0 */ DM_STK_TYPE_SKULL_KID,
/* 1 */ DM_STK_TYPE_MAJORAS_MASK,
} DmStkType;
typedef struct DmStk {
/* 0x0000 */ Actor actor;
/* 0x0144 */ SkelAnime skelAnime;
/* 0x0188 */ UNK_TYPE1 unk_188[0x108];
/* 0x0290 */ DmStkActionFunc actionFunc;
/* 0x0294 */ ColliderCylinder collider;
/* 0x02E0 */ s16 unk_2E0;
/* 0x02E4 */ s32 unk_2E4;
/* 0x02E8 */ u32 unk_2E8;
/* 0x02EC */ u32 unk_2EC;
/* 0x02F0 */ u32 unk_2F0;
/* 0x02F4 */ s32 unk_2F4;
/* 0x02F8 */ s32 unk_2F8;
/* 0x02FC */ s32 unk_2FC;
/* 0x0300 */ f32 unk_300;
/* 0x0304 */ Vec3f unk_304;
/* 0x0310 */ Vec3f unk_310;
/* 0x031C */ UNK_TYPE1 unk31C[0xC];
/* 0x0328 */ u16 unk_328;
/* 0x032A */ u16 unk_32A;
/* 0x032C */ u8 unk_32C;
/* 0x032D */ u8 unk_32D;
/* 0x032E */ u8 unk_32E;
/* 0x032F */ u8 unk_32F;
/* 0x0330 */ s32 unk_330;
/* 0x0334 */ u8 unk_334;
/* 0x0335 */ u8 unk_335;
/* 0x0336 */ s8 unk_336;
/* 0x0337 */ s8 unk_337;
/* 0x0338 */ s8 unk_338;
/* 0x0339 */ u8 unk_339;
/* 0x033A */ u8 unk_33A;
/* 0x033B */ u8 unk_33B;
/* 0x000 */ Actor actor;
/* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ Vec3s jointTable[SKULL_KID_LIMB_MAX]; // Not used, since it's allocated dynamically instead.
/* 0x20C */ Vec3s morphTable[SKULL_KID_LIMB_MAX]; // Not used, since it's allocated dynamically instead.
/* 0x290 */ DmStkActionFunc actionFunc;
/* 0x294 */ ColliderCylinder collider;
/* 0x2E0 */ s16 animationId;
/* 0x2E4 */ s32 alpha;
/* 0x2E8 */ u32 fogR;
/* 0x2EC */ u32 fogG;
/* 0x2F0 */ u32 fogB;
/* 0x2F4 */ s32 fogA;
/* 0x2F8 */ s32 fogN;
/* 0x2FC */ s32 fogF;
/* 0x300 */ f32 fogScale;
/* 0x304 */ Vec3f headPos; // set but never used
/* 0x310 */ Vec3f oathToOrderCutsceneVoicePos;
/* 0x31C */ UNK_TYPE1 unk31C[0xC];
/* 0x328 */ u16 tatlMessageTimer;
/* 0x32A */ u16 bobPhase;
/* 0x32C */ u8 maskType;
/* 0x32D */ u8 handType;
/* 0x32E */ u8 fadeInState;
/* 0x32F */ u8 fadeOutState;
/* 0x330 */ s32 fadeOutTimer;
/* 0x334 */ u8 csAction;
/* 0x335 */ u8 hasBeenHit; // set but never used
/* 0x336 */ s8 objectStkObjectIndex;
/* 0x337 */ s8 objectStk2ObjectIndex;
/* 0x338 */ s8 objectStk3ObjectIndex;
/* 0x339 */ u8 deflectCount;
/* 0x33A */ u8 dekuPipesCutsceneState;
/* 0x33B */ u8 shouldDraw;
} DmStk; // size = 0x33C
extern const ActorInit Dm_Stk_InitVars;