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

@ -217,7 +217,7 @@ s32 EnFd_ColliderCheck(EnFd* this, GlobalContext* globalCtx) {
* towards `actor`, and there must not be a collision poly between `this` and `actor`
*/
s32 EnFd_CanSeeActor(EnFd* this, Actor* actor, GlobalContext* globalCtx) {
CollisionPoly** colPoly;
CollisionPoly* colPoly;
u32 bgId;
Vec3f colPoint;
s16 angle;
@ -349,8 +349,7 @@ void EnFd_Fade(EnFd* this, GlobalContext* globalCtx) {
void EnFd_Init(Actor* thisx, GlobalContext* globalCtx) {
EnFd* this = THIS;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06005810, NULL, this->limbDrawTable, this->transitionDrawTable,
27);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06005810, NULL, this->jointTable, this->morphTable, 27);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 32.0f);
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colSphs);
@ -384,7 +383,7 @@ void EnFd_Reappear(EnFd* this, GlobalContext* globalCtx) {
}
void EnFd_SpinAndGrow(EnFd* this, GlobalContext* globalCtx) {
if (func_800A56C8(&this->skelAnime, this->skelAnime.animFrameCount)) {
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
this->actor.velocity.y = 6.0f;
this->actor.scale.y = 0.01f;
this->actor.posRot.rot.y ^= 0x8000;
@ -393,7 +392,7 @@ void EnFd_SpinAndGrow(EnFd* this, GlobalContext* globalCtx) {
func_80034EC0(&this->skelAnime, sAnimations, 1);
this->actionFunc = EnFd_JumpToGround;
} else {
this->actor.scale.y = this->skelAnime.animCurrentFrame * (0.01f / this->skelAnime.totalFrames);
this->actor.scale.y = this->skelAnime.curFrame * (0.01f / this->skelAnime.animLength);
this->actor.shape.rot.y += 0x2000;
this->actor.posRot.rot.y = this->actor.shape.rot.y;
}
@ -412,8 +411,8 @@ void EnFd_JumpToGround(EnFd* this, GlobalContext* globalCtx) {
void EnFd_Land(EnFd* this, GlobalContext* globalCtx) {
Vec3f adjPos;
Math_SmoothStepToF(&this->skelAnime.animPlaybackSpeed, 1.0f, 0.1f, 1.0f, 0.0f);
if (func_800A56C8(&this->skelAnime, this->skelAnime.animFrameCount)) {
Math_SmoothStepToF(&this->skelAnime.playSpeed, 1.0f, 0.1f, 1.0f, 0.0f);
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
this->spinTimer = Rand_S16Offset(60, 90);
this->runRadius = Math_Vec3f_DistXYZ(&this->actor.posRot.pos, &this->actor.initPosRot.pos);
EnFd_GetPosAdjAroundCircle(&adjPos, this, this->runRadius, this->runDir);
@ -521,8 +520,7 @@ void EnFd_Run(EnFd* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(adjPos.x, adjPos.z) * (0x8000 / M_PI), 4, 0xFA0, 1);
this->actor.posRot.rot = this->actor.shape.rot;
func_8002F974(&this->actor, NA_SE_EN_FLAME_RUN - SFX_FLAG);
if (this->skelAnime.animCurrentFrame == 6.0f || this->skelAnime.animCurrentFrame == 13.0f ||
this->skelAnime.animCurrentFrame == 28.0f) {
if (this->skelAnime.curFrame == 6.0f || this->skelAnime.curFrame == 13.0f || this->skelAnime.curFrame == 28.0f) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_KICK);
}
Math_SmoothStepToF(&this->actor.speedXZ, 8.0f, 0.1f, 1.0f, 0.0f);
@ -557,7 +555,7 @@ void EnFd_Update(Actor* thisx, GlobalContext* globalCtx) {
}
if (this->actionFunc != EnFd_Reappear) {
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
SkelAnime_Update(&this->skelAnime);
EnFd_SpawnDot(this, globalCtx);
}
@ -606,7 +604,7 @@ s32 EnFd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
}
}
return 0;
return false;
}
void EnFd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) {
@ -685,7 +683,7 @@ void EnFd_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPPipeSync(POLY_XLU_DISP++);
gSPSegment(POLY_XLU_DISP++, 0x9, D_80116280);
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnFd_OverrideLimbDraw, EnFd_PostLimbDraw, this,
POLY_XLU_DISP);
}

View file

@ -45,8 +45,8 @@ typedef struct EnFd {
/* 0x04C8 */ f32 runRadius;
/* 0x04CC */ f32 fadeAlpha;
/* 0x04D0 */ Vec3f corePos;
/* 0x04DC */ Vec3s limbDrawTable[27];
/* 0x057E */ Vec3s transitionDrawTable[27];
/* 0x04DC */ Vec3s jointTable[27];
/* 0x057E */ Vec3s morphTable[27];
/* 0x0620 */ EnFdEffect effects[200];
} EnFd; // size = 0x31E0