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

@ -67,8 +67,7 @@ void EnCrow_Init(Actor* thisx, GlobalContext* globalCtx) {
EnCrow* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060010C0, &D_060000F0, &this->limbDrawTable,
&this->transitionDrawTable, 9);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060010C0, &D_060000F0, this->jointTable, this->morphTable, 9);
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, &this->colliderItems);
this->collider.list[0].dim.worldSphere.radius = sJntSphInit.list->dim.modelSphere.radius;
@ -88,13 +87,13 @@ void EnCrow_SetupWait(EnCrow* this) {
this->timer = 100;
this->collider.base.acFlags |= 1;
this->actionFunc = EnCrow_Wait;
this->skelAnime.animPlaybackSpeed = 1.0f;
this->skelAnime.playSpeed = 1.0f;
}
void func_809E0384(EnCrow* this) {
this->timer = 300;
this->actor.speedXZ = 4.0f;
this->skelAnime.animPlaybackSpeed = 2.0f;
this->skelAnime.playSpeed = 2.0f;
this->actionFunc = func_809E0C8C;
}
@ -105,7 +104,7 @@ void func_809E03B4(EnCrow* this, GlobalContext* globalCtx) {
this->actor.speedXZ *= Math_CosS(this->actor.posRot.rot.x);
this->actor.velocity.y = 0.0f;
SkelAnime_ChangeAnim(&this->skelAnime, &D_060000F0, 0.4f, 0.0f, 0.0f, 1, -3.0f);
Animation_Change(&this->skelAnime, &D_060000F0, 0.4f, 0.0f, 0.0f, 1, -3.0f);
scale = this->actor.scale.x * 100.0f;
this->actor.posRot.pos.y += 20.0f * scale;
this->actor.bgCheckFlags &= ~1;
@ -152,7 +151,7 @@ void func_809E06E8(EnCrow* this) {
this->actor.speedXZ = 3.5f;
this->aimRotX = -0x1000;
this->aimRotY = this->actor.yawTowardsLink + 0x8000;
this->skelAnime.animPlaybackSpeed = 2.0f;
this->skelAnime.playSpeed = 2.0f;
func_8003426C(&this->actor, 0, 255, 0, 5);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
this->actionFunc = func_809E1004;
@ -168,7 +167,7 @@ void func_809E0770(EnCrow* this) {
this->collider.list[0].dim.worldSphere.radius = sJntSphInit.list->dim.modelSphere.radius;
}
SkelAnime_ChangeAnimDefaultRepeat(&this->skelAnime, &D_060000F0);
Animation_PlayLoop(&this->skelAnime, &D_060000F0);
Math_Vec3f_Copy(&this->actor.posRot, &this->actor.initPosRot);
this->actor.shape.rot.x = 0;
this->actor.shape.rot.z = 0;
@ -184,8 +183,8 @@ void EnCrow_Wait(EnCrow* this, GlobalContext* globalCtx) {
s32 skelanimeUpdated;
s16 var;
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
skelanimeUpdated = func_800A56C8(&this->skelAnime, 0.0f);
SkelAnime_Update(&this->skelAnime);
skelanimeUpdated = Animation_OnFrame(&this->skelAnime, 0.0f);
this->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 3.0f;
if (this->actor.bgCheckFlags & 8) {
@ -242,7 +241,7 @@ void func_809E0C8C(EnCrow* this, GlobalContext* globalCtx) {
Vec3f pos;
s16 target;
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
SkelAnime_Update(&this->skelAnime);
if (this->timer != 0) {
this->timer--;
}
@ -317,7 +316,7 @@ void EnCrow_Die(EnCrow* this, GlobalContext* globalCtx) {
}
void func_809E1004(EnCrow* this, GlobalContext* globalCtx) {
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
SkelAnime_Update(&this->skelAnime);
if (this->actor.bgCheckFlags & 8) {
this->aimRotY = this->actor.wallPolyRot;
@ -344,7 +343,7 @@ void func_809E10A8(EnCrow* this, GlobalContext* globalCtx) {
}
if (this->timer == 0) {
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
SkelAnime_Update(&this->skelAnime);
this->actor.draw = EnCrow_Draw;
if (this->actor.params != 0) {
target = 0.03f;
@ -421,7 +420,7 @@ void EnCrow_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetHeight(&this->actor, height);
if (this->actor.colChkInfo.health != 0 && func_800A56C8(&this->skelAnime, 3.0f)) {
if (this->actor.colChkInfo.health != 0 && Animation_OnFrame(&this->skelAnime, 3.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_FLUTTER);
}
}
@ -431,9 +430,9 @@ s32 EnCrow_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
if (this->actor.colChkInfo.health != 0) {
if (limbIndex == 7) {
rot->y += 0xC00 * sinf(this->skelAnime.animCurrentFrame * (M_PI / 4));
rot->y += 0xC00 * sinf(this->skelAnime.curFrame * (M_PI / 4));
} else if (limbIndex == 8) {
rot->y += 0x1400 * sinf((this->skelAnime.animCurrentFrame + 2.5f) * (M_PI / 4));
rot->y += 0x1400 * sinf((this->skelAnime.curFrame + 2.5f) * (M_PI / 4));
}
}
return false;
@ -457,6 +456,6 @@ void EnCrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnCrow* this = THIS;
func_80093D18(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,
EnCrow_OverrideLimbDraw, EnCrow_PostLimbDraw, this);
}

View file

@ -16,8 +16,8 @@ typedef struct EnCrow {
/* 0x01C4 */ s16 timer;
/* 0x01C6 */ s16 aimRotX;
/* 0x01C8 */ s16 aimRotY;
/* 0x01CA */ Vec3s limbDrawTable[9];
/* 0x0200 */ Vec3s transitionDrawTable[9];
/* 0x01CA */ Vec3s jointTable[9];
/* 0x0200 */ Vec3s morphTable[9];
/* 0x0238 */ ColliderJntSph collider;
/* 0x0258 */ ColliderJntSphItem colliderItems[1];
} EnCrow; // size = 0x0298