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
|
@ -102,9 +102,8 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 72.0f);
|
||||
switch (this->actor.params) {
|
||||
case 0:
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06004010, NULL, this->limbDrawTable,
|
||||
this->transitionDrawTable, 6);
|
||||
SkelAnime_ChangeAnimDefaultRepeat(&this->skelAnime, &D_060001CC);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06004010, NULL, this->jointTable, this->morphTable, 6);
|
||||
Animation_PlayLoop(&this->skelAnime, &D_060001CC);
|
||||
Collider_InitCylinder(globalCtx, &this->colliders[0]);
|
||||
Collider_SetCylinder(globalCtx, &this->colliders[0], &this->actor, &sCylinderInit);
|
||||
Collider_InitCylinder(globalCtx, &this->colliders[1]);
|
||||
|
@ -129,9 +128,8 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
DREG(53) = 0;
|
||||
break;
|
||||
case 1:
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06004C30, NULL, this->limbDrawTable,
|
||||
this->transitionDrawTable, 6);
|
||||
SkelAnime_ChangeAnimDefaultRepeat(&this->skelAnime, &D_06004348);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06004C30, NULL, this->jointTable, this->morphTable, 6);
|
||||
Animation_PlayLoop(&this->skelAnime, &D_06004348);
|
||||
this->actor.update = func_809DFE98;
|
||||
this->actor.draw = func_809E0070;
|
||||
this->actionFunc = func_809DFA84;
|
||||
|
@ -159,8 +157,8 @@ void func_809DF494(EnCow* this, GlobalContext* globalCtx) {
|
|||
this->unk_278 -= 1;
|
||||
} else {
|
||||
this->unk_278 = Rand_ZeroFloat(500.0f) + 40.0f;
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060001CC, 1.0f, this->skelAnime.animCurrentFrame,
|
||||
SkelAnime_GetFrameCount(&D_060001CC), 2, 1.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060001CC, 1.0f, this->skelAnime.curFrame,
|
||||
Animation_GetLastFrame(&D_060001CC), 2, 1.0f);
|
||||
}
|
||||
|
||||
if ((this->actor.xzDistFromLink < 150.0f) && (!(this->unk_276 & 2))) {
|
||||
|
@ -275,8 +273,8 @@ void func_809DFA84(EnCow* this, GlobalContext* globalCtx) {
|
|||
this->unk_278--;
|
||||
} else {
|
||||
this->unk_278 = Rand_ZeroFloat(200.0f) + 40.0f;
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004348, 1.0f, this->skelAnime.animCurrentFrame,
|
||||
SkelAnime_GetFrameCount(&D_06004348), 2, 1.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06004348, 1.0f, this->skelAnime.curFrame,
|
||||
Animation_GetLastFrame(&D_06004348), 2, 1.0f);
|
||||
}
|
||||
|
||||
if ((this->actor.xzDistFromLink < 150.0f) &&
|
||||
|
@ -300,14 +298,12 @@ void EnCow_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[1].base);
|
||||
Actor_MoveForward(thisx);
|
||||
func_8002E4B4(globalCtx, thisx, 0.0f, 0.0f, 0.0f, 4);
|
||||
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime) != 0) {
|
||||
if (SkelAnime_Update(&this->skelAnime) != 0) {
|
||||
if (this->skelAnime.animation == &D_060001CC) {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_COW_CRY);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004264, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06004264), 2,
|
||||
1.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06004264, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004264), 2, 1.0f);
|
||||
} else {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060001CC, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060001CC), 0,
|
||||
1.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060001CC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060001CC), 0, 1.0f);
|
||||
}
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
@ -340,13 +336,11 @@ void func_809DFE98(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnCow* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime) != 0) {
|
||||
if (SkelAnime_Update(&this->skelAnime) != 0) {
|
||||
if (this->skelAnime.animation == &D_06004348) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004E98, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06004E98), 2,
|
||||
1.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06004E98, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004E98), 2, 1.0f);
|
||||
} else {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004348, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06004348), 0,
|
||||
1.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06004348, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004348), 0, 1.0f);
|
||||
}
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
@ -362,7 +356,7 @@ s32 EnCow_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
if (limbIndex == 5) {
|
||||
*dList = NULL;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnCow_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
|
@ -377,7 +371,7 @@ void EnCow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnCow* this = THIS;
|
||||
|
||||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnCow_OverrideLimbDraw, EnCow_PostLimbDraw, this);
|
||||
}
|
||||
|
||||
|
@ -385,6 +379,6 @@ void func_809E0070(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnCow* this = THIS;
|
||||
|
||||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, this);
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ typedef struct EnCow {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ColliderCylinder colliders[2];
|
||||
/* 0x01E4 */ SkelAnime skelAnime;
|
||||
/* 0x0228 */ Vec3s limbDrawTable[6];
|
||||
/* 0x024C */ Vec3s transitionDrawTable[6];
|
||||
/* 0x0228 */ Vec3s jointTable[6];
|
||||
/* 0x024C */ Vec3s morphTable[6];
|
||||
/* 0x0270 */ Vec3s someRot;
|
||||
/* 0x0276 */ u16 unk_276;
|
||||
/* 0x0278 */ u16 unk_278;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue