1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 17:00:19 +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

@ -169,8 +169,7 @@ s32 EnFw_SpawnDust(EnFw* this, u8 timer, f32 scale, f32 scaleStep, s32 dustCnt,
void EnFw_Init(Actor* thisx, GlobalContext* globalCtx) {
EnFw* this = THIS;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06007C30, NULL, this->limbDrawTable, this->transitionDrawTable,
11);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06007C30, NULL, this->jointTable, this->morphTable, 11);
func_80034EC0(&this->skelAnime, D_80A1FBA0, 0);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 20.0f);
Collider_InitJntSph(globalCtx, &this->collider);
@ -201,9 +200,9 @@ void EnFw_Run(EnFw* this, GlobalContext* globalCtx) {
EnBom* bomb;
Actor* flareDancer;
Math_SmoothStepToF(&this->skelAnime.animPlaybackSpeed, 1.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&this->skelAnime.playSpeed, 1.0f, 0.1f, 1.0f, 0.0f);
if (this->skelAnime.animation == &D_06006CF8) {
if (func_800A56C8(&this->skelAnime, this->skelAnime.animFrameCount) == 0) {
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) == 0) {
this->runRadius = Math_Vec3f_DistXYZ(&this->actor.posRot.pos, &this->actor.parent->posRot.pos);
func_80034EC0(&this->skelAnime, D_80A1FBA0, 2);
}
@ -225,7 +224,7 @@ void EnFw_Run(EnFw* this, GlobalContext* globalCtx) {
}
if (this->explosionTimer != 0) {
this->skelAnime.animPlaybackSpeed = 0.0f;
this->skelAnime.playSpeed = 0.0f;
Math_SmoothStepToF(&this->actor.scale.x, 0.024999999f, 0.08f, 0.6f, 0.0f);
Actor_SetScale(&this->actor, this->actor.scale.x);
if (this->actor.dmgEffectTimer == 0) {
@ -292,7 +291,7 @@ void EnFw_Run(EnFw* this, GlobalContext* globalCtx) {
this->slideSfxTimer = 4;
}
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 1.0f, 0.0f);
this->skelAnime.animPlaybackSpeed = 0.0f;
this->skelAnime.playSpeed = 0.0f;
EnFw_SpawnDust(this, 8, 0.16f, 0.2f, 3, 8.0f, 20.0f, ((Rand_ZeroOne() - 0.5f) * 0.2f) + 0.3f);
this->slideTimer--;
if (this->slideTimer == 0) {
@ -301,7 +300,7 @@ void EnFw_Run(EnFw* this, GlobalContext* globalCtx) {
}
} else {
Math_SmoothStepToF(&this->actor.speedXZ, 6.0f, 0.1f, 1.0f, 0.0f);
phi_v0 = this->skelAnime.animCurrentFrame;
phi_v0 = this->skelAnime.curFrame;
if (phi_v0 == 1 || phi_v0 == 4) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_MAN_RUN);
EnFw_SpawnDust(this, 8, 0.16f, 0.1f, 1, 0.0f, 20.0f, 0.0f);
@ -338,7 +337,7 @@ void EnFw_JumpToParentInitPos(EnFw* this, GlobalContext* globalCtx) {
void EnFw_Update(Actor* thisx, GlobalContext* globalCtx) {
EnFw* this = THIS;
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
SkelAnime_Update(&this->skelAnime);
if ((this->actor.flags & 0x2000) != 0x2000) {
// not attached to hookshot.
Actor_MoveForward(&this->actor);
@ -353,7 +352,7 @@ void EnFw_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 EnFw_OverrideLimbDraw(GlobalContext* globalContext, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void* thisx) {
return 0;
return false;
}
void EnFw_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
@ -381,7 +380,7 @@ void EnFw_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnFw_DrawDust(this, globalCtx);
Matrix_Pull();
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,
EnFw_OverrideLimbDraw, EnFw_PostLimbDraw, this);
}

View file

@ -40,8 +40,8 @@ typedef struct EnFw {
/* 0x0212 */ s16 returnToParentTimer;
/* 0x0214 */ s16 turnAround;
/* 0x0218 */ f32 runRadius;
/* 0x021C */ Vec3s limbDrawTable[11];
/* 0x025E */ Vec3s transitionDrawTable[11];
/* 0x021C */ Vec3s jointTable[11];
/* 0x025E */ Vec3s morphTable[11];
/* 0x02A0 */ EnFwEffect effects[20];
} EnFw; // size = 0x0700