mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 06:40:15 +00:00
SkelAnime "Skeleton" Documentation Pass (#497)
* Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * could be useful * whoops * ZAP2 stuff * ZAP why * ZAP again * spooky scary skeletons * there's a skeleton inside of you * formatting * types * a matched function even * undo change * lol anime * ok how did I forget the .s * array fix * would you like to ride the bone train? * stuff * more renames * renames and cleanup * names suck * idea * using void** for now * stuff * look more type fixes Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
parent
629d1c8968
commit
4876610c75
268 changed files with 1941 additions and 2045 deletions
|
@ -70,7 +70,7 @@ typedef enum {
|
|||
/* 0x04 */ SHELLBLADE_BOUNCE,
|
||||
} ShellbladeBehavior;
|
||||
|
||||
extern SkeletonHeader D_06002BF0;
|
||||
extern FlexSkeletonHeader D_06002BF0;
|
||||
extern AnimationHeader D_06000194;
|
||||
extern AnimationHeader D_0600004C;
|
||||
extern AnimationHeader D_06000124;
|
||||
|
@ -83,7 +83,7 @@ void EnSb_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
this->actor.colChkInfo.health = 2;
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06002BF0, &D_06000194, NULL, NULL, 0);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06002BF0, &D_06000194, NULL, NULL, 0);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder_Set3(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->isDead = false;
|
||||
|
@ -115,29 +115,26 @@ void EnSb_SpawnBubbles(GlobalContext* globalCtx, EnSb* this) {
|
|||
}
|
||||
|
||||
void EnSb_SetupWaitClosed(EnSb* this) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600004C, 1.0f, 0, SkelAnime_GetFrameCount(&D_0600004C.genericHeader), 2,
|
||||
0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600004C, 1.0f, 0, SkelAnime_GetFrameCount(&D_0600004C), 2, 0.0f);
|
||||
this->behavior = SHELLBLADE_WAIT_CLOSED;
|
||||
this->actionFunc = EnSb_WaitClosed;
|
||||
}
|
||||
|
||||
void EnSb_SetupOpen(EnSb* this) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000194, 1.0f, 0, SkelAnime_GetFrameCount(&D_06000194.genericHeader), 2,
|
||||
0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000194, 1.0f, 0, SkelAnime_GetFrameCount(&D_06000194), 2, 0.0f);
|
||||
this->behavior = SHELLBLADE_OPEN;
|
||||
this->actionFunc = EnSb_Open;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_SHELL_MOUTH);
|
||||
}
|
||||
|
||||
void EnSb_SetupWaitOpen(EnSb* this) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002C8C, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002C8C.genericHeader), 0,
|
||||
0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002C8C, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002C8C), 0, 0.0f);
|
||||
this->behavior = SHELLBLADE_WAIT_OPEN;
|
||||
this->actionFunc = EnSb_WaitOpen;
|
||||
}
|
||||
|
||||
void EnSb_SetupLunge(EnSb* this) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06000124.genericHeader);
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06000124);
|
||||
f32 playbackSpeed = this->actor.waterY > 0.0f ? 1.0f : 0.0f;
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000124, playbackSpeed, 0.0f, frameCount, 2, 0);
|
||||
|
@ -147,17 +144,16 @@ void EnSb_SetupLunge(EnSb* this) {
|
|||
}
|
||||
|
||||
void EnSb_SetupBounce(EnSb* this) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060000B4, 1.0f, 0, SkelAnime_GetFrameCount(&D_060000B4.genericHeader), 2,
|
||||
0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060000B4, 1.0f, 0, SkelAnime_GetFrameCount(&D_060000B4), 2, 0.0f);
|
||||
this->behavior = SHELLBLADE_BOUNCE;
|
||||
this->actionFunc = EnSb_Bounce;
|
||||
}
|
||||
|
||||
void EnSb_SetupCooldown(EnSb* this, s32 changeSpeed) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_0600004C.genericHeader);
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_0600004C);
|
||||
|
||||
if (this->behavior != SHELLBLADE_WAIT_CLOSED) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600004C.genericHeader, 1.0f, 0, frameCount, 2, 0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600004C, 1.0f, 0, frameCount, 2, 0.0f);
|
||||
}
|
||||
this->behavior = SHELLBLADE_WAIT_CLOSED;
|
||||
if (changeSpeed) {
|
||||
|
@ -189,7 +185,7 @@ void EnSb_WaitClosed(EnSb* this, GlobalContext* globalCtx) {
|
|||
void EnSb_Open(EnSb* this, GlobalContext* globalCtx) {
|
||||
f32 currentFrame = this->skelAnime.animCurrentFrame;
|
||||
|
||||
if (SkelAnime_GetFrameCount(&D_06000194.genericHeader) <= currentFrame) {
|
||||
if (SkelAnime_GetFrameCount(&D_06000194) <= currentFrame) {
|
||||
this->timer = 15;
|
||||
EnSb_SetupWaitOpen(this);
|
||||
} else {
|
||||
|
@ -260,7 +256,7 @@ void EnSb_Bounce(EnSb* this, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
|
||||
currentFrame = this->skelAnime.animCurrentFrame;
|
||||
frameCount = SkelAnime_GetFrameCount(&D_060000B4.genericHeader);
|
||||
frameCount = SkelAnime_GetFrameCount(&D_060000B4);
|
||||
Math_ApproxF(&this->actor.speedXZ, 0.0f, 0.2f);
|
||||
|
||||
if (currentFrame == frameCount) {
|
||||
|
@ -445,7 +441,7 @@ void EnSb_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void EnSb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
|
||||
void EnSb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
EnSb* this = THIS;
|
||||
|
||||
func_80032F54(&this->unk_1E0, limbIndex, 0, 6, 8, dList, -1);
|
||||
|
@ -458,8 +454,8 @@ void EnSb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s16 fireDecr;
|
||||
|
||||
func_8002EBCC(&this->actor, globalCtx, 1);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, NULL,
|
||||
EnSb_PostLimbDraw, &this->actor);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
NULL, EnSb_PostLimbDraw, this);
|
||||
if (this->fire != 0) {
|
||||
this->actor.dmgEffectTimer++;
|
||||
fireDecr = this->fire - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue