1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 23:10:22 +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:
petrie911 2020-12-29 16:46:46 -06:00 committed by GitHub
parent e4d88bf942
commit 2dfa188706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1187 changed files with 5434 additions and 5367 deletions

View file

@ -51,9 +51,8 @@ void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 36.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06006260, &D_060005C0, this->limbDrawTable,
this->transitionDrawTable, 16);
SkelAnime_ChangeAnimDefaultRepeat(&this->skelAnime, &D_060005C0);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06006260, &D_060005C0, this->jointTable, this->morphTable, 16);
Animation_PlayLoop(&this->skelAnime, &D_060005C0);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = 0xFF;
@ -166,7 +165,7 @@ void func_80A6E7BC(EnHs* this, GlobalContext* globalCtx) {
break;
}
SkelAnime_ChangeAnim(&this->skelAnime, &D_060005C0, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060005C0), 0, 8.0f);
Animation_Change(&this->skelAnime, &D_060005C0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060005C0), 0, 8.0f);
}
this->unk_2A8 |= 1;
@ -178,7 +177,7 @@ void func_80A6E8CC(EnHs* this, GlobalContext* globalCtx) {
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
func_8010B720(globalCtx, 0x10B3);
func_80A6E3A0(this, func_80A6E7BC);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000528, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06000528), 0, 8.0f);
Animation_Change(&this->skelAnime, &D_06000528, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000528), 0, 8.0f);
}
if (this->unk_2AA > 0) {
@ -199,8 +198,7 @@ void func_80A6E9AC(EnHs* this, GlobalContext* globalCtx) {
if (func_8002F368(globalCtx) == 7) {
player->actor.textId = 0x10B2;
func_80A6E3A0(this, func_80A6E8CC);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000304, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06000304), 0,
8.0f);
Animation_Change(&this->skelAnime, &D_06000304, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000304), 0, 8.0f);
this->unk_2AA = 40;
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
} else {
@ -224,8 +222,8 @@ void EnHs_Update(Actor* thisx, GlobalContext* globalCtx) {
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
Actor_MoveForward(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime)) {
this->skelAnime.animCurrentFrame = 0.0f;
if (SkelAnime_Update(&this->skelAnime)) {
this->skelAnime.curFrame = 0.0f;
}
this->actionFunc(this, globalCtx);
@ -251,25 +249,24 @@ s32 EnHs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
break;
case 10:
*dList = NULL;
return 0;
return false;
case 11:
*dList = NULL;
return 0;
return false;
case 12:
if (this->actor.params == 1) {
*dList = NULL;
return 0;
return false;
}
break;
case 13:
if (this->actor.params == 1) {
*dList = NULL;
return 0;
return false;
}
break;
}
return 0;
return false;
}
void EnHs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
@ -285,6 +282,6 @@ void EnHs_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnHs* 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,
EnHs_OverrideLimbDraw, EnHs_PostLimbDraw, this);
}

View file

@ -12,8 +12,8 @@ typedef struct EnHs {
/* 0x0000 */ Actor actor;
/* 0x014C */ ColliderCylinder collider;
/* 0x0198 */ SkelAnime skelAnime;
/* 0x01DC */ Vec3s limbDrawTable[16];
/* 0x023C */ Vec3s transitionDrawTable[16];
/* 0x01DC */ Vec3s jointTable[16];
/* 0x023C */ Vec3s morphTable[16];
/* 0x029C */ Vec3s unk_29C;
/* 0x02A2 */ Vec3s unk_2A2;
/* 0x02A8 */ u16 unk_2A8;