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

@ -115,45 +115,45 @@ void EnSb_SpawnBubbles(GlobalContext* globalCtx, EnSb* this) {
}
void EnSb_SetupWaitClosed(EnSb* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600004C, 1.0f, 0, SkelAnime_GetFrameCount(&D_0600004C), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600004C, 1.0f, 0, Animation_GetLastFrame(&D_0600004C), 2, 0.0f);
this->behavior = SHELLBLADE_WAIT_CLOSED;
this->actionFunc = EnSb_WaitClosed;
}
void EnSb_SetupOpen(EnSb* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000194, 1.0f, 0, SkelAnime_GetFrameCount(&D_06000194), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06000194, 1.0f, 0, Animation_GetLastFrame(&D_06000194), 2, 0.0f);
this->behavior = SHELLBLADE_OPEN;
this->actionFunc = EnSb_Open;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_SHELL_MOUTH);
}
void EnSb_SetupWaitOpen(EnSb* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002C8C, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002C8C), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06002C8C, 1.0f, 0, Animation_GetLastFrame(&D_06002C8C), 0, 0.0f);
this->behavior = SHELLBLADE_WAIT_OPEN;
this->actionFunc = EnSb_WaitOpen;
}
void EnSb_SetupLunge(EnSb* this) {
f32 frameCount = SkelAnime_GetFrameCount(&D_06000124);
f32 frameCount = Animation_GetLastFrame(&D_06000124);
f32 playbackSpeed = this->actor.waterY > 0.0f ? 1.0f : 0.0f;
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000124, playbackSpeed, 0.0f, frameCount, 2, 0);
Animation_Change(&this->skelAnime, &D_06000124, playbackSpeed, 0.0f, frameCount, 2, 0);
this->behavior = SHELLBLADE_LUNGE;
this->actionFunc = EnSb_Lunge;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_SHELL_MOUTH);
}
void EnSb_SetupBounce(EnSb* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_060000B4, 1.0f, 0, SkelAnime_GetFrameCount(&D_060000B4), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060000B4, 1.0f, 0, Animation_GetLastFrame(&D_060000B4), 2, 0.0f);
this->behavior = SHELLBLADE_BOUNCE;
this->actionFunc = EnSb_Bounce;
}
void EnSb_SetupCooldown(EnSb* this, s32 changeSpeed) {
f32 frameCount = SkelAnime_GetFrameCount(&D_0600004C);
f32 frameCount = Animation_GetLastFrame(&D_0600004C);
if (this->behavior != SHELLBLADE_WAIT_CLOSED) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600004C, 1.0f, 0, frameCount, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600004C, 1.0f, 0, frameCount, 2, 0.0f);
}
this->behavior = SHELLBLADE_WAIT_CLOSED;
if (changeSpeed) {
@ -183,9 +183,9 @@ void EnSb_WaitClosed(EnSb* this, GlobalContext* globalCtx) {
}
void EnSb_Open(EnSb* this, GlobalContext* globalCtx) {
f32 currentFrame = this->skelAnime.animCurrentFrame;
f32 currentFrame = this->skelAnime.curFrame;
if (SkelAnime_GetFrameCount(&D_06000194) <= currentFrame) {
if (Animation_GetLastFrame(&D_06000194) <= currentFrame) {
this->timer = 15;
EnSb_SetupWaitOpen(this);
} else {
@ -255,8 +255,8 @@ void EnSb_Bounce(EnSb* this, GlobalContext* globalCtx) {
f32 currentFrame;
f32 frameCount;
currentFrame = this->skelAnime.animCurrentFrame;
frameCount = SkelAnime_GetFrameCount(&D_060000B4);
currentFrame = this->skelAnime.curFrame;
frameCount = Animation_GetLastFrame(&D_060000B4);
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f);
if (currentFrame == frameCount) {
@ -304,27 +304,27 @@ void EnSb_Cooldown(EnSb* this, GlobalContext* globalCtx) {
s32 EnSb_IsVulnerable(EnSb* this) {
switch (this->behavior) {
case SHELLBLADE_OPEN:
if ((this->skelAnime.animCurrentFrame >= 2.0f) && (this->skelAnime.animCurrentFrame <= 5.0f)) {
if ((this->skelAnime.curFrame >= 2.0f) && (this->skelAnime.curFrame <= 5.0f)) {
return true;
}
break;
case SHELLBLADE_WAIT_CLOSED:
if ((this->skelAnime.animCurrentFrame >= 0.0f) && (this->skelAnime.animCurrentFrame <= 1.0f)) {
if ((this->skelAnime.curFrame >= 0.0f) && (this->skelAnime.curFrame <= 1.0f)) {
return true;
}
break;
case SHELLBLADE_WAIT_OPEN:
if ((this->skelAnime.animCurrentFrame >= 0.0f) && (this->skelAnime.animCurrentFrame <= 19.0f)) {
if ((this->skelAnime.curFrame >= 0.0f) && (this->skelAnime.curFrame <= 19.0f)) {
return true;
}
break;
case SHELLBLADE_LUNGE:
if (this->skelAnime.animCurrentFrame == 0.0f) {
if (this->skelAnime.curFrame == 0.0f) {
return true;
}
break;
case SHELLBLADE_BOUNCE:
if ((this->skelAnime.animCurrentFrame >= 3.0f) && (this->skelAnime.animCurrentFrame <= 5.0f)) {
if ((this->skelAnime.curFrame >= 3.0f) && (this->skelAnime.curFrame <= 5.0f)) {
return true;
}
break;
@ -437,7 +437,7 @@ void EnSb_Update(Actor* thisx, GlobalContext* globalCtx) {
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
SkelAnime_Update(&this->skelAnime);
}
}
@ -454,7 +454,7 @@ void EnSb_Draw(Actor* thisx, GlobalContext* globalCtx) {
s16 fireDecr;
func_8002EBCC(&this->actor, globalCtx, 1);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
NULL, EnSb_PostLimbDraw, this);
if (this->fire != 0) {
this->actor.dmgEffectTimer++;