1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 14:50:15 +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

@ -73,9 +73,8 @@ void EnAni_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, -2800.0f, ActorShadow_DrawFunc_Circle, 36.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060000F0, &D_060076EC, this->limbDrawTable,
this->transitionDrawTable, 0x10);
SkelAnime_ChangeAnimDefaultStop(&this->skelAnime, &D_060076EC);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060000F0, &D_060076EC, this->jointTable, this->morphTable, 0x10);
Animation_PlayOnce(&this->skelAnime, &D_060076EC);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = 0xFF;
@ -209,24 +208,24 @@ void func_809B0988(EnAni* this, GlobalContext* globalCtx) {
void func_809B0994(EnAni* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.npcActions[0]->action == 4) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_060070F0, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060070F0), 2, -4.0f);
Animation_Change(&this->skelAnime, &D_060070F0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060070F0), 2, -4.0f);
this->unk_2AA++;
this->actor.shape.shadowDrawFunc = ActorShadow_DrawFunc_Circle;
}
}
void func_809B0A28(EnAni* this, GlobalContext* globalCtx) {
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime)) {
if (SkelAnime_Update(&this->skelAnime)) {
this->unk_2AA++;
}
}
void func_809B0A6C(EnAni* this, GlobalContext* globalCtx) {
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime)) {
this->skelAnime.animCurrentFrame = 0.0f;
if (SkelAnime_Update(&this->skelAnime)) {
this->skelAnime.curFrame = 0.0f;
}
if (globalCtx->csCtx.npcActions[0]->action == 2) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_060067B8, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060067B8), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060067B8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060067B8), 2, 0.0f);
this->actor.shape.shadowDrawFunc = NULL;
this->unk_2AA++;
}
@ -263,8 +262,8 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) {
func_800788CC(NA_SE_IT_EARTHQUAKE);
}
} else {
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime) != 0) {
this->skelAnime.animCurrentFrame = 0.0f;
if (SkelAnime_Update(&this->skelAnime) != 0) {
this->skelAnime.curFrame = 0.0f;
}
this->actionFunc(this, globalCtx);
}
@ -297,7 +296,7 @@ s32 EnAni_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
rot->x += this->unk_29C.y;
rot->z += this->unk_29C.x;
}
return 0;
return false;
}
void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
@ -318,7 +317,7 @@ void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809B0F80[this->unk_2AC]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ani.c", 736);

View file

@ -12,8 +12,8 @@ typedef struct EnAni {
/* 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;