1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 22:30:15 +00:00

Some cleanup and docs for z_skelanime (#601)

* docs and enums

* bgcheck merge

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
petrie911 2021-01-09 16:07:17 -06:00 committed by GitHub
parent 7a171488d2
commit 115c152b03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 701 additions and 423 deletions

View file

@ -307,7 +307,8 @@ void EnGeldB_Wait(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupFlee(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_0600ADF8, -2.0f, Animation_GetLastFrame(&D_0600ADF8), 0.0f, 3, -4.0f);
Animation_Change(&this->skelAnime, &D_0600ADF8, -2.0f, Animation_GetLastFrame(&D_0600ADF8), 0.0f,
ANIMMODE_ONCE_INTERP, -4.0f);
this->timer = 20;
this->invisible = false;
this->actionState = GELDB_WAIT;
@ -398,7 +399,8 @@ void EnGeldB_Ready(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupAdvance(EnGeldB* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_060024E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060024E8), 1, -4.0f);
Animation_Change(&this->skelAnime, &D_060024E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060024E8),
ANIMMODE_LOOP_INTERP, -4.0f);
this->actionState = GELDB_ADVANCE;
EnGeldB_SetupAction(this, EnGeldB_Advance);
}
@ -481,7 +483,8 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupRollForward(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
-3.0f);
this->timer = 0;
this->invisible = true;
this->actionState = GELDB_ROLL_FORWARD;
@ -554,7 +557,8 @@ void EnGeldB_Pivot(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupCircle(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814), 1, 0.0f);
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
ANIMMODE_LOOP_INTERP, 0.0f);
this->actor.speedXZ = Rand_CenteredFloat(12.0f);
this->actor.posRot.rot.y = this->actor.shape.rot.y;
this->skelAnime.playSpeed = -this->actor.speedXZ * 0.5f;
@ -657,7 +661,8 @@ void EnGeldB_SetupSpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
s16 sp3E;
Player* player = PLAYER;
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814), 1, 0.0f);
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
ANIMMODE_LOOP_INTERP, 0.0f);
sp3E = player->actor.shape.rot.y;
if (Math_SinS(sp3E - this->actor.shape.rot.y) > 0.0f) {
this->actor.speedXZ = -10.0f;
@ -809,7 +814,8 @@ void EnGeldB_Slash(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupSpinAttack(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_06000F5C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000F5C), 3, 0.0f);
Animation_Change(&this->skelAnime, &D_06000F5C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000F5C),
ANIMMODE_ONCE_INTERP, 0.0f);
this->swordCollider.base.atFlags &= ~6;
this->actionState = GELDB_SPIN_ATTACK;
this->spinAttackState = 0;
@ -994,7 +1000,8 @@ void EnGeldB_Damaged(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupJump(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
-3.0f);
this->timer = 0;
this->invisible = false;
this->actionState = GELDB_JUMP;
@ -1035,7 +1042,7 @@ void EnGeldB_SetupBlock(EnGeldB* this) {
this->actor.speedXZ = 0.0f;
this->actionState = GELDB_BLOCK;
this->timer = (s32)Rand_CenteredFloat(10.0f) + 10;
Animation_Change(&this->skelAnime, &D_06001578, 0.0f, 0.0f, lastFrame, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06001578, 0.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f);
EnGeldB_SetupAction(this, EnGeldB_Block);
}
@ -1096,7 +1103,8 @@ void EnGeldB_SetupSidestep(EnGeldB* this, GlobalContext* globalCtx) {
s16 linkAngle;
Player* player;
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814), 1, 0.0f);
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
ANIMMODE_LOOP_INTERP, 0.0f);
player = PLAYER;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsLink, 1, 0xFA0, 1);
linkAngle = player->actor.shape.rot.y;
@ -1470,7 +1478,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
if ((this->spinAttackState >= 2) && SkelAnime_Update(&this->skelAnime)) {
if (this->spinAttackState == 2) {
Animation_Change(&this->skelAnime, &D_06000F5C, 0.5f, 0.0f, 12.0f, 3, 4.0f);
Animation_Change(&this->skelAnime, &D_06000F5C, 0.5f, 0.0f, 12.0f, ANIMMODE_ONCE_INTERP, 4.0f);
this->spinAttackState++;
thisx->posRot.rot.y = thisx->shape.rot.y = thisx->yawTowardsLink;
} else {