mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Animation Cleanup: En_G* (#1395)
* wip * more cleanup * more cleanup * one more thing * one more default case * missed brackets * PR Review
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_gb2.h"
|
||||
#include "objects/object_ps/object_ps.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
@@ -163,7 +162,7 @@ u16 func_80B0F7FC(EnGb2* this) {
|
||||
return 0x14E4;
|
||||
}
|
||||
|
||||
if (gSaveContext.save.saveInfo.playerData.health > 48) {
|
||||
if (gSaveContext.save.saveInfo.playerData.health > 0x30) {
|
||||
return 0x14D2;
|
||||
}
|
||||
|
||||
@@ -171,7 +170,7 @@ u16 func_80B0F7FC(EnGb2* this) {
|
||||
return 0x14D3;
|
||||
|
||||
case 0x14E4:
|
||||
if (gSaveContext.save.saveInfo.playerData.health > 48) {
|
||||
if (gSaveContext.save.saveInfo.playerData.health > 0x30) {
|
||||
return 0x14D2;
|
||||
}
|
||||
|
||||
@@ -193,8 +192,10 @@ u16 func_80B0F7FC(EnGb2* this) {
|
||||
|
||||
case 0x14D9:
|
||||
return 0x14DA;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u16 func_80B0F8F8(EnGb2* this) {
|
||||
@@ -213,8 +214,10 @@ u16 func_80B0F8F8(EnGb2* this) {
|
||||
|
||||
case 0x14E1:
|
||||
return 0x14E2;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u16 func_80B0F97C(EnGb2* this) {
|
||||
@@ -236,8 +239,10 @@ u16 func_80B0F97C(EnGb2* this) {
|
||||
case 0x14FA:
|
||||
this->unk_26C |= 2;
|
||||
return 0x14FB;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80B0FA04(EnGb2* this) {
|
||||
@@ -262,17 +267,19 @@ s32 func_80B0FA48(EnGb2* this, PlayState* play) {
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_80_40)) {
|
||||
this->unk_26E = 0x14EB;
|
||||
return false;
|
||||
} else {
|
||||
this->unk_26E = 0x14EE;
|
||||
return true;
|
||||
}
|
||||
this->unk_26E = 0x14EE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_80_20)) {
|
||||
this->unk_26E = 0x14EF;
|
||||
return false;
|
||||
} else {
|
||||
this->unk_26E = 0x14F4;
|
||||
return true;
|
||||
default:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_80_20)) {
|
||||
this->unk_26E = 0x14EF;
|
||||
return false;
|
||||
} else {
|
||||
this->unk_26E = 0x14F4;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,12 +321,14 @@ u16 func_80B0FB24(EnGb2* this) {
|
||||
case 0x14F2:
|
||||
this->unk_26C |= 2;
|
||||
return 0x14F3;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80B0FBF0(EnGb2* this, PlayState* play) {
|
||||
Vec3f sp90[4] = {
|
||||
Vec3f sp90[] = {
|
||||
{ 120.0f, 0.0f, 800.0f },
|
||||
{ -120.0f, 0.0f, 750.0f },
|
||||
{ 60.0f, 0.0f, 750.0f },
|
||||
@@ -425,6 +434,9 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) {
|
||||
this->unk_26C |= 2;
|
||||
Message_StartTextbox(play, this->unk_26E, &this->actor);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_26E == 0x14DA) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
@@ -443,6 +455,9 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) {
|
||||
this->unk_26C |= 2;
|
||||
Message_StartTextbox(play, this->unk_26E, &this->actor);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -505,7 +520,7 @@ void func_80B10344(EnGb2* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.save.saveInfo.playerData.health < 49) {
|
||||
if (gSaveContext.save.saveInfo.playerData.health <= 0x30) {
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
|
||||
SET_EVENTINF(EVENTINF_46);
|
||||
SET_EVENTINF(EVENTINF_45);
|
||||
@@ -596,6 +611,9 @@ void func_80B10634(EnGb2* this, PlayState* play) {
|
||||
this->unk_26C |= 2;
|
||||
Message_StartTextbox(play, this->unk_26E, &this->actor);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -673,6 +691,9 @@ void func_80B10A48(EnGb2* this, PlayState* play) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
this->actionFunc = func_80B111AC;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -877,7 +898,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.room = -1;
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_ps_Skel_007230, &object_ps_Anim_00049C, this->jointTable,
|
||||
this->morphTable, 12);
|
||||
this->morphTable, OBJECT_PS_LIMB_MAX);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinderType1(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
@@ -981,11 +1002,11 @@ s32 EnGb2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
Gfx** gfx) {
|
||||
EnGb2* this = THIS;
|
||||
|
||||
if (limbIndex == 7) {
|
||||
if (limbIndex == OBJECT_PS_LIMB_07) {
|
||||
Matrix_RotateYS(this->unk_270.y, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 1) {
|
||||
if (limbIndex == OBJECT_PS_LIMB_01) {
|
||||
*dList = NULL;
|
||||
}
|
||||
|
||||
@@ -996,7 +1017,7 @@ void EnGb2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
EnGb2* this = THIS;
|
||||
Vec3f sp18 = { 2400.0f, 0.0f, 0.0f };
|
||||
|
||||
if (limbIndex == 7) {
|
||||
if (limbIndex == OBJECT_PS_LIMB_07) {
|
||||
Matrix_MultVec3f(&sp18, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_GB2_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_ps/object_ps.h"
|
||||
|
||||
struct EnGb2;
|
||||
|
||||
@@ -19,8 +20,8 @@ typedef enum {
|
||||
typedef struct EnGb2 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[12];
|
||||
/* 0x1D0 */ Vec3s morphTable[12];
|
||||
/* 0x188 */ Vec3s jointTable[OBJECT_PS_LIMB_MAX];
|
||||
/* 0x1D0 */ Vec3s morphTable[OBJECT_PS_LIMB_MAX];
|
||||
/* 0x218 */ EnGb2ActionFunc actionFunc;
|
||||
/* 0x21C */ ColliderCylinder collider;
|
||||
/* 0x268 */ Actor* unk_268;
|
||||
|
||||
@@ -69,10 +69,11 @@ typedef enum {
|
||||
/* 6 */ GERUDO_WHITE_ANIM_EXCITED_CLAPPING,
|
||||
/* 7 */ GERUDO_WHITE_ANIM_SALUTE,
|
||||
/* 8 */ GERUDO_WHITE_ANIM_LEADING_BOAT,
|
||||
/* 9 */ GERUDO_WHITE_ANIM_BLOWN_AWAY
|
||||
/* 9 */ GERUDO_WHITE_ANIM_BLOWN_AWAY,
|
||||
/* 10 */ GERUDO_WHITE_ANIM_MAX
|
||||
} GerudoWhiteAnimation;
|
||||
|
||||
void EnGe1_ChangeAnim(EnGe1* this, s16 animIndex, u8 mode, f32 morphFrames);
|
||||
void EnGe1_ChangeAnim(EnGe1* this, s16 animIndex, u8 animMode, f32 morphFrames);
|
||||
void EnGe1_ShadowDraw(Actor* thisx, Lights* lights, PlayState* play);
|
||||
void EnGe1_Wait(EnGe1* this, PlayState* play);
|
||||
void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play);
|
||||
@@ -127,8 +128,8 @@ void EnGe1_Destroy(Actor* thisx, PlayState* play) {
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
void EnGe1_ChangeAnim(EnGe1* this, s16 animIndex, u8 mode, f32 morphFrames) {
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
void EnGe1_ChangeAnim(EnGe1* this, s16 animIndex, u8 animMode, f32 morphFrames) {
|
||||
static AnimationHeader* sAnimations[GERUDO_WHITE_ANIM_MAX] = {
|
||||
&gGerudoWhiteArmsFoldedAnim, // GERUDO_WHITE_ANIM_ARMS_FOLDED,
|
||||
&gGerudoWhiteUnfoldingArmsAnim, // GERUDO_WHITE_ANIM_UNFOLDING_ARMS
|
||||
&gGerudoWhiteStandingHeadBowedAnim, // GERUDO_WHITE_ANIM_STANDING_HEAD_BOWED,
|
||||
@@ -154,7 +155,7 @@ void EnGe1_ChangeAnim(EnGe1* this, s16 animIndex, u8 mode, f32 morphFrames) {
|
||||
|
||||
default:
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), mode, morphFrames);
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), animMode, morphFrames);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) {
|
||||
switch (GERUDO_PURPLE_GET_TYPE(&this->picto.actor)) {
|
||||
case GERUDO_PURPLE_TYPE_BOAT_SENTRY:
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, 0.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, 0.0f);
|
||||
this->actionFunc = EnGe2_GuardStationary;
|
||||
this->picto.actor.speed = 0.0f;
|
||||
this->picto.actor.uncullZoneForward = 4000.0f;
|
||||
@@ -343,18 +343,18 @@ s32 EnGe2_FollowPathWithoutGravity(EnGe2* this) {
|
||||
/* Action and helper functions */
|
||||
|
||||
void EnGe2_SpawnEffects(EnGe2* this, PlayState* play) {
|
||||
static Vec3f effectVelocity = { 0.0f, -0.05f, 0.0f };
|
||||
static Vec3f effectAccel = { 0.0f, -0.025f, 0.0f };
|
||||
static Color_RGBA8 effectPrimColor = { 255, 255, 255, 0 };
|
||||
static Color_RGBA8 effectEnvColor = { 255, 150, 0, 0 };
|
||||
static Vec3f sEffectVelocity = { 0.0f, -0.05f, 0.0f };
|
||||
static Vec3f sEffectAccel = { 0.0f, -0.025f, 0.0f };
|
||||
static Color_RGBA8 sEffectPrimColor = { 255, 255, 255, 0 };
|
||||
static Color_RGBA8 sEffectEnvColor = { 255, 150, 0, 0 };
|
||||
s16 effectAngle = play->state.frames * 0x2800;
|
||||
Vec3f effectPos;
|
||||
|
||||
effectPos.x = (Math_CosS(effectAngle) * 5.0f) + this->picto.actor.focus.pos.x;
|
||||
effectPos.y = this->picto.actor.focus.pos.y + 10.0f;
|
||||
effectPos.z = (Math_SinS(effectAngle) * 5.0f) + this->picto.actor.focus.pos.z;
|
||||
EffectSsKirakira_SpawnDispersed(play, &effectPos, &effectVelocity, &effectAccel, &effectPrimColor, &effectEnvColor,
|
||||
1000, 16);
|
||||
EffectSsKirakira_SpawnDispersed(play, &effectPos, &sEffectVelocity, &sEffectAccel, &sEffectPrimColor,
|
||||
&sEffectEnvColor, 1000, 16);
|
||||
}
|
||||
|
||||
void EnGe2_Scream(EnGe2* this) {
|
||||
@@ -396,7 +396,7 @@ void EnGe2_SetupCapturePlayer(EnGe2* this) {
|
||||
this->picto.actor.speed = 0.0f;
|
||||
this->actionFunc = EnGe2_CapturePlayer;
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f);
|
||||
}
|
||||
|
||||
void EnGe2_Charge(EnGe2* this, PlayState* play) {
|
||||
@@ -429,7 +429,7 @@ void EnGe2_SetupCharge(EnGe2* this, PlayState* play) {
|
||||
|
||||
if (this->picto.actor.shape.rot.y == this->picto.actor.yawTowardsPlayer) {
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleChargingAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleChargingAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleChargingAnim), ANIMMODE_LOOP, -8.0f);
|
||||
this->timer = 50;
|
||||
this->picto.actor.speed = 4.0f;
|
||||
this->actionFunc = EnGe2_Charge;
|
||||
@@ -438,7 +438,7 @@ void EnGe2_SetupCharge(EnGe2* this, PlayState* play) {
|
||||
|
||||
void EnGe2_SetupLookAround(EnGe2* this) {
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f);
|
||||
this->timer = 60;
|
||||
this->picto.actor.speed = 0.0f;
|
||||
this->actionFunc = EnGe2_LookAround;
|
||||
@@ -483,13 +483,13 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) {
|
||||
this->picto.actor.speed = 0.0f;
|
||||
this->actionFunc = EnGe2_SetupCharge;
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f);
|
||||
this->stateFlags |= GERUDO_PURPLE_STATE_CAPTURING;
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_80_08)) {
|
||||
this->picto.actor.speed = 0.0f;
|
||||
this->actionFunc = EnGe2_TurnToPlayerFast;
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f);
|
||||
} else if (EnGe2_LookForPlayer(play, &this->picto.actor, &this->picto.actor.focus.pos,
|
||||
this->picto.actor.shape.rot.y, 0x1800, visionRange, this->verticalDetectRange)) {
|
||||
if ((GERUDO_PURPLE_GET_EXIT(&this->picto.actor) != GERUDO_PURPLE_EXIT_NONE) && !Play_InCsMode(play)) {
|
||||
@@ -499,7 +499,7 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) {
|
||||
Message_StartTextbox(play, 0x1194, &this->picto.actor);
|
||||
this->actionFunc = EnGe2_SetupCharge;
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f);
|
||||
}
|
||||
} else if (this->collider.base.acFlags & AC_HIT) {
|
||||
if ((this->collider.info.acHitInfo != NULL) &&
|
||||
@@ -510,7 +510,7 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) {
|
||||
this->stateFlags |= GERUDO_PURPLE_STATE_STUNNED;
|
||||
} else {
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleFallingToGroundAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleFallingToGroundAnim), 2, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleFallingToGroundAnim), ANIMMODE_ONCE, -8.0f);
|
||||
this->timer = 200;
|
||||
this->picto.actor.speed = 0.0f;
|
||||
this->actionFunc = EnGe2_KnockedOut;
|
||||
@@ -543,7 +543,7 @@ void EnGe2_LookAround(EnGe2* this, PlayState* play) {
|
||||
} else {
|
||||
this->actionFunc = EnGe2_Walk;
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleWalkingAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleWalkingAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleWalkingAnim), ANIMMODE_LOOP, -8.0f);
|
||||
this->headRot.y = 0;
|
||||
this->detectedStatus = GERUDO_PURPLE_DETECTION_UNDETECTED;
|
||||
}
|
||||
@@ -602,13 +602,14 @@ void EnGe2_PerformCutsceneActions(EnGe2* this, PlayState* play) {
|
||||
switch (cueId) {
|
||||
case ENGE2_CUEID_BEEHIVE_PATROL:
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f);
|
||||
EnGe2_GetNextPath(this, play);
|
||||
break;
|
||||
|
||||
case ENGE2_CUEID_BEEHIVE_RUN_AWAY:
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleRunningAwayCutsceneAnim, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&gGerudoPurpleRunningAwayCutsceneAnim), 0, -5.0f);
|
||||
Animation_GetLastFrame(&gGerudoPurpleRunningAwayCutsceneAnim), ANIMMODE_LOOP,
|
||||
-5.0f);
|
||||
this->screamTimer = (s32)(Rand_ZeroFloat(10.0f) + 20.0f);
|
||||
break;
|
||||
|
||||
@@ -617,11 +618,13 @@ void EnGe2_PerformCutsceneActions(EnGe2* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case ENGE2_CUEID_GBT_ENTR_STAND_STILL:
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleGreatBayCutsceneAnim, 0.0f, 0.0f, 0.0f, 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleGreatBayCutsceneAnim, 0.0f, 0.0f, 0.0f,
|
||||
ANIMMODE_ONCE, 0.0f);
|
||||
break;
|
||||
|
||||
case ENGE2_CUEID_GBT_ENTR_BLOWN_AWAY:
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleGreatBayCutsceneAnim, 0.0f, 1.0f, 1.0f, 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gGerudoPurpleGreatBayCutsceneAnim, 0.0f, 1.0f, 1.0f,
|
||||
ANIMMODE_ONCE, 0.0f);
|
||||
EnGe2_SetupBlownAwayPath(this, play);
|
||||
this->stateFlags |= GERUDO_PURPLE_STATE_DISABLE_MOVEMENT;
|
||||
this->screamTimer = (s32)(Rand_ZeroFloat(10.0f) + 20.0f);
|
||||
|
||||
@@ -15,7 +15,7 @@ void EnGe3_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnGe3_Update(Actor* thisx, PlayState* play);
|
||||
void EnGe3_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnGe3_ChangeAnim(EnGe3* this, s16 animIndex, u8 mode, f32 morphFrames);
|
||||
void EnGe3_ChangeAnim(EnGe3* this, s16 animIndex, u8 animMode, f32 morphFrames);
|
||||
void EnGe3_SetupPath(EnGe3* this, PlayState* play);
|
||||
void EnGe3_Idle(EnGe3* this, PlayState* play);
|
||||
void EnGe3_AveilsChamberIdle(EnGe3* this, PlayState* play);
|
||||
@@ -111,7 +111,7 @@ void EnGe3_Destroy(Actor* thisx, PlayState* play) {
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
void EnGe3_ChangeAnim(EnGe3* this, s16 animIndex, u8 mode, f32 morphFrames) {
|
||||
void EnGe3_ChangeAnim(EnGe3* this, s16 animIndex, u8 animMode, f32 morphFrames) {
|
||||
static AnimationHeader* sAnimations[GERUDO_AVEIL_ANIM_MAX] = {
|
||||
&gGerudoRedStandAnim, // GERUDO_AVEIL_ANIM_STAND
|
||||
&gGerudoRedWalkAnim, // GERUDO_AVEIL_ANIM_WALK
|
||||
@@ -125,7 +125,7 @@ void EnGe3_ChangeAnim(EnGe3* this, s16 animIndex, u8 mode, f32 morphFrames) {
|
||||
};
|
||||
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), mode, morphFrames);
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), animMode, morphFrames);
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "z_en_geg.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
#include "objects/object_taisou/object_taisou.h"
|
||||
#include "objects/object_hakugin_demo/object_hakugin_demo.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
@@ -126,68 +125,112 @@ static DamageTable sDamageTable = {
|
||||
/* Powder Keg */ DMG_ENTRY(1, 0x0),
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gGoronDropKegAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronAthleticsSquatSideToSideAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronAthleticsDoubleArmSideBendAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronAthleticsShakeLimbsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronAthleticsSingleArmSideBendAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronAthleticsHamstringStretchSittingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronAthleticsCheerAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronAthleticsShoutAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronAthleticsHamstringStretchStandingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronCoverEarsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronSpringLookAroundAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronSpringLookAroundLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gGoronShiveringSurprisedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronStandingIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
typedef enum {
|
||||
/* -1 */ ENGEG_ANIM_NONE = -1,
|
||||
/* 0x00 */ ENGEG_ANIM_0,
|
||||
/* 0x01 */ ENGEG_ANIM_1,
|
||||
/* 0x02 */ ENGEG_ANIM_2,
|
||||
/* 0x03 */ ENGEG_ANIM_3,
|
||||
/* 0x04 */ ENGEG_ANIM_4,
|
||||
/* 0x05 */ ENGEG_ANIM_5,
|
||||
/* 0x06 */ ENGEG_ANIM_6,
|
||||
/* 0x07 */ ENGEG_ANIM_7,
|
||||
/* 0x08 */ ENGEG_ANIM_8,
|
||||
/* 0x09 */ ENGEG_ANIM_9,
|
||||
/* 0x0A */ ENGEG_ANIM_10,
|
||||
/* 0x0B */ ENGEG_ANIM_11,
|
||||
/* 0x0C */ ENGEG_ANIM_12,
|
||||
/* 0x0D */ ENGEG_ANIM_13,
|
||||
/* 0x0E */ ENGEG_ANIM_14,
|
||||
/* 0x0F */ ENGEG_ANIM_15,
|
||||
/* 0x10 */ ENGEG_ANIM_16,
|
||||
/* 0x11 */ ENGEG_ANIM_17,
|
||||
/* 0x12 */ ENGEG_ANIM_18,
|
||||
/* 0x13 */ ENGEG_ANIM_19,
|
||||
/* 0x14 */ ENGEG_ANIM_20,
|
||||
/* 0x15 */ ENGEG_ANIM_MAX
|
||||
} EnGegAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[ENGEG_ANIM_MAX] = {
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_0
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENGEG_ANIM_1
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENGEG_ANIM_2
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, -4 }, // ENGEG_ANIM_3
|
||||
{ &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, -4 }, // ENGEG_ANIM_4
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_5
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENGEG_ANIM_6
|
||||
{ &gGoronDropKegAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // ENGEG_ANIM_7
|
||||
{ &gGoronAthleticsSquatSideToSideAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_8
|
||||
{ &gGoronAthleticsDoubleArmSideBendAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_9
|
||||
{ &gGoronAthleticsShakeLimbsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_10
|
||||
{ &gGoronAthleticsSingleArmSideBendAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_11
|
||||
{ &gGoronAthleticsHamstringStretchSittingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_12
|
||||
{ &gGoronAthleticsCheerAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_13
|
||||
{ &gGoronAthleticsShoutAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_14
|
||||
{ &gGoronAthleticsHamstringStretchStandingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_15
|
||||
{ &gGoronCoverEarsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_16
|
||||
{ &gGoronSpringLookAroundAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENGEG_ANIM_17
|
||||
{ &gGoronSpringLookAroundLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENGEG_ANIM_18
|
||||
{ &gGoronShiveringSurprisedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENGEG_ANIM_19
|
||||
{ &gGoronStandingIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENGEG_ANIM_20
|
||||
};
|
||||
|
||||
u16 func_80BB16D0(EnGeg* this) {
|
||||
switch (this->unk_496) {
|
||||
case 0xD5E:
|
||||
return 0xD5F;
|
||||
|
||||
case 0xD5F:
|
||||
return 0xD60;
|
||||
|
||||
case 0xD60:
|
||||
return 0xD61;
|
||||
|
||||
case 0xD62:
|
||||
return 0xD63;
|
||||
|
||||
case 0xD64:
|
||||
return 0xD65;
|
||||
|
||||
case 0xD66:
|
||||
return 0xD67;
|
||||
|
||||
case 0xD67:
|
||||
return 0xD68;
|
||||
|
||||
case 0xD68:
|
||||
return 0xD69;
|
||||
|
||||
case 0xD6A:
|
||||
return 0xD6B;
|
||||
|
||||
case 0xD6B:
|
||||
return 0xD6C;
|
||||
|
||||
case 0xD6C:
|
||||
return 0xD6D;
|
||||
|
||||
case 0xD6E:
|
||||
return 0xD6F;
|
||||
|
||||
case 0xD70:
|
||||
return 0xD71;
|
||||
|
||||
case 0xD71:
|
||||
return 0xD72;
|
||||
|
||||
case 0xD73:
|
||||
return 0xD74;
|
||||
|
||||
case 0xD74:
|
||||
return 0xD75;
|
||||
|
||||
case 0xD89:
|
||||
return 0xD8A;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80BB178C(EnGeg* this, PlayState* play) {
|
||||
@@ -372,14 +415,14 @@ s32 func_80BB1D64(EnGeg* this, PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void func_80BB1FCC(EnGeg* this, PlayState* play) {
|
||||
void EnGeg_UpdateSkelAnime(EnGeg* this, PlayState* play) {
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->unk_248].segment);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
void func_80BB2020(EnGeg* this, PlayState* play) {
|
||||
void EnGeg_ChangeAnim(EnGeg* this, PlayState* play) {
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->unk_248].segment);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_4AC);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
}
|
||||
|
||||
s32 func_80BB2088(EnGeg* this, PlayState* play) {
|
||||
@@ -393,7 +436,7 @@ s32 func_80BB2088(EnGeg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (Actor_IsFacingAndNearPlayer(&this->actor, 300.0f, 0x7FF8) &&
|
||||
((this->unk_4AC == 5) || ((this->unk_4AC == 13) && (this->unk_496 == 0xD69)))) {
|
||||
((this->animIndex == ENGEG_ANIM_5) || ((this->animIndex == ENGEG_ANIM_13) && (this->unk_496 == 0xD69)))) {
|
||||
this->unk_230 |= 2;
|
||||
func_80BB1D64(this, play);
|
||||
} else {
|
||||
@@ -412,8 +455,8 @@ s32 func_80BB2088(EnGeg* this, PlayState* play) {
|
||||
|
||||
void func_80BB217C(EnGeg* this, PlayState* play) {
|
||||
if (Object_IsLoaded(&play->objectCtx, this->unk_248)) {
|
||||
this->unk_4AC = 5;
|
||||
func_80BB2020(this, play);
|
||||
this->animIndex = ENGEG_ANIM_5;
|
||||
EnGeg_ChangeAnim(this, play);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->unk_230 = 0;
|
||||
this->actor.shape.shadowScale = 20.0f;
|
||||
@@ -509,8 +552,8 @@ void func_80BB2520(EnGeg* this, PlayState* play) {
|
||||
case 0xD66:
|
||||
this->unk_248 = Object_GetIndex(&play->objectCtx, OBJECT_OF1D_MAP);
|
||||
if (this->unk_248 >= 0) {
|
||||
this->unk_4AC = 19;
|
||||
func_80BB2020(this, play);
|
||||
this->animIndex = ENGEG_ANIM_19;
|
||||
EnGeg_ChangeAnim(this, play);
|
||||
}
|
||||
this->unk_230 |= 0x20;
|
||||
this->actionFunc = func_80BB2944;
|
||||
@@ -527,11 +570,14 @@ void func_80BB2520(EnGeg* this, PlayState* play) {
|
||||
case 0xD8B:
|
||||
this->unk_248 = Object_GetIndex(&play->objectCtx, OBJECT_OF1D_MAP);
|
||||
if (this->unk_248 >= 0) {
|
||||
this->unk_4AC = 4;
|
||||
func_80BB2020(this, play);
|
||||
this->animIndex = ENGEG_ANIM_4;
|
||||
EnGeg_ChangeAnim(this, play);
|
||||
}
|
||||
this->actionFunc = func_80BB2E00;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_TALK) {
|
||||
@@ -557,6 +603,9 @@ void func_80BB26EC(EnGeg* this, PlayState* play) {
|
||||
this->unk_230 &= ~0x10;
|
||||
this->actionFunc = func_80BB221C;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this->unk_496 = func_80BB16D0(this);
|
||||
@@ -609,12 +658,12 @@ void func_80BB27D4(EnGeg* this, PlayState* play) {
|
||||
void func_80BB2944(EnGeg* this, PlayState* play) {
|
||||
u8 talkState = Message_GetState(&play->msgCtx);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_4AC].animation);
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
|
||||
if (this->unk_4AC == 19) {
|
||||
if (curFrame == lastFrame) {
|
||||
this->unk_4AC = 6;
|
||||
func_80BB2020(this, play);
|
||||
if (this->animIndex == ENGEG_ANIM_19) {
|
||||
if (curFrame == endFrame) {
|
||||
this->animIndex = ENGEG_ANIM_6;
|
||||
EnGeg_ChangeAnim(this, play);
|
||||
}
|
||||
} else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
if (this->unk_496 == 0xD67) {
|
||||
@@ -666,8 +715,8 @@ void func_80BB2B1C(EnGeg* this, PlayState* play) {
|
||||
Message_ContinueTextbox(play, this->unk_496);
|
||||
this->unk_248 = Object_GetIndex(&play->objectCtx, OBJECT_TAISOU);
|
||||
if (this->unk_248 >= 0) {
|
||||
this->unk_4AC = 13;
|
||||
func_80BB2020(this, play);
|
||||
this->animIndex = ENGEG_ANIM_13;
|
||||
EnGeg_ChangeAnim(this, play);
|
||||
}
|
||||
this->actionFunc = func_80BB27D4;
|
||||
} else {
|
||||
@@ -704,21 +753,21 @@ void func_80BB2B1C(EnGeg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BB2E00(EnGeg* this, PlayState* play) {
|
||||
s16 sp2E = this->skelAnime.curFrame;
|
||||
s16 sp2C = Animation_GetLastFrame(sAnimationInfo[this->unk_4AC].animation);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
|
||||
if (this->unk_4AC == 2) {
|
||||
if (this->animIndex == ENGEG_ANIM_2) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x1000, 0x100);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (sp2E == sp2C) {
|
||||
if (curFrame == endFrame) {
|
||||
CutsceneManager_Stop(this->csId);
|
||||
this->unk_4AC = 20;
|
||||
func_80BB2020(this, play);
|
||||
this->animIndex = ENGEG_ANIM_20;
|
||||
EnGeg_ChangeAnim(this, play);
|
||||
this->actionFunc = func_80BB30B4;
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 24.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_STAND_IMT);
|
||||
}
|
||||
} else if (this->unk_4AC == 4) {
|
||||
} else if (this->animIndex == ENGEG_ANIM_4) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f)) {
|
||||
this->unk_230 |= 1;
|
||||
this->actor.shape.yOffset = 14.0f;
|
||||
@@ -740,11 +789,11 @@ void func_80BB2F7C(EnGeg* this, PlayState* play) {
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 150.0f) && (fabsf(this->actor.playerHeightRel) < 10.0f) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->unk_4AC = 2;
|
||||
this->animIndex = ENGEG_ANIM_2;
|
||||
this->actor.speed = 0.0f;
|
||||
this->unk_230 &= ~1;
|
||||
this->actor.shape.yOffset = 0.0f;
|
||||
func_80BB2020(this, play);
|
||||
EnGeg_ChangeAnim(this, play);
|
||||
this->actionFunc = func_80BB2E00;
|
||||
} else {
|
||||
this->actor.speed = 5.0f;
|
||||
@@ -902,7 +951,7 @@ void EnGeg_Update(Actor* thisx, PlayState* play) {
|
||||
EnGeg* this = THIS;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
func_80BB1FCC(this, play);
|
||||
EnGeg_UpdateSkelAnime(this, play);
|
||||
func_80BB2088(this, play);
|
||||
func_80BB1C8C(this);
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENGEG_FIDGET_TABLE_LEN);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_GEG_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
struct EnGeg;
|
||||
|
||||
@@ -23,8 +24,8 @@ typedef struct EnGeg {
|
||||
/* 0x242 */ s16 unk_242;
|
||||
/* 0x244 */ s16 unk_244;
|
||||
/* 0x248 */ s32 unk_248;
|
||||
/* 0x24C */ Vec3s jointTable[18];
|
||||
/* 0x2B8 */ Vec3s morphTable[18];
|
||||
/* 0x24C */ Vec3s jointTable[GORON_LIMB_MAX];
|
||||
/* 0x2B8 */ Vec3s morphTable[GORON_LIMB_MAX];
|
||||
/* 0x324 */ UNK_TYPE1 unk324[0x144];
|
||||
/* 0x468 */ s16 unk_468;
|
||||
/* 0x46A */ s16 unk_46A;
|
||||
@@ -38,7 +39,7 @@ typedef struct EnGeg {
|
||||
/* 0x498 */ s16 csId;
|
||||
/* 0x49A */ s16 nextCsId;
|
||||
/* 0x49C */ s16 csIdList[8];
|
||||
/* 0x4AC */ s32 unk_4AC;
|
||||
/* 0x4AC */ s32 animIndex;
|
||||
/* 0x4B0 */ s16 unk_4B0;
|
||||
/* 0x4B4 */ Vec3f unk_4B4;
|
||||
/* 0x4C0 */ Vec3f unk_4C0[2];
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "z_en_gg.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_gg/object_gg.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_REACT_TO_LENS)
|
||||
|
||||
@@ -95,15 +94,44 @@ static DamageTable sDamageTable = {
|
||||
/* Powder Keg */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00D528, 1.0f, 0.0f, 0.0f, 2, -10.0f },
|
||||
{ &object_gg_Anim_00D174, 1.0f, 0.0f, 0.0f, 2, -10.0f }, { &object_gg_Anim_00ECC0, 1.0f, 0.0f, 0.0f, 2, -10.0f },
|
||||
{ &object_gg_Anim_00BAF0, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, 0, -10.0f },
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, 0, -10.0f },
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_0100C8, 1.0f, 0.0f, 0.0f, 0, 0.0f },
|
||||
{ &object_gg_Anim_00CDA0, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_gg_Anim_00B560, 1.0f, 0.0f, 0.0f, 0, 0.0f },
|
||||
{ &object_gg_Anim_00A4B4, 1.0f, 0.0f, 0.0f, 2, 0.0f }, { &object_gg_Anim_00E86C, 1.0f, 0.0f, 0.0f, 2, 0.0f },
|
||||
{ &object_gg_Anim_00D99C, 1.0f, 0.0f, 0.0f, 2, 0.0f }, { &object_gg_Anim_00E2A4, 1.0f, 0.0f, 0.0f, 0, 0.0f },
|
||||
typedef enum {
|
||||
/* -1 */ ENGG_ANIM_NONE = -1,
|
||||
/* 0x00 */ ENGG_ANIM_0,
|
||||
/* 0x01 */ ENGG_ANIM_1,
|
||||
/* 0x02 */ ENGG_ANIM_2,
|
||||
/* 0x03 */ ENGG_ANIM_3,
|
||||
/* 0x04 */ ENGG_ANIM_4,
|
||||
/* 0x05 */ ENGG_ANIM_5,
|
||||
/* 0x06 */ ENGG_ANIM_6,
|
||||
/* 0x07 */ ENGG_ANIM_7,
|
||||
/* 0x08 */ ENGG_ANIM_8,
|
||||
/* 0x09 */ ENGG_ANIM_9,
|
||||
/* 0x0A */ ENGG_ANIM_10,
|
||||
/* 0x0B */ ENGG_ANIM_11,
|
||||
/* 0x0C */ ENGG_ANIM_12,
|
||||
/* 0x0D */ ENGG_ANIM_13,
|
||||
/* 0x0E */ ENGG_ANIM_14,
|
||||
/* 0x0F */ ENGG_ANIM_15,
|
||||
/* 0x10 */ ENGG_ANIM_MAX
|
||||
} EnGgAnimation;
|
||||
|
||||
static AnimationInfo sAnimationInfo[ENGG_ANIM_MAX] = {
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG_ANIM_0
|
||||
{ &object_gg_Anim_00D528, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -10.0f }, // ENGG_ANIM_1
|
||||
{ &object_gg_Anim_00D174, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -10.0f }, // ENGG_ANIM_2
|
||||
{ &object_gg_Anim_00ECC0, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -10.0f }, // ENGG_ANIM_3
|
||||
{ &object_gg_Anim_00BAF0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG_ANIM_4
|
||||
{ &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG_ANIM_5
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG_ANIM_6
|
||||
{ &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG_ANIM_7
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG_ANIM_8
|
||||
{ &object_gg_Anim_0100C8, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG_ANIM_9
|
||||
{ &object_gg_Anim_00CDA0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG_ANIM_10
|
||||
{ &object_gg_Anim_00B560, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG_ANIM_11
|
||||
{ &object_gg_Anim_00A4B4, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // ENGG_ANIM_12
|
||||
{ &object_gg_Anim_00E86C, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // ENGG_ANIM_13
|
||||
{ &object_gg_Anim_00D99C, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // ENGG_ANIM_14
|
||||
{ &object_gg_Anim_00E2A4, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG_ANIM_15
|
||||
};
|
||||
|
||||
void func_80B34F70(EnGg* this) {
|
||||
@@ -149,7 +177,7 @@ void func_80B35108(EnGg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80B351A4(EnGg* this) {
|
||||
if ((this->unk_2E6 == 2) || (this->unk_2E6 == 3)) {
|
||||
if ((this->animIndex == ENGG_ANIM_2) || (this->animIndex == ENGG_ANIM_3)) {
|
||||
this->unk_2E2 = 3;
|
||||
} else {
|
||||
s16 temp = this->unk_2E4 - 1;
|
||||
@@ -170,57 +198,57 @@ void func_80B351A4(EnGg* this) {
|
||||
void func_80B35250(EnGg* this) {
|
||||
this->unk_2E4 = 20;
|
||||
this->unk_2E2 = 0;
|
||||
this->unk_2E6 = 0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0);
|
||||
this->animIndex = ENGG_ANIM_0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_0);
|
||||
this->actionFunc = func_80B35450;
|
||||
}
|
||||
|
||||
void func_80B352A4(EnGg* this, PlayState* play) {
|
||||
s16 sp26 = this->skelAnime.curFrame;
|
||||
s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2E6].animation);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
|
||||
if (sp26 == lastFrame) {
|
||||
if (curFrame == endFrame) {
|
||||
switch (this->actor.textId) {
|
||||
case 0xCE5:
|
||||
this->unk_2E6 = 1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1);
|
||||
this->animIndex = ENGG_ANIM_1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_1);
|
||||
break;
|
||||
|
||||
case 0xCE6:
|
||||
case 0xCEC:
|
||||
this->unk_2E6 = 0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0);
|
||||
this->animIndex = ENGG_ANIM_0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_0);
|
||||
break;
|
||||
|
||||
case 0xCE8:
|
||||
this->unk_2E6 = 2;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2);
|
||||
this->animIndex = ENGG_ANIM_2;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_2);
|
||||
break;
|
||||
|
||||
case 0xCE9:
|
||||
this->unk_2E6 = 3;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3);
|
||||
this->animIndex = ENGG_ANIM_3;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_3);
|
||||
break;
|
||||
|
||||
case 0xCED:
|
||||
case 0xCEE:
|
||||
this->unk_2E6 = 4;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4);
|
||||
this->animIndex = ENGG_ANIM_4;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_4);
|
||||
break;
|
||||
|
||||
default:
|
||||
this->unk_2E6 = 0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0);
|
||||
this->animIndex = ENGG_ANIM_0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_0);
|
||||
break;
|
||||
}
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_19_80);
|
||||
this->actionFunc = func_80B3556C;
|
||||
} else if ((this->unk_2E6 == 0) && ((this->actor.textId == 0xCED) || (this->actor.textId == 0xCEE))) {
|
||||
if (sp26 < (lastFrame - 1)) {
|
||||
} else if ((this->animIndex == ENGG_ANIM_0) && ((this->actor.textId == 0xCED) || (this->actor.textId == 0xCEE))) {
|
||||
if (curFrame < (endFrame - 1)) {
|
||||
this->skelAnime.playSpeed = 2.0f;
|
||||
} else {
|
||||
this->unk_2E6 = 4;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4);
|
||||
this->animIndex = ENGG_ANIM_4;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -249,7 +277,7 @@ void func_80B35450(EnGg* this, PlayState* play) {
|
||||
|
||||
void func_80B3556C(EnGg* this, PlayState* play) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
if (this->unk_2E6 == 4) {
|
||||
if (this->animIndex == ENGG_ANIM_4) {
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
this->unk_308 = 0;
|
||||
@@ -275,47 +303,43 @@ void func_80B35634(EnGg* this, PlayState* play) {
|
||||
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 1:
|
||||
this->unk_2DA = 0;
|
||||
this->unk_2E6 = 0;
|
||||
this->csAnimIndex = ENGG_ANIM_0;
|
||||
this->animIndex = ENGG_ANIM_0;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this->unk_2DA = 9;
|
||||
this->unk_2E6 = 9;
|
||||
this->csAnimIndex = ENGG_ANIM_9;
|
||||
this->animIndex = ENGG_ANIM_9;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
this->unk_2DA = 10;
|
||||
this->unk_2E6 = 10;
|
||||
this->csAnimIndex = ENGG_ANIM_10;
|
||||
this->animIndex = ENGG_ANIM_10;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
do {
|
||||
this->unk_344.unk_30 = this->unk_2DA = 11;
|
||||
} while (0);
|
||||
this->unk_2E6 = 11;
|
||||
this->unk_344.animIndex = this->csAnimIndex = ENGG_ANIM_11;
|
||||
this->animIndex = ENGG_ANIM_11;
|
||||
func_80B364D4(&this->unk_344, play);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
do {
|
||||
this->unk_344.unk_30 = this->unk_2DA = 12;
|
||||
} while (0);
|
||||
this->unk_2E6 = 12;
|
||||
this->unk_344.animIndex = this->csAnimIndex = ENGG_ANIM_12;
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
this->animIndex = ENGG_ANIM_12;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
do {
|
||||
this->unk_344.unk_30 = this->unk_2DA = 13;
|
||||
} while (0);
|
||||
this->unk_2E6 = 13;
|
||||
this->unk_344.animIndex = this->csAnimIndex = ENGG_ANIM_13;
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
this->animIndex = ENGG_ANIM_13;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
do {
|
||||
this->unk_344.unk_30 = this->unk_2DA = 14;
|
||||
} while (0);
|
||||
this->unk_2E6 = 14;
|
||||
this->unk_344.animIndex = this->csAnimIndex = ENGG_ANIM_14;
|
||||
this->animIndex = ENGG_ANIM_14;
|
||||
func_80B364D4(&this->unk_344, play);
|
||||
break;
|
||||
|
||||
@@ -324,13 +348,13 @@ void func_80B35634(EnGg* this, PlayState* play) {
|
||||
return;
|
||||
|
||||
default:
|
||||
this->unk_2DA = 0;
|
||||
this->csAnimIndex = ENGG_ANIM_0;
|
||||
break;
|
||||
}
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_2DA);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->csAnimIndex);
|
||||
}
|
||||
|
||||
if (this->unk_2DA == 14) {
|
||||
if (this->csAnimIndex == ENGG_ANIM_14) {
|
||||
func_80B358D8(this, play);
|
||||
}
|
||||
|
||||
@@ -345,16 +369,22 @@ u16 func_80B357F0(EnGg* this) {
|
||||
switch (this->actor.textId) {
|
||||
case 0xCE5:
|
||||
return 0xCE6;
|
||||
|
||||
case 0xCE6:
|
||||
return 0xCE8;
|
||||
|
||||
case 0xCE8:
|
||||
return 0xCE9;
|
||||
|
||||
case 0xCE9:
|
||||
return 0xCEC;
|
||||
|
||||
case 0xCEC:
|
||||
return 0xCED;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80B3584C(EnGg* this) {
|
||||
@@ -366,12 +396,12 @@ void func_80B3584C(EnGg* this) {
|
||||
}
|
||||
|
||||
void func_80B358D8(EnGg* this, PlayState* play) {
|
||||
s16 sp1E = this->skelAnime.curFrame;
|
||||
s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2DA].animation);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->csAnimIndex].animation);
|
||||
|
||||
if ((this->unk_2E6 == 14) && (sp1E == lastFrame)) {
|
||||
this->unk_2E6 = 15;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 15);
|
||||
if ((this->animIndex == ENGG_ANIM_14) && (curFrame == endFrame)) {
|
||||
this->animIndex = ENGG_ANIM_15;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG_ANIM_15);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,8 +409,8 @@ void func_80B35968(EnGg* this, PlayState* play) {
|
||||
if (this->unk_344.unk_34 != NULL) {
|
||||
this->unk_344.unk_34(&this->unk_344, play);
|
||||
} else {
|
||||
if ((this->unk_2DA == 11) || (this->unk_2DA == 14)) {
|
||||
this->unk_344.unk_30 = this->unk_2DA;
|
||||
if ((this->csAnimIndex == ENGG_ANIM_11) || (this->csAnimIndex == ENGG_ANIM_14)) {
|
||||
this->unk_344.animIndex = this->csAnimIndex;
|
||||
}
|
||||
func_80B363E8(&this->unk_344, play, &this->unk_320, &this->unk_32C, &this->unk_338);
|
||||
}
|
||||
@@ -433,7 +463,7 @@ void func_80B35B24(EnGgStruct* ptr, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80B35B44(EnGgStruct* ptr, PlayState* play) {
|
||||
if (ptr->unk_30 == 0xE) {
|
||||
if (ptr->animIndex == ENGG_ANIM_14) {
|
||||
ptr->unk_40++;
|
||||
if (ptr->unk_40 > 0x46) {
|
||||
ptr->unk_48 = 1;
|
||||
@@ -455,13 +485,13 @@ void func_80B35B44(EnGgStruct* ptr, PlayState* play) {
|
||||
ptr->unk_44 = 0x37;
|
||||
}
|
||||
}
|
||||
} else if ((ptr->unk_30 == 11) || (ptr->unk_30 == 12)) {
|
||||
} else if ((ptr->animIndex == ENGG_ANIM_11) || (ptr->animIndex == ENGG_ANIM_12)) {
|
||||
ptr->unk_40++;
|
||||
if (ptr->unk_40 > 0x46) {
|
||||
ptr->unk_48 = 1;
|
||||
ptr->unk_40 = 0;
|
||||
}
|
||||
} else if (ptr->unk_30 == 0xD) {
|
||||
} else if (ptr->animIndex == ENGG_ANIM_13) {
|
||||
ptr->unk_48 = 0;
|
||||
ptr->unk_40++;
|
||||
if (ptr->unk_40 > 0x46) {
|
||||
@@ -496,7 +526,7 @@ void func_80B35C84(EnGgStruct* ptr, PlayState* play) {
|
||||
sp74 = ptr->unk_40 % temp;
|
||||
ptr->unk_40 = sp74;
|
||||
phi_s7 = 0x46;
|
||||
} else if (ptr->unk_30 == 0xD) {
|
||||
} else if (ptr->animIndex == ENGG_ANIM_13) {
|
||||
sp74 = ptr->unk_40;
|
||||
phi_s7 = 0x46;
|
||||
} else {
|
||||
@@ -519,6 +549,7 @@ void func_80B35C84(EnGgStruct* ptr, PlayState* play) {
|
||||
temp_f26 = ptr->unk_00.z + (ptr->unk_18.z * temp_f20) + (0.5f * ptr->unk_24.z * temp_f20 * temp_f20);
|
||||
temp_f20 = Rand_ZeroOne() * 0.003f;
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
Matrix_Translate(temp_f22, temp_f24, temp_f26, MTXMODE_NEW);
|
||||
@@ -630,9 +661,9 @@ void func_80B363E8(EnGgStruct* ptr, PlayState* play, Vec3f* arg1, Vec3f* arg2, V
|
||||
ptr->unk_00.x += -4.0f;
|
||||
ptr->unk_0C.x += 4.0f;
|
||||
|
||||
if ((ptr->unk_30 == 11) || (ptr->unk_30 == 12) || (ptr->unk_30 == 13)) {
|
||||
if ((ptr->animIndex == ENGG_ANIM_11) || (ptr->animIndex == ENGG_ANIM_12) || (ptr->animIndex == ENGG_ANIM_13)) {
|
||||
ptr->unk_38 = func_80B35C84;
|
||||
} else if (ptr->unk_30 == 14) {
|
||||
} else if (ptr->animIndex == ENGG_ANIM_14) {
|
||||
ptr->unk_38 = func_80B3610C;
|
||||
}
|
||||
}
|
||||
@@ -655,7 +686,7 @@ void EnGg_Init(Actor* thisx, PlayState* play) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
this->actor.bgCheckFlags |= BGCHECKFLAG_PLAYER_400;
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_gg_Skel_00F6C0, &object_gg_Anim_00F578, this->jointTable,
|
||||
this->morphTable, 20);
|
||||
this->morphTable, OBJECT_GG_LIMB_MAX);
|
||||
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
@@ -700,11 +731,13 @@ void EnGg_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((play->csCtx.state == CS_STATE_IDLE) &&
|
||||
((this->unk_2DA != 14) && (this->unk_2DA != 11) && (this->unk_2DA != 12) && (this->unk_2DA != 13))) {
|
||||
((this->csAnimIndex != ENGG_ANIM_14) && (this->csAnimIndex != ENGG_ANIM_11) &&
|
||||
(this->csAnimIndex != ENGG_ANIM_12) && (this->csAnimIndex != ENGG_ANIM_13))) {
|
||||
func_80B364D4(&this->unk_344, play);
|
||||
}
|
||||
|
||||
if (((this->unk_2DA == 14) || (this->unk_2DA == 11) || (this->unk_2DA == 12) || (this->unk_2DA == 13)) &&
|
||||
if (((this->csAnimIndex == ENGG_ANIM_14) || (this->csAnimIndex == ENGG_ANIM_11) ||
|
||||
(this->csAnimIndex == ENGG_ANIM_12) || (this->csAnimIndex == ENGG_ANIM_13)) &&
|
||||
(this->unk_309 == 1)) {
|
||||
func_80B35968(this, play);
|
||||
}
|
||||
@@ -738,7 +771,7 @@ s32 EnGg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
||||
Gfx** gfx) {
|
||||
EnGg* this = THIS;
|
||||
|
||||
if (limbIndex == 2) {
|
||||
if (limbIndex == OBJECT_GG_LIMB_02) {
|
||||
Matrix_RotateZS(this->unk_2E8, MTXMODE_APPLY);
|
||||
}
|
||||
return false;
|
||||
@@ -750,12 +783,13 @@ void EnGg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
Vec3f sp30 = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f sp24 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
if (this->unk_2DA == 14) {
|
||||
if (this->csAnimIndex == ENGG_ANIM_14) {
|
||||
sp30.y = 3.0f;
|
||||
sp30.z = -1.0f;
|
||||
sp24.y = -0.07f;
|
||||
this->unk_309 = 1;
|
||||
} else if ((this->unk_2DA == 11) || (this->unk_2DA == 12) || (this->unk_2DA == 13)) {
|
||||
} else if ((this->csAnimIndex == ENGG_ANIM_11) || (this->csAnimIndex == ENGG_ANIM_12) ||
|
||||
(this->csAnimIndex == ENGG_ANIM_13)) {
|
||||
sp30.x = 3.0f;
|
||||
sp24.x = 0.5f;
|
||||
this->unk_309 = 1;
|
||||
@@ -763,7 +797,7 @@ void EnGg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
this->unk_309 = 0;
|
||||
}
|
||||
|
||||
if (limbIndex == 4) {
|
||||
if (limbIndex == OBJECT_GG_LIMB_04) {
|
||||
Matrix_MultVec3f(&D_80B36DF0, &this->unk_320);
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_GG_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_gg/object_gg.h"
|
||||
|
||||
struct EnGg;
|
||||
struct EnGgStruct;
|
||||
@@ -14,7 +15,7 @@ typedef struct EnGgStruct {
|
||||
/* 0x0C */ Vec3f unk_0C;
|
||||
/* 0x18 */ Vec3f unk_18;
|
||||
/* 0x24 */ Vec3f unk_24;
|
||||
/* 0x30 */ u8 unk_30;
|
||||
/* 0x30 */ u8 animIndex;
|
||||
/* 0x34 */ EnGgUnkFunc unk_34;
|
||||
/* 0x38 */ EnGgUnkFunc unk_38;
|
||||
/* 0x3C */ s32 unk_3C;
|
||||
@@ -30,16 +31,16 @@ typedef struct EnGg {
|
||||
/* 0x1D4 */ EnGgActionFunc actionFunc;
|
||||
/* 0x1D8 */ Vec3s unk_1D8;
|
||||
/* 0x1DE */ Vec3s unk_1DE;
|
||||
/* 0x1E4 */ Vec3s jointTable[20];
|
||||
/* 0x25C */ Vec3s morphTable[20];
|
||||
/* 0x1E4 */ Vec3s jointTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x25C */ Vec3s morphTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x2D4 */ UNK_TYPE1 unk_2D4[0x6];
|
||||
/* 0x2DA */ u8 unk_2DA;
|
||||
/* 0x2DA */ u8 csAnimIndex;
|
||||
/* 0x2DB */ u8 cueId;
|
||||
/* 0x2DC */ s16 csId;
|
||||
/* 0x2DE */ UNK_TYPE1 unk2DE[4];
|
||||
/* 0x2E2 */ s16 unk_2E2;
|
||||
/* 0x2E4 */ s16 unk_2E4;
|
||||
/* 0x2E6 */ s16 unk_2E6;
|
||||
/* 0x2E6 */ s16 animIndex;
|
||||
/* 0x2E8 */ s16 unk_2E8;
|
||||
/* 0x2EA */ UNK_TYPE1 unk2EA[0x1A];
|
||||
/* 0x304 */ s16 unk_304;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_gg2.h"
|
||||
#include "objects/object_gg/object_gg.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_REACT_TO_LENS)
|
||||
|
||||
@@ -39,15 +38,44 @@ ActorInit En_Gg2_InitVars = {
|
||||
(ActorFunc)EnGg2_Draw,
|
||||
};
|
||||
|
||||
AnimationInfo D_80B3BF00[] = {
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00D528, 1.0f, 0.0f, 0.0f, 2, -10.0f },
|
||||
{ &object_gg_Anim_00D174, 1.0f, 0.0f, 0.0f, 2, -10.0f }, { &object_gg_Anim_00ECC0, 1.0f, 0.0f, 0.0f, 2, -10.0f },
|
||||
{ &object_gg_Anim_00BAF0, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, 0, -10.0f },
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, 0, -10.0f },
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_0100C8, 1.0f, 0.0f, 0.0f, 0, 0.0f },
|
||||
{ &object_gg_Anim_00CDA0, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_gg_Anim_00B560, 1.0f, 0.0f, 0.0f, 0, 0.0f },
|
||||
{ &object_gg_Anim_00A4B4, 1.0f, 0.0f, 0.0f, 2, 0.0f }, { &object_gg_Anim_00E86C, 1.0f, 0.0f, 0.0f, 2, 0.0f },
|
||||
{ &object_gg_Anim_00D99C, 1.0f, 0.0f, 0.0f, 2, 0.0f }, { &object_gg_Anim_00E2A4, 1.0f, 0.0f, 0.0f, 0, 0.0f },
|
||||
typedef enum {
|
||||
/* -1 */ ENGG2_ANIM_NONE = -1,
|
||||
/* 0x00 */ ENGG2_ANIM_0,
|
||||
/* 0x01 */ ENGG2_ANIM_1,
|
||||
/* 0x02 */ ENGG2_ANIM_2,
|
||||
/* 0x03 */ ENGG2_ANIM_3,
|
||||
/* 0x04 */ ENGG2_ANIM_4,
|
||||
/* 0x05 */ ENGG2_ANIM_5,
|
||||
/* 0x06 */ ENGG2_ANIM_6,
|
||||
/* 0x07 */ ENGG2_ANIM_7,
|
||||
/* 0x08 */ ENGG2_ANIM_8,
|
||||
/* 0x09 */ ENGG2_ANIM_9,
|
||||
/* 0x0A */ ENGG2_ANIM_10,
|
||||
/* 0x0B */ ENGG2_ANIM_11,
|
||||
/* 0x0C */ ENGG2_ANIM_12,
|
||||
/* 0x0D */ ENGG2_ANIM_13,
|
||||
/* 0x0E */ ENGG2_ANIM_14,
|
||||
/* 0x0F */ ENGG2_ANIM_15,
|
||||
/* 0x10 */ ENGG2_ANIM_MAX
|
||||
} EnGg2Animation;
|
||||
|
||||
static AnimationInfo sAnimationInfo[ENGG2_ANIM_MAX] = {
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG2_ANIM_0
|
||||
{ &object_gg_Anim_00D528, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -10.0f }, // ENGG2_ANIM_1
|
||||
{ &object_gg_Anim_00D174, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -10.0f }, // ENGG2_ANIM_2
|
||||
{ &object_gg_Anim_00ECC0, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -10.0f }, // ENGG2_ANIM_3
|
||||
{ &object_gg_Anim_00BAF0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG2_ANIM_4
|
||||
{ &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG2_ANIM_5
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG2_ANIM_6
|
||||
{ &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG2_ANIM_7
|
||||
{ &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -10.0f }, // ENGG2_ANIM_8
|
||||
{ &object_gg_Anim_0100C8, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG2_ANIM_9
|
||||
{ &object_gg_Anim_00CDA0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG2_ANIM_10
|
||||
{ &object_gg_Anim_00B560, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG2_ANIM_11
|
||||
{ &object_gg_Anim_00A4B4, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // ENGG2_ANIM_12
|
||||
{ &object_gg_Anim_00E86C, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // ENGG2_ANIM_13
|
||||
{ &object_gg_Anim_00D99C, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // ENGG2_ANIM_14
|
||||
{ &object_gg_Anim_00E2A4, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // ENGG2_ANIM_15
|
||||
};
|
||||
|
||||
Color_RGBA8 D_80B3C080 = { 255, 255, 255, 255 };
|
||||
@@ -116,38 +144,38 @@ void func_80B3ADD8(EnGg2* this) {
|
||||
|
||||
void func_80B3AE60(EnGg2* this, PlayState* play) {
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 lastFrame = Animation_GetLastFrame(D_80B3BF00[this->unk_2EE].animation);
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
|
||||
if (curFrame == lastFrame) {
|
||||
switch (this->unk_2EE) {
|
||||
case 0:
|
||||
this->unk_2EE = 1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 1);
|
||||
if (curFrame == endFrame) {
|
||||
switch (this->animIndex) {
|
||||
case ENGG2_ANIM_0:
|
||||
this->animIndex = ENGG2_ANIM_1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_1);
|
||||
this->actionFunc = func_80B3B0A0;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 8:
|
||||
this->unk_2EE = 5;
|
||||
case ENGG2_ANIM_1:
|
||||
case ENGG2_ANIM_8:
|
||||
this->animIndex = ENGG2_ANIM_5;
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 5);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_5);
|
||||
this->actionFunc = func_80B3B120;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
this->unk_2EE = 6;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0);
|
||||
case ENGG2_ANIM_5:
|
||||
this->animIndex = ENGG2_ANIM_6;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_0);
|
||||
this->actionFunc = func_80B3B21C;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
this->unk_2EE = 7;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 5);
|
||||
case ENGG2_ANIM_6:
|
||||
this->animIndex = ENGG2_ANIM_7;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_5);
|
||||
this->actionFunc = func_80B3B294;
|
||||
break;
|
||||
|
||||
default:
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_0);
|
||||
this->actionFunc = func_80B3AFB0;
|
||||
break;
|
||||
}
|
||||
@@ -338,7 +366,7 @@ f32 func_80B3B7E4(Path* path, s32 arg1, Vec3f* arg2, Vec3s* arg3) {
|
||||
void func_80B3B8A4(EnGg2* this) {
|
||||
f32 sp1C;
|
||||
|
||||
if ((this->unk_2EE != 5) && (this->unk_2EE != 7)) {
|
||||
if ((this->animIndex != ENGG2_ANIM_5) && (this->animIndex != ENGG2_ANIM_7)) {
|
||||
this->unk_2F2 += 0x62C;
|
||||
sp1C = 1100.0f;
|
||||
} else {
|
||||
@@ -368,7 +396,7 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
this->actor.bgCheckFlags |= BGCHECKFLAG_PLAYER_400;
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_gg_Skel_00F6C0, &object_gg_Anim_00F578, this->jointTable,
|
||||
this->morphTable, 20);
|
||||
this->morphTable, OBJECT_GG_LIMB_MAX);
|
||||
this->path = SubS_GetPathByIndex(play, ENGG2_GET_PATH_INDEX(&this->actor), ENGG2_PATH_INDEX_NONE);
|
||||
this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->unk_2F0 = 0;
|
||||
@@ -384,15 +412,15 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_04);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_08);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_10);
|
||||
this->unk_2EE = 0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0);
|
||||
this->animIndex = ENGG2_ANIM_0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_0);
|
||||
this->actionFunc = func_80B3AFB0;
|
||||
} else if (play->sceneId == SCENE_17SETUGEN) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_04) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_20_08) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_20_10)) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_04);
|
||||
this->unk_2EE = 8;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0);
|
||||
this->animIndex = ENGG2_ANIM_8;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_0);
|
||||
this->actionFunc = func_80B3B05C;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
@@ -401,8 +429,8 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) {
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_20_04) && CHECK_WEEKEVENTREG(WEEKEVENTREG_20_08) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_20_10)) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_20_08);
|
||||
this->unk_2EE = 8;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0);
|
||||
this->animIndex = ENGG2_ANIM_8;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENGG2_ANIM_0);
|
||||
this->actionFunc = func_80B3B05C;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
@@ -424,7 +452,7 @@ void EnGg2_Update(Actor* thisx, PlayState* play) {
|
||||
if (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) {
|
||||
this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
if ((this->unk_2EE == 5) && (this->unk_2EE == 7)) {
|
||||
if ((this->animIndex == ENGG2_ANIM_5) && (this->animIndex == ENGG2_ANIM_7)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||
}
|
||||
} else {
|
||||
@@ -441,7 +469,7 @@ void EnGg2_Update(Actor* thisx, PlayState* play) {
|
||||
func_80B3B8A4(this);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_1E0, &this->unk_1E6, this->actor.focus.pos);
|
||||
|
||||
if ((this->unk_2EE == 5) || (this->unk_2EE == 7)) {
|
||||
if ((this->animIndex == ENGG2_ANIM_5) || (this->animIndex == ENGG2_ANIM_7)) {
|
||||
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHARP_FLOAT - SFX_FLAG);
|
||||
if ((play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) && ((play->state.frames % 4) == 0)) {
|
||||
func_80B3B4B0(this, play);
|
||||
@@ -454,12 +482,12 @@ void EnGg2_Update(Actor* thisx, PlayState* play) {
|
||||
s32 func_80B3BD44(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) {
|
||||
EnGg2* this = THIS;
|
||||
|
||||
if ((this->unk_2EE != 5) && (this->unk_2EE != 7)) {
|
||||
if (limbIndex == 1) {
|
||||
if ((this->animIndex != ENGG2_ANIM_5) && (this->animIndex != ENGG2_ANIM_7)) {
|
||||
if (limbIndex == OBJECT_GG_LIMB_01) {
|
||||
Matrix_RotateYS(this->unk_2F6, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 2) {
|
||||
if (limbIndex == OBJECT_GG_LIMB_02) {
|
||||
Matrix_RotateZS(this->unk_2F4, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
@@ -469,7 +497,7 @@ s32 func_80B3BD44(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
||||
void func_80B3BDC0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
|
||||
EnGg2* this = THIS;
|
||||
|
||||
if (limbIndex == 4) {
|
||||
if (limbIndex == OBJECT_GG_LIMB_04) {
|
||||
Matrix_MultVec3f(&D_80B3C0A0, &this->unk_304);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_GG2_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_gg/object_gg.h"
|
||||
|
||||
struct EnGg2;
|
||||
|
||||
@@ -20,14 +21,14 @@ typedef struct EnGg2 {
|
||||
/* 0x1DC */ s32 unk_1DC;
|
||||
/* 0x1E0 */ Vec3s unk_1E0;
|
||||
/* 0x1E6 */ Vec3s unk_1E6;
|
||||
/* 0x1EC */ Vec3s jointTable[20];
|
||||
/* 0x264 */ Vec3s morphTable[20];
|
||||
/* 0x1EC */ Vec3s jointTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x264 */ Vec3s morphTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x2DC */ UNK_TYPE1 unk2DC[0x8];
|
||||
/* 0x2E4 */ s16 csId;
|
||||
/* 0x2E6 */ UNK_TYPE1 unk2E6[4];
|
||||
/* 0x2EA */ s16 unk_2EA;
|
||||
/* 0x2EC */ s16 unk_2EC;
|
||||
/* 0x2EE */ s16 unk_2EE;
|
||||
/* 0x2EE */ s16 animIndex;
|
||||
/* 0x2F0 */ u8 unk_2F0;
|
||||
/* 0x2F1 */ u8 unk_2F1;
|
||||
/* 0x2F2 */ s16 unk_2F2;
|
||||
|
||||
@@ -28,10 +28,45 @@ void EnGiant_PerformCutsceneActions(EnGiant* this, PlayState* play);
|
||||
#define GIANT_TYPE_IS_CLOCK_TOWER_FAILURE(type) \
|
||||
(type >= GIANT_TYPE_MOUNTAIN_CLOCK_TOWER_FAILURE && type <= GIANT_TYPE_OCEAN_CLOCK_TOWER_FAILURE)
|
||||
|
||||
/**
|
||||
* Used as values for cueId. The UNKNOWN ones are never used in-game.
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0 */ GIANT_CUEID_NONE,
|
||||
/* 1 */ GIANT_CUEID_IDLE,
|
||||
/* 2 */ GIANT_CUEID_WALKING,
|
||||
/* 3 */ GIANT_CUEID_LOOKING_UP,
|
||||
/* 4 */ GIANT_CUEID_RAISING_ARMS,
|
||||
/* 5 */ GIANT_CUEID_STRUGGLING,
|
||||
/* 6 */ GIANT_CUEID_FALLING_OVER,
|
||||
/* 7 */ GIANT_CUEID_IDLE_FADE_IN,
|
||||
/* 8 */ GIANT_CUEID_TALKING,
|
||||
/* 9 */ GIANT_CUEID_DONE_TALKING,
|
||||
/* 10 */ GIANT_CUEID_TEACHING_OATH_TO_ORDER,
|
||||
/* 11 */ GIANT_CUEID_PLAYER_LEARNED_OATH_TO_ORDER,
|
||||
/* 12 */ GIANT_CUEID_UNKNOWN_12,
|
||||
/* 13 */ GIANT_CUEID_UNKNOWN_13,
|
||||
/* 14 */ GIANT_CUEID_UNKNOWN_14,
|
||||
/* 15 */ GIANT_CUEID_HOLDING_UP_MOON_IN_CLOCK_TOWER
|
||||
} GiantCueId;
|
||||
|
||||
ActorInit En_Giant_InitVars = {
|
||||
ACTOR_EN_GIANT,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_GIANT,
|
||||
sizeof(EnGiant),
|
||||
(ActorFunc)EnGiant_Init,
|
||||
(ActorFunc)EnGiant_Destroy,
|
||||
(ActorFunc)EnGiant_Update,
|
||||
(ActorFunc)EnGiant_Draw,
|
||||
};
|
||||
|
||||
/**
|
||||
* These values are used to index into sAnimations to pick the appropriate animation.
|
||||
*/
|
||||
typedef enum {
|
||||
/* -1 */ GIANT_ANIM_NONE = -1,
|
||||
/* 0 */ GIANT_ANIM_LOOK_UP_START,
|
||||
/* 1 */ GIANT_ANIM_LOOK_UP_LOOP,
|
||||
/* 2 */ GIANT_ANIM_FALLING_OVER,
|
||||
@@ -50,49 +85,26 @@ typedef enum {
|
||||
/* 15 */ GIANT_ANIM_MAX
|
||||
} GiantAnimation;
|
||||
|
||||
/**
|
||||
* Used as values for cueId. The UNKNOWN ones are never used in-game.
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0 */ GIANT_CUE_ID_NONE,
|
||||
/* 1 */ GIANT_CUE_ID_IDLE,
|
||||
/* 2 */ GIANT_CUE_ID_WALKING,
|
||||
/* 3 */ GIANT_CUE_ID_LOOKING_UP,
|
||||
/* 4 */ GIANT_CUE_ID_RAISING_ARMS,
|
||||
/* 5 */ GIANT_CUE_ID_STRUGGLING,
|
||||
/* 6 */ GIANT_CUE_ID_FALLING_OVER,
|
||||
/* 7 */ GIANT_CUE_ID_IDLE_FADE_IN,
|
||||
/* 8 */ GIANT_CUE_ID_TALKING,
|
||||
/* 9 */ GIANT_CUE_ID_DONE_TALKING,
|
||||
/* 10 */ GIANT_CUE_ID_TEACHING_OATH_TO_ORDER,
|
||||
/* 11 */ GIANT_CUE_ID_PLAYER_LEARNED_OATH_TO_ORDER,
|
||||
/* 12 */ GIANT_CUE_ID_UNKNOWN_12,
|
||||
/* 13 */ GIANT_CUE_ID_UNKNOWN_13,
|
||||
/* 14 */ GIANT_CUE_ID_UNKNOWN_14,
|
||||
/* 15 */ GIANT_CUE_ID_HOLDING_UP_MOON_IN_CLOCK_TOWER
|
||||
} GiantCueId;
|
||||
|
||||
ActorInit En_Giant_InitVars = {
|
||||
ACTOR_EN_GIANT,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_GIANT,
|
||||
sizeof(EnGiant),
|
||||
(ActorFunc)EnGiant_Init,
|
||||
(ActorFunc)EnGiant_Destroy,
|
||||
(ActorFunc)EnGiant_Update,
|
||||
(ActorFunc)EnGiant_Draw,
|
||||
};
|
||||
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&gGiantLookUpStartAnim, &gGiantLookUpLoopAnim, &gGiantFallingOverAnim, &gGiantRaisedArmsStartAnim,
|
||||
&gGiantRaisedArmsLoopAnim, &gGiantStruggleStartAnim, &gGiantStruggleLoopAnim, &gGiantIdleAnim,
|
||||
&gGiantWalkingAnim, &gGiantBigCallStartAnim, &gGiantBigCallLoopAnim, &gGiantBigCallEndAnim,
|
||||
&gGiantSmallCallStartAnim, &gGiantSmallCallLoopAnim, &gGiantSmallCallEndAnim,
|
||||
static AnimationHeader* sAnimations[GIANT_ANIM_MAX] = {
|
||||
&gGiantLookUpStartAnim, // GIANT_ANIM_LOOK_UP_START
|
||||
&gGiantLookUpLoopAnim, // GIANT_ANIM_LOOK_UP_LOOP
|
||||
&gGiantFallingOverAnim, // GIANT_ANIM_FALLING_OVER
|
||||
&gGiantRaisedArmsStartAnim, // GIANT_ANIM_RAISED_ARMS_START
|
||||
&gGiantRaisedArmsLoopAnim, // GIANT_ANIM_RAISED_ARMS_LOOP
|
||||
&gGiantStruggleStartAnim, // GIANT_ANIM_STRUGGLE_START
|
||||
&gGiantStruggleLoopAnim, // GIANT_ANIM_STRUGGLE_LOOP
|
||||
&gGiantIdleAnim, // GIANT_ANIM_IDLE_LOOP
|
||||
&gGiantWalkingAnim, // GIANT_ANIM_WALKING_LOOP
|
||||
&gGiantBigCallStartAnim, // GIANT_ANIM_BIG_CALL_START
|
||||
&gGiantBigCallLoopAnim, // GIANT_ANIM_BIG_CALL_LOOP
|
||||
&gGiantBigCallEndAnim, // GIANT_ANIM_BIG_CALL_END
|
||||
&gGiantSmallCallStartAnim, // GIANT_ANIM_SMALL_CALL_START
|
||||
&gGiantSmallCallLoopAnim, // GIANT_ANIM_SMALL_CALL_LOOP
|
||||
&gGiantSmallCallEndAnim, // GIANT_ANIM_SMALL_CALL_END
|
||||
};
|
||||
|
||||
void EnGiant_ChangeAnim(EnGiant* this, s16 animIndex) {
|
||||
if (animIndex >= GIANT_ANIM_LOOK_UP_START && animIndex < GIANT_ANIM_MAX) {
|
||||
if ((animIndex >= GIANT_ANIM_LOOK_UP_START) && (animIndex < GIANT_ANIM_MAX)) {
|
||||
if (((this->animIndex == GIANT_ANIM_WALKING_LOOP) && (animIndex != GIANT_ANIM_WALKING_LOOP)) ||
|
||||
((animIndex == GIANT_ANIM_WALKING_LOOP) && (this->animIndex != GIANT_ANIM_WALKING_LOOP))) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f,
|
||||
@@ -160,7 +172,7 @@ void EnGiant_Init(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGiantSkel, &gGiantLargeStrideAnim, this->jointTable, this->morphTable,
|
||||
GIANT_LIMB_MAX);
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP);
|
||||
this->cueId = GIANT_CUE_ID_NONE;
|
||||
this->cueId = GIANT_CUEID_NONE;
|
||||
this->actionFunc = EnGiant_PerformCutsceneActions;
|
||||
this->actor.draw = NULL;
|
||||
this->alpha = 0;
|
||||
@@ -275,58 +287,58 @@ void EnGiant_ChangeToStartOrLoopAnimation(EnGiant* this, s16 requestedAnimIndex)
|
||||
*/
|
||||
void EnGiant_ChangeAnimBasedOnCueId(EnGiant* this) {
|
||||
switch (this->cueId) {
|
||||
case GIANT_CUE_ID_IDLE:
|
||||
case GIANT_CUEID_IDLE:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_WALKING:
|
||||
case GIANT_CUEID_WALKING:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_WALKING_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_STRUGGLING:
|
||||
case GIANT_CUEID_STRUGGLING:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_STRUGGLE_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_FALLING_OVER:
|
||||
case GIANT_CUEID_FALLING_OVER:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_FALLING_OVER);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_IDLE_FADE_IN:
|
||||
case GIANT_CUEID_IDLE_FADE_IN:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP);
|
||||
this->alpha = 0;
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_TALKING:
|
||||
case GIANT_CUEID_TALKING:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_BIG_CALL_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_DONE_TALKING:
|
||||
case GIANT_CUEID_DONE_TALKING:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_BIG_CALL_END);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_TEACHING_OATH_TO_ORDER:
|
||||
case GIANT_CUEID_TEACHING_OATH_TO_ORDER:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_SMALL_CALL_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_PLAYER_LEARNED_OATH_TO_ORDER:
|
||||
case GIANT_CUEID_PLAYER_LEARNED_OATH_TO_ORDER:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_SMALL_CALL_END);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_UNKNOWN_12:
|
||||
case GIANT_CUEID_UNKNOWN_12:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_UNKNOWN_13:
|
||||
case GIANT_CUEID_UNKNOWN_13:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_WALKING_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_UNKNOWN_14:
|
||||
case GIANT_CUEID_UNKNOWN_14:
|
||||
if (this->animIndex != GIANT_ANIM_WALKING_LOOP) {
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_WALKING_LOOP);
|
||||
}
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_HOLDING_UP_MOON_IN_CLOCK_TOWER:
|
||||
case GIANT_CUEID_HOLDING_UP_MOON_IN_CLOCK_TOWER:
|
||||
Animation_Change(&this->skelAnime, &gGiantRaisedArmsStartAnim, 0.0f,
|
||||
Animation_GetLastFrame(&gGiantRaisedArmsStartAnim) - 1.0f,
|
||||
Animation_GetLastFrame(&gGiantRaisedArmsStartAnim), ANIMMODE_ONCE, 0.0f);
|
||||
@@ -339,14 +351,16 @@ void EnGiant_ChangeAnimBasedOnCueId(EnGiant* this) {
|
||||
|
||||
void EnGiant_UpdateAlpha(EnGiant* this) {
|
||||
switch (this->cueId) {
|
||||
case GIANT_CUE_ID_FALLING_OVER:
|
||||
case GIANT_CUEID_FALLING_OVER:
|
||||
if (this->skelAnime.curFrame >= 90.0f && this->alpha > 0) {
|
||||
this->alpha -= 12;
|
||||
}
|
||||
break;
|
||||
case GIANT_CUE_ID_UNKNOWN_14:
|
||||
|
||||
case GIANT_CUEID_UNKNOWN_14:
|
||||
this->alpha -= 12;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (this->alpha < 255) {
|
||||
this->alpha += 8;
|
||||
@@ -363,36 +377,37 @@ void EnGiant_UpdateAlpha(EnGiant* this) {
|
||||
*/
|
||||
void EnGiant_PlayAndUpdateAnimation(EnGiant* this) {
|
||||
if (SkelAnime_Update(&this->skelAnime) &&
|
||||
(this->animIndex != GIANT_ANIM_FALLING_OVER || this->cueId != GIANT_CUE_ID_FALLING_OVER)) {
|
||||
((this->animIndex != GIANT_ANIM_FALLING_OVER) || (this->cueId != GIANT_CUEID_FALLING_OVER))) {
|
||||
EnGiant_ChangeAnim(this, this->animIndex);
|
||||
|
||||
switch (this->cueId) {
|
||||
case GIANT_CUE_ID_LOOKING_UP:
|
||||
case GIANT_CUEID_LOOKING_UP:
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_LOOK_UP_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_RAISING_ARMS:
|
||||
case GIANT_CUEID_RAISING_ARMS:
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_RAISED_ARMS_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_STRUGGLING:
|
||||
case GIANT_CUEID_STRUGGLING:
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_STRUGGLE_START);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_FALLING_OVER:
|
||||
case GIANT_CUEID_FALLING_OVER:
|
||||
// Unused
|
||||
EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_FALLING_OVER);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_TALKING:
|
||||
case GIANT_CUEID_TALKING:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_BIG_CALL_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_DONE_TALKING:
|
||||
case GIANT_CUE_ID_PLAYER_LEARNED_OATH_TO_ORDER:
|
||||
case GIANT_CUEID_DONE_TALKING:
|
||||
case GIANT_CUEID_PLAYER_LEARNED_OATH_TO_ORDER:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP);
|
||||
break;
|
||||
|
||||
case GIANT_CUE_ID_TEACHING_OATH_TO_ORDER:
|
||||
case GIANT_CUEID_TEACHING_OATH_TO_ORDER:
|
||||
EnGiant_ChangeAnim(this, GIANT_ANIM_SMALL_CALL_LOOP);
|
||||
break;
|
||||
|
||||
@@ -445,7 +460,7 @@ void EnGiant_PerformClockTowerSuccessActions(EnGiant* this, PlayState* play) {
|
||||
}
|
||||
|
||||
EnGiant_PlaySound(this);
|
||||
if (this->cueId == GIANT_CUE_ID_STRUGGLING) {
|
||||
if (this->cueId == GIANT_CUEID_STRUGGLING) {
|
||||
Actor_PlaySfx_Flagged(&this->actor, NA_SE_IT_KYOJIN_BEARING - SFX_FLAG);
|
||||
}
|
||||
EnGiant_PlayAndUpdateAnimation(this);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_ginko_man.h"
|
||||
#include "objects/object_boj/object_boj.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
|
||||
|
||||
@@ -47,15 +46,16 @@ typedef enum {
|
||||
/* 1 */ GINKO_ANIM_SITTING,
|
||||
/* 2 */ GINKO_ANIM_REACHING,
|
||||
/* 3 */ GINKO_ANIM_AMAZED,
|
||||
/* 4 */ GINKO_ANIM_ADVERTISING
|
||||
/* 4 */ GINKO_ANIM_ADVERTISING, // looking around for customers
|
||||
/* 5 */ GINKO_ANIM_MAX
|
||||
} GinkoAnimation;
|
||||
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &object_boj_Anim_0008C0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &object_boj_Anim_0043F0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
{ &object_boj_Anim_004F40, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -4.0f },
|
||||
{ &object_boj_Anim_000AC4, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, // looking around for customers
|
||||
{ &object_boj_Anim_004A7C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f },
|
||||
static AnimationInfo sAnimationInfo[GINKO_ANIM_MAX] = {
|
||||
{ &object_boj_Anim_0008C0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, // GINKO_ANIM_LEGSMACKING
|
||||
{ &object_boj_Anim_0043F0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, // GINKO_ANIM_SITTING
|
||||
{ &object_boj_Anim_004F40, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -4.0f }, // GINKO_ANIM_REACHING
|
||||
{ &object_boj_Anim_000AC4, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, // GINKO_ANIM_AMAZED
|
||||
{ &object_boj_Anim_004A7C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, // GINKO_ANIM_ADVERTISING
|
||||
};
|
||||
|
||||
void EnGinkoMan_Init(Actor* thisx, PlayState* play) {
|
||||
@@ -71,7 +71,7 @@ void EnGinkoMan_Init(Actor* thisx, PlayState* play) {
|
||||
this->choiceDepositWithdrawl = GINKOMAN_CHOICE_RESET;
|
||||
this->serviceFee = 0;
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_boj_Skel_00C240, &object_boj_Anim_0043F0, this->jointTable,
|
||||
this->morphTable, 16);
|
||||
this->morphTable, OBJECT_BOJ_LIMB_MAX);
|
||||
EnGinkoMan_SetupIdle(this);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_59_40);
|
||||
Message_StartTextbox(play, 0x45B, &this->actor);
|
||||
this->curTextId = 0x45B;
|
||||
} else if ((HS_GET_BANK_RUPEES() >= 1000) && ((this->previousBankValue) < 1000) &&
|
||||
} else if ((HS_GET_BANK_RUPEES() >= 1000) && (this->previousBankValue < 1000) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_59_80)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_59_80);
|
||||
Message_StartTextbox(play, 0x45C, &this->actor);
|
||||
@@ -664,16 +664,16 @@ void EnGinkoMan_Update(Actor* thisx, PlayState* play) {
|
||||
s32 EnGinkoMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnGinkoMan* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == OBJECT_BOJ_LIMB_0F) {
|
||||
*dList = object_boj_DL_00B1D8;
|
||||
}
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == OBJECT_BOJ_LIMB_0F) {
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->limb15Rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->limb15Rot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else if (limbIndex == 8) {
|
||||
} else if (limbIndex == OBJECT_BOJ_LIMB_08) {
|
||||
Matrix_RotateXS(-this->limb8Rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->limb8Rot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_GINKO_MAN_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_boj/object_boj.h"
|
||||
|
||||
struct EnGinkoMan;
|
||||
|
||||
@@ -11,8 +12,8 @@ typedef struct EnGinkoMan {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ EnGinkoManActionFunc actionFunc;
|
||||
/* 0x18C */ Vec3s jointTable[0x10];
|
||||
/* 0x1EC */ Vec3s morphTable[0x10];
|
||||
/* 0x18C */ Vec3s jointTable[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x1EC */ Vec3s morphTable[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x24C */ Vec3s limb15Rot;
|
||||
/* 0x252 */ Vec3s limb8Rot;
|
||||
/* 0x258 */ s16 curTextId;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_GK_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_gk/object_gk.h"
|
||||
|
||||
struct EnGk;
|
||||
|
||||
@@ -32,17 +33,17 @@ typedef struct EnGk {
|
||||
/* 0x1E4 */ u16 unk_1E4;
|
||||
/* 0x1E8 */ Path* path;
|
||||
/* 0x1EC */ s32 unk_1EC;
|
||||
/* 0x1F0 */ Vec3s jointTable[20];
|
||||
/* 0x1F0 */ Vec3s morphTable[20];
|
||||
/* 0x1F0 */ Vec3s jointTable[OBJECT_GK_LIMB_MAX];
|
||||
/* 0x1F0 */ Vec3s morphTable[OBJECT_GK_LIMB_MAX];
|
||||
/* 0x2E0 */ s16 unk_2E0;
|
||||
/* 0x2E2 */ s16 unk_2E2;
|
||||
/* 0x2E4 */ s16 unk_2E4;
|
||||
/* 0x2E4 */ s16 animIndex;
|
||||
/* 0x2E8 */ Vec3f unk_2E8;
|
||||
/* 0x2F4 */ Vec3f unk_2F4;
|
||||
/* 0x300 */ Vec3f unk_300;
|
||||
/* 0x30C */ Vec3f unk_30C;
|
||||
/* 0x318 */ s16 csId;
|
||||
/* 0x31A */ u8 unk_31A;
|
||||
/* 0x31A */ u8 csAnimIndex;
|
||||
/* 0x31B */ u8 cueId;
|
||||
/* 0x31C */ u16 unk_31C;
|
||||
/* 0x31E */ s16 unk_31E;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_GM_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_in2/object_in2.h"
|
||||
|
||||
struct EnGm;
|
||||
|
||||
@@ -42,11 +43,11 @@ typedef struct EnGm {
|
||||
/* 0x29C */ Vec3f unk_29C;
|
||||
/* 0x2A8 */ Vec3s unk_2A8;
|
||||
/* 0x2AE */ Vec3s unk_2AE;
|
||||
/* 0x2B4 */ Vec3s jointTable[20];
|
||||
/* 0x32C */ Vec3s morphTable[20];
|
||||
/* 0x2B4 */ Vec3s jointTable[OBJECT_IN2_LIMB_MAX];
|
||||
/* 0x32C */ Vec3s morphTable[OBJECT_IN2_LIMB_MAX];
|
||||
/* 0x3A4 */ u16 unk_3A4;
|
||||
/* 0x3A6 */ u16 unk_3A6;
|
||||
/* 0x3A8 */ f32 unk_3A8;
|
||||
/* 0x3A8 */ f32 animPlaySpeed;
|
||||
/* 0x3AC */ f32 unk_3AC;
|
||||
/* 0x3B0 */ f32 unk_3B0;
|
||||
/* 0x3B4 */ f32 unk_3B4;
|
||||
@@ -69,7 +70,7 @@ typedef struct EnGm {
|
||||
/* 0x3E0 */ s16 unk_3E0;
|
||||
/* 0x3E2 */ s16 unk_3E2;
|
||||
/* 0x3E4 */ EnGmUnkFunc unk_3E4;
|
||||
/* 0x3E8 */ s32 unk_3E8;
|
||||
/* 0x3E8 */ s32 animIndex;
|
||||
/* 0x3EC */ UNK_TYPE1 unk3EC[0x4];
|
||||
/* 0x3F0 */ s32 prevTalkState;
|
||||
/* 0x3F4 */ s32 unk_3F4;
|
||||
|
||||
@@ -82,8 +82,8 @@ typedef enum EnGoEffectType {
|
||||
/* 7 */ ENGO_EFFECT_STEAM = ENGO_EFFECT_STEAM_MIN
|
||||
} EnGoEffectType;
|
||||
|
||||
typedef enum EnGoAnimationIndex {
|
||||
/* -1 */ ENGO_ANIM_INVALID = -1,
|
||||
typedef enum EnGoAnimation {
|
||||
/* -1 */ ENGO_ANIM_NONE = -1,
|
||||
/* 0 */ ENGO_ANIM_GORON_MIN,
|
||||
/* 0 */ ENGO_ANIM_LYINGDOWNIDLE = ENGO_ANIM_GORON_MIN,
|
||||
/* 1 */ ENGO_ANIM_LYINGDOWNIDLE_IMM,
|
||||
@@ -95,21 +95,21 @@ typedef enum EnGoAnimationIndex {
|
||||
/* 7 */ ENGO_ANIM_DROPKEG,
|
||||
/* 8 */ ENGO_ANIM_COVEREARS,
|
||||
/* 9 */ ENGO_ANIM_SHIVERINGSURPRISED,
|
||||
/* 10 */ ENGO_ANIM_ATHLETICS_MIN,
|
||||
/* 10 */ ENGO_ANIM_DOUBLE_ARM_SIDEBEND = ENGO_ANIM_ATHLETICS_MIN,
|
||||
/* 11 */ ENGO_ANIM_SQUAT_SIDE_TO_SIDE,
|
||||
/* 12 */ ENGO_ANIM_SHAKE_LIMBS,
|
||||
/* 13 */ ENGO_ANIM_SINGLE_ARM_SIDEBEND,
|
||||
/* 14 */ ENGO_ANIM_SITTING_STRETCH,
|
||||
/* 15 */ ENGO_ANIM_CHEER,
|
||||
/* 16 */ ENGO_ANIM_SHOUT,
|
||||
/* 17 */ ENGO_ANIM_HELP_SITTING_STRETCH,
|
||||
/* 18 */ ENGO_ANIM_SPRING_MIN,
|
||||
/* 18 */ ENGO_ANIM_SHOW = ENGO_ANIM_SPRING_MIN,
|
||||
/* 19 */ ENGO_ANIM_SHOW_LOOPED,
|
||||
/* 20 */ ENGO_ANIM_LOOK_AROUND,
|
||||
/* 21 */ ENGO_ANIM_LOOK_AROUND_LOOPED
|
||||
} EnGoAnimationIndex;
|
||||
/* 10 */ ENGO_ANIM_ATHLETICS_MIN,
|
||||
/* 10 */ ENGO_ANIM_DOUBLE_ARM_SIDEBEND = ENGO_ANIM_ATHLETICS_MIN,
|
||||
/* 11 */ ENGO_ANIM_SQUAT_SIDE_TO_SIDE,
|
||||
/* 12 */ ENGO_ANIM_SHAKE_LIMBS,
|
||||
/* 13 */ ENGO_ANIM_SINGLE_ARM_SIDEBEND,
|
||||
/* 14 */ ENGO_ANIM_SITTING_STRETCH,
|
||||
/* 15 */ ENGO_ANIM_CHEER,
|
||||
/* 16 */ ENGO_ANIM_SHOUT,
|
||||
/* 17 */ ENGO_ANIM_HELP_SITTING_STRETCH,
|
||||
/* 18 */ ENGO_ANIM_SPRING_MIN,
|
||||
/* 18 */ ENGO_ANIM_SHOW = ENGO_ANIM_SPRING_MIN,
|
||||
/* 19 */ ENGO_ANIM_SHOW_LOOPED,
|
||||
/* 20 */ ENGO_ANIM_LOOK_AROUND,
|
||||
/* 21 */ ENGO_ANIM_LOOK_AROUND_LOOPED
|
||||
} EnGoAnimation;
|
||||
|
||||
void EnGo_Idle(EnGo* this, PlayState* play);
|
||||
void EnGo_Sleep(EnGo* this, PlayState* play);
|
||||
@@ -309,7 +309,7 @@ static DamageTable sDamageTable = {
|
||||
/**
|
||||
* Animations used in the actor.
|
||||
*
|
||||
* @see EnGoAnimationIndex
|
||||
* @see EnGoAnimation
|
||||
*/
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
|
||||
@@ -530,7 +530,7 @@ void EnGo_DrawDust(EnGoEffect effect[ENGO_EFFECT_COUNT], PlayState* play2) {
|
||||
* @param pos Position around which the effects appear
|
||||
*/
|
||||
void EnGo_InitSnow(EnGoEffect effect[ENGO_SNOW_EFFECT_COUNT], Vec3f pos) {
|
||||
static u8 effectIndexToSnowEffectTable[ENGO_SNOW_EFFECT_COUNT] = {
|
||||
static u8 sEffectIndexToSnowEffectTable[ENGO_SNOW_EFFECT_COUNT] = {
|
||||
ENGO_EFFECT_SNOW3, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW2,
|
||||
ENGO_EFFECT_SNOW3, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW2,
|
||||
ENGO_EFFECT_SNOW3, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW2,
|
||||
@@ -570,7 +570,7 @@ void EnGo_InitSnow(EnGoEffect effect[ENGO_SNOW_EFFECT_COUNT], Vec3f pos) {
|
||||
effect->alphaDenom = effect->alphaNumer = 1;
|
||||
|
||||
// Assign a snow effect value of 'ENGO_EFFECT_SNOW1'/'2'/'3'
|
||||
effect->type = effectIndexToSnowEffectTable[i];
|
||||
effect->type = sEffectIndexToSnowEffectTable[i];
|
||||
|
||||
// Initialize the parameters for the paired element
|
||||
randRelativeToWorldPos.x = ((Rand_ZeroOne() - 0.5f) * 80.0f) + effect->pos.x;
|
||||
@@ -977,27 +977,27 @@ s32 EnGo_UpdateSpringArrivalCutscene(EnGo* this, PlayState* play) {
|
||||
*
|
||||
* @return True if non-repeating animation has finished
|
||||
*/
|
||||
s32 EnGo_UpdateAnimationToCurrent(EnGo* this, PlayState* play) {
|
||||
s32 EnGo_UpdateSkelAnime(EnGo* this, PlayState* play) {
|
||||
s8 objIndex = this->actor.objBankIndex;
|
||||
s8 extraObjIndex = -1;
|
||||
s32 ret = false;
|
||||
s32 isAnimFinished = false;
|
||||
|
||||
if ((this->curAnimIndex >= ENGO_ANIM_SPRING_MIN) && (this->hakuginDemoObjIndex >= 0)) {
|
||||
if ((this->animIndex >= ENGO_ANIM_SPRING_MIN) && (this->hakuginDemoObjIndex >= 0)) {
|
||||
extraObjIndex = this->hakuginDemoObjIndex;
|
||||
} else if ((this->curAnimIndex >= ENGO_ANIM_ATHLETICS_MIN) && (this->taisouObjIndex >= 0)) {
|
||||
} else if ((this->animIndex >= ENGO_ANIM_ATHLETICS_MIN) && (this->taisouObjIndex >= 0)) {
|
||||
extraObjIndex = this->taisouObjIndex;
|
||||
} else if (this->curAnimIndex < ENGO_ANIM_ATHLETICS_MIN) {
|
||||
} else if (this->animIndex < ENGO_ANIM_ATHLETICS_MIN) {
|
||||
extraObjIndex = this->actor.objBankIndex;
|
||||
}
|
||||
|
||||
if (extraObjIndex >= 0) {
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[extraObjIndex].segment);
|
||||
this->skelAnime.playSpeed = this->curAnimPlaySpeed;
|
||||
ret = SkelAnime_Update(&this->skelAnime);
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
isAnimFinished = SkelAnime_Update(&this->skelAnime);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objIndex].segment);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return isAnimFinished;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1005,7 +1005,7 @@ s32 EnGo_UpdateAnimationToCurrent(EnGo* this, PlayState* play) {
|
||||
*/
|
||||
s32 EnGo_UpdateSfx(EnGo* this, PlayState* play) {
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
if (this->curAnimIndex == ENGO_ANIM_ROLL) {
|
||||
if (this->animIndex == ENGO_ANIM_ROLL) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 2.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_CIRCLE);
|
||||
}
|
||||
@@ -1013,7 +1013,7 @@ s32 EnGo_UpdateSfx(EnGo* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 22.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_SIT_IMT);
|
||||
}
|
||||
} else if ((this->curAnimIndex == ENGO_ANIM_UNROLL) || (this->curAnimIndex == ENGO_ANIM_UNROLL_IMM)) {
|
||||
} else if ((this->animIndex == ENGO_ANIM_UNROLL) || (this->animIndex == ENGO_ANIM_UNROLL_IMM)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 2.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_CIRCLE_OFF);
|
||||
}
|
||||
@@ -1037,10 +1037,10 @@ s32 EnGo_UpdateSfx(EnGo* this, PlayState* play) {
|
||||
*
|
||||
* @return True if animation was changed
|
||||
*/
|
||||
s32 EnGo_ChangeAnim(EnGo* this, PlayState* play, EnGoAnimationIndex animIndex) {
|
||||
s32 EnGo_ChangeAnim(EnGo* this, PlayState* play, EnGoAnimation animIndex) {
|
||||
s8 objIndex = this->actor.objBankIndex;
|
||||
s8 extraObjIndex = -1;
|
||||
s32 ret = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if ((animIndex >= ENGO_ANIM_SPRING_MIN) && (this->hakuginDemoObjIndex >= 0)) {
|
||||
extraObjIndex = this->hakuginDemoObjIndex;
|
||||
@@ -1052,13 +1052,13 @@ s32 EnGo_ChangeAnim(EnGo* this, PlayState* play, EnGoAnimationIndex animIndex) {
|
||||
|
||||
if (extraObjIndex >= 0) {
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[extraObjIndex].segment);
|
||||
this->curAnimIndex = animIndex;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->curAnimPlaySpeed = this->skelAnime.playSpeed;
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objIndex].segment);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1651,7 +1651,7 @@ void EnGo_ChangeToStretchingAnimation(EnGo* this, PlayState* play) {
|
||||
EnGo_ChangeAnim(this, play, sSubtypeToAnimIndex[subtypeLookup]);
|
||||
|
||||
// Move the sitting Goron forward, since their spawn location is the same as their standing counterpart.
|
||||
if (this->curAnimIndex == ENGO_ANIM_SITTING_STRETCH) {
|
||||
if (this->animIndex == ENGO_ANIM_SITTING_STRETCH) {
|
||||
|
||||
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, this->actor.shape.rot.y, &sStretchingGoronOffset,
|
||||
&newSittingStretcherPos);
|
||||
@@ -1701,7 +1701,7 @@ void EnGo_ChangeToSpectatingAnimation(EnGo* this, PlayState* play) {
|
||||
void EnGo_ChangeToFrozenAnimation(EnGo* this, PlayState* play) {
|
||||
Collider_InitAndSetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInitFrozen);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
this->curAnimIndex = -1;
|
||||
this->animIndex = ENGO_ANIM_NONE;
|
||||
EnGo_ChangeAnim(this, play, ENGO_ANIM_SHIVER);
|
||||
this->sleepState = ENGO_AWAKE;
|
||||
this->iceBlockScale = (this->scaleFactor / 0.01f) * 0.9f;
|
||||
@@ -1899,7 +1899,7 @@ void EnGo_SetupInitialAction(EnGo* this, PlayState* play) {
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
|
||||
GORON_LIMB_MAX);
|
||||
|
||||
this->curAnimIndex = ENGO_ANIM_INVALID;
|
||||
this->animIndex = ENGO_ANIM_NONE;
|
||||
EnGo_ChangeAnim(this, play, ENGO_ANIM_UNROLL);
|
||||
this->actor.draw = EnGo_Draw;
|
||||
|
||||
@@ -2168,14 +2168,14 @@ void EnGo_HandleSpringArrivalCutscene(EnGo* this, PlayState* play) {
|
||||
switch (this->springArrivalCueId) {
|
||||
case 3:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) &&
|
||||
(this->curAnimIndex == ENGO_ANIM_LOOK_AROUND)) {
|
||||
(this->animIndex == ENGO_ANIM_LOOK_AROUND)) {
|
||||
EnGo_ChangeAnim(this, play, ENGO_ANIM_LOOK_AROUND_LOOPED);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) &&
|
||||
(this->curAnimIndex == ENGO_ANIM_SHOW)) {
|
||||
(this->animIndex == ENGO_ANIM_SHOW)) {
|
||||
EnGo_ChangeAnim(this, play, ENGO_ANIM_SHOW_LOOPED);
|
||||
}
|
||||
break;
|
||||
@@ -2439,7 +2439,7 @@ void EnGo_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (!(this->actionFlags & ENGO_FLAG_FROZEN)) {
|
||||
EnGo_UpdateEyes(this);
|
||||
EnGo_UpdateAnimationToCurrent(this, play);
|
||||
EnGo_UpdateSkelAnime(this, play);
|
||||
EnGo_UpdateAttentionTargetAndReactions(this, play);
|
||||
EnGo_UpdateSfx(this, play);
|
||||
}
|
||||
@@ -2599,7 +2599,7 @@ void EnGo_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->eyeTexIndex]));
|
||||
|
||||
if (this->curAnimIndex == ENGO_ANIM_SITTING_STRETCH) {
|
||||
if (this->animIndex == ENGO_ANIM_SITTING_STRETCH) {
|
||||
Matrix_Translate(0.0f, 0.0f, -4000.0f, MTXMODE_APPLY);
|
||||
}
|
||||
SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
|
||||
@@ -106,7 +106,7 @@ typedef struct EnGo {
|
||||
/* 0x390 */ u16 actionFlags;
|
||||
/* 0x392 */ u16 lastTextId;
|
||||
/* 0x394 */ u8 springArrivalCueId;
|
||||
/* 0x398 */ f32 curAnimPlaySpeed;
|
||||
/* 0x398 */ f32 animPlaySpeed;
|
||||
/* 0x39C */ f32 iceBlockScale;
|
||||
/* 0x3A0 */ f32 iceBlockAlpha;
|
||||
/* 0x3A4 */ f32 scaleFactor;
|
||||
@@ -132,7 +132,7 @@ typedef struct EnGo {
|
||||
/* 0x3CE */ s16 fidgetTableY[ENGO_FIDGET_TABLE_LEN];
|
||||
/* 0x3D4 */ s16 surprisePhase;
|
||||
/* 0x3D8 */ MsgEventFunc msgEventFunc;
|
||||
/* 0x3DC */ s32 curAnimIndex;
|
||||
/* 0x3DC */ s32 animIndex;
|
||||
/* 0x3E0 */ UNK_TYPE1 unk3E0[0x4];
|
||||
/* 0x3E4 */ s32 indexPathPoint;
|
||||
/* 0x3E8 */ s32 indexEffect;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user