|
|
@ -1,4 +1,5 @@
|
|
|
|
#include "z_en_geldb.h"
|
|
|
|
#include "z_en_geldb.h"
|
|
|
|
|
|
|
|
#include "objects/object_geldb/object_geldb.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define FLAGS 0x00000015
|
|
|
|
#define FLAGS 0x00000015
|
|
|
|
|
|
|
|
|
|
|
@ -22,7 +23,7 @@ typedef enum {
|
|
|
|
/* 14 */ GELDB_ROLL_FORWARD,
|
|
|
|
/* 14 */ GELDB_ROLL_FORWARD,
|
|
|
|
/* 15 */ GELDB_STUNNED,
|
|
|
|
/* 15 */ GELDB_STUNNED,
|
|
|
|
/* 16 */ GELDB_SPIN_DODGE
|
|
|
|
/* 16 */ GELDB_SPIN_DODGE
|
|
|
|
} EnGeldBActionState;
|
|
|
|
} EnGeldBAction;
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx);
|
|
|
|
void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx);
|
|
|
|
void EnGeldB_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|
|
|
void EnGeldB_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|
|
@ -64,19 +65,6 @@ void EnGeldB_Block(EnGeldB* this, GlobalContext* globalCtx);
|
|
|
|
void EnGeldB_Sidestep(EnGeldB* this, GlobalContext* globalCtx);
|
|
|
|
void EnGeldB_Sidestep(EnGeldB* this, GlobalContext* globalCtx);
|
|
|
|
void EnGeldB_Defeated(EnGeldB* this, GlobalContext* globalCtx);
|
|
|
|
void EnGeldB_Defeated(EnGeldB* this, GlobalContext* globalCtx);
|
|
|
|
|
|
|
|
|
|
|
|
extern FlexSkeletonHeader D_0600A458;
|
|
|
|
|
|
|
|
extern AnimationHeader D_0600ADF8;
|
|
|
|
|
|
|
|
extern AnimationHeader D_0600B6D4;
|
|
|
|
|
|
|
|
extern AnimationHeader D_0600A814;
|
|
|
|
|
|
|
|
extern AnimationHeader D_06001390;
|
|
|
|
|
|
|
|
extern AnimationHeader D_060024E8;
|
|
|
|
|
|
|
|
extern AnimationHeader D_060003CC;
|
|
|
|
|
|
|
|
extern AnimationHeader D_06000F5C;
|
|
|
|
|
|
|
|
extern AnimationHeader D_06002280;
|
|
|
|
|
|
|
|
extern AnimationHeader D_06001E10;
|
|
|
|
|
|
|
|
extern AnimationHeader D_0600ADF8;
|
|
|
|
|
|
|
|
extern AnimationHeader D_06001578;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ActorInit En_GeldB_InitVars = {
|
|
|
|
const ActorInit En_GeldB_InitVars = {
|
|
|
|
ACTOR_EN_GELDB,
|
|
|
|
ACTOR_EN_GELDB,
|
|
|
|
ACTORCAT_ENEMY,
|
|
|
|
ACTORCAT_ENEMY,
|
|
|
@ -240,7 +228,8 @@ void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
thisx->params &= 0xFF;
|
|
|
|
thisx->params &= 0xFF;
|
|
|
|
this->blinkState = 0;
|
|
|
|
this->blinkState = 0;
|
|
|
|
this->unkFloat = 10.0f;
|
|
|
|
this->unkFloat = 10.0f;
|
|
|
|
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600A458, &D_0600B6D4, this->jointTable, this->morphTable, 24);
|
|
|
|
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGerudoRedSkel, &gGerudoRedNeutralAnim, this->jointTable,
|
|
|
|
|
|
|
|
this->morphTable, 24);
|
|
|
|
Collider_InitCylinder(globalCtx, &this->bodyCollider);
|
|
|
|
Collider_InitCylinder(globalCtx, &this->bodyCollider);
|
|
|
|
Collider_SetCylinder(globalCtx, &this->bodyCollider, thisx, &sBodyCylInit);
|
|
|
|
Collider_SetCylinder(globalCtx, &this->bodyCollider, thisx, &sBodyCylInit);
|
|
|
|
Collider_InitTris(globalCtx, &this->blockCollider);
|
|
|
|
Collider_InitTris(globalCtx, &this->blockCollider);
|
|
|
@ -257,7 +246,7 @@ void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
blureInit.unkFlag = 0;
|
|
|
|
blureInit.unkFlag = 0;
|
|
|
|
blureInit.calcMode = 2;
|
|
|
|
blureInit.calcMode = 2;
|
|
|
|
|
|
|
|
|
|
|
|
Effect_Add(globalCtx, &this->blureIdx, EFFECT_BLURE1, 0, 0, &blureInit);
|
|
|
|
Effect_Add(globalCtx, &this->blureIndex, EFFECT_BLURE1, 0, 0, &blureInit);
|
|
|
|
Actor_SetScale(thisx, 0.012499999f);
|
|
|
|
Actor_SetScale(thisx, 0.012499999f);
|
|
|
|
EnGeldB_SetupWait(this);
|
|
|
|
EnGeldB_SetupWait(this);
|
|
|
|
if ((this->keyFlag != 0) && Flags_GetCollectible(globalCtx, this->keyFlag >> 8)) {
|
|
|
|
if ((this->keyFlag != 0) && Flags_GetCollectible(globalCtx, this->keyFlag >> 8)) {
|
|
|
@ -270,7 +259,7 @@ void EnGeldB_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
EnGeldB* this = THIS;
|
|
|
|
EnGeldB* this = THIS;
|
|
|
|
|
|
|
|
|
|
|
|
func_800F5B58();
|
|
|
|
func_800F5B58();
|
|
|
|
Effect_Delete(globalCtx, this->blureIdx);
|
|
|
|
Effect_Delete(globalCtx, this->blureIndex);
|
|
|
|
Collider_DestroyTris(globalCtx, &this->blockCollider);
|
|
|
|
Collider_DestroyTris(globalCtx, &this->blockCollider);
|
|
|
|
Collider_DestroyCylinder(globalCtx, &this->bodyCollider);
|
|
|
|
Collider_DestroyCylinder(globalCtx, &this->bodyCollider);
|
|
|
|
Collider_DestroyQuad(globalCtx, &this->swordCollider);
|
|
|
|
Collider_DestroyQuad(globalCtx, &this->swordCollider);
|
|
|
@ -348,11 +337,11 @@ s32 EnGeldB_ReactToPlayer(GlobalContext* globalCtx, EnGeldB* this, s16 arg2) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupWait(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupWait(EnGeldB* this) {
|
|
|
|
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_0600ADF8, 0.0f);
|
|
|
|
Animation_PlayOnceSetSpeed(&this->skelAnime, &gGerudoRedJumpAnim, 0.0f);
|
|
|
|
this->actor.world.pos.y = this->actor.home.pos.y + 120.0f;
|
|
|
|
this->actor.world.pos.y = this->actor.home.pos.y + 120.0f;
|
|
|
|
this->timer = 10;
|
|
|
|
this->timer = 10;
|
|
|
|
this->invisible = true;
|
|
|
|
this->invisible = true;
|
|
|
|
this->actionState = GELDB_WAIT;
|
|
|
|
this->action = GELDB_WAIT;
|
|
|
|
this->actor.bgCheckFlags &= ~3;
|
|
|
|
this->actor.bgCheckFlags &= ~3;
|
|
|
|
this->actor.gravity = -2.0f;
|
|
|
|
this->actor.gravity = -2.0f;
|
|
|
|
this->actor.flags &= ~1;
|
|
|
|
this->actor.flags &= ~1;
|
|
|
@ -386,11 +375,12 @@ void EnGeldB_Wait(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupFlee(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupFlee(EnGeldB* this) {
|
|
|
|
Animation_Change(&this->skelAnime, &D_0600ADF8, -2.0f, Animation_GetLastFrame(&D_0600ADF8), 0.0f,
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedJumpAnim);
|
|
|
|
ANIMMODE_ONCE_INTERP, -4.0f);
|
|
|
|
|
|
|
|
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedJumpAnim, -2.0f, lastFrame, 0.0f, ANIMMODE_ONCE_INTERP, -4.0f);
|
|
|
|
this->timer = 20;
|
|
|
|
this->timer = 20;
|
|
|
|
this->invisible = false;
|
|
|
|
this->invisible = false;
|
|
|
|
this->actionState = GELDB_WAIT;
|
|
|
|
this->action = GELDB_WAIT;
|
|
|
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Flee);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Flee);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -414,8 +404,8 @@ void EnGeldB_Flee(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupReady(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupReady(EnGeldB* this) {
|
|
|
|
Animation_MorphToLoop(&this->skelAnime, &D_0600B6D4, -4.0f);
|
|
|
|
Animation_MorphToLoop(&this->skelAnime, &gGerudoRedNeutralAnim, -4.0f);
|
|
|
|
this->actionState = GELDB_READY;
|
|
|
|
this->action = GELDB_READY;
|
|
|
|
this->timer = Rand_ZeroOne() * 10.0f + 5.0f;
|
|
|
|
this->timer = Rand_ZeroOne() * 10.0f + 5.0f;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y;
|
|
|
@ -478,9 +468,10 @@ void EnGeldB_Ready(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupAdvance(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),
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedWalkAnim);
|
|
|
|
ANIMMODE_LOOP_INTERP, -4.0f);
|
|
|
|
|
|
|
|
this->actionState = GELDB_ADVANCE;
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedWalkAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, -4.0f);
|
|
|
|
|
|
|
|
this->action = GELDB_ADVANCE;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Advance);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Advance);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -562,11 +553,12 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupRollForward(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupRollForward(EnGeldB* this) {
|
|
|
|
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedFlipAnim);
|
|
|
|
-3.0f);
|
|
|
|
|
|
|
|
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedFlipAnim, -1.0f, lastFrame, 0.0f, ANIMMODE_ONCE, -3.0f);
|
|
|
|
this->timer = 0;
|
|
|
|
this->timer = 0;
|
|
|
|
this->invisible = true;
|
|
|
|
this->invisible = true;
|
|
|
|
this->actionState = GELDB_ROLL_FORWARD;
|
|
|
|
this->action = GELDB_ROLL_FORWARD;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
this->actor.speedXZ = 10.0f;
|
|
|
|
this->actor.speedXZ = 10.0f;
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
|
|
@ -599,8 +591,8 @@ void EnGeldB_RollForward(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupPivot(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupPivot(EnGeldB* this) {
|
|
|
|
Animation_MorphToLoop(&this->skelAnime, &D_0600A814, -4.0f);
|
|
|
|
Animation_MorphToLoop(&this->skelAnime, &gGerudoRedSidestepAnim, -4.0f);
|
|
|
|
this->actionState = GELDB_PIVOT;
|
|
|
|
this->action = GELDB_PIVOT;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Pivot);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Pivot);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -636,13 +628,14 @@ void EnGeldB_Pivot(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupCircle(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupCircle(EnGeldB* this) {
|
|
|
|
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSidestepAnim);
|
|
|
|
ANIMMODE_LOOP_INTERP, 0.0f);
|
|
|
|
|
|
|
|
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedSidestepAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f);
|
|
|
|
this->actor.speedXZ = Rand_CenteredFloat(12.0f);
|
|
|
|
this->actor.speedXZ = Rand_CenteredFloat(12.0f);
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y;
|
|
|
|
this->skelAnime.playSpeed = -this->actor.speedXZ * 0.5f;
|
|
|
|
this->skelAnime.playSpeed = -this->actor.speedXZ * 0.5f;
|
|
|
|
this->timer = Rand_ZeroOne() * 30.0f + 30.0f;
|
|
|
|
this->timer = Rand_ZeroOne() * 30.0f + 30.0f;
|
|
|
|
this->actionState = GELDB_CIRCLE;
|
|
|
|
this->action = GELDB_CIRCLE;
|
|
|
|
this->approachRate = 0.0f;
|
|
|
|
this->approachRate = 0.0f;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Circle);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Circle);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -739,9 +732,9 @@ void EnGeldB_Circle(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
void EnGeldB_SetupSpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
void EnGeldB_SetupSpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
s16 sp3E;
|
|
|
|
s16 sp3E;
|
|
|
|
Player* player = PLAYER;
|
|
|
|
Player* player = PLAYER;
|
|
|
|
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSidestepAnim);
|
|
|
|
|
|
|
|
|
|
|
|
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedSidestepAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f);
|
|
|
|
ANIMMODE_LOOP_INTERP, 0.0f);
|
|
|
|
|
|
|
|
sp3E = player->actor.shape.rot.y;
|
|
|
|
sp3E = player->actor.shape.rot.y;
|
|
|
|
if (Math_SinS(sp3E - this->actor.shape.rot.y) > 0.0f) {
|
|
|
|
if (Math_SinS(sp3E - this->actor.shape.rot.y) > 0.0f) {
|
|
|
|
this->actor.speedXZ = -10.0f;
|
|
|
|
this->actor.speedXZ = -10.0f;
|
|
|
@ -757,7 +750,7 @@ void EnGeldB_SetupSpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
this->timer = 6;
|
|
|
|
this->timer = 6;
|
|
|
|
this->approachRate = 0.0f;
|
|
|
|
this->approachRate = 0.0f;
|
|
|
|
this->unkFloat = 0.0f;
|
|
|
|
this->unkFloat = 0.0f;
|
|
|
|
this->actionState = GELDB_SPIN_DODGE;
|
|
|
|
this->action = GELDB_SPIN_DODGE;
|
|
|
|
|
|
|
|
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_SpinDodge);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_SpinDodge);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -836,9 +829,9 @@ void EnGeldB_SpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupSlash(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupSlash(EnGeldB* this) {
|
|
|
|
Animation_PlayOnce(&this->skelAnime, &D_060003CC);
|
|
|
|
Animation_PlayOnce(&this->skelAnime, &gGerudoRedSlashAnim);
|
|
|
|
this->swordCollider.base.atFlags &= ~AT_BOUNCED;
|
|
|
|
this->swordCollider.base.atFlags &= ~AT_BOUNCED;
|
|
|
|
this->actionState = GELDB_SLASH;
|
|
|
|
this->action = GELDB_SLASH;
|
|
|
|
this->spinAttackState = 0;
|
|
|
|
this->spinAttackState = 0;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
func_800F8A44(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
|
|
|
|
func_800F8A44(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
|
|
|
@ -893,10 +886,11 @@ void EnGeldB_Slash(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupSpinAttack(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupSpinAttack(EnGeldB* this) {
|
|
|
|
Animation_Change(&this->skelAnime, &D_06000F5C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000F5C),
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSpinAttackAnim);
|
|
|
|
ANIMMODE_ONCE_INTERP, 0.0f);
|
|
|
|
|
|
|
|
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedSpinAttackAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE_INTERP, 0.0f);
|
|
|
|
this->swordCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
|
|
|
this->swordCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
|
|
|
this->actionState = GELDB_SPIN_ATTACK;
|
|
|
|
this->action = GELDB_SPIN_ATTACK;
|
|
|
|
this->spinAttackState = 0;
|
|
|
|
this->spinAttackState = 0;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_SpinAttack);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_SpinAttack);
|
|
|
@ -974,10 +968,10 @@ void EnGeldB_SpinAttack(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupRollBack(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupRollBack(EnGeldB* this) {
|
|
|
|
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001390, -3.0f);
|
|
|
|
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedFlipAnim, -3.0f);
|
|
|
|
this->timer = 0;
|
|
|
|
this->timer = 0;
|
|
|
|
this->invisible = true;
|
|
|
|
this->invisible = true;
|
|
|
|
this->actionState = GELDB_ROLL_BACK;
|
|
|
|
this->action = GELDB_ROLL_BACK;
|
|
|
|
this->actor.speedXZ = -8.0f;
|
|
|
|
this->actor.speedXZ = -8.0f;
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
|
|
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
|
|
@ -1004,14 +998,14 @@ void EnGeldB_SetupStunned(EnGeldB* this) {
|
|
|
|
if (this->actor.bgCheckFlags & 1) {
|
|
|
|
if (this->actor.bgCheckFlags & 1) {
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((this->damageEffect != GELDB_DMG_FREEZE) || (this->actionState == GELDB_SPIN_ATTACK)) {
|
|
|
|
if ((this->damageEffect != GELDB_DMG_FREEZE) || (this->action == GELDB_SPIN_ATTACK)) {
|
|
|
|
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_06002280, 0.0f);
|
|
|
|
Animation_PlayOnceSetSpeed(&this->skelAnime, &gGerudoRedDamageAnim, 0.0f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this->damageEffect == GELDB_DMG_FREEZE) {
|
|
|
|
if (this->damageEffect == GELDB_DMG_FREEZE) {
|
|
|
|
this->iceTimer = 36;
|
|
|
|
this->iceTimer = 36;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
|
|
|
this->actionState = GELDB_STUNNED;
|
|
|
|
this->action = GELDB_STUNNED;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Stunned);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Stunned);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1035,7 +1029,7 @@ void EnGeldB_Stunned(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupDamaged(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupDamaged(EnGeldB* this) {
|
|
|
|
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002280, -4.0f);
|
|
|
|
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDamageAnim, -4.0f);
|
|
|
|
if (this->actor.bgCheckFlags & 1) {
|
|
|
|
if (this->actor.bgCheckFlags & 1) {
|
|
|
|
this->invisible = false;
|
|
|
|
this->invisible = false;
|
|
|
|
this->actor.speedXZ = -4.0f;
|
|
|
|
this->actor.speedXZ = -4.0f;
|
|
|
@ -1045,7 +1039,7 @@ void EnGeldB_SetupDamaged(EnGeldB* this) {
|
|
|
|
this->lookTimer = 0;
|
|
|
|
this->lookTimer = 0;
|
|
|
|
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DAMAGE);
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DAMAGE);
|
|
|
|
this->actionState = GELDB_DAMAGED;
|
|
|
|
this->action = GELDB_DAMAGED;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Damaged);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Damaged);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1079,11 +1073,12 @@ void EnGeldB_Damaged(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupJump(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupJump(EnGeldB* this) {
|
|
|
|
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedFlipAnim);
|
|
|
|
-3.0f);
|
|
|
|
|
|
|
|
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedFlipAnim, -1.0f, lastFrame, 0.0f, ANIMMODE_ONCE, -3.0f);
|
|
|
|
this->timer = 0;
|
|
|
|
this->timer = 0;
|
|
|
|
this->invisible = false;
|
|
|
|
this->invisible = false;
|
|
|
|
this->actionState = GELDB_JUMP;
|
|
|
|
this->action = GELDB_JUMP;
|
|
|
|
this->actor.speedXZ = 6.5f;
|
|
|
|
this->actor.speedXZ = 6.5f;
|
|
|
|
this->actor.velocity.y = 15.0f;
|
|
|
|
this->actor.velocity.y = 15.0f;
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
|
|
@ -1112,16 +1107,15 @@ void EnGeldB_Jump(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupBlock(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupBlock(EnGeldB* this) {
|
|
|
|
f32 lastFrame;
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedBlockAnim);
|
|
|
|
|
|
|
|
|
|
|
|
lastFrame = Animation_GetLastFrame(&D_06001578);
|
|
|
|
|
|
|
|
if (this->swordState != 0) {
|
|
|
|
if (this->swordState != 0) {
|
|
|
|
this->swordState = -1;
|
|
|
|
this->swordState = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
this->actor.speedXZ = 0.0f;
|
|
|
|
this->actionState = GELDB_BLOCK;
|
|
|
|
this->action = GELDB_BLOCK;
|
|
|
|
this->timer = (s32)Rand_CenteredFloat(10.0f) + 10;
|
|
|
|
this->timer = (s32)Rand_CenteredFloat(10.0f) + 10;
|
|
|
|
Animation_Change(&this->skelAnime, &D_06001578, 0.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f);
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedBlockAnim, 0.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Block);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Block);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1181,9 +1175,9 @@ void EnGeldB_Block(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
void EnGeldB_SetupSidestep(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
void EnGeldB_SetupSidestep(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
s16 linkAngle;
|
|
|
|
s16 linkAngle;
|
|
|
|
Player* player;
|
|
|
|
Player* player;
|
|
|
|
|
|
|
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSidestepAnim);
|
|
|
|
|
|
|
|
|
|
|
|
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedSidestepAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f);
|
|
|
|
ANIMMODE_LOOP_INTERP, 0.0f);
|
|
|
|
|
|
|
|
player = PLAYER;
|
|
|
|
player = PLAYER;
|
|
|
|
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xFA0, 1);
|
|
|
|
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xFA0, 1);
|
|
|
|
linkAngle = player->actor.shape.rot.y;
|
|
|
|
linkAngle = player->actor.shape.rot.y;
|
|
|
@ -1198,7 +1192,7 @@ void EnGeldB_SetupSidestep(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
this->approachRate = 0.0f;
|
|
|
|
this->approachRate = 0.0f;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y + 0x3FFF;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y + 0x3FFF;
|
|
|
|
this->timer = Rand_ZeroOne() * 10.0f + 5.0f;
|
|
|
|
this->timer = Rand_ZeroOne() * 10.0f + 5.0f;
|
|
|
|
this->actionState = GELDB_SIDESTEP;
|
|
|
|
this->action = GELDB_SIDESTEP;
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Sidestep);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Sidestep);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1309,7 +1303,7 @@ void EnGeldB_Sidestep(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EnGeldB_SetupDefeated(EnGeldB* this) {
|
|
|
|
void EnGeldB_SetupDefeated(EnGeldB* this) {
|
|
|
|
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001E10, -4.0f);
|
|
|
|
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDefeatAnim, -4.0f);
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
|
|
|
if (this->actor.bgCheckFlags & 1) {
|
|
|
|
if (this->actor.bgCheckFlags & 1) {
|
|
|
|
this->invisible = false;
|
|
|
|
this->invisible = false;
|
|
|
@ -1317,7 +1311,7 @@ void EnGeldB_SetupDefeated(EnGeldB* this) {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this->invisible = true;
|
|
|
|
this->invisible = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->actionState = GELDB_DEFEAT;
|
|
|
|
this->action = GELDB_DEFEAT;
|
|
|
|
this->actor.flags &= ~1;
|
|
|
|
this->actor.flags &= ~1;
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DEAD);
|
|
|
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DEAD);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Defeated);
|
|
|
|
EnGeldB_SetupAction(this, EnGeldB_Defeated);
|
|
|
@ -1339,11 +1333,11 @@ void EnGeldB_Defeated(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void func_80A391D8(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
void EnGeldB_TurnHead(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
if ((this->actionState == GELDB_READY) && (this->lookTimer != 0)) {
|
|
|
|
if ((this->action == GELDB_READY) && (this->lookTimer != 0)) {
|
|
|
|
this->headRot.y = Math_SinS(this->lookTimer * 0x1068) * 8920.0f;
|
|
|
|
this->headRot.y = Math_SinS(this->lookTimer * 0x1068) * 8920.0f;
|
|
|
|
} else if (this->actionState != GELDB_STUNNED) {
|
|
|
|
} else if (this->action != GELDB_STUNNED) {
|
|
|
|
if ((this->actionState != GELDB_SLASH) && (this->actionState != GELDB_SPIN_ATTACK)) {
|
|
|
|
if ((this->action != GELDB_SLASH) && (this->action != GELDB_SPIN_ATTACK)) {
|
|
|
|
Math_SmoothStepToS(&this->headRot.y, this->actor.yawTowardsPlayer - this->actor.shape.rot.y, 1, 0x1F4, 0);
|
|
|
|
Math_SmoothStepToS(&this->headRot.y, this->actor.yawTowardsPlayer - this->actor.shape.rot.y, 1, 0x1F4, 0);
|
|
|
|
this->headRot.y = CLAMP(this->headRot.y, -0x256F, 0x256F);
|
|
|
|
this->headRot.y = CLAMP(this->headRot.y, -0x256F, 0x256F);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -1352,14 +1346,14 @@ void func_80A391D8(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void func_80A392D8(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
void EnGeldB_CollisionCheck(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
s32 pad;
|
|
|
|
s32 pad;
|
|
|
|
EnItem00* key;
|
|
|
|
EnItem00* key;
|
|
|
|
|
|
|
|
|
|
|
|
if (this->blockCollider.base.acFlags & AC_BOUNCED) {
|
|
|
|
if (this->blockCollider.base.acFlags & AC_BOUNCED) {
|
|
|
|
this->blockCollider.base.acFlags &= ~AC_BOUNCED;
|
|
|
|
this->blockCollider.base.acFlags &= ~AC_BOUNCED;
|
|
|
|
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
|
|
|
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
|
|
|
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->actionState >= GELDB_READY) &&
|
|
|
|
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->action >= GELDB_READY) &&
|
|
|
|
(this->spinAttackState < 2)) {
|
|
|
|
(this->spinAttackState < 2)) {
|
|
|
|
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
|
|
|
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
|
|
|
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
|
|
|
|
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
|
|
|
@ -1368,7 +1362,7 @@ void func_80A392D8(EnGeldB* this, GlobalContext* globalCtx) {
|
|
|
|
func_800F8A44(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
|
|
|
|
func_800F8A44(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
|
|
|
|
if ((this->actor.colChkInfo.damageEffect == GELDB_DMG_STUN) ||
|
|
|
|
if ((this->actor.colChkInfo.damageEffect == GELDB_DMG_STUN) ||
|
|
|
|
(this->actor.colChkInfo.damageEffect == GELDB_DMG_FREEZE)) {
|
|
|
|
(this->actor.colChkInfo.damageEffect == GELDB_DMG_FREEZE)) {
|
|
|
|
if (this->actionState != GELDB_STUNNED) {
|
|
|
|
if (this->action != GELDB_STUNNED) {
|
|
|
|
func_8003426C(&this->actor, 0, 0x78, 0, 0x50);
|
|
|
|
func_8003426C(&this->actor, 0, 0x78, 0, 0x50);
|
|
|
|
Actor_ApplyDamage(&this->actor);
|
|
|
|
Actor_ApplyDamage(&this->actor);
|
|
|
|
EnGeldB_SetupStunned(this);
|
|
|
|
EnGeldB_SetupStunned(this);
|
|
|
@ -1399,22 +1393,22 @@ void EnGeldB_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
s32 pad;
|
|
|
|
s32 pad;
|
|
|
|
EnGeldB* this = THIS;
|
|
|
|
EnGeldB* this = THIS;
|
|
|
|
|
|
|
|
|
|
|
|
func_80A392D8(this, globalCtx);
|
|
|
|
EnGeldB_CollisionCheck(this, globalCtx);
|
|
|
|
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
|
|
|
|
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
|
|
|
|
Actor_MoveForward(&this->actor);
|
|
|
|
Actor_MoveForward(&this->actor);
|
|
|
|
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 15.0f, 30.0f, 60.0f, 0x1D);
|
|
|
|
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 15.0f, 30.0f, 60.0f, 0x1D);
|
|
|
|
this->actionFunc(this, globalCtx);
|
|
|
|
this->actionFunc(this, globalCtx);
|
|
|
|
this->actor.focus.pos = this->actor.world.pos;
|
|
|
|
this->actor.focus.pos = this->actor.world.pos;
|
|
|
|
this->actor.focus.pos.y += 40.0f;
|
|
|
|
this->actor.focus.pos.y += 40.0f;
|
|
|
|
func_80A391D8(this, globalCtx);
|
|
|
|
EnGeldB_TurnHead(this, globalCtx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
|
|
|
|
Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
|
|
|
|
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->bodyCollider.base);
|
|
|
|
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->bodyCollider.base);
|
|
|
|
if ((this->actionState >= GELDB_READY) && (this->spinAttackState < 2) &&
|
|
|
|
if ((this->action >= GELDB_READY) && (this->spinAttackState < 2) &&
|
|
|
|
((this->actor.colorFilterTimer == 0) || !(this->actor.colorFilterParams & 0x4000))) {
|
|
|
|
((this->actor.colorFilterTimer == 0) || !(this->actor.colorFilterParams & 0x4000))) {
|
|
|
|
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->bodyCollider.base);
|
|
|
|
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->bodyCollider.base);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((this->actionState == GELDB_BLOCK) && (this->skelAnime.curFrame == 0.0f)) {
|
|
|
|
if ((this->action == GELDB_BLOCK) && (this->skelAnime.curFrame == 0.0f)) {
|
|
|
|
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->blockCollider.base);
|
|
|
|
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->blockCollider.base);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this->swordState > 0) {
|
|
|
|
if (this->swordState > 0) {
|
|
|
@ -1478,12 +1472,11 @@ void EnGeldB_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|
|
|
Matrix_MultVec3f(&swordTipOffset, &swordTip);
|
|
|
|
Matrix_MultVec3f(&swordTipOffset, &swordTip);
|
|
|
|
Matrix_MultVec3f(&swordHiltOffset, &swordHilt);
|
|
|
|
Matrix_MultVec3f(&swordHiltOffset, &swordHilt);
|
|
|
|
|
|
|
|
|
|
|
|
if ((this->swordState < 0) ||
|
|
|
|
if ((this->swordState < 0) || ((this->action != GELDB_SLASH) && (this->action != GELDB_SPIN_ATTACK))) {
|
|
|
|
((this->actionState != GELDB_SLASH) && (this->actionState != GELDB_SPIN_ATTACK))) {
|
|
|
|
EffectBlure_AddSpace(Effect_GetByIndex(this->blureIndex));
|
|
|
|
EffectBlure_AddSpace(Effect_GetByIndex(this->blureIdx));
|
|
|
|
|
|
|
|
this->swordState = 0;
|
|
|
|
this->swordState = 0;
|
|
|
|
} else if (this->swordState > 0) {
|
|
|
|
} else if (this->swordState > 0) {
|
|
|
|
EffectBlure_AddVertex(Effect_GetByIndex(this->blureIdx), &swordTip, &swordHilt);
|
|
|
|
EffectBlure_AddVertex(Effect_GetByIndex(this->blureIndex), &swordTip, &swordHilt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Actor_SetFeetPos(&this->actor, limbIndex, 19, &footOffset, 22, &footOffset);
|
|
|
|
Actor_SetFeetPos(&this->actor, limbIndex, 19, &footOffset, 22, &footOffset);
|
|
|
@ -1547,7 +1540,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
{ 3000.0f, 0.0f, 1600.0f },
|
|
|
|
{ 3000.0f, 0.0f, 1600.0f },
|
|
|
|
{ 3000.0f, 6000.0f, 1600.0f },
|
|
|
|
{ 3000.0f, 6000.0f, 1600.0f },
|
|
|
|
};
|
|
|
|
};
|
|
|
|
static Gfx* eyeDLists[4] = { 0x06005FE8, 0x060065A8, 0x06006D28, 0x060065A8 };
|
|
|
|
static u64* eyeDLists[4] = { gGerudoRedEyeOpenTex, gGerudoRedEyeHalfTex, gGerudoRedEyeShutTex,
|
|
|
|
|
|
|
|
gGerudoRedEyeHalfTex };
|
|
|
|
s32 pad;
|
|
|
|
s32 pad;
|
|
|
|
EnGeldB* this = THIS;
|
|
|
|
EnGeldB* this = THIS;
|
|
|
|
|
|
|
|
|
|
|
@ -1556,7 +1550,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
|
|
|
|
|
|
|
|
if ((this->spinAttackState >= 2) && SkelAnime_Update(&this->skelAnime)) {
|
|
|
|
if ((this->spinAttackState >= 2) && SkelAnime_Update(&this->skelAnime)) {
|
|
|
|
if (this->spinAttackState == 2) {
|
|
|
|
if (this->spinAttackState == 2) {
|
|
|
|
Animation_Change(&this->skelAnime, &D_06000F5C, 0.5f, 0.0f, 12.0f, ANIMMODE_ONCE_INTERP, 4.0f);
|
|
|
|
Animation_Change(&this->skelAnime, &gGerudoRedSpinAttackAnim, 0.5f, 0.0f, 12.0f, ANIMMODE_ONCE_INTERP,
|
|
|
|
|
|
|
|
4.0f);
|
|
|
|
this->spinAttackState++;
|
|
|
|
this->spinAttackState++;
|
|
|
|
thisx->world.rot.y = thisx->shape.rot.y = thisx->yawTowardsPlayer;
|
|
|
|
thisx->world.rot.y = thisx->shape.rot.y = thisx->yawTowardsPlayer;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -1575,12 +1570,12 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((this->actionState != GELDB_WAIT) || !this->invisible) {
|
|
|
|
if ((this->action != GELDB_WAIT) || !this->invisible) {
|
|
|
|
func_80093D18(globalCtx->state.gfxCtx);
|
|
|
|
func_80093D18(globalCtx->state.gfxCtx);
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeDLists[this->blinkState]));
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeDLists[this->blinkState]));
|
|
|
|
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
|
|
|
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
|
|
|
this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
|
|
|
|
this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
|
|
|
|
if (this->actionState == GELDB_BLOCK) {
|
|
|
|
if (this->action == GELDB_BLOCK) {
|
|
|
|
s32 i;
|
|
|
|
s32 i;
|
|
|
|
Vec3f blockTrisVtx0[3];
|
|
|
|
Vec3f blockTrisVtx0[3];
|
|
|
|
Vec3f blockTrisVtx1[3];
|
|
|
|
Vec3f blockTrisVtx1[3];
|
|
|
@ -1599,8 +1594,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|
|
|
if ((this->iceTimer % 4) == 0) {
|
|
|
|
if ((this->iceTimer % 4) == 0) {
|
|
|
|
s32 iceIndex = this->iceTimer >> 2;
|
|
|
|
s32 iceIndex = this->iceTimer >> 2;
|
|
|
|
|
|
|
|
|
|
|
|
EffectSsEnIce_SpawnFlyingVec3s(globalCtx, thisx, &this->bodyPartsPos[iceIndex], 0x96, 0x96, 0x96, 0xFA,
|
|
|
|
EffectSsEnIce_SpawnFlyingVec3s(globalCtx, thisx, &this->bodyPartsPos[iceIndex], 150, 150, 150, 250, 235,
|
|
|
|
0xEB, 0xF5, 0xFF, 1.5f);
|
|
|
|
245, 255, 1.5f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|