mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
Docs for the Anime part of SkelAnime (#517)
* 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 * more names * so many names * we got subsystems now * slight cleanup * merge part 2 * new naming scheme * slight adjustment * no limit * syms maybe * step one * OK, it's fixed * table * some names and such * comments** * update zap * gitkeep to please jenkins * ZAP * fixer * fixer2 * fixer3 * zap Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
parent
e4d88bf942
commit
2dfa188706
1187 changed files with 5434 additions and 5367 deletions
|
@ -110,8 +110,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->unk_2E0 = 60.0f;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_06005C30, this->limbDrawTable,
|
||||
this->transitionDrawTable, 17);
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_06005C30, this->jointTable, this->morphTable, 17);
|
||||
collider = &this->collider;
|
||||
Collider_InitCylinder(globalCtx, collider);
|
||||
Collider_SetCylinder(globalCtx, collider, &this->actor, &sCylinderInit);
|
||||
|
@ -166,9 +165,9 @@ void func_80A531D8(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A531E4(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005C30);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
this->actionFunc = func_80A53278;
|
||||
}
|
||||
|
||||
|
@ -224,7 +223,7 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A5344C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
this->unk_300 = 5;
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
|
@ -253,7 +252,7 @@ void func_80A5344C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A53538(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_300 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
|
@ -264,10 +263,10 @@ void func_80A53538(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A535BC(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005500);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005500);
|
||||
|
||||
this->unk_2EC = frameCount;
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
|
||||
this->actionFunc = func_80A53638;
|
||||
}
|
||||
|
||||
|
@ -276,10 +275,10 @@ void func_80A53638(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
BgSpot15Saku* actor;
|
||||
|
||||
frameCount = this->skelAnime.animCurrentFrame;
|
||||
frameCount = this->skelAnime.curFrame;
|
||||
thisx = &this->actor;
|
||||
actor = globalCtx->actorCtx.actorList[ACTORTYPE_ITEMACTION].first;
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((frameCount >= 12.0f) && (!this->audioFlag)) {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_SPEAR_HIT);
|
||||
this->audioFlag = 1;
|
||||
|
@ -301,9 +300,9 @@ void func_80A53638(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A5372C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005C30);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
this->unk_2F2[0] = 200;
|
||||
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
|
@ -323,7 +322,7 @@ void func_80A5372C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
BgSpot15Saku* gate;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
gate = (BgSpot15Saku*)this->gate;
|
||||
if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) {
|
||||
|
@ -337,9 +336,9 @@ void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A53908(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005C30);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
this->actionFunc = func_80A5399C;
|
||||
}
|
||||
|
||||
|
@ -392,7 +391,7 @@ void func_80A53AD4(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
s16 yawDiffTemp;
|
||||
s16 yawDiff;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Text_GetFaceReaction(globalCtx, 5) != 0) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 5);
|
||||
} else {
|
||||
|
@ -419,7 +418,7 @@ void func_80A53AD4(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A53C0C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_300 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_8002DF54(globalCtx, 0, 8);
|
||||
|
@ -430,10 +429,10 @@ void func_80A53C0C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A53C90(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005500);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005500);
|
||||
|
||||
this->unk_2EC = frameCount;
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
|
||||
this->actionFunc = func_80A53D0C;
|
||||
}
|
||||
|
||||
|
@ -442,9 +441,9 @@ void func_80A53D0C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
BgGateShutter* gate;
|
||||
|
||||
frameCount = this->skelAnime.animCurrentFrame;
|
||||
frameCount = this->skelAnime.curFrame;
|
||||
gate = (BgGateShutter*)globalCtx->actorCtx.actorList[ACTORTYPE_ITEMACTION].first;
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (12.0f <= frameCount) {
|
||||
if (this->audioFlag == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SPEAR_HIT);
|
||||
|
@ -468,9 +467,9 @@ void func_80A53D0C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A53DF8(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005C30);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
this->unk_2F2[0] = 200;
|
||||
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
|
||||
|
@ -494,7 +493,7 @@ void func_80A53DF8(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
BgGateShutter* gate;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Gameplay_CameraSetAtEye(globalCtx, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
gate = (BgGateShutter*)this->gate;
|
||||
if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) {
|
||||
|
@ -521,7 +520,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A54038(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (func_8010BDBC(&globalCtx->msgCtx) == 5) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
gSaveContext.infTable[7] |= 0x40;
|
||||
|
@ -533,7 +532,7 @@ void func_80A54038(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 4) && (func_80106BC8(globalCtx) != 0)) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
|
@ -567,7 +566,7 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A541FC(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
this->actor.textId = 0x2021; // "You sold the 10-Rupee mask for 15 Rupees. You earned a little profit. Let's
|
||||
// go to the Mask Shop..."
|
||||
|
@ -578,7 +577,7 @@ void func_80A541FC(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A5427C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
|
||||
if (this->unk_30E == 0) {
|
||||
this->unk_30E = 0;
|
||||
|
@ -593,10 +592,10 @@ void func_80A5427C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A54320(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005500);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005500);
|
||||
|
||||
this->unk_2EC = frameCount;
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
|
||||
this->audioFlag = 0;
|
||||
this->actionFunc = func_80A543A0;
|
||||
}
|
||||
|
@ -606,10 +605,10 @@ void func_80A543A0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
BgGateShutter* gate;
|
||||
|
||||
frameCount = this->skelAnime.animCurrentFrame;
|
||||
frameCount = this->skelAnime.curFrame;
|
||||
thisx = &this->actor;
|
||||
gate = (BgGateShutter*)(globalCtx->actorCtx.actorList[ACTORTYPE_ITEMACTION].first);
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((frameCount >= 12.0f) && (!this->audioFlag)) {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_SPEAR_HIT);
|
||||
this->audioFlag = 1;
|
||||
|
@ -685,7 +684,7 @@ void func_80A546DC(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
s16 yawDiff;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (Text_GetFaceReaction(globalCtx, 5) != 0) {
|
||||
if (this->unk_30B == 0) {
|
||||
|
@ -745,14 +744,14 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A54954(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06005C30);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
|
||||
this->actionFunc = func_80A549E8;
|
||||
}
|
||||
|
||||
void func_80A549E8(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_300 == func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (func_80106BC8(globalCtx) != 0) {
|
||||
func_80106CCC(globalCtx);
|
||||
|
@ -819,7 +818,7 @@ s32 EnHeishi2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL
|
|||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnHeishi2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
|
@ -848,7 +847,7 @@ void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
||||
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, EnHeishi2_OverrideLimbDraw,
|
||||
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi2_OverrideLimbDraw,
|
||||
EnHeishi2_PostLimbDraw, this);
|
||||
if ((this->initParams == 5) && (gSaveContext.infTable[7] & 0x80)) {
|
||||
linkObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
|
|
|
@ -12,8 +12,8 @@ typedef void (*EnHeishi2ActionFunc)(struct EnHeishi2*, GlobalContext*);
|
|||
typedef struct EnHeishi2 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ Vec3s limbDrawTable[17];
|
||||
/* 0x01F6 */ Vec3s transitionDrawTable[17];
|
||||
/* 0x0190 */ Vec3s jointTable[17];
|
||||
/* 0x01F6 */ Vec3s morphTable[17];
|
||||
/* 0x025C */ EnHeishi2ActionFunc actionFunc;
|
||||
/* 0x0260 */ Vec3s unk_260;
|
||||
/* 0x0266 */ char unk_266[0x06];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue