mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 08:50:23 +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
|
@ -101,7 +101,7 @@ extern AnimationHeader D_06000AFC;
|
|||
extern Gfx D_0600EDE8[];
|
||||
extern AnimationHeader D_060014E4;
|
||||
extern AnimationHeader D_06001868;
|
||||
extern SkeletonHeader D_0600F788;
|
||||
extern FlexSkeletonHeader D_0600F788;
|
||||
extern AnimationHeader D_0600FB10;
|
||||
extern AnimationHeader D_060101C8;
|
||||
extern AnimationHeader D_06010EE0;
|
||||
|
@ -281,8 +281,8 @@ void func_80985200(DemoIm* this, GlobalContext* globalCtx, s32 actionIdx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80985280(DemoIm* this, AnimationHeader* animationHeader, u8 arg2, f32 transitionRate, s32 arg4) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&animationHeader->genericHeader);
|
||||
void func_80985280(DemoIm* this, AnimationHeader* animHeaderSeg, u8 arg2, f32 transitionRate, s32 arg4) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(animHeaderSeg);
|
||||
f32 playbackSpeed;
|
||||
f32 unk0;
|
||||
f32 fc;
|
||||
|
@ -297,7 +297,7 @@ void func_80985280(DemoIm* this, AnimationHeader* animationHeader, u8 arg2, f32
|
|||
playbackSpeed = -1.0f;
|
||||
}
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, animationHeader, playbackSpeed, unk0, fc, arg2, transitionRate);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, animHeaderSeg, playbackSpeed, unk0, fc, arg2, transitionRate);
|
||||
}
|
||||
|
||||
void func_80985310(DemoIm* this, GlobalContext* globalCtx) {
|
||||
|
@ -345,8 +345,7 @@ void func_8098544C(DemoIm* this, GlobalContext* globalCtx) {
|
|||
void func_809854DC(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[5] != NULL) &&
|
||||
(globalCtx->csCtx.npcActions[5]->action == 2)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_06001868.genericHeader), 0, 0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06001868), 0, 0.0f);
|
||||
this->action = 2;
|
||||
this->drawConfig = 1;
|
||||
func_80985358(this, globalCtx);
|
||||
|
@ -363,16 +362,14 @@ void func_8098557C(DemoIm* this) {
|
|||
void func_809855A8(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[5] != NULL) &&
|
||||
(globalCtx->csCtx.npcActions[5]->action == 3)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000710, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_06000710.genericHeader), 2, 4.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000710, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06000710), 2, 4.0f);
|
||||
this->action = 4;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80985640(DemoIm* this, s32 arg1) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000AFC, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_06000AFC.genericHeader), 0, 0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000AFC, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06000AFC), 0, 0.0f);
|
||||
this->action = 5;
|
||||
}
|
||||
}
|
||||
|
@ -446,8 +443,7 @@ void func_809858C8(DemoIm* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80985948(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if (func_809850E8(this, globalCtx, 4, 5)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06011C08, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_06011C08.genericHeader), 2, 0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06011C08, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06011C08), 2, 0.0f);
|
||||
this->action = 8;
|
||||
this->drawConfig = 2;
|
||||
this->unk_26C = 0;
|
||||
|
@ -486,8 +482,7 @@ void func_809859E0(DemoIm* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80985B34(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if (func_80985134(this, globalCtx, 4, 5)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06012218, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_06012218.genericHeader), 2, -8.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06012218, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06012218), 2, -8.0f);
|
||||
this->action = 8;
|
||||
this->drawConfig = 2;
|
||||
this->unk_268 = kREG(5) + 10.0f;
|
||||
|
@ -536,8 +531,8 @@ void func_80985CE8(DemoIm* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_26C);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
|
||||
|
||||
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
|
||||
NULL, NULL, NULL, POLY_XLU_DISP);
|
||||
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
|
||||
NULL, NULL, NULL, POLY_XLU_DISP);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 308);
|
||||
}
|
||||
|
@ -557,7 +552,7 @@ void func_80985EAC(DemoIm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80985EF4(DemoIm* this) {
|
||||
if (!func_800A56C8(&this->skelAnime, SkelAnime_GetFrameCount(&D_0601182C.genericHeader) - 1.0f)) {
|
||||
if (!func_800A56C8(&this->skelAnime, SkelAnime_GetFrameCount(&D_0601182C) - 1.0f)) {
|
||||
func_80985060(this);
|
||||
}
|
||||
}
|
||||
|
@ -568,8 +563,7 @@ void func_80985F54(DemoIm* this) {
|
|||
}
|
||||
|
||||
void func_80985F64(DemoIm* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06001868.genericHeader),
|
||||
0, 0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06001868), 0, 0.0f);
|
||||
func_80985180(this, globalCtx, 5);
|
||||
this->action = 11;
|
||||
this->drawConfig = 1;
|
||||
|
@ -577,13 +571,12 @@ void func_80985F64(DemoIm* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80985FE8(DemoIm* this, s32 arg1) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_0601182C, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_0601182C.genericHeader), 0, -8.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_0601182C, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_0601182C), 0, -8.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8098604C(DemoIm* this) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06010EE0.genericHeader);
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06010EE0);
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06010EE0, 1.0f, 0.0f, frameCount, 2, -8.0f);
|
||||
this->action = 12;
|
||||
|
@ -598,15 +591,13 @@ void func_809860C8(DemoIm* this) {
|
|||
|
||||
void func_809860DC(DemoIm* this, s32 arg1) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_06001868.genericHeader), 0, -8.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06001868), 0, -8.0f);
|
||||
this->unk_2D0 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80986148(DemoIm* this) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06010EE0, -1.0f, SkelAnime_GetFrameCount(&D_06010EE0.genericHeader), 0.0f,
|
||||
2, -8.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06010EE0, -1.0f, SkelAnime_GetFrameCount(&D_06010EE0), 0.0f, 2, -8.0f);
|
||||
this->action = 14;
|
||||
this->drawConfig = 1;
|
||||
}
|
||||
|
@ -625,7 +616,7 @@ void func_809861C4(DemoIm* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 7:
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_0601182C, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&D_0601182C.genericHeader), 0, -8.0f);
|
||||
SkelAnime_GetFrameCount(&D_0601182C), 0, -8.0f);
|
||||
this->action = 12;
|
||||
break;
|
||||
default:
|
||||
|
@ -759,16 +750,14 @@ void func_80986700(DemoIm* this) {
|
|||
}
|
||||
|
||||
void func_80986710(DemoIm* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06001868.genericHeader),
|
||||
0, 0.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001868, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06001868), 0, 0.0f);
|
||||
func_80985180(this, globalCtx, 5);
|
||||
this->action = 16;
|
||||
this->drawConfig = 1;
|
||||
}
|
||||
|
||||
void func_80986794(DemoIm* this) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060014E4, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060014E4.genericHeader),
|
||||
2, -8.0f);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060014E4, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060014E4), 2, -8.0f);
|
||||
this->action = 17;
|
||||
this->drawConfig = 1;
|
||||
}
|
||||
|
@ -1106,8 +1095,8 @@ void DemoIm_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
func_80984D00(thisx, globalCtx);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600F788, NULL, this->limbDrawTable, this->transitionDrawTable,
|
||||
17);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600F788, NULL, this->limbDrawTable, this->transitionDrawTable,
|
||||
17);
|
||||
thisx->flags &= ~1;
|
||||
|
||||
switch (this->actor.params) {
|
||||
|
@ -1135,7 +1124,7 @@ void DemoIm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80984D4C(thisx, globalCtx);
|
||||
}
|
||||
|
||||
s32 func_80987514(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
s32 func_80987514(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
DemoIm* this = THIS;
|
||||
s32* unk_2D0 = &this->unk_2D0;
|
||||
|
||||
|
@ -1163,20 +1152,20 @@ s32 func_80987514(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
return 0;
|
||||
}
|
||||
|
||||
void func_809875C0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
s32 pad;
|
||||
void func_809875C0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
DemoIm* this = THIS;
|
||||
|
||||
if (limbIndex == 0x10) {
|
||||
Vec3f sp28 = D_809887D8;
|
||||
Vec3f dest;
|
||||
|
||||
Matrix_MultVec3f(&sp28, &dest);
|
||||
thisx->posRot2.pos.x = dest.x;
|
||||
thisx->posRot2.pos.y = dest.y;
|
||||
thisx->posRot2.pos.z = dest.z;
|
||||
thisx->posRot2.rot.x = thisx->posRot.rot.x;
|
||||
thisx->posRot2.rot.y = thisx->posRot.rot.y;
|
||||
thisx->posRot2.rot.z = thisx->posRot.rot.z;
|
||||
this->actor.posRot2.pos.x = dest.x;
|
||||
this->actor.posRot2.pos.y = dest.y;
|
||||
this->actor.posRot2.pos.z = dest.z;
|
||||
this->actor.posRot2.rot.x = this->actor.posRot.rot.x;
|
||||
this->actor.posRot2.rot.y = this->actor.posRot.rot.y;
|
||||
this->actor.posRot2.rot.z = this->actor.posRot.rot.z;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1198,8 +1187,8 @@ void func_80987658(DemoIm* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
|
||||
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, func_80987514,
|
||||
func_809875C0, &this->actor);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, func_80987514,
|
||||
func_809875C0, this);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_im.c", 925);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue