mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-22 22:44:14 -04:00
Animation Cleanup: En_R* (#1516)
* begin R * finish anim R * cleanup * small adj * cleanup * CS_STATE_IDLE * CS_ID_NONE * more cleanup * sBssPad * angles * sneak in small fix * small fix
This commit is contained in:
+1
-1
@@ -4390,7 +4390,7 @@ void Npc_TrackPointWithLimits(Actor* actor, NpcInteractInfo* interactInfo, s16 m
|
||||
}
|
||||
|
||||
temp = CLAMP(pitchTowardsTarget, minHeadPitch, (s16)(u16)maxHeadPitch);
|
||||
Math_SmoothStepToS(&interactInfo->headRot.x, temp, 6, 2000, 1);
|
||||
Math_SmoothStepToS(&interactInfo->headRot.x, temp, 6, 0x7D0, 1);
|
||||
|
||||
torsoPitch = pitchTowardsTarget - interactInfo->headRot.x;
|
||||
|
||||
|
||||
+1
-1
@@ -7228,7 +7228,7 @@ void Camera_EarthquakeDay3(Camera* camera) {
|
||||
0x1FC, // 8 Large Earthquakes between CLOCK_TIME(4, 30) to CLOCK_TIME(6, 00)
|
||||
};
|
||||
|
||||
if ((CURRENT_DAY == 3) && (CutsceneManager_GetCurrentCsId() == -1)) {
|
||||
if ((CURRENT_DAY == 3) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE)) {
|
||||
time = CURRENT_TIME;
|
||||
timeSpeedOffset = gSaveContext.save.timeSpeedOffset;
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ typedef struct {
|
||||
|
||||
typedef void (*DebugDispObjectDrawFunc)(DebugDispObject*, void*, PlayState*);
|
||||
|
||||
void DebugDisplay_DrawSpriteI8(DebugDispObject*, void*, PlayState*);
|
||||
void DebugDisplay_DrawPolygon(DebugDispObject*, void*, PlayState*);
|
||||
void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayState* play);
|
||||
void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dList, PlayState* play);
|
||||
Gfx* DebugDisplay_PathDisplayList(GraphicsContext* gfxCtx, Path* path);
|
||||
|
||||
DebugDispObject* DebugDisplay_Init(void) {
|
||||
|
||||
+2
-2
@@ -1644,7 +1644,7 @@ void Cutscene_ActorTranslateAndYawSmooth(Actor* actor, PlayState* play, s32 cueC
|
||||
|
||||
VEC3F_LERPIMPDST(&actor->world.pos, &startPos, &endPos, lerp);
|
||||
|
||||
Math_SmoothStepToS(&actor->world.rot.y, Math_Vec3f_Yaw(&startPos, &endPos), 10, 1000, 1);
|
||||
Math_SmoothStepToS(&actor->world.rot.y, Math_Vec3f_Yaw(&startPos, &endPos), 10, 0x3E8, 1);
|
||||
actor->shape.rot.y = actor->world.rot.y;
|
||||
}
|
||||
|
||||
@@ -1669,7 +1669,7 @@ void Cutscene_ActorTranslateXZAndYawSmooth(Actor* actor, PlayState* play, s32 cu
|
||||
actor->world.pos.x = startPos.x + (endPos.x - startPos.x) * lerp;
|
||||
actor->world.pos.z = startPos.z + (endPos.z - startPos.z) * lerp;
|
||||
|
||||
Math_SmoothStepToS(&actor->world.rot.y, Math_Vec3f_Yaw(&startPos, &endPos), 10, 1000, 1);
|
||||
Math_SmoothStepToS(&actor->world.rot.y, Math_Vec3f_Yaw(&startPos, &endPos), 10, 0x3E8, 1);
|
||||
actor->shape.rot.y = actor->world.rot.y;
|
||||
}
|
||||
|
||||
|
||||
@@ -333,14 +333,14 @@ void func_800A640C(EnItem00* this, PlayState* play) {
|
||||
} else if ((this->actor.params >= ITEM00_SHIELD_HERO) && (this->actor.params != ITEM00_DEKU_NUTS_10) &&
|
||||
(this->actor.params < ITEM00_BOMBS_0)) {
|
||||
if (this->unk152 == -1) {
|
||||
if (!Math_SmoothStepToS(&this->actor.shape.rot.x, this->actor.world.rot.x - 0x4000, 2, 3000, 1500)) {
|
||||
if (!Math_SmoothStepToS(&this->actor.shape.rot.x, this->actor.world.rot.x - 0x4000, 2, 0xBB8, 0x5DC)) {
|
||||
this->unk152 = -2;
|
||||
}
|
||||
} else if (!Math_SmoothStepToS(&this->actor.shape.rot.x, -0x4000 - this->actor.world.rot.x, 2, 3000, 1500)) {
|
||||
} else if (!Math_SmoothStepToS(&this->actor.shape.rot.x, -0x4000 - this->actor.world.rot.x, 2, 0xBB8, 0x5DC)) {
|
||||
this->unk152 = -1;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 2, 2500, 500);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 2, 0x9C4, 0x1F4);
|
||||
} else if ((this->actor.params == ITEM00_MAP) || (this->actor.params == ITEM00_COMPASS)) {
|
||||
this->unk152 = -1;
|
||||
this->actor.shape.rot.y += 0x3C0;
|
||||
|
||||
+3
-3
@@ -2477,9 +2477,9 @@ void Environment_UpdateTimeBasedSequence(PlayState* play) {
|
||||
s32 pad;
|
||||
|
||||
//! FAKE:
|
||||
if (!gSaveContext.sceneLayer) {}
|
||||
if (gSaveContext.sceneLayer) {}
|
||||
|
||||
if ((play->csCtx.state == 0) && !(play->actorCtx.flags & ACTORCTX_FLAG_TELESCOPE_ON)) {
|
||||
if ((play->csCtx.state == CS_STATE_IDLE) && !(play->actorCtx.flags & ACTORCTX_FLAG_TELESCOPE_ON)) {
|
||||
switch (play->envCtx.timeSeqState) {
|
||||
case TIMESEQ_DAY_BGM:
|
||||
break;
|
||||
@@ -2539,7 +2539,7 @@ void Environment_UpdateTimeBasedSequence(PlayState* play) {
|
||||
|
||||
if ((play->envCtx.timeSeqState != TIMESEQ_REQUEST) && (((void)0, gSaveContext.save.day) == 3) &&
|
||||
(CURRENT_TIME < CLOCK_TIME(6, 0)) && !func_800FE5D0(play) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && (play->csCtx.state == 0) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && (play->csCtx.state == CS_STATE_IDLE) &&
|
||||
((play->sceneId != SCENE_00KEIKOKU) || (((void)0, gSaveContext.sceneLayer) != 1)) &&
|
||||
(CutsceneManager_GetCurrentCsId() == CS_ID_NONE) &&
|
||||
(AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_FINAL_HOURS) &&
|
||||
|
||||
@@ -594,9 +594,9 @@ void func_80B81234(BgIkanaRotaryroom* this, PlayState* play) {
|
||||
sp58.y = ptr->unk_4C.y + 50.0f;
|
||||
sp58.z = ptr->unk_4C.z;
|
||||
|
||||
sp64 = Math_ScaledStepToS(&player->actor.shape.rot.x, ptr->unk_40.x, 2000) & 1;
|
||||
sp64 &= Math_ScaledStepToS(&player->actor.shape.rot.y, ptr->unk_40.y, 2000);
|
||||
sp64 &= Math_ScaledStepToS(&player->actor.shape.rot.z, ptr->unk_40.z, 2000);
|
||||
sp64 = Math_ScaledStepToS(&player->actor.shape.rot.x, ptr->unk_40.x, 0x7D0) & 1;
|
||||
sp64 &= Math_ScaledStepToS(&player->actor.shape.rot.y, ptr->unk_40.y, 0x7D0);
|
||||
sp64 &= Math_ScaledStepToS(&player->actor.shape.rot.z, ptr->unk_40.z, 0x7D0);
|
||||
|
||||
ptr->unk_48 -= 2.1f;
|
||||
ptr->unk_48 *= 0.98f;
|
||||
|
||||
@@ -141,7 +141,7 @@ s32 func_80BD7E0C(BgIknvObj* this, s16 targetRotation, PlayState* play) {
|
||||
this->dyna.actor.shape.yOffset = 0.0f;
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
if (targetRotation != this->dyna.actor.shape.rot.y) {
|
||||
Math_SmoothStepToS(&this->dyna.actor.shape.rot.y, targetRotation, 2, 100, 100);
|
||||
Math_SmoothStepToS(&this->dyna.actor.shape.rot.y, targetRotation, 2, 0x64, 0x64);
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y;
|
||||
if ((play->gameplayFrames % 2) != 0) {
|
||||
this->dyna.actor.shape.yOffset = 5.0f;
|
||||
|
||||
@@ -996,7 +996,7 @@ void Boss01_IntroCutscene(Boss01* this, PlayState* play) {
|
||||
|
||||
switch (this->cutsceneState) {
|
||||
case ODOLWA_INTRO_CS_STATE_WAITING_FOR_PLAYER_OR_DONE:
|
||||
if ((CutsceneManager_GetCurrentCsId() != -1) || !(player->actor.world.pos.z < 590.0f)) {
|
||||
if ((CutsceneManager_GetCurrentCsId() != CS_ID_NONE) || !(player->actor.world.pos.z < 590.0f)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1184,7 +1184,7 @@ void Boss01_SummonBugsCutscene(Boss01* this, PlayState* play) {
|
||||
|
||||
switch (this->cutsceneState) {
|
||||
case ODOLWA_BUG_SUMMONING_CS_STATE_STARTED:
|
||||
if (CutsceneManager_GetCurrentCsId() != -1) {
|
||||
if (CutsceneManager_GetCurrentCsId() != CS_ID_NONE) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2130,7 +2130,7 @@ void Boss01_DeathCutscene(Boss01* this, PlayState* play) {
|
||||
|
||||
switch (this->cutsceneState) {
|
||||
case ODOLWA_DEATH_CS_STATE_STARTED:
|
||||
if (CutsceneManager_GetCurrentCsId() != -1) {
|
||||
if (CutsceneManager_GetCurrentCsId() != CS_ID_NONE) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ void EnAh_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnAh_Update(Actor* thisx, PlayState* play);
|
||||
void EnAh_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80BD36B8(EnAh* this, PlayState* play);
|
||||
void func_80BD3768(EnAh* this, PlayState* play);
|
||||
|
||||
static u8 D_80BD3DB0[] = {
|
||||
|
||||
@@ -1311,7 +1311,7 @@ void func_80BEEDC0(EnAkindonuts* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BEEE10(EnAkindonuts* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 2000, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x7D0, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
|
||||
if (Actor_TalkOfferAccepted(&this->actor, &play->state)) {
|
||||
@@ -1569,7 +1569,7 @@ void func_80BEF83C(EnAkindonuts* this, PlayState* play) {
|
||||
this->actor.shape.yOffset = 1500.0f;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk_368, 3, 2000, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk_368, 3, 0x7D0, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
|
||||
if (DECR(this->unk_33A) == 0) {
|
||||
@@ -1630,9 +1630,9 @@ void func_80BEFAF0(EnAkindonuts* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (ENAKINDONUTS_GET_3(&this->actor) == ENAKINDONUTS_3_1) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, sp38.y, 10, 1000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, sp38.y, 10, 0x3E8, 0);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, sp38.y, 10, 300, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, sp38.y, 10, 0x12C, 0);
|
||||
}
|
||||
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
|
||||
@@ -15,7 +15,6 @@ void EnAl_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnAl_Update(Actor* thisx, PlayState* play);
|
||||
void EnAl_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80BDF5E8(EnAl* this, PlayState* play);
|
||||
void func_80BDF6C4(EnAl* this, PlayState* play);
|
||||
|
||||
static u8 D_80BDFC70[] = {
|
||||
|
||||
@@ -294,13 +294,13 @@ void EnAni_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_4);
|
||||
this->actionFunc(this, play);
|
||||
if (this->actor.xzDistToPlayer < 100.0f && !(this->stateFlags & ANI_STATE_CLIMBING)) {
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->chestRot, this->actor.focus.pos);
|
||||
this->chestRot.x = this->chestRot.y = this->chestRot.z = 0;
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
this->torsoRot.x = this->torsoRot.y = this->torsoRot.z = 0;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 0x6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 0x6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->chestRot.x, 0, 0x6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->chestRot.y, 0, 0x6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 0x6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 0x6, 0x1838, 0x64);
|
||||
}
|
||||
|
||||
this->blinkFunc(this);
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef struct EnAni {
|
||||
/* 0x220 */ Vec3s jointTable[ANI_LIMB_MAX];
|
||||
/* 0x280 */ Vec3s morphTable[ANI_LIMB_MAX];
|
||||
/* 0x2E0 */ Vec3s headRot;
|
||||
/* 0x2E6 */ Vec3s chestRot; // unused
|
||||
/* 0x2E6 */ Vec3s torsoRot; // unused
|
||||
/* 0x2EC */ u16 stateFlags;
|
||||
/* 0x2EE */ s16 unk2EE; // assigned to zero in init, never used after
|
||||
/* 0x2F0 */ s16 treeReachTimer;
|
||||
|
||||
@@ -604,7 +604,7 @@ void EnAob01_BeforeRace_Idle(EnAob01* this, PlayState* play) {
|
||||
void EnAob01_BeforeRace_Talk(EnAob01* this, PlayState* play) {
|
||||
u8 talkState = Message_GetState(&play->msgCtx);
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 4000, 1);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xFA0, 1);
|
||||
|
||||
//! @bug: This block of code acts as a failsafe for when the player triggered this conversation by
|
||||
//! bumping into the racetrack owner while holding the dog and, at the same time, threw or dropped
|
||||
@@ -971,7 +971,7 @@ void EnAob01_AfterRace_AskToPlayAgain(EnAob01* this, PlayState* play) {
|
||||
void EnAob01_AfterRace_Talk(EnAob01* this, PlayState* play) {
|
||||
u8 talkState = Message_GetState(&play->msgCtx);
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 4000, 1);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xFA0, 1);
|
||||
|
||||
if (this->stateFlags & ENAOB01_FLAG_LAUGH) {
|
||||
if (!EnAob01_ProcessLaughAnim(this)) {
|
||||
|
||||
@@ -195,14 +195,14 @@ void EnBaguo_Idle(EnBaguo* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
// Depending on how the last roll ended, this actor may be "sitting" on
|
||||
// something other than its legs. This slowly corrects that.
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 10, 100, 1000);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.z, 0, 10, 100, 1000);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 10, 0x64, 0x3E8);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.z, 0, 10, 0x64, 0x3E8);
|
||||
|
||||
// If this actor isn't mostly facing the player, do a discrete turn towards
|
||||
// them. It takes 8 frames to turn, and we must wait 8 frames to do another.
|
||||
if ((this->timer & 8) != 0) {
|
||||
if (fabsf(this->actor.world.rot.y - this->actor.yawTowardsPlayer) > 200.0f) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 30, 300, 1000);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 30, 0x12C, 0x3E8);
|
||||
if ((play->gameplayFrames % 8) == 0) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos,
|
||||
this->actor.shape.shadowScale - 20.0f, 10, 8.0f, 500, 10, true);
|
||||
|
||||
@@ -320,7 +320,7 @@ void EnBom_WaitForRelease(EnBom* this, PlayState* play) {
|
||||
gSaveContext.powderKegTimer = this->timer;
|
||||
}
|
||||
}
|
||||
Math_ScaledStepToS(&this->unk_1FA, 0, 2000);
|
||||
Math_ScaledStepToS(&this->unk_1FA, 0, 0x7D0);
|
||||
}
|
||||
|
||||
void EnBom_Explode(EnBom* this, PlayState* play) {
|
||||
|
||||
@@ -268,7 +268,7 @@ void func_809C4BC4(EnBomBowlMan* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->unk_290, this->unk_2D4, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->unk_290, this->unk_2D4, 1, 0x1388, 0);
|
||||
|
||||
if (this->unk_2B8 == 0) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
@@ -537,7 +537,7 @@ void func_809C5738(EnBomBowlMan* this, PlayState* play) {
|
||||
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_18, 1.0f);
|
||||
}
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, yaw, 1, 2000, 10);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, yaw, 1, 0x7D0, 0xA);
|
||||
Math_ApproachF(&this->actor.world.pos.x, this->unk_2A0.x, 0.5f, 6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, this->unk_2A0.z, 0.5f, 6.0f);
|
||||
if ((sqrtf(SQ(this->actor.world.pos.x - this->unk_2A0.x) + SQ(this->actor.world.pos.z - this->unk_2A0.z)) <
|
||||
|
||||
@@ -507,7 +507,7 @@ void EnBomChu_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (this->isMoving) {
|
||||
this->visualJitter =
|
||||
(5.0f + (Rand_ZeroOne() * 3.0f)) * Math_SinS((((s32)(Rand_ZeroOne() * 0x200) + 0x3000) * this->timer));
|
||||
(5.0f + (Rand_ZeroOne() * 3.0f)) * Math_SinS(((s32)(Rand_ZeroOne() * 0x200) + 0x3000) * this->timer);
|
||||
EnBomChu_ActorCoordsToWorld(this, &sBlureP1Offset, &blureP1);
|
||||
|
||||
EnBomChu_ActorCoordsToWorld(this, &sBlureP2LeftOffset, &blureP2);
|
||||
|
||||
@@ -24,7 +24,7 @@ void func_80C05DE8(EnBombal* this, PlayState* play);
|
||||
void func_80C05B24(EnBombal* this);
|
||||
void EnBombal_InitEffects(EnBombal* this, Vec3f* pos, s16 fadeDelay);
|
||||
void EnBombal_UpdateEffects(EnBombal* this, PlayState* play);
|
||||
void EnBombal_DrawEffects(EnBombal*, PlayState*);
|
||||
void EnBombal_DrawEffects(EnBombal* this, PlayState* play);
|
||||
|
||||
ActorInit En_Bombal_InitVars = {
|
||||
/**/ ACTOR_EN_BOMBAL,
|
||||
|
||||
@@ -10,7 +10,7 @@ typedef void (*EnBombalActionFunc)(struct EnBombal*, PlayState*);
|
||||
typedef struct EnBombalEffect {
|
||||
/* 0x00 */ u8 isEnabled;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ UNK_TYPE4 unk10;
|
||||
/* 0x10 */ UNK_TYPE1 unk10[0x4];
|
||||
/* 0x14 */ s16 alpha;
|
||||
/* 0x16 */ s16 alphaFadeDelay;
|
||||
/* 0x18 */ Vec3f velocity;
|
||||
|
||||
@@ -119,7 +119,7 @@ void EnBombers2_Init(Actor* thisx, PlayState* play) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_73_80) || (gSaveContext.save.entrance == ENTRANCE(EAST_CLOCK_TOWN, 2))) {
|
||||
this->actor.world.pos.x += Math_SinS(this->actor.home.rot.y + 0xC100) * 50.0f;
|
||||
cos = Math_CosS(this->actor.home.rot.y + 0xC100) * 50.0f;
|
||||
this->unk_2AC = 1;
|
||||
this->unk_2AC = true;
|
||||
this->actor.world.pos.z += cos;
|
||||
}
|
||||
this->csId = this->actor.csId;
|
||||
@@ -146,7 +146,7 @@ void EnBombers2_ChangeAnim(EnBombers2* this, s32 animIndex, f32 playSpeed) {
|
||||
}
|
||||
|
||||
void func_80C04B40(EnBombers2* this) {
|
||||
if (this->unk_2AC == 0) {
|
||||
if (!this->unk_2AC) {
|
||||
EnBombers2_ChangeAnim(this, ENBOMBERS_ANIM_4, 1.0f);
|
||||
} else {
|
||||
EnBombers2_ChangeAnim(this, ENBOMBERS_ANIM_0, 1.0f);
|
||||
@@ -180,7 +180,7 @@ void func_80C04BA0(EnBombers2* this, PlayState* play) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (this->unk_2AC != 0) {
|
||||
if (this->unk_2AC) {
|
||||
this->textIdIndex = 7;
|
||||
}
|
||||
this->actor.textId = sTextIds[this->textIdIndex];
|
||||
@@ -208,7 +208,7 @@ void func_80C04D00(EnBombers2* this) {
|
||||
}
|
||||
|
||||
this->unk_2A8 = 0;
|
||||
if (this->unk_2AC != 0) {
|
||||
if (this->unk_2AC) {
|
||||
EnBombers2_ChangeAnim(this, ENBOMBERS_ANIM_6, 1.0f);
|
||||
}
|
||||
this->unk_2C0 = 1;
|
||||
@@ -219,7 +219,7 @@ void func_80C04D8C(EnBombers2* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 curFrame = this->skelAnime.curFrame;
|
||||
|
||||
if ((this->unk_2AC == 0) && (curFrame >= this->lastAnimFrame)) {
|
||||
if (!this->unk_2AC && (curFrame >= this->lastAnimFrame)) {
|
||||
if (!(this->unk_2A8 & 1)) {
|
||||
EnBombers2_ChangeAnim(this, ENBOMBERS_ANIM_1, 1.0f);
|
||||
} else {
|
||||
@@ -367,7 +367,7 @@ void func_80C0520C(EnBombers2* this, PlayState* play) {
|
||||
this->unk_2C0 = 1;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_73_80);
|
||||
CutsceneManager_Stop(this->csId);
|
||||
this->unk_2AC = 1;
|
||||
this->unk_2AC = true;
|
||||
this->actor.textId = sTextIds[this->textIdIndex];
|
||||
Message_StartTextbox(play, this->actor.textId, &this->actor);
|
||||
this->actionFunc = func_80C04D8C;
|
||||
@@ -380,8 +380,8 @@ void func_80C0520C(EnBombers2* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnBombers2_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnBombers2* this = (EnBombers2*)thisx;
|
||||
f32 temp_f4;
|
||||
Vec3f sp34;
|
||||
s32 yawDiffAbs;
|
||||
|
||||
@@ -422,10 +422,9 @@ void EnBombers2_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
Math_Vec3f_Copy(&sp34, &this->actor.world.pos);
|
||||
if (this->unk_2AC == 0) {
|
||||
this->actor.world.pos.x = (Math_SinS((this->actor.world.rot.y + 0x8000)) * 26.0f) + sp34.x;
|
||||
temp_f4 = Math_CosS(this->actor.world.rot.y + 0x8000) * 26.0f;
|
||||
this->actor.world.pos.z = temp_f4 + sp34.z;
|
||||
if (!this->unk_2AC) {
|
||||
this->actor.world.pos.x = sp34.x + Math_SinS(this->actor.world.rot.y + 0x8000) * 26.0f;
|
||||
this->actor.world.pos.z = sp34.z + Math_CosS(this->actor.world.rot.y + 0x8000) * 26.0f;
|
||||
this->collider.dim.radius = 35;
|
||||
this->collider.dim.height = 30;
|
||||
} else {
|
||||
@@ -434,7 +433,7 @@ void EnBombers2_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
if (this->unk_2AC == 0) {
|
||||
if (!this->unk_2AC) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 50.0f,
|
||||
UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_8 |
|
||||
UPDBGCHECKINFO_FLAG_10);
|
||||
|
||||
@@ -318,7 +318,7 @@ void func_80BFE67C(EnBomjima* this, PlayState* play) {
|
||||
s32 sp4C;
|
||||
|
||||
this->unk_2DC = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_2A4);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 0x1388, 0);
|
||||
|
||||
switch (this->unk_2A2) {
|
||||
case 0:
|
||||
@@ -342,7 +342,7 @@ void func_80BFE67C(EnBomjima* this, PlayState* play) {
|
||||
case 1:
|
||||
if (curFrame >= 0.0f) {
|
||||
this->unk_2DC = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_2A4);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 10, 2000, 20);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 10, 0x7D0, 0x14);
|
||||
}
|
||||
|
||||
abs2 = BINANG_SUB(this->actor.world.rot.y, this->unk_2DC);
|
||||
@@ -510,7 +510,7 @@ void func_80BFEB64(EnBomjima* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 0x1388, 0);
|
||||
}
|
||||
|
||||
void func_80BFEFF0(EnBomjima* this) {
|
||||
@@ -567,7 +567,7 @@ void func_80BFF174(EnBomjima* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 0x1388, 0);
|
||||
|
||||
if ((curFrame >= this->animEndFrame) && (this->unk_2BC < 5)) {
|
||||
this->unk_2BC++;
|
||||
@@ -824,7 +824,7 @@ void func_80BFFBC4(EnBomjima* this, PlayState* play) {
|
||||
this->unk_2DC = -10000;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->unk_290, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->unk_290, this->unk_2DC, 1, 0x1388, 0);
|
||||
if (D_80C009F0 >= 104) {
|
||||
D_80C009F0 = 0;
|
||||
Message_CloseTextbox(play);
|
||||
@@ -848,7 +848,7 @@ void func_80BFFD48(EnBomjima* this, PlayState* play) {
|
||||
s32 pad[2];
|
||||
|
||||
this->unk_2DC = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_2A4);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 0x1388, 0);
|
||||
Math_ApproachF(&this->actor.world.pos.x, this->unk_2A4.x, 0.3f, 4.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, this->unk_2A4.z, 0.3f, 4.0f);
|
||||
if (sqrtf(SQ(this->actor.world.pos.x - this->unk_2A4.x) + SQ(this->actor.world.pos.z - this->unk_2A4.z)) < 4.0f) {
|
||||
@@ -860,7 +860,7 @@ void func_80BFFD48(EnBomjima* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BFFE48(EnBomjima* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 0x1388, 0);
|
||||
Math_ApproachF(&this->actor.world.pos.x, this->unk_2A4.x, 0.3f, 4.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, this->unk_2A4.z, 0.3f, 4.0f);
|
||||
|
||||
@@ -871,7 +871,7 @@ void func_80BFFE48(EnBomjima* this, PlayState* play) {
|
||||
func_80BFE65C(this);
|
||||
this->actionFunc = func_80BFFF54;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_290, 10000, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->unk_290, 10000, 1, 0x1388, 0);
|
||||
if (D_80C009F0 >= 103) {
|
||||
this->unk_2DC = 0;
|
||||
EnBomjima_ChangeAnim(this, ENBOMJIMA_ANIM_15, 1.0f);
|
||||
@@ -885,7 +885,7 @@ void func_80BFFE48(EnBomjima* this, PlayState* play) {
|
||||
void func_80BFFF54(EnBomjima* this, PlayState* play) {
|
||||
f32 curFrame = this->skelAnime.curFrame;
|
||||
|
||||
Math_SmoothStepToS(&this->unk_290, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->unk_290, this->unk_2DC, 1, 0x1388, 0);
|
||||
|
||||
if ((D_80C009F4 != 0) && (this->unk_2C2 == 0)) {
|
||||
this->unk_2C2 = Rand_S16Offset(5, 5);
|
||||
@@ -964,7 +964,7 @@ void func_80C00284(EnBomjima* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 curFrame = this->skelAnime.curFrame;
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2DC, 1, 0x1388, 0);
|
||||
if (((this->action == EN_BOMJIMA_ACTION_0) || (this->unk_2C8 == 10) || (this->unk_2C8 == 11) ||
|
||||
(this->unk_2CA == 1)) &&
|
||||
(curFrame >= this->animEndFrame)) {
|
||||
@@ -1097,9 +1097,9 @@ void EnBomjima_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_SetFocus(&this->actor, 20.0f);
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
Math_SmoothStepToS(&this->unk_28A, this->unk_290, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->unk_288, this->unk_28E, 1, 1000, 0);
|
||||
Math_SmoothStepToS(&this->unk_294, this->unk_29A, 1, 1000, 0);
|
||||
Math_SmoothStepToS(&this->unk_28A, this->unk_290, 1, 0x1388, 0);
|
||||
Math_SmoothStepToS(&this->unk_288, this->unk_28E, 1, 0x3E8, 0);
|
||||
Math_SmoothStepToS(&this->unk_294, this->unk_29A, 1, 0x3E8, 0);
|
||||
|
||||
if (this->unk_2E2 == 0) {
|
||||
this->unk_2E0++;
|
||||
|
||||
@@ -355,7 +355,7 @@ void func_80C014E4(EnBomjimb* this, PlayState* play) {
|
||||
case 1:
|
||||
if (curFrame >= 0.0f) {
|
||||
this->unk_2D6 = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_294);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2D6, 10, 2000, 20);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2D6, 10, 0x7D0, 0x14);
|
||||
}
|
||||
|
||||
if ((s16)ABS_ALT(BINANG_SUB(this->actor.world.rot.y, this->unk_2D6)) < 0x100) {
|
||||
@@ -503,7 +503,7 @@ void func_80C01CD0(EnBomjimb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->animIndex != ENBOMJIMB_ANIM_7) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_294), 1, 3000,
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_294), 1, 0xBB8,
|
||||
0);
|
||||
Math_ApproachF(&this->actor.world.pos.x, this->unk_294.x, 0.3f, 2.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, this->unk_294.z, 0.3f, 2.0f);
|
||||
@@ -605,7 +605,7 @@ void func_80C0217C(EnBomjimb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (player->stateFlags3 == PLAYER_STATE3_1000000) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
|
||||
func_80C01494(this);
|
||||
return;
|
||||
}
|
||||
@@ -691,14 +691,14 @@ void func_80C02570(EnBomjimb* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1388, 0);
|
||||
|
||||
if (this->actor.xzDistToPlayer < 200.0f) {
|
||||
this->unk_2D6 = BINANG_ROT180(this->actor.yawTowardsPlayer);
|
||||
EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_19, 2.0f);
|
||||
this->actionFunc = func_80C0217C;
|
||||
} else if ((player->stateFlags3 == PLAYER_STATE3_1000000) || (this->actor.xzDistToPlayer > 410.0f)) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
|
||||
func_80C01494(this);
|
||||
}
|
||||
}
|
||||
@@ -845,7 +845,7 @@ void func_80C02A14(EnBomjimb* this, PlayState* play) {
|
||||
void func_80C02BCC(EnBomjimb* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1388, 0);
|
||||
if (this->unk_2C0 == 0) {
|
||||
player->actor.freezeTimer = 3;
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
@@ -918,7 +918,7 @@ void EnBomjimb_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->unk_28A, this->unk_290, 1, 5000, 0);
|
||||
Math_SmoothStepToS(&this->unk_28A, this->unk_290, 1, 0x1388, 0);
|
||||
|
||||
if (this->unk_2C4 == 0) {
|
||||
this->unk_2C2++;
|
||||
|
||||
@@ -203,7 +203,7 @@ void func_808A2918(EnBoom* this, PlayState* play) {
|
||||
}
|
||||
|
||||
Math_ScaledStepToS(&this->actor.world.rot.y, sp72,
|
||||
(this->unk_1CF > 0) ? 1000 : (s16)(ABS_ALT(sp70) * sp64));
|
||||
(this->unk_1CF > 0) ? 0x3E8 : (s16)(ABS_ALT(sp70) * sp64));
|
||||
}
|
||||
|
||||
Math_ScaledStepToS(&this->actor.world.rot.x, sp6E, ABS_ALT(sp6C) * sp64);
|
||||
|
||||
@@ -381,8 +381,8 @@ void EnCow_Update(Actor* thisx, PlayState* play2) {
|
||||
targetX = targetY = 0;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->headTilt.x, targetX, 10, 200, 10);
|
||||
Math_SmoothStepToS(&this->headTilt.y, targetY, 10, 200, 10);
|
||||
Math_SmoothStepToS(&this->headTilt.x, targetX, 10, 0xC8, 0xA);
|
||||
Math_SmoothStepToS(&this->headTilt.y, targetY, 10, 0xC8, 0xA);
|
||||
}
|
||||
|
||||
void EnCow_UpdateTail(Actor* thisx, PlayState* play) {
|
||||
|
||||
@@ -249,7 +249,7 @@ void func_80BE66E4(EnDaiku2* this, PlayState* play) {
|
||||
s32 pad[2];
|
||||
s16 temp_v0;
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.home.rot.y, 1, 0xBB8, 0x0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.home.rot.y, 1, 0xBB8, 0);
|
||||
if (sp98 != 2) {
|
||||
if ((this->switchFlag > SWITCH_FLAG_NONE) && Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->unk_28A = 5;
|
||||
@@ -332,7 +332,7 @@ void func_80BE6B40(EnDaiku2* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BE6BC0(EnDaiku2* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0x0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
s32 day = gSaveContext.save.day - 1;
|
||||
|
||||
@@ -413,7 +413,7 @@ void func_80BE6EF0(EnDaiku2* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.home.rot.y, 1, 0xBB8, 0x0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.home.rot.y, 1, 0xBB8, 0);
|
||||
if (curFrame >= this->animEndFrame) {
|
||||
this->unk_274 = 1;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ s32 func_80B3CDA4(EnDnp* this, PlayState* play) {
|
||||
|
||||
temp_s0 = CLAMP(temp_s0, -0x3FFC, 0x3FFC);
|
||||
|
||||
Math_SmoothStepToS(&this->unk_332, temp_s0, 3, 0x2AA8, 0x1);
|
||||
Math_SmoothStepToS(&this->unk_332, temp_s0, 3, 0x2AA8, 1);
|
||||
sp30 = player->actor.world.pos;
|
||||
sp30.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
sp3C = this->actor.world.pos;
|
||||
@@ -222,7 +222,7 @@ s32 func_80B3CDA4(EnDnp* this, PlayState* play) {
|
||||
//! FAKE
|
||||
if (1) {}
|
||||
|
||||
Math_SmoothStepToS(&this->unk_330, pitch, 3, 0x2AA8, 0x1);
|
||||
Math_SmoothStepToS(&this->unk_330, pitch, 3, 0x2AA8, 1);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@ void EnDoor_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnDoor_Update(Actor* thisx, PlayState* play);
|
||||
void EnDoor_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80866B20(EnDoor*, PlayState*);
|
||||
void func_8086704C(EnDoor*, PlayState*);
|
||||
void func_80866F94(EnDoor*, PlayState*);
|
||||
void func_80867080(EnDoor*, PlayState*);
|
||||
void func_80867144(EnDoor*, PlayState*);
|
||||
void func_808670F0(EnDoor*, PlayState*);
|
||||
void func_80866A5C(EnDoor*, PlayState*);
|
||||
void func_80866B20(EnDoor* this, PlayState* play);
|
||||
void func_8086704C(EnDoor* this, PlayState* play);
|
||||
void func_80866F94(EnDoor* this, PlayState* play);
|
||||
void func_80867080(EnDoor* this, PlayState* play);
|
||||
void func_80867144(EnDoor* this, PlayState* play);
|
||||
void func_808670F0(EnDoor* this, PlayState* play);
|
||||
void func_80866A5C(EnDoor* this, PlayState* play);
|
||||
|
||||
u8 D_808675D0[] = {
|
||||
/* 0x00 */ SCHEDULE_CMD_CHECK_NOT_IN_DAY_S(3, 0x12 - 0x04),
|
||||
|
||||
@@ -685,9 +685,9 @@ void EnDragon_Dead(EnDragon* this, PlayState* play) {
|
||||
sNumPythonsDead++;
|
||||
if (sNumPythonsDead >= (BREG(39) + 8)) {
|
||||
Math_Vec3f_Copy(&seahorsePos, &this->actor.parent->world.pos);
|
||||
seahorsePos.x += (Math_SinS((this->actor.parent->world.rot.y + 0x8000)) * (500.0f + BREG(38)));
|
||||
seahorsePos.x += Math_SinS(this->actor.parent->world.rot.y + 0x8000) * (500.0f + BREG(38));
|
||||
seahorsePos.y += -100.0f + BREG(33);
|
||||
seahorsePos.z += (Math_CosS((this->actor.parent->world.rot.y + 0x8000)) * (500.0f + BREG(38)));
|
||||
seahorsePos.z += Math_CosS(this->actor.parent->world.rot.y + 0x8000) * (500.0f + BREG(38));
|
||||
if (Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_OT, seahorsePos.x, seahorsePos.y,
|
||||
seahorsePos.z, 0, this->actor.shape.rot.y, 0,
|
||||
SEAHORSE_PARAMS(SEAHORSE_TYPE_1, 0, 0), this->actor.csId,
|
||||
|
||||
@@ -88,7 +88,7 @@ void EnDs2n_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->chestRot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
EnDs2n_UpdateEyes(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ typedef struct EnDs2n {
|
||||
/* 0x1D8 */ s16 fidgetTableY[DS2N_LIMB_MAX];
|
||||
/* 0x1FE */ s16 fidgetTableZ[DS2N_LIMB_MAX];
|
||||
/* 0x224 */ Vec3s headRot;
|
||||
/* 0x22A */ Vec3s chestRot; // set by function, but not applied in limbdraw
|
||||
/* 0x22A */ Vec3s torsoRot; // set by function, but not applied in limbdraw
|
||||
/* 0x230 */ s16 blinkState;
|
||||
/* 0x232 */ s16 blinkTimer;
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ void EnElforg_MoveToTargetFairyFountain(EnElforg* this, Vec3f* homePos) {
|
||||
}
|
||||
|
||||
targetAngle += angleAdjustment;
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, targetAngle, 2, 4000, 1000);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, targetAngle, 2, 0xFA0, 0x3E8);
|
||||
EnElforg_ApproachTargetSpeedXZ(this);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ typedef void (*EnEncount2ActionFunc)(struct EnEncount2*, PlayState*);
|
||||
typedef struct EnEncount2Effect{
|
||||
/* 0x00 */ u8 isEnabled;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ UNK_TYPE4 unk10;
|
||||
/* 0x10 */ UNK_TYPE1 unk10[0x4];
|
||||
/* 0x14 */ s16 alpha;
|
||||
/* 0x16 */ s16 alphaFadeDelay; // frame count before alpha fade starts
|
||||
/* 0x18 */ Vec3f velocity;
|
||||
|
||||
@@ -983,7 +983,7 @@ void EnFish2_Update(Actor* thisx, PlayState* play2) {
|
||||
Vec3f sp5C;
|
||||
|
||||
if (this->actor.params == 0) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, this->unk_348, 1, this->unk_34C + 200, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, this->unk_348, 1, this->unk_34C + 0xC8, 0);
|
||||
if (this->actionFunc != func_80B297FC) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_34A, 1, 0xBB8, 0);
|
||||
}
|
||||
|
||||
@@ -1510,7 +1510,7 @@ void EnFsn_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk27A, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENFSN_LIMB_MAX);
|
||||
EnFsn_Blink(this);
|
||||
if (ENFSN_IS_SHOP(&this->actor) && EnFsn_HasItemsToSell()) {
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef struct EnFsn {
|
||||
/* 0x228 */ s16 fidgetTableY[ENFSN_LIMB_MAX];
|
||||
/* 0x24E */ s16 fidgetTableZ[ENFSN_LIMB_MAX];
|
||||
/* 0x274 */ Vec3s headRot;
|
||||
/* 0x27A */ Vec3s unk27A; // Set but never used
|
||||
/* 0x27A */ Vec3s torsoRot; // Set but never used
|
||||
/* 0x280 */ Vec3s jointTable[ENFSN_LIMB_MAX];
|
||||
/* 0x2F2 */ Vec3s morphTable[ENFSN_LIMB_MAX];
|
||||
/* 0x364 */ s16 eyeTexIndex;
|
||||
|
||||
@@ -328,13 +328,13 @@ void func_80961F38(PlayState* play, Vec3f* arg1, s16* arg2, s16 arg3, s16 arg4,
|
||||
sp40 = Math_Vec3f_Yaw(arg1, &sp34) - arg3;
|
||||
|
||||
if (arg5 < ABS_ALT(sp40)) {
|
||||
Math_SmoothStepToS(&arg2[0], 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg2[1], 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg2[0], 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&arg2[1], 0, 6, 0x1838, 0x64);
|
||||
} else {
|
||||
sp42 = Math_Vec3f_Pitch(arg1, &sp34);
|
||||
|
||||
Math_SmoothStepToS(&arg2[0], sp42, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg2[1], sp40, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg2[0], sp42, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&arg2[1], sp40, 6, 0x1838, 0x64);
|
||||
}
|
||||
|
||||
if (arg4 < ABS_ALT(arg2[1])) {
|
||||
@@ -345,7 +345,7 @@ void func_80961F38(PlayState* play, Vec3f* arg1, s16* arg2, s16 arg3, s16 arg4,
|
||||
}
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&arg2[2], 0, 6, 2000, 100);
|
||||
Math_SmoothStepToS(&arg2[2], 0, 6, 0x7D0, 0x64);
|
||||
}
|
||||
|
||||
void func_8096209C(EnFu* this, PlayState* play) {
|
||||
@@ -354,9 +354,9 @@ void func_8096209C(EnFu* this, PlayState* play) {
|
||||
if (this->unk_53C & 1) {
|
||||
func_80961F38(play, &this->unk_508, this->unk_524, this->actor.shape.rot.y, 0x38E3, 0x6AAA);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_524[0], 0, 6, 6000, 100);
|
||||
Math_SmoothStepToS(&this->unk_524[1], 0, 6, 6000, 100);
|
||||
Math_SmoothStepToS(&this->unk_524[2], 0, 6, 6000, 100);
|
||||
Math_SmoothStepToS(&this->unk_524[0], 0, 6, 0x1770, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_524[1], 0, 6, 0x1770, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_524[2], 0, 6, 0x1770, 0x64);
|
||||
}
|
||||
|
||||
if (this->unk_53C & 2) {
|
||||
@@ -364,9 +364,9 @@ void func_8096209C(EnFu* this, PlayState* play) {
|
||||
|
||||
func_80961F38(play, &this->unk_514, this->unk_52A, rotY, 0x38E3, 0x5555);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_52A[0], 0, 6, 6000, 100);
|
||||
Math_SmoothStepToS(&this->unk_52A[1], 0, 6, 6000, 100);
|
||||
Math_SmoothStepToS(&this->unk_52A[2], 0, 6, 6000, 100);
|
||||
Math_SmoothStepToS(&this->unk_52A[0], 0, 6, 0x1770, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_52A[1], 0, 6, 0x1770, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_52A[2], 0, 6, 0x1770, 0x64);
|
||||
}
|
||||
|
||||
if ((this->unk_53C & 1) && (this->unk_53C & 2)) {
|
||||
@@ -440,7 +440,7 @@ void func_80962340(EnFu* this, PlayState* play) {
|
||||
} else {
|
||||
Actor_OfferTalk(&this->actor, play, 100.0f);
|
||||
}
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_SUB(this->actor.child->shape.rot.y, 0x4000), 10, 3000, 100);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_SUB(this->actor.child->shape.rot.y, 0x4000), 10, 3000, 0x64);
|
||||
}
|
||||
|
||||
void func_80962588(EnFu* this, PlayState* play) {
|
||||
@@ -1238,7 +1238,7 @@ void func_809640D8(EnFu* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_8096413C(EnFu* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_SUB(this->actor.yawTowardsPlayer, 0x4000), 5, 1000, 100);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_SUB(this->actor.yawTowardsPlayer, 0x4000), 5, 0x3E8, 0x64);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@ void func_80933014(EnFz* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, temp_a1, 10, 2000, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, temp_a1, 10, 0x7D0, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
}
|
||||
|
||||
|
||||
@@ -995,7 +995,7 @@ void EnGb2_Update(Actor* thisx, PlayState* play) {
|
||||
if (!(this->unk_26C & 0x100)) {
|
||||
func_80B0F5E0(this, play);
|
||||
}
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_270, &this->unk_276, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
s32 EnGb2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
|
||||
@@ -1003,7 +1003,7 @@ s32 EnGb2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
EnGb2* this = THIS;
|
||||
|
||||
if (limbIndex == OBJECT_PS_LIMB_07) {
|
||||
Matrix_RotateYS(this->unk_270.y, MTXMODE_APPLY);
|
||||
Matrix_RotateYS(this->headRot.y, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == OBJECT_PS_LIMB_01) {
|
||||
|
||||
@@ -27,8 +27,8 @@ typedef struct EnGb2 {
|
||||
/* 0x268 */ Actor* unk_268;
|
||||
/* 0x26C */ u16 unk_26C;
|
||||
/* 0x26E */ u16 unk_26E;
|
||||
/* 0x270 */ Vec3s unk_270;
|
||||
/* 0x276 */ Vec3s unk_276;
|
||||
/* 0x270 */ Vec3s headRot;
|
||||
/* 0x276 */ Vec3s torsoRot;
|
||||
/* 0x27C */ s16 unk_27C;
|
||||
/* 0x27E */ s16 unk_27E;
|
||||
/* 0x280 */ s16 unk_280;
|
||||
|
||||
@@ -784,7 +784,7 @@ void func_80BB2E00(EnGeg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BB2F7C(EnGeg* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_4E4), 4, 1000, 1);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_4E4), 4, 0x3E8, 1);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 150.0f) && (fabsf(this->actor.playerHeightRel) < 10.0f) &&
|
||||
@@ -877,7 +877,7 @@ void func_80BB3318(EnGeg* this, PlayState* play) {
|
||||
if (this->unk_4D8 < 2) {
|
||||
sp46 = Math_Vec3f_Yaw(&this->actor.world.pos, &D_80BB4044[this->unk_4D8]);
|
||||
sp40 = Math_Vec3f_DistXZ(&this->actor.world.pos, &D_80BB4044[this->unk_4D8]);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, sp46, 4, 1000, 1);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, sp46, 4, 0x3E8, 1);
|
||||
if (sp40 < 20.0f) {
|
||||
this->unk_4D8++;
|
||||
}
|
||||
|
||||
@@ -763,7 +763,7 @@ void EnGg_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
func_80B35634(this, play);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
func_80B351A4(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ typedef struct EnGg {
|
||||
/* 0x144 */ ColliderCylinder collider;
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ EnGgActionFunc actionFunc;
|
||||
/* 0x1D8 */ Vec3s unk_1D8;
|
||||
/* 0x1DE */ Vec3s unk_1DE;
|
||||
/* 0x1D8 */ Vec3s headRot;
|
||||
/* 0x1DE */ Vec3s torsoRot;
|
||||
/* 0x1E4 */ Vec3s jointTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x25C */ Vec3s morphTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x2D4 */ UNK_TYPE1 unk_2D4[0x6];
|
||||
|
||||
@@ -468,7 +468,7 @@ void EnGg2_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_MoveWithoutGravity(&this->actor);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_80B3B8A4(this);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_1E0, &this->unk_1E6, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
|
||||
if ((this->animIndex == ENGG2_ANIM_5) || (this->animIndex == ENGG2_ANIM_7)) {
|
||||
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHARP_FLOAT - SFX_FLAG);
|
||||
|
||||
@@ -19,8 +19,8 @@ typedef struct EnGg2 {
|
||||
/* 0x1D4 */ EnGg2ActionFunc actionFunc;
|
||||
/* 0x1D8 */ Path* path;
|
||||
/* 0x1DC */ s32 unk_1DC;
|
||||
/* 0x1E0 */ Vec3s unk_1E0;
|
||||
/* 0x1E6 */ Vec3s unk_1E6;
|
||||
/* 0x1E0 */ Vec3s headRot;
|
||||
/* 0x1E6 */ Vec3s torsoRot;
|
||||
/* 0x1EC */ Vec3s jointTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x264 */ Vec3s morphTable[OBJECT_GG_LIMB_MAX];
|
||||
/* 0x2DC */ UNK_TYPE1 unk2DC[0x8];
|
||||
|
||||
@@ -646,9 +646,9 @@ void EnGinkoMan_SwitchAnimation(EnGinkoMan* this, PlayState* play) {
|
||||
void EnGinkoMan_FacePlayer(EnGinkoMan* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->skelAnime.animation != &object_boj_Anim_004A7C) {
|
||||
Actor_TrackPlayer(play, &this->actor, &this->limb15Rot, &this->limb8Rot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
} else {
|
||||
Actor_TrackNone(&this->limb15Rot, &this->limb8Rot);
|
||||
Actor_TrackNone(&this->headRot, &this->torsoRot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -670,12 +670,12 @@ s32 EnGinkoMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
|
||||
|
||||
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_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else if (limbIndex == OBJECT_BOJ_LIMB_08) {
|
||||
Matrix_RotateXS(-this->limb8Rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->limb8Rot.x, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(-this->torsoRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -14,8 +14,8 @@ typedef struct EnGinkoMan {
|
||||
/* 0x188 */ EnGinkoManActionFunc actionFunc;
|
||||
/* 0x18C */ Vec3s jointTable[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x1EC */ Vec3s morphTable[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x24C */ Vec3s limb15Rot;
|
||||
/* 0x252 */ Vec3s limb8Rot;
|
||||
/* 0x24C */ Vec3s headRot;
|
||||
/* 0x252 */ Vec3s torsoRot;
|
||||
/* 0x258 */ s16 curTextId;
|
||||
/* 0x25A */ s16 serviceFee;
|
||||
/* 0x25C */ s16 choiceDepositWithdrawl;
|
||||
|
||||
@@ -1130,7 +1130,7 @@ void EnGk_Update(Actor* thisx, PlayState* play) {
|
||||
((ENGK_GET_F(&this->actor) == ENGK_F_0) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_CALMED_GORON_ELDERS_SON))) {
|
||||
func_80B507A0(this, play);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
if (ENGK_GET_F(&this->actor) == ENGK_F_1) {
|
||||
func_80B5123C(this, play);
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ typedef struct EnGk {
|
||||
/* 0x144 */ ColliderCylinder collider;
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ EnGkActionFunc actionFunc;
|
||||
/* 0x1D8 */ Vec3s unk_1D8;
|
||||
/* 0x1DE */ Vec3s unk_1DE;
|
||||
/* 0x1D8 */ Vec3s headRot;
|
||||
/* 0x1DE */ Vec3s torsoRot;
|
||||
/* 0x1E4 */ u16 unk_1E4;
|
||||
/* 0x1E8 */ Path* path;
|
||||
/* 0x1EC */ s32 unk_1EC;
|
||||
|
||||
@@ -342,8 +342,8 @@ void func_8093F198(PlayState* play, Vec3f* arg1, f32 arg2) {
|
||||
temp_lo = 0x10000 / temp_f16;
|
||||
|
||||
for (i = 0, phi_s0 = 0; i < temp_f16; i++, phi_s0 += temp_lo) {
|
||||
sp74.x = (Math_SinS((s32)(Rand_ZeroOne() * temp_lo) + phi_s0) * temp_f20) + arg1->x;
|
||||
sp74.z = (Math_CosS((s32)(Rand_ZeroOne() * temp_lo) + phi_s0) * temp_f20) + arg1->z;
|
||||
sp74.x = arg1->x + (Math_SinS((s32)(Rand_ZeroOne() * temp_lo) + phi_s0) * temp_f20);
|
||||
sp74.z = arg1->z + (Math_CosS((s32)(Rand_ZeroOne() * temp_lo) + phi_s0) * temp_f20);
|
||||
EffectSsGSplash_Spawn(play, &sp74, NULL, NULL, 0, 0x15E);
|
||||
}
|
||||
|
||||
|
||||
@@ -378,8 +378,8 @@ void EnGuruguru_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
Actor_SetFocus(&this->actor, 50.0f);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
Math_SmoothStepToS(&this->headXRot, this->headXRotTarget, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&this->headZRot, this->headZRotTarget, 1, 1000, 0);
|
||||
Math_SmoothStepToS(&this->headXRot, this->headXRotTarget, 1, 0xBB8, 0);
|
||||
Math_SmoothStepToS(&this->headZRot, this->headZRotTarget, 1, 0x3E8, 0);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 50.0f,
|
||||
UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_8 |
|
||||
UPDBGCHECKINFO_FLAG_10);
|
||||
|
||||
@@ -174,8 +174,8 @@ void EnHeishi_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
Actor_SetFocus(&this->actor, 60.0f);
|
||||
Math_SmoothStepToS(&this->headRotX, this->headRotXTarget, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, this->headRotYTarget, 1, 1000, 0);
|
||||
Math_SmoothStepToS(&this->headRotX, this->headRotXTarget, 1, 0xBB8, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, this->headRotYTarget, 1, 0x3E8, 0);
|
||||
Collider_UpdateCylinder(&this->actor, &this->colliderCylinder);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base);
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ void func_80C1FE80(EnHintSkb* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 15.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_WALK);
|
||||
}
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 750, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x2EE, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (Actor_IsFacingPlayer(&this->actor, 0x11C7) && (this->actor.xzDistToPlayer < 60.0f)) {
|
||||
func_80C1FF30(this);
|
||||
@@ -321,10 +321,10 @@ void func_80C20334(EnHintSkb* this, PlayState* play) {
|
||||
} else if (this->actor.speed != 0.0f) {
|
||||
this->actor.speed -= 0.05f;
|
||||
}
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 2500, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x9C4, 0);
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 16, 2000, 100);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 16, 0x7D0, 0x64);
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
|
||||
@@ -4018,7 +4018,7 @@ void func_80886C00(EnHorse* this, PlayState* play) {
|
||||
if (((this->action == ENHORSE_ACTION_MOUNTED_WALK) || (this->action == ENHORSE_ACTION_MOUNTED_TROT) ||
|
||||
(this->action == ENHORSE_ACTION_MOUNTED_GALLOP)) &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_A) || (AudioVoice_GetWord() == VOICE_WORD_ID_HIYA)) &&
|
||||
(play->interfaceCtx.unk_212 == 8) && !(this->stateFlags & ENHORSE_BOOST) &&
|
||||
(play->interfaceCtx.unk_212 == DO_ACTION_FASTER) && !(this->stateFlags & ENHORSE_BOOST) &&
|
||||
!(this->stateFlags & ENHORSE_FLAG_8) && !(this->stateFlags & ENHORSE_FLAG_9)) {
|
||||
if (this->numBoosts > 0) {
|
||||
Rumble_Request(0.0f, 180, 20, 100);
|
||||
|
||||
@@ -294,15 +294,15 @@ void EnHs_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (this->stateFlags & 4) {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unusedRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unusedRot.y, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 6, 0x1838, 0x64);
|
||||
} else if (this->stateFlags & 1) {
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unusedRot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0x3200, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unusedRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unusedRot.y, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 6, 0x1838, 0x64);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct EnHs {
|
||||
/* 0x1D4 */ Vec3s jointTable[OBJECT_HS_LIMB_MAX];
|
||||
/* 0x234 */ Vec3s morphTable[OBJECT_HS_LIMB_MAX];
|
||||
/* 0x294 */ Vec3s headRot;
|
||||
/* 0x29A */ Vec3s unusedRot; // probably not chest, as chest is same limb as lower body
|
||||
/* 0x29A */ Vec3s torsoRot; // Set but unused
|
||||
/* 0x2A0 */ u16 stateFlags;
|
||||
/* 0x2A2 */ s16 stateTimer; // reused for different actionFunc
|
||||
/* 0x2A4 */ Vec3f nwcPos[20]; // actual chick position are even values, odd values seem to be extra values for smoother chain
|
||||
|
||||
@@ -487,8 +487,8 @@ void EnIk_VerticalAttack(EnIk* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_IRONNACK_SWING_AXE);
|
||||
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 21.0f)) {
|
||||
particlePos.x = (Math_SinS((this->actor.shape.rot.y + 0x6A4)) * 70.0f) + this->actor.world.pos.x;
|
||||
particlePos.z = (Math_CosS((this->actor.shape.rot.y + 0x6A4)) * 70.0f) + this->actor.world.pos.z;
|
||||
particlePos.x = this->actor.world.pos.x + (Math_SinS(this->actor.shape.rot.y + 0x6A4) * 70.0f);
|
||||
particlePos.z = this->actor.world.pos.z + (Math_CosS(this->actor.shape.rot.y + 0x6A4) * 70.0f);
|
||||
particlePos.y = this->actor.world.pos.y;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_IRONNACK_HIT_GND);
|
||||
Camera_AddQuake(GET_ACTIVE_CAM(play), 2, 25, 5);
|
||||
@@ -750,9 +750,9 @@ void EnIk_PlayCutscene(EnIk* this, PlayState* play) {
|
||||
if (this->actor.csId != CS_ID_NONE) {
|
||||
CutsceneManager_StartWithPlayerCsAndSetFlag(this->actor.csId, &this->actor);
|
||||
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->actor.csId);
|
||||
subCamEye.x = (Math_SinS((this->actor.shape.rot.y - 0x2000)) * 120.0f) + this->actor.focus.pos.x;
|
||||
subCamEye.x = this->actor.focus.pos.x + (Math_SinS(this->actor.shape.rot.y - 0x2000) * 120.0f);
|
||||
subCamEye.y = this->actor.focus.pos.y + 20.0f;
|
||||
subCamEye.z = (Math_CosS((this->actor.shape.rot.y - 0x2000)) * 120.0f) + this->actor.focus.pos.z;
|
||||
subCamEye.z = this->actor.focus.pos.z + (Math_CosS(this->actor.shape.rot.y - 0x2000) * 120.0f);
|
||||
Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &subCamEye);
|
||||
}
|
||||
if (this->actor.colChkInfo.health != 0) {
|
||||
|
||||
@@ -623,8 +623,8 @@ void func_8095EBDC(EnIshi* this, PlayState* play) {
|
||||
sp58.y = this->actor.world.pos.y + this->actor.depthInWater;
|
||||
|
||||
for (phi_s0 = 0, i = 0; i < 11; i++, phi_s0 += 0x1746) {
|
||||
sp58.x = (Math_SinS((s32)(Rand_ZeroOne() * 2000.0f) + phi_s0) * 50.0f) + this->actor.world.pos.x;
|
||||
sp58.z = (Math_CosS((s32)(Rand_ZeroOne() * 2000.0f) + phi_s0) * 50.0f) + this->actor.world.pos.z;
|
||||
sp58.x = this->actor.world.pos.x + (Math_SinS((s32)(Rand_ZeroOne() * 2000.0f) + phi_s0) * 50.0f);
|
||||
sp58.z = this->actor.world.pos.z + (Math_CosS((s32)(Rand_ZeroOne() * 2000.0f) + phi_s0) * 50.0f);
|
||||
EffectSsGSplash_Spawn(play, &sp58, NULL, NULL, 0, 350);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_en_jg.h"
|
||||
#include "overlays/actors/ovl_En_S_Goro/z_en_s_goro.h"
|
||||
#include "overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10)
|
||||
|
||||
@@ -553,9 +554,10 @@ void EnJg_Freeze(EnJg* this, PlayState* play) {
|
||||
this->action = EN_JG_ACTION_FROZEN_OR_NON_FIRST_THAW;
|
||||
this->freezeTimer = 1000;
|
||||
this->skelAnime.curFrame = endFrame;
|
||||
this->icePoly = Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_ICE_POLY, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x,
|
||||
this->actor.world.rot.y, this->actor.world.rot.z, 0xFF50);
|
||||
this->icePoly =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_ICE_POLY, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, this->actor.world.rot.x, this->actor.world.rot.y,
|
||||
this->actor.world.rot.z, OBJICEPOLY_PARAMS(80, OBJICEPOLY_SWITCH_FLAG_NONE));
|
||||
this->animIndex = EN_JG_ANIM_FROZEN_LOOP;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
this->actionFunc = EnJg_FrozenIdle;
|
||||
@@ -563,9 +565,10 @@ void EnJg_Freeze(EnJg* this, PlayState* play) {
|
||||
this->action = EN_JG_ACTION_FROZEN_OR_NON_FIRST_THAW;
|
||||
if (curFrame == endFrame) {
|
||||
this->freezeTimer = 1000;
|
||||
this->icePoly = Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_ICE_POLY, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x,
|
||||
this->actor.world.rot.y, this->actor.world.rot.z, 0xFF50);
|
||||
this->icePoly =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_ICE_POLY, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, this->actor.world.rot.x, this->actor.world.rot.y,
|
||||
this->actor.world.rot.z, OBJICEPOLY_PARAMS(80, OBJICEPOLY_SWITCH_FLAG_NONE));
|
||||
this->animIndex = EN_JG_ANIM_FROZEN_LOOP;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
this->actionFunc = EnJg_FrozenIdle;
|
||||
@@ -995,7 +998,7 @@ void EnJg_Update(Actor* thisx, PlayState* play) {
|
||||
EnJg_SpawnBreath(this, play);
|
||||
}
|
||||
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unusedRotation1, &this->unusedRotation2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
}
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ typedef struct EnJg {
|
||||
/* 0x1E0 */ Path* path;
|
||||
/* 0x1E4 */ s32 currentPoint;
|
||||
/* 0x1E8 */ Actor* drum;
|
||||
/* 0x1EC */ Vec3s unusedRotation1; // probably meant to be a head rotation to look at the player
|
||||
/* 0x1F2 */ Vec3s unusedRotation2; // probably meant to be a body rotation to look at the player
|
||||
/* 0x1EC */ Vec3s headRot; // set but unused
|
||||
/* 0x1F2 */ Vec3s torsoRot; // set but unused
|
||||
/* 0x1F8 */ Vec3s jointTable[GORON_ELDER_LIMB_MAX];
|
||||
/* 0x2CA */ Vec3s morphTable[GORON_ELDER_LIMB_MAX];
|
||||
/* 0x39C */ s16 rootRotationWhenTalking;
|
||||
|
||||
@@ -601,7 +601,7 @@ void func_80C14D14(EnJgameTsn* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80C14D58(EnJgameTsn* this, PlayState* play) {
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_2EC, &this->unk_2F2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
|
||||
if (DECR(this->unk_2FA) == 0) {
|
||||
this->unk_2FA = Rand_S16Offset(60, 60);
|
||||
@@ -626,13 +626,13 @@ void EnJgameTsn_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
s32 EnJgamesTsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnJgameTsn* this = THIS;
|
||||
s16 temp_v0 = this->unk_2EC.x >> 1;
|
||||
s16 temp_v0 = this->headRot.x >> 1;
|
||||
|
||||
if (limbIndex == OBJECT_TSN_LIMB_0F) {
|
||||
rot->x += this->unk_2EC.y;
|
||||
rot->x += this->headRot.y;
|
||||
rot->z += temp_v0;
|
||||
} else if (limbIndex == OBJECT_TSN_LIMB_08) {
|
||||
rot->x += this->unk_2F2.y;
|
||||
rot->x += this->torsoRot.y;
|
||||
rot->z += temp_v0;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -28,8 +28,8 @@ typedef struct EnJgameTsn {
|
||||
/* 0x21C */ s32 unk_21C;
|
||||
/* 0x220 */ Vec3s jointTable[OBJECT_TSN_LIMB_MAX];
|
||||
/* 0x286 */ Vec3s morphTable[OBJECT_TSN_LIMB_MAX];
|
||||
/* 0x2EC */ Vec3s unk_2EC;
|
||||
/* 0x2F2 */ Vec3s unk_2F2;
|
||||
/* 0x2EC */ Vec3s headRot;
|
||||
/* 0x2F2 */ Vec3s torsoRot;
|
||||
/* 0x2F8 */ s16 unk_2F8;
|
||||
/* 0x2FA */ s16 unk_2FA;
|
||||
/* 0x2FC */ s16 unk_2FC;
|
||||
|
||||
@@ -689,7 +689,7 @@ void func_80B86804(EnKaizoku* this, PlayState* play) {
|
||||
void func_80B868B8(EnKaizoku* this, PlayState* play) {
|
||||
f32 curFrame = this->skelAnime.curFrame;
|
||||
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 1, 4000, 1);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 1, 0xFA0, 1);
|
||||
this->subCamEye.x = Math_SinS(this->picto.actor.yawTowardsPlayer) * 155.0f + this->picto.actor.world.pos.x;
|
||||
this->subCamEye.y = this->picto.actor.world.pos.y + 10.0f;
|
||||
this->subCamEye.z = Math_CosS(this->picto.actor.yawTowardsPlayer) * 115.0f + this->picto.actor.world.pos.z;
|
||||
@@ -1485,7 +1485,7 @@ void func_80B88D6C(EnKaizoku* this, PlayState* play) {
|
||||
if (this->picto.actor.speed < -8.0f) {
|
||||
this->picto.actor.speed = -8.0f;
|
||||
}
|
||||
} else if (Math_SinS((sp2A - this->picto.actor.shape.rot.y)) < 0.0f) {
|
||||
} else if (Math_SinS(sp2A - this->picto.actor.shape.rot.y) < 0.0f) {
|
||||
this->picto.actor.speed += 0.25f;
|
||||
if (this->picto.actor.speed > 8.0f) {
|
||||
this->picto.actor.speed = 8.0f;
|
||||
@@ -1645,7 +1645,7 @@ void func_80B893CC(EnKaizoku* this, PlayState* play) {
|
||||
void func_80B894C0(EnKaizoku* this, PlayState* play) {
|
||||
s16 temp_v0;
|
||||
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 1, 4500, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 1, 0x1194, 0);
|
||||
if (!func_80B85858(this, play) && !func_80B85A00(this, play, false) && (this->unk_3C4.x < 1.0f) &&
|
||||
(this->unk_3C4.z < 1.0f)) {
|
||||
temp_v0 = this->picto.actor.wallYaw - this->picto.actor.shape.rot.y;
|
||||
|
||||
@@ -260,7 +260,7 @@ void EnKakasi_CheckPlayerPosition(EnKakasi* this, PlayState* play) {
|
||||
player->actor.world.pos.z = -190.0f;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&player->actor.shape.rot.y, (this->picto.actor.yawTowardsPlayer + 0x8000), 5, 1000, 0);
|
||||
Math_SmoothStepToS(&player->actor.shape.rot.y, (this->picto.actor.yawTowardsPlayer + 0x8000), 5, 0x3E8, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -403,7 +403,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
||||
u32 day = gSaveContext.save.day;
|
||||
f32 curFrame = this->skelAnime.curFrame;
|
||||
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 2000, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 0x7D0, 0);
|
||||
// if first dialogue
|
||||
if ((this->picto.actor.textId != 0x1644) && (curFrame >= this->animEndFrame) &&
|
||||
(this->animIndex == ENKAKASI_ANIM_SLOWROLL)) {
|
||||
@@ -599,7 +599,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) {
|
||||
Vec3f tempVec;
|
||||
|
||||
EnKakasi_CheckPlayerPosition(this, play);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.home.rot.y, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.home.rot.y, 1, 0xBB8, 0);
|
||||
if (this->unkState1A8 == 0) {
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_TALK) {
|
||||
CutsceneManager_Stop(CS_ID_GLOBAL_TALK);
|
||||
@@ -684,8 +684,8 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
|
||||
f32 curFrame = this->skelAnime.curFrame;
|
||||
Vec3f vec3fCopy;
|
||||
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.home.rot.y, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&player->actor.shape.rot.y, this->picto.actor.yawTowardsPlayer + 0x8000, 5, 1000, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.home.rot.y, 1, 0xBB8, 0);
|
||||
Math_SmoothStepToS(&player->actor.shape.rot.y, this->picto.actor.yawTowardsPlayer + 0x8000, 5, 0x3E8, 0);
|
||||
|
||||
if (this->unk190 == 0) {
|
||||
Message_CloseTextbox(play);
|
||||
@@ -837,7 +837,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
||||
Player* player;
|
||||
|
||||
EnKakasi_CheckPlayerPosition(this, play);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.home.rot.y, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.home.rot.y, 1, 0xBB8, 0);
|
||||
this->unk22C.y = this->picto.actor.home.pos.y + 50.0f;
|
||||
|
||||
this->subCamEyeNext.x = D_80971E38[this->unk190].x;
|
||||
@@ -945,7 +945,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
||||
case 14:
|
||||
// goes off once for some camera changes,
|
||||
// otherwise it's the end when camera is back to normal and Player is confused
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 1000, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 0x3E8, 0);
|
||||
if (this->unk204 == 0) {
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
@@ -1109,7 +1109,7 @@ void EnKakasi_SetupIdleRisen(EnKakasi* this) {
|
||||
}
|
||||
|
||||
void EnKakasi_IdleRisen(EnKakasi* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 1000, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 0x3E8, 0);
|
||||
if (Actor_TalkOfferAccepted(&this->picto.actor, &play->state)) {
|
||||
this->actionFunc = EnKakasi_RisenDialogue;
|
||||
} else {
|
||||
@@ -1118,7 +1118,7 @@ void EnKakasi_IdleRisen(EnKakasi* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnKakasi_RisenDialogue(EnKakasi* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 1000, 0);
|
||||
Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 5, 0x3E8, 0);
|
||||
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
Message_CloseTextbox(play);
|
||||
|
||||
@@ -776,7 +776,7 @@ void EnKendoJs_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_278, &this->unk_27E, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
func_80B279AC(this, play);
|
||||
func_80B27880(this, play);
|
||||
}
|
||||
@@ -785,7 +785,7 @@ s32 EnKendoJs_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
|
||||
EnKendoJs* this = THIS;
|
||||
|
||||
if (limbIndex == OBJECT_JS_LIMB_0C) {
|
||||
rot->y -= this->unk_278.y;
|
||||
rot->y -= this->headRot.y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ typedef struct EnKendoJs {
|
||||
/* 0x1D8 */ Vec3s jointTable[OBJECT_JS_LIMB_MAX];
|
||||
/* 0x226 */ Vec3s morphTable[OBJECT_JS_LIMB_MAX];
|
||||
/* 0x274 */ Vec3s* pathPoints;
|
||||
/* 0x278 */ Vec3s unk_278;
|
||||
/* 0x27E */ Vec3s unk_27E;
|
||||
/* 0x278 */ Vec3s headRot;
|
||||
/* 0x27E */ Vec3s torsoRot;
|
||||
/* 0x284 */ s16 unk_284;
|
||||
/* 0x286 */ s16 unk_286;
|
||||
/* 0x288 */ s16 unk_288;
|
||||
|
||||
@@ -1133,17 +1133,17 @@ void func_80B42D28(EnKgy* this, PlayState* play) {
|
||||
void EnKgy_Update(Actor* thisx, PlayState* play) {
|
||||
EnKgy* this = THIS;
|
||||
s32 pad;
|
||||
Vec3s sp30;
|
||||
Vec3s torsoRot;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
if (this->animIndex == ENKGY_ANIM_2) {
|
||||
sp30.z = 0;
|
||||
sp30.y = 0;
|
||||
sp30.x = 0;
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_2CC, &sp30, this->actor.focus.pos);
|
||||
torsoRot.z = 0;
|
||||
torsoRot.y = 0;
|
||||
torsoRot.x = 0;
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &torsoRot, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_2CC.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->unk_2CC.y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 0x1838, 0x64);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1159,7 +1159,7 @@ s32 EnKgy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
}
|
||||
|
||||
if (limbIndex == OBJECT_KGY_LIMB_0B) {
|
||||
rot->x += this->unk_2CC.y;
|
||||
rot->x += this->headRot.y;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef struct EnKgy {
|
||||
/* 0x2A8 */ Vec3f unk_2A8;
|
||||
/* 0x2B4 */ Vec3f unk_2B4;
|
||||
/* 0x2C0 */ Vec3f unk_2C0;
|
||||
/* 0x2CC */ Vec3s unk_2CC;
|
||||
/* 0x2CC */ Vec3s headRot;
|
||||
/* 0x2D2 */ s16 animIndex;
|
||||
/* 0x2D4 */ s16 csIdList[6];
|
||||
/* 0x2E0 */ s16 csIdIndex;
|
||||
|
||||
@@ -581,9 +581,9 @@ void EnKusa_Fall(EnKusa* this, PlayState* play) {
|
||||
contactPos.y = this->actor.world.pos.y + this->actor.depthInWater;
|
||||
for (angleOffset = 0, i = 0; i < 4; i++, angleOffset += 0x4000) {
|
||||
contactPos.x =
|
||||
(Math_SinS((s32)(Rand_ZeroOne() * 7200.0f) + angleOffset) * 15.0f) + this->actor.world.pos.x;
|
||||
this->actor.world.pos.x + (Math_SinS((s32)(Rand_ZeroOne() * 7200.0f) + angleOffset) * 15.0f);
|
||||
contactPos.z =
|
||||
(Math_CosS((s32)(Rand_ZeroOne() * 7200.0f) + angleOffset) * 15.0f) + this->actor.world.pos.z;
|
||||
this->actor.world.pos.z + (Math_CosS((s32)(Rand_ZeroOne() * 7200.0f) + angleOffset) * 15.0f);
|
||||
EffectSsGSplash_Spawn(play, &contactPos, NULL, NULL, 0, 190);
|
||||
}
|
||||
contactPos.x = this->actor.world.pos.x;
|
||||
|
||||
@@ -338,8 +338,8 @@ void func_80A5BDB0(EnKusa2* this, PlayState* play) {
|
||||
sp50.y = this->actor.world.pos.y + this->actor.depthInWater;
|
||||
|
||||
for (phi_s0 = 0, i = 0; i < 4; i++, phi_s0 += 0x4000) {
|
||||
sp50.x = (Math_SinS((s32)(Rand_ZeroOne() * 7200.0f) + phi_s0) * 15.0f) + this->actor.world.pos.x;
|
||||
sp50.z = (Math_CosS((s32)(Rand_ZeroOne() * 7200.0f) + phi_s0) * 15.0f) + this->actor.world.pos.z;
|
||||
sp50.x = this->actor.world.pos.x + (Math_SinS((s32)(Rand_ZeroOne() * 7200.0f) + phi_s0) * 15.0f);
|
||||
sp50.z = this->actor.world.pos.z + (Math_CosS((s32)(Rand_ZeroOne() * 7200.0f) + phi_s0) * 15.0f);
|
||||
EffectSsGSplash_Spawn(play, &sp50, NULL, NULL, 0, 190);
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ void func_80A5C70C(EnKusa2UnkBssSubStruct* arg0) {
|
||||
}
|
||||
|
||||
void func_80A5C718(EnKusa2UnkBssSubStruct* arg0) {
|
||||
Math_ScaledStepToS(&arg0->unk_20, arg0->unk_22, 1200);
|
||||
Math_ScaledStepToS(&arg0->unk_20, arg0->unk_22, 0x4B0);
|
||||
|
||||
if ((arg0->unk_1C > 0.0f) && (Rand_ZeroOne() < 0.05f)) {
|
||||
arg0->unk_1C = -arg0->unk_1C;
|
||||
|
||||
@@ -56,7 +56,7 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 20, 50, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
s32 D_80A6862C = 0;
|
||||
s32 D_80A6862C = false;
|
||||
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku Nut */ DMG_ENTRY(1, 0xF),
|
||||
@@ -160,7 +160,7 @@ void EnLookNuts_Patrol(EnLookNuts* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
|
||||
if (D_80A6862C != 0) {
|
||||
if (D_80A6862C) {
|
||||
Math_ApproachZeroF(&this->actor.speed, 0.3f, 1.0f);
|
||||
return;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ void EnLookNuts_StandAndWait(EnLookNuts* this, PlayState* play) {
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_ApproachZeroF(&this->actor.speed, 0.3f, 1.0f);
|
||||
if (!Play_InCsMode(play) && (D_80A6862C == 0) && (this->eventTimer == 0)) {
|
||||
if (!Play_InCsMode(play) && !D_80A6862C && (this->eventTimer == 0)) {
|
||||
this->eventTimer = 10;
|
||||
switch (this->waitTimer) {
|
||||
case 0:
|
||||
@@ -228,7 +228,7 @@ void EnLookNuts_StandAndWait(EnLookNuts* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (fabsf(this->headRotTarget.y - this->headRotation.y) < 10.0f) {
|
||||
if (fabsf(this->headRotTarget.y - this->headRot.y) < 10.0f) {
|
||||
this->waitTimer = 10;
|
||||
this->headRotTarget.x = 4000.0f;
|
||||
this->eventTimer = 5;
|
||||
@@ -236,7 +236,7 @@ void EnLookNuts_StandAndWait(EnLookNuts* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (fabsf(this->headRotTarget.y - this->headRotation.y) < 10.0f) {
|
||||
if (fabsf(this->headRotTarget.y - this->headRot.y) < 10.0f) {
|
||||
this->headRotTarget.z = 4000.0f;
|
||||
this->waitTimer++;
|
||||
}
|
||||
@@ -254,8 +254,8 @@ void EnLookNuts_StandAndWait(EnLookNuts* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if ((fabsf(this->headRotation.x) < 30.0f) && (fabsf(this->headRotation.y) < 30.0f) &&
|
||||
(fabsf(this->headRotation.z) < 30.0f)) {
|
||||
if ((fabsf(this->headRot.x) < 30.0f) && (fabsf(this->headRot.y) < 30.0f) &&
|
||||
(fabsf(this->headRot.z) < 30.0f)) {
|
||||
this->waitTimer = 12;
|
||||
}
|
||||
break;
|
||||
@@ -313,14 +313,9 @@ void EnLookNuts_SendPlayerToSpawn(EnLookNuts* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
static Vec3f sEffectVecInitialize = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
void EnLookNuts_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnLookNuts* this = THIS;
|
||||
Vec3f effectVelOffset;
|
||||
Vec3f effectPos;
|
||||
Vec3f effectVel;
|
||||
|
||||
if (this->blinkTimer == 0) {
|
||||
this->eyeState++;
|
||||
@@ -337,17 +332,20 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) {
|
||||
this->eventTimer--;
|
||||
}
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
if (D_80A6862C == 0) {
|
||||
if (!D_80A6862C) {
|
||||
if ((this->state < 2) && (this->actor.xzDistToPlayer < 320.0f) && (this->actor.playerHeightRel < 80.0f)) {
|
||||
effectVelOffset = sEffectVecInitialize;
|
||||
Vec3f effectVelocityOffset = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f effectPos;
|
||||
Vec3f effectVelocity;
|
||||
|
||||
Math_Vec3f_Copy(&effectPos, &this->actor.world.pos);
|
||||
effectPos.x += Math_SinS((this->actor.world.rot.y + (s16)this->headRotation.y)) * 10.0f;
|
||||
effectPos.x += Math_SinS(this->actor.world.rot.y + (s16)this->headRot.y) * 10.0f;
|
||||
effectPos.y += 30.0f;
|
||||
effectPos.z += Math_CosS((this->actor.world.rot.y + (s16)this->headRotation.y)) * 10.0f;
|
||||
effectPos.z += Math_CosS(this->actor.world.rot.y + (s16)this->headRot.y) * 10.0f;
|
||||
Matrix_Push();
|
||||
Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW);
|
||||
effectVelOffset.z = 20.0f;
|
||||
Matrix_MultVec3f(&effectVelOffset, &effectVel);
|
||||
effectVelocityOffset.z = 20.0f;
|
||||
Matrix_MultVec3f(&effectVelocityOffset, &effectVelocity);
|
||||
Matrix_Pop();
|
||||
if (!this->isPlayerDetected) {
|
||||
s16 effectFlags = SOLDERSRCHBALL_INVISIBLE;
|
||||
@@ -356,8 +354,8 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) {
|
||||
effectFlags = 0;
|
||||
}
|
||||
if (Player_GetMask(play) != PLAYER_MASK_STONE) {
|
||||
EffectSsSolderSrchBall_Spawn(play, &effectPos, &effectVel, &gZeroVec3f, 50, &this->isPlayerDetected,
|
||||
effectFlags);
|
||||
EffectSsSolderSrchBall_Spawn(play, &effectPos, &effectVelocity, &gZeroVec3f, 50,
|
||||
&this->isPlayerDetected, effectFlags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +367,7 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) {
|
||||
this->state = PALACE_GUARD_RUNNING_TO_PLAYER;
|
||||
Audio_PlaySfx(NA_SE_SY_FOUND);
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_26);
|
||||
D_80A6862C = 1;
|
||||
D_80A6862C = true;
|
||||
this->actor.flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_10);
|
||||
this->actor.gravity = 0.0f;
|
||||
EnLookNuts_DetectedPlayer(this, play);
|
||||
@@ -378,9 +376,9 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Math_ApproachF(&this->headRotation.x, this->headRotTarget.x, 1.0f, 3000.0f);
|
||||
Math_ApproachF(&this->headRotation.y, this->headRotTarget.y, 1.0f, 6000.0f);
|
||||
Math_ApproachF(&this->headRotation.z, this->headRotTarget.z, 1.0f, 2000.0f);
|
||||
Math_ApproachF(&this->headRot.x, this->headRotTarget.x, 1.0f, 3000.0f);
|
||||
Math_ApproachF(&this->headRot.y, this->headRotTarget.y, 1.0f, 6000.0f);
|
||||
Math_ApproachF(&this->headRot.z, this->headRotTarget.z, 1.0f, 2000.0f);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
||||
@@ -32,8 +32,8 @@ typedef struct EnLookNuts {
|
||||
/* 0x222 */ s16 isPlayerDetected;
|
||||
/* 0x224 */ s16 waitTimer; // Timer for how long the deku guard will take a break for
|
||||
/* 0x226 */ s16 spawnIndex;
|
||||
/* 0x228 */ UNK_TYPE4 pad228; // Unused necessary padding
|
||||
/* 0x22C */ Vec3f headRotation;
|
||||
/* 0x228 */ UNK_TYPE1 pad228[0x4];
|
||||
/* 0x22C */ Vec3f headRot;
|
||||
/* 0x238 */ Vec3f headRotTarget; // Target value for head rotation
|
||||
/* 0x244 */ ColliderCylinder collider;
|
||||
} EnLookNuts; // size = 0x290
|
||||
|
||||
@@ -686,7 +686,7 @@ void EnMa4_DialogueHandler(EnMa4* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->type != MA4_TYPE_ALIENS_WON) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 2000, 1000);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x7D0, 0x3E8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ void func_80959E18(EnMk* this, PlayState* play) {
|
||||
void EnMk_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnMk* this = THIS;
|
||||
Vec3s sp38;
|
||||
Vec3s torsoRot;
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
@@ -467,10 +467,10 @@ void EnMk_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if ((this->unk_27A & 1) && !Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_127)) {
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_270, &sp38, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &torsoRot, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_270.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_270.y, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 0x1838, 0x64);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,8 +478,8 @@ s32 EnMk_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
||||
EnMk* this = THIS;
|
||||
|
||||
if (limbIndex == MARINE_RESEARCHER_LIMB_HEAD) {
|
||||
rot->y -= this->unk_270.y;
|
||||
rot->z += this->unk_270.x;
|
||||
rot->y -= this->headRot.y;
|
||||
rot->z += this->headRot.x;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ typedef struct EnMk {
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ Vec3s jointTable[MARINE_RESEARCHER_LIMB_MAX];
|
||||
/* 0x222 */ Vec3s morphTable[MARINE_RESEARCHER_LIMB_MAX];
|
||||
/* 0x270 */ Vec3s unk_270;
|
||||
/* 0x270 */ Vec3s headRot;
|
||||
/* 0x276 */ s16 csIdList[2];
|
||||
/* 0x27A */ u16 unk_27A;
|
||||
/* 0x27C */ s16 animIndex;
|
||||
|
||||
@@ -193,7 +193,7 @@ void func_8096611C(EnMm* this, PlayState* play) {
|
||||
} else {
|
||||
Math_Vec3f_ToVec3s(&this->actor.home.rot, &this->actor.parent->world.pos);
|
||||
}
|
||||
Math_ScaledStepToS(&this->unk_190, 0, 2000);
|
||||
Math_ScaledStepToS(&this->unk_190, 0, 0x7D0);
|
||||
}
|
||||
|
||||
void EnMm_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
@@ -147,10 +147,10 @@ void func_80A6F2C8(EnMm3* this, PlayState* play) {
|
||||
Actor_OfferTalk(&this->actor, play, 100.0f);
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->unk_2A0.x, 0, 5, 0x1000, 0x100);
|
||||
Math_SmoothStepToS(&this->unk_2A0.y, 0, 5, 0x1000, 0x100);
|
||||
Math_SmoothStepToS(&this->unk_2A6.x, 0, 5, 0x1000, 0x100);
|
||||
Math_SmoothStepToS(&this->unk_2A6.y, 0, 5, 0x1000, 0x100);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 5, 0x1000, 0x100);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 5, 0x1000, 0x100);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 5, 0x1000, 0x100);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 5, 0x1000, 0x100);
|
||||
}
|
||||
|
||||
void func_80A6F3B4(EnMm3* this, PlayState* play) {
|
||||
@@ -551,7 +551,7 @@ void EnMm3_Update(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->unk_2B0 & 1) {
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_2A0, &this->unk_2A6, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
@@ -562,11 +562,11 @@ s32 EnMm3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
EnMm3* this = THIS;
|
||||
|
||||
if (limbIndex == OBJECT_MM_LIMB_08) {
|
||||
rot->x += this->unk_2A6.y;
|
||||
rot->y -= this->unk_2A6.x;
|
||||
rot->x += this->torsoRot.y;
|
||||
rot->y -= this->torsoRot.x;
|
||||
} else if (limbIndex == OBJECT_MM_LIMB_0F) {
|
||||
rot->x += this->unk_2A0.y;
|
||||
rot->z += this->unk_2A0.x;
|
||||
rot->x += this->headRot.y;
|
||||
rot->z += this->headRot.x;
|
||||
if ((this->unk_2B0 & 2) && ((play->gameplayFrames % 3) == 0)) {
|
||||
Matrix_Translate(40.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ typedef struct EnMm3 {
|
||||
/* 0x1DC */ s32 unk_1DC;
|
||||
/* 0x1E0 */ Vec3s jointTable[OBJECT_MM_LIMB_MAX];
|
||||
/* 0x240 */ Vec3s morphTable[OBJECT_MM_LIMB_MAX];
|
||||
/* 0x2A0 */ Vec3s unk_2A0;
|
||||
/* 0x2A6 */ Vec3s unk_2A6;
|
||||
/* 0x2A0 */ Vec3s headRot;
|
||||
/* 0x2A6 */ Vec3s torsoRot;
|
||||
/* 0x2AC */ s16 unk_2AC;
|
||||
/* 0x2AE */ s16 unk_2AE;
|
||||
/* 0x2B0 */ u16 unk_2B0;
|
||||
|
||||
@@ -135,17 +135,17 @@ void EnMuto_SetHeadRotation(EnMuto* this) {
|
||||
}
|
||||
|
||||
void EnMuto_SetupIdle(EnMuto* this) {
|
||||
EnMuto_ChangeAnim(this, 0);
|
||||
EnMuto_ChangeAnim(this, ENMUTO_ANIM_0);
|
||||
this->isInDialogue = false;
|
||||
this->actionFunc = EnMuto_Idle;
|
||||
}
|
||||
|
||||
void EnMuto_Idle(EnMuto* this, PlayState* play) {
|
||||
Player* player;
|
||||
this->actor.textId = sTextIds[this->textIdIndex];
|
||||
|
||||
if (!this->isInMayorsRoom) {
|
||||
player = GET_PLAYER(play);
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->transformation == PLAYER_FORM_DEKU) {
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_88_08)) {
|
||||
this->actor.textId = 0x62C;
|
||||
@@ -155,9 +155,6 @@ void EnMuto_Idle(EnMuto* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
if (!this->isInMayorsRoom && (Player_GetMask(play) == PLAYER_MASK_KAFEIS_MASK)) {
|
||||
this->actor.textId = 0x2363;
|
||||
}
|
||||
|
||||
@@ -16,15 +16,8 @@ void EnNb_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnNb_Update(Actor* thisx, PlayState* play);
|
||||
void EnNb_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnNb_FollowSchedule(EnNb* this, PlayState* play);
|
||||
void func_80BC0EAC(EnNb* this, PlayState* play);
|
||||
|
||||
void func_80BC08E0(EnNb* this, PlayState* play);
|
||||
void func_80BC0978(EnNb* this, PlayState* play);
|
||||
|
||||
s32 func_80BC00AC(Actor* thisx, PlayState* play);
|
||||
s32 func_80BC01DC(Actor* thisx, PlayState* play);
|
||||
|
||||
#define EN_NB_FLAG_NONE (0)
|
||||
#define EN_NB_FLAG_8 (1 << 3)
|
||||
#define EN_NB_FLAG_10 (1 << 4)
|
||||
|
||||
@@ -16,8 +16,6 @@ void EnNimotsu_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnNimotsu_Update(Actor* thisx, PlayState* play);
|
||||
void EnNimotsu_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnNimotsu_UpdateCollision(EnNimotsu* this, PlayState* play);
|
||||
|
||||
ActorInit En_Nimotsu_InitVars = {
|
||||
/**/ ACTOR_EN_NIMOTSU,
|
||||
/**/ ACTORCAT_PROP,
|
||||
|
||||
@@ -15,22 +15,18 @@ void EnNiw_Init(Actor* thisx, PlayState* play);
|
||||
void EnNiw_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnNiw_Update(Actor* thisx, PlayState* play2);
|
||||
void EnNiw_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnNiw_SetupIdle(EnNiw* this);
|
||||
void EnNiw_Idle(EnNiw* this, PlayState* play);
|
||||
void EnNiw_Thrown(EnNiw* this, PlayState* play);
|
||||
void EnNiw_SetupRunAway(EnNiw* this);
|
||||
void EnNiw_RunAway(EnNiw* this, PlayState* play);
|
||||
void EnNiw_Swimming(EnNiw* this, PlayState* play);
|
||||
void EnNiw_Trigger(EnNiw* this, PlayState* play);
|
||||
void EnNiw_Upset(EnNiw* this, PlayState* play);
|
||||
void EnNiw_SetupCuccoStorm(EnNiw* this, PlayState* play);
|
||||
void EnNiw_CuccoStorm(EnNiw* this, PlayState* play);
|
||||
void EnNiw_SpawnAttackNiw(EnNiw* this, PlayState* play);
|
||||
void EnNiw_Held(EnNiw* this, PlayState* play);
|
||||
void EnNiw_UpdateFeather(EnNiw* this, PlayState* play);
|
||||
void EnNiw_DrawFeathers(EnNiw* this, PlayState* play);
|
||||
void EnNiw_CheckRage(EnNiw* this, PlayState* play);
|
||||
void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState);
|
||||
void EnNiw_SpawnFeather(EnNiw* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, f32 scale);
|
||||
|
||||
s16 sCuccoStormActive = false;
|
||||
|
||||
@@ -21,10 +21,8 @@ void EnOssan_Update(Actor* thisx, PlayState* play);
|
||||
void EnOssan_CuriosityShopMan_Draw(Actor* thisx, PlayState* play);
|
||||
void EnOssan_PartTimer_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnOssan_CuriosityShopMan_Init(EnOssan* this, PlayState* play);
|
||||
u16 EnOssan_CuriosityShopMan_GetWelcome(EnOssan* this, PlayState* play);
|
||||
|
||||
void EnOssan_PartTimer_Init(EnOssan* this, PlayState* play);
|
||||
u16 EnOssan_PartTimer_GetWelcome(EnOssan* this, PlayState* play);
|
||||
|
||||
void EnOssan_InitShop(EnOssan* this, PlayState* play);
|
||||
@@ -240,11 +238,11 @@ void EnOssan_RotateHead(EnOssan* this, PlayState* play) {
|
||||
|
||||
if (this->actor.params == ENOSSAN_PART_TIME_WORKER) {
|
||||
if (player->transformation == PLAYER_FORM_ZORA) {
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, this->headRot.y, 3, 2000, 0);
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, this->headRot.y, 3, 0x7D0, 0);
|
||||
} else if (this->flags & LOOKED_AT_PLAYER) {
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, 8000, 3, 2000, 0);
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, 0x1F40, 3, 0x7D0, 0);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, this->headRot.y, 3, 2000, 0);
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, this->headRot.y, 3, 0x7D0, 0);
|
||||
if (ABS_ALT(this->partTimerHeadRot.y - this->headRot.y) < 16) {
|
||||
this->flags |= LOOKED_AT_PLAYER;
|
||||
}
|
||||
@@ -387,7 +385,7 @@ void EnOssan_Idle(EnOssan* this, PlayState* play) {
|
||||
Actor_OfferTalk(&this->actor, play, 100.0f);
|
||||
}
|
||||
if (this->actor.params == ENOSSAN_PART_TIME_WORKER) {
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, 8000, 3, 2000, 0);
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, 0x1F40, 3, 0x7D0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -672,7 +670,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
if ((this->actor.params == ENOSSAN_PART_TIME_WORKER) && (player->transformation != PLAYER_FORM_ZORA)) {
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, 8000, 3, 2000, 0);
|
||||
Math_SmoothStepToS(&this->partTimerHeadRot.y, 0x1F40, 3, 0x7D0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1600,7 +1598,7 @@ void EnOssan_Update(Actor* thisx, PlayState* play) {
|
||||
EnOssan_UpdateItemSelectedProperty(this);
|
||||
EnOssan_UpdateStickDirectionPromptAnim(this);
|
||||
EnOssan_UpdateCursorAnim(this);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk2CC, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
this->actionFunc(this, play);
|
||||
Actor_SetFocus(&this->actor, 90.0f);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
@@ -51,7 +51,7 @@ typedef struct EnOssan {
|
||||
/* 0x2C2 */ s16 cutsceneState;
|
||||
/* 0x2C4 */ u16 textId;
|
||||
/* 0x2C6 */ Vec3s headRot;
|
||||
/* 0x2CC */ Vec3s unk2CC; // Set but never used
|
||||
/* 0x2CC */ Vec3s torsoRot; // Set but never used
|
||||
/* 0x2D2 */ s16 fidgetTableY[ENOSSAN_LIMB_MAX];
|
||||
/* 0x2F8 */ s16 fidgetTableZ[ENOSSAN_LIMB_MAX];
|
||||
/* 0x31E */ Vec3s jointTable[ENOSSAN_LIMB_MAX];
|
||||
|
||||
@@ -336,7 +336,7 @@ void func_808976DC(EnPeehat* this, PlayState* play) {
|
||||
|
||||
Math_StepToF(&this->actor.shape.yOffset, 0.0f, 50.0f);
|
||||
|
||||
if (Math_ScaledStepToS(&this->unk_2B2, 4000, 800)) {
|
||||
if (Math_ScaledStepToS(&this->unk_2B2, 0xFA0, 0x320)) {
|
||||
if (this->unk_2B0 != 0) {
|
||||
this->unk_2B0--;
|
||||
if ((this->unk_2B0 == 0) && (this->skelAnime.playSpeed < 0.5f)) {
|
||||
@@ -383,13 +383,13 @@ void func_80897910(EnPeehat* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (!gSaveContext.save.isNight && (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 1200.0f)) {
|
||||
Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1000);
|
||||
Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0x3E8);
|
||||
this->actor.shape.rot.y += (s16)(this->unk_2AD * 450);
|
||||
} else {
|
||||
func_80898124(this);
|
||||
}
|
||||
|
||||
Math_ScaledStepToS(&this->unk_2B2, 4000, 500);
|
||||
Math_ScaledStepToS(&this->unk_2B2, 0xFA0, 0x1F4);
|
||||
this->unk_2B4 += this->unk_2B2;
|
||||
Math_StepToF(&this->unk_2C4, 0.075f, 0.005f);
|
||||
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG);
|
||||
@@ -425,7 +425,7 @@ void func_80897A94(EnPeehat* this, PlayState* play) {
|
||||
|
||||
this->actor.shape.rot.y += 0x15E;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_ScaledStepToS(&this->unk_2B2, 4000, 500);
|
||||
Math_ScaledStepToS(&this->unk_2B2, 0xFA0, 0x1F4);
|
||||
this->unk_2B4 += this->unk_2B2;
|
||||
Math_StepToF(&this->unk_2C4, 0.075f, 0.005f);
|
||||
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_SM_FLY - SFX_FLAG);
|
||||
@@ -472,7 +472,7 @@ void func_80897D48(EnPeehat* this, PlayState* play) {
|
||||
|
||||
Math_StepToF(&this->actor.shape.yOffset, -1000.0f, 50.0f);
|
||||
Math_StepToF(&this->actor.speed, 0.0f, 1.0f);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 50);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x32);
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
func_80897498(this);
|
||||
@@ -487,7 +487,7 @@ void func_80897D48(EnPeehat* this, PlayState* play) {
|
||||
func_80897258(play, this, &sp34, 75.0f, 2.0f);
|
||||
}
|
||||
}
|
||||
Math_ScaledStepToS(&this->unk_2B2, 0, 100);
|
||||
Math_ScaledStepToS(&this->unk_2B2, 0, 0x64);
|
||||
this->unk_2B4 += this->unk_2B2;
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ void func_80897F44(EnPeehat* this, PlayState* play) {
|
||||
func_80898124(this);
|
||||
}
|
||||
|
||||
Math_ScaledStepToS(&this->unk_2B2, 4000, 500);
|
||||
Math_ScaledStepToS(&this->unk_2B2, 0xFA0, 0x1F4);
|
||||
this->unk_2B4 += this->unk_2B2;
|
||||
Math_StepToF(&this->unk_2C4, 0.075f, 0.005f);
|
||||
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG);
|
||||
@@ -626,7 +626,7 @@ void func_80898454(EnPeehat* this, PlayState* play) {
|
||||
void func_808984E0(EnPeehat* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_ph_Anim_000844, -4.0f);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_PIHAT_DAMAGE);
|
||||
this->unk_2B2 = 4000;
|
||||
this->unk_2B2 = 0xFA0;
|
||||
this->unk_2B0 = 14;
|
||||
this->actor.speed = 10.0f;
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 14);
|
||||
@@ -641,7 +641,7 @@ void func_808984E0(EnPeehat* this) {
|
||||
void func_80898594(EnPeehat* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_2B4 += this->unk_2B2;
|
||||
Math_ScaledStepToS(&this->unk_2B2, 4000, 250);
|
||||
Math_ScaledStepToS(&this->unk_2B2, 0xFA0, 0xFA);
|
||||
Math_StepToF(&this->actor.world.pos.y, this->actor.floorHeight + 88.5f, 3.0f);
|
||||
Math_StepToF(&this->actor.speed, 0.0f, 0.5f);
|
||||
this->unk_2B0--;
|
||||
@@ -765,9 +765,9 @@ void EnPeehat_Update(Actor* thisx, PlayState* play2) {
|
||||
this->unk_2BC += this->unk_2C0;
|
||||
if (thisx->params == 0) {
|
||||
if (this->actionFunc == func_80897910) {
|
||||
Math_ScaledStepToS(&thisx->shape.rot.x, 6000, 300);
|
||||
Math_ScaledStepToS(&thisx->shape.rot.x, 0x1770, 0x12C);
|
||||
} else {
|
||||
Math_ScaledStepToS(&thisx->shape.rot.x, 0, 300);
|
||||
Math_ScaledStepToS(&thisx->shape.rot.x, 0, 0x12C);
|
||||
}
|
||||
} else {
|
||||
Actor_SetFocus(thisx, 0.0f);
|
||||
|
||||
@@ -680,12 +680,12 @@ void EnPoSisters_DeathStage1(EnPoSisters* this, PlayState* play) {
|
||||
this->firePos[end] = this->firePos[end - 1];
|
||||
}
|
||||
|
||||
this->firePos[0].x = (Math_SinS((this->actor.shape.rot.y + (this->deathTimer * 0x3000)) - 0x4000) *
|
||||
(3000.0f * this->actor.scale.x)) +
|
||||
this->actor.world.pos.x;
|
||||
this->firePos[0].z = (Math_CosS((this->actor.shape.rot.y + (this->deathTimer * 0x3000)) - 0x4000) *
|
||||
(3000.0f * this->actor.scale.x)) +
|
||||
this->actor.world.pos.z;
|
||||
this->firePos[0].x =
|
||||
this->actor.world.pos.x +
|
||||
(Math_SinS((this->actor.shape.rot.y + (this->deathTimer * 0x3000)) - 0x4000) * (3000.0f * this->actor.scale.x));
|
||||
this->firePos[0].z =
|
||||
this->actor.world.pos.z +
|
||||
(Math_CosS((this->actor.shape.rot.y + (this->deathTimer * 0x3000)) - 0x4000) * (3000.0f * this->actor.scale.x));
|
||||
|
||||
if (this->deathTimer < 8) {
|
||||
this->firePos[0].y = this->firePos[1].y - 9.0f;
|
||||
|
||||
@@ -366,7 +366,7 @@ void func_80A32B20(EnPr* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->actor.speed = BREG(57) + 3.0f;
|
||||
Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, BREG(49) + 1, BREG(50) + 1000, BREG(51));
|
||||
Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, 1 + BREG(49), 0x3E8 + BREG(50), BREG(51));
|
||||
this->unk_2B8 = D_80A338C0[GET_PLAYER_FORM] + player->actor.world.pos.y;
|
||||
func_80A324E0(this, play);
|
||||
|
||||
@@ -402,7 +402,7 @@ void func_80A32D28(EnPr* this, PlayState* play) {
|
||||
this->actor.speed = 1.0f;
|
||||
func_80A32854(this);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, BREG(49) + 1, BREG(50) + 1000, BREG(51));
|
||||
Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, 1 + BREG(49), 0x3E8 + BREG(50), BREG(51));
|
||||
func_80A325E4(this);
|
||||
this->unk_2B8 = D_80A338C0[GET_PLAYER_FORM] + player->actor.world.pos.y;
|
||||
func_80A324E0(this, play);
|
||||
@@ -552,9 +552,9 @@ void EnPr_Update(Actor* thisx, PlayState* play) {
|
||||
pitch = Math_Vec3f_Pitch(&this->actor.world.pos, &sp50) * 0.3f;
|
||||
|
||||
if (fabsf(this->actor.world.pos.y - this->unk_2B8) > 8.0f) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, pitch, 1, BREG(48) + 500, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, pitch, 1, 0x1F4 + BREG(48), 0);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 1, BREG(52) + 500, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 1, 0x1F4 + BREG(52), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -239,9 +239,9 @@ void func_80A7436C(EnPr2* this, s16 arg1) {
|
||||
|
||||
if (fabsf(this->actor.world.pos.y - this->unk_21C.y) > 10.0f) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_21C) * 0.3f,
|
||||
20, 5000, 500);
|
||||
20, 0x1388, 0x1F4);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 20, 5000, 500);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 20, 0x1388, 0x1F4);
|
||||
}
|
||||
|
||||
if (fabsf(this->actor.world.rot.y - arg1) < 30.0f) {
|
||||
@@ -250,7 +250,7 @@ void func_80A7436C(EnPr2* this, s16 arg1) {
|
||||
Math_ApproachF(&this->unk_1FC, sp2E, 0.5f, 3000.0f);
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, arg1, 1, 2000, 300);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, arg1, 1, 0x7D0, 300);
|
||||
}
|
||||
|
||||
void EnPr2_ChangeAnim(EnPr2* this, s32 animIndex) {
|
||||
@@ -298,9 +298,9 @@ void func_80A745FC(EnPr2* this, PlayState* play) {
|
||||
|
||||
if (fabsf(this->actor.world.pos.y - this->unk_21C.y) > 10.0f) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_21C) * 0.3f,
|
||||
20, 5000, 500);
|
||||
20, 0x1388, 0x1F4);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 20, 5000, 500);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 20, 0x1388, 0x1F4);
|
||||
}
|
||||
|
||||
x = this->actor.world.pos.x - this->unk_21C.x;
|
||||
@@ -424,7 +424,7 @@ void func_80A748E8(EnPr2* this, PlayState* play) {
|
||||
this->unk_1F0 += 0x2000;
|
||||
}
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_1F0, 0, 1, 1000, 100);
|
||||
Math_SmoothStepToS(&this->unk_1F0, 0, 1, 0x3E8, 0x64);
|
||||
this->unk_1F2 = 0;
|
||||
}
|
||||
}
|
||||
@@ -583,9 +583,9 @@ void func_80A75310(EnPr2* this, PlayState* play) {
|
||||
Vec3f sp64;
|
||||
|
||||
temp = false;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 5, 10000, 1000);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.z, this->unk_1E4, 5, 10000, 1000);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk_1E6, 5, 10000, 1000);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 5, 0x2710, 0x3E8);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.z, this->unk_1E4, 5, 0x2710, 0x3E8);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk_1E6, 5, 0x2710, 0x3E8);
|
||||
|
||||
if ((Rand_ZeroOne() < 0.3f) && !this->unk_1D6) {
|
||||
this->unk_1D6 = true;
|
||||
|
||||
@@ -50,29 +50,6 @@ void EnRailgibud_DoNothing(EnRailgibud* this, PlayState* play);
|
||||
void EnRailgibud_SinkIntoGround(EnRailgibud* this, PlayState* play);
|
||||
void EnRailgibud_Cutscene_Update(Actor* thisx, PlayState* play);
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ EN_RAILGIBUD_ANIM_GRAB_ATTACK,
|
||||
/* 1 */ EN_RAILGIBUD_ANIM_GRAB_END,
|
||||
/* 2 */ EN_RAILGIBUD_ANIM_GRAB_START,
|
||||
/* 3 */ EN_RAILGIBUD_ANIM_LOOK_BACK,
|
||||
/* 4 */ EN_RAILGIBUD_ANIM_CROUCH_WIPING_TEARS,
|
||||
/* 5 */ EN_RAILGIBUD_ANIM_CROUCH_CRYING,
|
||||
/* 6 */ EN_RAILGIBUD_ANIM_DEATH,
|
||||
/* 7 */ EN_RAILGIBUD_ANIM_DAMAGE,
|
||||
/* 8 */ EN_RAILGIBUD_ANIM_CROUCH_END,
|
||||
/* 9 */ EN_RAILGIBUD_ANIM_IDLE,
|
||||
/* 10 */ EN_RAILGIBUD_ANIM_WALK,
|
||||
/* 11 */ EN_RAILGIBUD_ANIM_DANCE_SQUAT,
|
||||
/* 12 */ EN_RAILGIBUD_ANIM_DANCE_PIROUETTE,
|
||||
/* 13 */ EN_RAILGIBUD_ANIM_DANCE_CLAP,
|
||||
/* 14 */ EN_RAILGIBUD_ANIM_CROUCH_END_2,
|
||||
/* 15 */ EN_RAILGIBUD_ANIM_SLUMP_START,
|
||||
/* 16 */ EN_RAILGIBUD_ANIM_SLUMP_LOOP,
|
||||
/* 17 */ EN_RAILGIBUD_ANIM_CONVULSION,
|
||||
/* 18 */ EN_RAILGIBUD_ANIM_ARMS_UP_START,
|
||||
/* 19 */ EN_RAILGIBUD_ANIM_ARMS_UP_LOOP
|
||||
} EnRailgibudAnimation;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ EN_RAILGIBUD_TYPE_GIBDO,
|
||||
/* 1 */ EN_RAILGIBUD_TYPE_REDEAD
|
||||
@@ -96,27 +73,51 @@ ActorInit En_Railgibud_InitVars = {
|
||||
/**/ EnRailgibud_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &gGibdoRedeadGrabAttackAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadGrabEndAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_ONCE_INTERP, 0.0f },
|
||||
{ &gGibdoRedeadGrabStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadLookBackAnim, 0.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadWipingTearsAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadSobbingAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadDeathAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadDamageAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadStandUpAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadWalkAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -8.0f },
|
||||
{ &gGibdoRedeadSquattingDanceAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadPirouetteAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadClappingDanceAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadStandUpAnim, 3.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -6.0f },
|
||||
{ &gGibdoRedeadSlumpStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadSlumpLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadConvulsionAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gGibdoRedeadArmsUpStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f },
|
||||
{ &gGibdoRedeadArmsUpLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
typedef enum EnRailgibudAnimation {
|
||||
/* 0 */ EN_RAILGIBUD_ANIM_GRAB_ATTACK,
|
||||
/* 1 */ EN_RAILGIBUD_ANIM_GRAB_END,
|
||||
/* 2 */ EN_RAILGIBUD_ANIM_GRAB_START,
|
||||
/* 3 */ EN_RAILGIBUD_ANIM_LOOK_BACK,
|
||||
/* 4 */ EN_RAILGIBUD_ANIM_CROUCH_WIPING_TEARS,
|
||||
/* 5 */ EN_RAILGIBUD_ANIM_CROUCH_CRYING,
|
||||
/* 6 */ EN_RAILGIBUD_ANIM_DEATH,
|
||||
/* 7 */ EN_RAILGIBUD_ANIM_DAMAGE,
|
||||
/* 8 */ EN_RAILGIBUD_ANIM_CROUCH_END,
|
||||
/* 9 */ EN_RAILGIBUD_ANIM_IDLE,
|
||||
/* 10 */ EN_RAILGIBUD_ANIM_WALK,
|
||||
/* 11 */ EN_RAILGIBUD_ANIM_DANCE_SQUAT,
|
||||
/* 12 */ EN_RAILGIBUD_ANIM_DANCE_PIROUETTE,
|
||||
/* 13 */ EN_RAILGIBUD_ANIM_DANCE_CLAP,
|
||||
/* 14 */ EN_RAILGIBUD_ANIM_CROUCH_END_2,
|
||||
/* 15 */ EN_RAILGIBUD_ANIM_SLUMP_START,
|
||||
/* 16 */ EN_RAILGIBUD_ANIM_SLUMP_LOOP,
|
||||
/* 17 */ EN_RAILGIBUD_ANIM_CONVULSION,
|
||||
/* 18 */ EN_RAILGIBUD_ANIM_ARMS_UP_START,
|
||||
/* 19 */ EN_RAILGIBUD_ANIM_ARMS_UP_LOOP,
|
||||
/* 20 */ EN_RAILGIBUD_ANIM_MAX
|
||||
} EnRailgibudAnimation;
|
||||
|
||||
static AnimationInfo sAnimationInfo[EN_RAILGIBUD_ANIM_MAX] = {
|
||||
{ &gGibdoRedeadGrabAttackAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_GRAB_ATTACK
|
||||
{ &gGibdoRedeadGrabEndAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_ONCE_INTERP, 0.0f }, // EN_RAILGIBUD_ANIM_GRAB_END
|
||||
{ &gGibdoRedeadGrabStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_GRAB_START
|
||||
{ &gGibdoRedeadLookBackAnim, 0.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_LOOK_BACK
|
||||
{ &gGibdoRedeadWipingTearsAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_CROUCH_WIPING_TEARS
|
||||
{ &gGibdoRedeadSobbingAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_CROUCH_CRYING
|
||||
{ &gGibdoRedeadDeathAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_DEATH
|
||||
{ &gGibdoRedeadDamageAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_DAMAGE
|
||||
{ &gGibdoRedeadStandUpAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_CROUCH_END
|
||||
{ &gGibdoRedeadIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_IDLE
|
||||
{ &gGibdoRedeadWalkAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -8.0f }, // EN_RAILGIBUD_ANIM_WALK
|
||||
{ &gGibdoRedeadSquattingDanceAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_DANCE_SQUAT
|
||||
{ &gGibdoRedeadPirouetteAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_DANCE_PIROUETTE
|
||||
{ &gGibdoRedeadClappingDanceAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_DANCE_CLAP
|
||||
{ &gGibdoRedeadStandUpAnim, 3.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -6.0f }, // EN_RAILGIBUD_ANIM_CROUCH_END_2
|
||||
{ &gGibdoRedeadSlumpStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_SLUMP_START
|
||||
{ &gGibdoRedeadSlumpLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_SLUMP_LOOP
|
||||
{ &gGibdoRedeadConvulsionAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_CONVULSION
|
||||
{ &gGibdoRedeadArmsUpStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, // EN_RAILGIBUD_ANIM_ARMS_UP_START
|
||||
{ &gGibdoRedeadArmsUpLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, // EN_RAILGIBUD_ANIM_ARMS_UP_LOOP
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
@@ -139,7 +140,7 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 20, 70, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
typedef enum EnRailgibudDamageEffect {
|
||||
/* 0x0 */ EN_RAILGIBUD_DMGEFF_NONE, // Does not interact with the Gibdo/Redead at all
|
||||
/* 0x1 */ EN_RAILGIBUD_DMGEFF_STUN, // Stuns without applying any effect
|
||||
/* 0x2 */ EN_RAILGIBUD_DMGEFF_FIRE_ARROW, // Damages, applies a fire effect, and changes a Gibdo into a Redead
|
||||
@@ -193,29 +194,29 @@ static CollisionCheckInfoInit2 sColChkInfoInit = { 8, 0, 0, 0, MASS_IMMOVABLE };
|
||||
* point along the path up to a maximum of nine additional Gibdos (not counting itself).
|
||||
*/
|
||||
void EnRailgibud_SpawnOtherGibdosAndSetPositionAndRotation(EnRailgibud* this, PlayState* play) {
|
||||
static s32 currentGibdoIndex = 0;
|
||||
static s32 sCurrentGibdoIndex = 0;
|
||||
s32 nextPoint;
|
||||
Vec3f targetPos;
|
||||
Path* path = &play->setupPathList[ENRAILGIBUD_GET_PATH_INDEX(&this->actor)];
|
||||
|
||||
this->pathPoints = Lib_SegmentedToVirtual(path->points);
|
||||
this->currentPoint = currentGibdoIndex;
|
||||
this->currentPoint = sCurrentGibdoIndex;
|
||||
this->pathCount = path->count;
|
||||
|
||||
// This branch will only be taken for the first, "main" Gibdo. The subsequent
|
||||
// Gibdos created by Actor_SpawnAsChild will go through this function to set
|
||||
// their position and rotation, but they will not be able to spawn any more
|
||||
// Gibdos themselves because currentGibdoIndex will be non-zero.
|
||||
if (currentGibdoIndex == 0) {
|
||||
// Gibdos themselves because sCurrentGibdoIndex will be non-zero.
|
||||
if (sCurrentGibdoIndex == 0) {
|
||||
s32 i;
|
||||
|
||||
for (i = 1; i < this->pathCount && i < 10; i++) {
|
||||
currentGibdoIndex++;
|
||||
for (i = 1; (i < this->pathCount) && (i < 10); i++) {
|
||||
sCurrentGibdoIndex++;
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_RAILGIBUD, 0.0f, 0.0f, 0.0f, 0, 0, 0,
|
||||
this->actor.params);
|
||||
}
|
||||
|
||||
currentGibdoIndex = 0;
|
||||
sCurrentGibdoIndex = 0;
|
||||
}
|
||||
|
||||
this->actor.world.pos.x = this->pathPoints[this->currentPoint].x;
|
||||
@@ -305,8 +306,8 @@ void EnRailgibud_WalkInCircles(EnRailgibud* this, PlayState* play) {
|
||||
EnRailgibud_SetupAttemptPlayerFreeze(this);
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->headRotation.y, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyRotation.y, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 1, 0x64, 0);
|
||||
|
||||
// If we're not supposed to walk forward, then stop here;
|
||||
// don't rotate the Gibdo or move it around.
|
||||
@@ -342,7 +343,7 @@ void EnRailgibud_SetupAttemptPlayerFreeze(EnRailgibud* this) {
|
||||
|
||||
void EnRailgibud_AttemptPlayerFreeze(EnRailgibud* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 rot = this->actor.shape.rot.y + this->headRotation.y + this->upperBodyRotation.y;
|
||||
s16 rot = this->actor.shape.rot.y + this->headRot.y + this->torsoRot.y;
|
||||
s16 yaw = BINANG_SUB(this->actor.yawTowardsPlayer, rot);
|
||||
|
||||
if (ABS_ALT(yaw) < 0x2008) {
|
||||
@@ -375,8 +376,8 @@ void EnRailgibud_WalkToPlayer(EnRailgibud* this, PlayState* play) {
|
||||
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xFA);
|
||||
this->actor.world.rot = this->actor.shape.rot;
|
||||
Math_SmoothStepToS(&this->headRotation.y, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyRotation.y, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 1, 0x64, 0);
|
||||
|
||||
if (EnRailgibud_PlayerInRangeWithCorrectState(this, play) && Actor_IsFacingPlayer(&this->actor, 0x38E3)) {
|
||||
if ((this->grabWaitTimer == 0) && (this->actor.xzDistToPlayer <= 45.0f)) {
|
||||
@@ -500,8 +501,8 @@ void EnRailgibud_GrabFail(EnRailgibud* this, PlayState* play) {
|
||||
}
|
||||
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
Math_SmoothStepToS(&this->headRotation.y, 0, 1, 0x12C, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyRotation.y, 0, 1, 0x12C, 0);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 1, 0x12C, 0);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 1, 0x12C, 0);
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
EnRailgibud_SetupTurnAwayAndShakeHead(this);
|
||||
@@ -515,14 +516,13 @@ void EnRailgibud_SetupTurnAwayAndShakeHead(EnRailgibud* this) {
|
||||
}
|
||||
|
||||
void EnRailgibud_TurnAwayAndShakeHead(EnRailgibud* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 5, 3500, 200);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 5, 0xDAC, 0xC8);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
if (this->headShakeTimer > 60) {
|
||||
EnRailgibud_SetupWalkToHome(this);
|
||||
this->playerStunWaitTimer = 0;
|
||||
} else {
|
||||
this->headRotation.y =
|
||||
Math_SinS(this->headShakeTimer * 4000) * (0x256F * ((60 - this->headShakeTimer) / 60.0f));
|
||||
this->headRot.y = Math_SinS(this->headShakeTimer * 4000) * (0x256F * ((60 - this->headShakeTimer) / 60.0f));
|
||||
this->headShakeTimer++;
|
||||
}
|
||||
}
|
||||
@@ -534,8 +534,8 @@ void EnRailgibud_SetupWalkToHome(EnRailgibud* this) {
|
||||
}
|
||||
|
||||
void EnRailgibud_WalkToHome(EnRailgibud* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->headRotation.y, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyRotation.y, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 1, 0x64, 0);
|
||||
if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) < 5.0f) {
|
||||
if (this->actor.speed > 0.2f) {
|
||||
this->actor.speed -= 0.2f;
|
||||
@@ -543,7 +543,7 @@ void EnRailgibud_WalkToHome(EnRailgibud* this, PlayState* play) {
|
||||
this->actor.speed = 0.0f;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 200, 10);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 0xC8, 0xA);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (this->actor.world.rot.y == this->actor.home.rot.y) {
|
||||
EnRailgibud_SetupWalkInCircles(this);
|
||||
@@ -647,8 +647,8 @@ void EnRailgibud_Dead(EnRailgibud* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRotation.y, 0, 1, 250, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyRotation.y, 0, 1, 250, 0);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 1, 0xFA, 0);
|
||||
Math_SmoothStepToS(&this->torsoRot.y, 0, 1, 0xFA, 0);
|
||||
this->deathTimer++;
|
||||
}
|
||||
|
||||
@@ -725,22 +725,22 @@ void EnRailgibud_UpdateWalkForwardState(EnRailgibud* this) {
|
||||
}
|
||||
|
||||
void EnRailgibud_TurnTowardsPlayer(EnRailgibud* this, PlayState* play) {
|
||||
s16 headAngle = (this->actor.yawTowardsPlayer - this->actor.shape.rot.y) - this->upperBodyRotation.y;
|
||||
s16 headAngle = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->torsoRot.y;
|
||||
s16 upperBodyAngle = CLAMP(headAngle, -500, 500);
|
||||
|
||||
headAngle -= this->headRotation.y;
|
||||
headAngle -= this->headRot.y;
|
||||
headAngle = CLAMP(headAngle, -500, 500);
|
||||
|
||||
if (BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.shape.rot.y) >= 0) {
|
||||
this->upperBodyRotation.y += ABS_ALT(upperBodyAngle);
|
||||
this->headRotation.y += ABS_ALT(headAngle);
|
||||
this->torsoRot.y += ABS_ALT(upperBodyAngle);
|
||||
this->headRot.y += ABS_ALT(headAngle);
|
||||
} else {
|
||||
this->upperBodyRotation.y -= ABS_ALT(upperBodyAngle);
|
||||
this->headRotation.y -= ABS_ALT(headAngle);
|
||||
this->torsoRot.y -= ABS_ALT(upperBodyAngle);
|
||||
this->headRot.y -= ABS_ALT(headAngle);
|
||||
}
|
||||
|
||||
this->upperBodyRotation.y = CLAMP(this->upperBodyRotation.y, -0x495F, 0x495F);
|
||||
this->headRotation.y = CLAMP(this->headRotation.y, -0x256F, 0x256F);
|
||||
this->torsoRot.y = CLAMP(this->torsoRot.y, -0x495F, 0x495F);
|
||||
this->headRot.y = CLAMP(this->headRot.y, -0x256F, 0x256F);
|
||||
}
|
||||
|
||||
s32 EnRailgibud_PlayerInRangeWithCorrectState(EnRailgibud* this, PlayState* play) {
|
||||
@@ -1048,9 +1048,9 @@ s32 EnRailgibud_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
EnRailgibud* this = THIS;
|
||||
|
||||
if (limbIndex == GIBDO_LIMB_UPPER_BODY_ROOT) {
|
||||
rot->y += this->upperBodyRotation.y;
|
||||
rot->y += this->torsoRot.y;
|
||||
} else if (limbIndex == GIBDO_LIMB_HEAD_ROOT) {
|
||||
rot->y += this->headRotation.y;
|
||||
rot->y += this->headRot.y;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -46,8 +46,8 @@ typedef struct EnRailgibud {
|
||||
/* 0x2A4 */ f32 drawDmgEffScale;
|
||||
/* 0x2A8 */ Vec3s jointTable[GIBDO_LIMB_MAX];
|
||||
/* 0x344 */ Vec3s morphTable[GIBDO_LIMB_MAX];
|
||||
/* 0x3E0 */ Vec3s headRotation;
|
||||
/* 0x3E6 */ Vec3s upperBodyRotation;
|
||||
/* 0x3E0 */ Vec3s headRot;
|
||||
/* 0x3E6 */ Vec3s torsoRot;
|
||||
/* 0x3EC */ s16 shouldWalkForward; // Only used by the "main" Gibdo
|
||||
/* 0x3EE */ s16 shouldWalkForwardNextFrame; // Only used by the "main" Gibdo
|
||||
/* 0x3F0 */ union {
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "z_en_rd.h"
|
||||
#include "z64rumble.h"
|
||||
#include "objects/object_rd/object_rd.h"
|
||||
#include "overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_400)
|
||||
|
||||
@@ -191,7 +192,7 @@ void EnRd_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.targetMode = TARGET_MODE_0;
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||
this->upperBodyYRotation = this->headYRotation = 0;
|
||||
this->torsoRotY = this->headRotY = 0;
|
||||
this->actor.focus.pos = this->actor.world.pos;
|
||||
this->actor.focus.pos.y += 50.0f;
|
||||
this->actor.colChkInfo.mass = MASS_HEAVY;
|
||||
@@ -274,7 +275,8 @@ void EnRd_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_OBJ_ICE_POLY, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x,
|
||||
this->actor.world.rot.y, this->actor.world.rot.z, 0xFF4B);
|
||||
this->actor.world.rot.y, this->actor.world.rot.z,
|
||||
OBJICEPOLY_PARAMS(75, OBJICEPOLY_SWITCH_FLAG_NONE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,8 +365,8 @@ void EnRd_SetupIdle(EnRd* this) {
|
||||
|
||||
void EnRd_Idle(EnRd* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x64, 0);
|
||||
|
||||
if ((EN_RD_GET_TYPE(&this->actor) == EN_RD_TYPE_CRYING) && Animation_OnFrame(&this->skelAnime, 0.0f)) {
|
||||
if (Rand_ZeroOne() >= 0.5f) {
|
||||
@@ -426,8 +428,8 @@ void EnRd_SetupSquattingDance(EnRd* this) {
|
||||
|
||||
void EnRd_SquattingDance(EnRd* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x64, 0);
|
||||
|
||||
if (this->isMourning) {
|
||||
EnRd_SetupAttemptPlayerFreeze(this);
|
||||
@@ -470,8 +472,8 @@ void EnRd_SetupClappingDance(EnRd* this) {
|
||||
|
||||
void EnRd_ClappingDance(EnRd* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x64, 0);
|
||||
|
||||
if (this->isMourning) {
|
||||
EnRd_SetupAttemptPlayerFreeze(this);
|
||||
@@ -531,8 +533,8 @@ void EnRd_SetupPirouette(EnRd* this) {
|
||||
|
||||
void EnRd_Pirouette(EnRd* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x64, 0);
|
||||
|
||||
if (this->isMourning) {
|
||||
EnRd_SetupAttemptPlayerFreeze(this);
|
||||
@@ -628,9 +630,9 @@ void EnRd_RiseFromCoffin(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnRd_SetupWalkToPlayer(EnRd* this, PlayState* play) {
|
||||
f32 frameCount = Animation_GetLastFrame(&gGibdoRedeadWalkAnim);
|
||||
f32 endFrame = Animation_GetLastFrame(&gGibdoRedeadWalkAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 1.0f, 4.0f, frameCount, ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 1.0f, 4.0f, endFrame, ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
this->actor.speed = 0.4f;
|
||||
this->action = EN_RD_ACTION_WALKING_TO_PLAYER_OR_RELEASING_GRAB;
|
||||
this->actionFunc = EnRd_WalkToPlayer;
|
||||
@@ -639,13 +641,12 @@ void EnRd_SetupWalkToPlayer(EnRd* this, PlayState* play) {
|
||||
void EnRd_WalkToPlayer(EnRd* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
s16 yaw =
|
||||
((this->actor.yawTowardsPlayer - this->actor.shape.rot.y) - this->headYRotation) - this->upperBodyYRotation;
|
||||
s16 yaw = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->headRotY - this->torsoRotY;
|
||||
|
||||
this->skelAnime.playSpeed = this->actor.speed;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 250, 0);
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xFA, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x64, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
@@ -716,13 +717,13 @@ void EnRd_SetupWalkToHome(EnRd* this, PlayState* play) {
|
||||
void EnRd_WalkToHome(EnRd* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
s16 sp36 = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
s16 yaw = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
|
||||
if (Actor_WorldDistXYZToPoint(&this->actor, &this->actor.home.pos) >= 5.0f) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, sp36, 1, 450, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, yaw, 1, 0x1C2, 0);
|
||||
} else {
|
||||
this->actor.speed = 0.0f;
|
||||
if (!Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 450, 0)) {
|
||||
if (!Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 0x1C2, 0)) {
|
||||
if (EN_RD_GET_TYPE(&this->actor) != EN_RD_TYPE_CRYING) {
|
||||
EnRd_SetupIdle(this);
|
||||
} else {
|
||||
@@ -731,8 +732,8 @@ void EnRd_WalkToHome(EnRd* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x64, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
@@ -759,9 +760,9 @@ void EnRd_WalkToHome(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnRd_SetupWalkToParent(EnRd* this) {
|
||||
f32 frameCount = Animation_GetLastFrame(&gGibdoRedeadWalkAnim);
|
||||
f32 endFrame = Animation_GetLastFrame(&gGibdoRedeadWalkAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 0.5f, 0.0f, frameCount, ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 0.5f, 0.0f, endFrame, ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
this->action = EN_RD_ACTION_WALKING_TO_PARENT;
|
||||
this->isMourning = true;
|
||||
this->actionFunc = EnRd_WalkToParent;
|
||||
@@ -782,7 +783,7 @@ void EnRd_WalkToParent(EnRd* this, PlayState* play) {
|
||||
parentPos = this->actor.parent->world.pos;
|
||||
yaw = Actor_WorldYawTowardPoint(&this->actor, &parentPos);
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, yaw, 1, 250, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, yaw, 1, 0xFA, 0);
|
||||
if (Actor_WorldDistXYZToPoint(&this->actor, &parentPos) >= 45.0f) {
|
||||
this->actor.speed = 0.4f;
|
||||
} else {
|
||||
@@ -793,8 +794,8 @@ void EnRd_WalkToParent(EnRd* this, PlayState* play) {
|
||||
EnRd_SetupCrouch(this);
|
||||
}
|
||||
}
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x64, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x64, 0);
|
||||
} else {
|
||||
EnRd_SetupWalkToPlayer(this, play);
|
||||
}
|
||||
@@ -836,8 +837,8 @@ void EnRd_Grab(EnRd* this, PlayState* play) {
|
||||
this->grabDamageTimer = 20;
|
||||
|
||||
case EN_RD_GRAB_START:
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 1500, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 1500, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x5DC, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x5DC, 0);
|
||||
|
||||
case EN_RD_GRAB_ATTACK:
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_80) || (player->unk_B62 != 0)) {
|
||||
@@ -853,14 +854,15 @@ void EnRd_Grab(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
switch (player->transformation) {
|
||||
case PLAYER_FORM_HUMAN:
|
||||
Math_SmoothStepToF(&this->actor.shape.yOffset, -1500.0f, 1.0f, 150.0f, 0.0f);
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_FIERCE_DEITY:
|
||||
case PLAYER_FORM_GORON:
|
||||
case PLAYER_FORM_ZORA:
|
||||
case PLAYER_FORM_DEKU:
|
||||
break;
|
||||
|
||||
case PLAYER_FORM_HUMAN:
|
||||
Math_SmoothStepToF(&this->actor.shape.yOffset, -1500.0f, 1.0f, 150.0f, 0.0f);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -871,7 +873,7 @@ void EnRd_Grab(EnRd* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->actor.world.pos.z,
|
||||
(Math_CosS(player->actor.shape.rot.y) * -25.0f) + player->actor.world.pos.z, 1.0f, 10.0f,
|
||||
0.0f);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, player->actor.shape.rot.y, 1, 6000, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, player->actor.shape.rot.y, 1, 0x1770, 0);
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_REDEAD_ATTACK);
|
||||
@@ -902,6 +904,9 @@ void EnRd_Grab(EnRd* this, PlayState* play) {
|
||||
this->grabWaitTimer = 15;
|
||||
EnRd_SetupWalkToPlayer(this, play);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -914,8 +919,7 @@ void EnRd_SetupAttemptPlayerFreeze(EnRd* this) {
|
||||
|
||||
void EnRd_AttemptPlayerFreeze(EnRd* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 yaw =
|
||||
((this->actor.yawTowardsPlayer - this->actor.shape.rot.y) - this->headYRotation) - this->upperBodyYRotation;
|
||||
s16 yaw = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->headRotY - this->torsoRotY;
|
||||
|
||||
if (ABS_ALT(yaw) < 0x2008) {
|
||||
if (!(this->flags & EN_RD_FLAG_CANNOT_FREEZE_PLAYER)) {
|
||||
@@ -943,8 +947,8 @@ void EnRd_GrabFail(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 300, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 300, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x12C, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x12C, 0);
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
EnRd_SetupTurnAwayAndShakeHead(this);
|
||||
@@ -952,22 +956,22 @@ void EnRd_GrabFail(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnRd_SetupTurnAwayAndShakeHead(EnRd* this) {
|
||||
f32 frameCount = Animation_GetLastFrame(&gGibdoRedeadWalkAnim);
|
||||
f32 endFrame = Animation_GetLastFrame(&gGibdoRedeadWalkAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 0.5f, 0.0f, frameCount, ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 0.5f, 0.0f, endFrame, ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
this->action = EN_RD_ACTION_TURNING_AWAY_AND_SHAKING_HEAD;
|
||||
this->headShakeTimer = 0;
|
||||
this->actionFunc = EnRd_TurnAwayAndShakeHead;
|
||||
}
|
||||
|
||||
void EnRd_TurnAwayAndShakeHead(EnRd* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 5, 3500, 200);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 5, 0xDAC, 0xC8);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
if (this->headShakeTimer > 60) {
|
||||
EnRd_SetupWalkToHome(this, play);
|
||||
this->headShakeTimer = 0;
|
||||
} else {
|
||||
this->headYRotation = Math_SinS(this->headShakeTimer * 4000) * (0x256F * ((60 - this->headShakeTimer) / 60.0f));
|
||||
this->headRotY = Math_SinS(this->headShakeTimer * 4000) * (0x256F * ((60 - this->headShakeTimer) / 60.0f));
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->headShakeTimer++;
|
||||
}
|
||||
@@ -1023,8 +1027,8 @@ void EnRd_Damage(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 300, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 300, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x12C, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x12C, 0);
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
@@ -1054,8 +1058,8 @@ void EnRd_Dead(EnRd* this, PlayState* play) {
|
||||
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP);
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->headYRotation, 0, 1, 2000, 0);
|
||||
Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 2000, 0);
|
||||
Math_SmoothStepToS(&this->headRotY, 0, 1, 0x7D0, 0);
|
||||
Math_SmoothStepToS(&this->torsoRotY, 0, 1, 0x7D0, 0);
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->deathTimer == 0) {
|
||||
@@ -1131,22 +1135,22 @@ void EnRd_Stunned(EnRd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnRd_TurnTowardsPlayer(EnRd* this, PlayState* play) {
|
||||
s16 headAngle = (this->actor.yawTowardsPlayer - this->actor.shape.rot.y) - this->upperBodyYRotation;
|
||||
s16 upperBodyAngle = CLAMP(headAngle, -500, 500);
|
||||
s16 headAngle = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->torsoRotY;
|
||||
s16 upperBodyAngle = CLAMP(headAngle, -0x1F4, 0x1F4);
|
||||
|
||||
headAngle -= this->headYRotation;
|
||||
headAngle = CLAMP(headAngle, -500, 500);
|
||||
headAngle -= this->headRotY;
|
||||
headAngle = CLAMP(headAngle, -0x1F4, 0x1F4);
|
||||
|
||||
if (BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.shape.rot.y) >= 0) {
|
||||
this->upperBodyYRotation += ABS_ALT(upperBodyAngle);
|
||||
this->headYRotation += ABS_ALT(headAngle);
|
||||
this->torsoRotY += ABS_ALT(upperBodyAngle);
|
||||
this->headRotY += ABS_ALT(headAngle);
|
||||
} else {
|
||||
this->upperBodyYRotation -= ABS_ALT(upperBodyAngle);
|
||||
this->headYRotation -= ABS_ALT(headAngle);
|
||||
this->torsoRotY -= ABS_ALT(upperBodyAngle);
|
||||
this->headRotY -= ABS_ALT(headAngle);
|
||||
}
|
||||
|
||||
this->upperBodyYRotation = CLAMP(this->upperBodyYRotation, -0x495F, 0x495F);
|
||||
this->headYRotation = CLAMP(this->headYRotation, -0x256F, 0x256F);
|
||||
this->torsoRotY = CLAMP(this->torsoRotY, -0x495F, 0x495F);
|
||||
this->headRotY = CLAMP(this->headRotY, -0x256F, 0x256F);
|
||||
}
|
||||
|
||||
void EnRd_UpdateDamage(EnRd* this, PlayState* play) {
|
||||
@@ -1304,9 +1308,9 @@ s32 EnRd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
||||
EnRd* this = THIS;
|
||||
|
||||
if (limbIndex == REDEAD_LIMB_HEAD_ROOT) {
|
||||
rot->y += this->headYRotation;
|
||||
rot->y += this->headRotY;
|
||||
} else if (limbIndex == REDEAD_LIMB_UPPER_BODY_ROOT) {
|
||||
rot->y += this->upperBodyYRotation;
|
||||
rot->y += this->torsoRotY;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ typedef struct EnRd {
|
||||
s16 deathTimer;
|
||||
s16 coffinRiseForwardAccelTimer;
|
||||
};
|
||||
/* 0x3D8 */ s16 headYRotation;
|
||||
/* 0x3DA */ s16 upperBodyYRotation;
|
||||
/* 0x3D8 */ s16 headRotY;
|
||||
/* 0x3DA */ s16 torsoRotY;
|
||||
/* 0x3DC */ s16 flags;
|
||||
/* 0x3DE */ s16 alpha;
|
||||
/* 0x3E0 */ s16 sunsSongStunTimer;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_recepgirl.h"
|
||||
#include "objects/object_bg/object_bg.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
|
||||
|
||||
@@ -33,8 +32,12 @@ ActorInit En_Recepgirl_InitVars = {
|
||||
/**/ EnRecepgirl_Draw,
|
||||
};
|
||||
|
||||
static TexturePtr sEyeTextures[] = { object_bg_Tex_00F8F0, object_bg_Tex_00FCF0, object_bg_Tex_0100F0,
|
||||
object_bg_Tex_00FCF0 };
|
||||
static TexturePtr sEyeTextures[] = {
|
||||
object_bg_Tex_00F8F0,
|
||||
object_bg_Tex_00FCF0,
|
||||
object_bg_Tex_0100F0,
|
||||
object_bg_Tex_00FCF0,
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, TARGET_MODE_6, ICHAIN_CONTINUE),
|
||||
@@ -50,7 +53,7 @@ void EnRecepgirl_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, -60.0f, NULL, 0.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_bg_Skel_011B60, &object_bg_Anim_009890, this->jointTable,
|
||||
this->morphTable, 24);
|
||||
this->morphTable, OBJECT_BG_2_LIMB_MAX);
|
||||
|
||||
if (!sTexturesDesegmented) {
|
||||
for (i = 0; i < ARRAY_COUNT(sEyeTextures); i++) {
|
||||
@@ -92,7 +95,7 @@ void EnRecepgirl_SetupWait(EnRecepgirl* this) {
|
||||
}
|
||||
|
||||
void EnRecepgirl_Wait(EnRecepgirl* this, PlayState* play) {
|
||||
if (SkelAnime_Update(&this->skelAnime) != 0) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->skelAnime.animation == &object_bg_Anim_00A280) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 5.0f);
|
||||
} else {
|
||||
@@ -175,17 +178,17 @@ void EnRecepgirl_Talk(EnRecepgirl* this, PlayState* play) {
|
||||
void EnRecepgirl_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnRecepgirl* this = THIS;
|
||||
Vec3s sp30;
|
||||
Vec3s torsoRot;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &sp30, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &torsoRot, this->actor.focus.pos);
|
||||
EnRecepgirl_UpdateEyes(this);
|
||||
}
|
||||
|
||||
s32 EnRecepgirl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnRecepgirl* this = THIS;
|
||||
|
||||
if (limbIndex == 5) {
|
||||
if (limbIndex == OBJECT_BG_2_LIMB_05) {
|
||||
rot->x += this->headRot.y;
|
||||
}
|
||||
return false;
|
||||
@@ -194,7 +197,7 @@ s32 EnRecepgirl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
void EnRecepgirl_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
EnRecepgirl* this = THIS;
|
||||
|
||||
if (limbIndex == 5) {
|
||||
if (limbIndex == OBJECT_BG_2_LIMB_05) {
|
||||
Matrix_RotateYS(0x400 - this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_MultVecX(500.0f, &this->actor.focus.pos);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_RECEPGIRL_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_bg/object_bg.h"
|
||||
|
||||
struct EnRecepgirl;
|
||||
|
||||
@@ -12,8 +13,8 @@ typedef void (*EnRecepgirlActionFunc)(struct EnRecepgirl*, PlayState*);
|
||||
typedef struct EnRecepgirl {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[24];
|
||||
/* 0x218 */ Vec3s morphTable[24];
|
||||
/* 0x188 */ Vec3s jointTable[OBJECT_BG_2_LIMB_MAX];
|
||||
/* 0x218 */ Vec3s morphTable[OBJECT_BG_2_LIMB_MAX];
|
||||
/* 0x2A8 */ EnRecepgirlActionFunc actionFunc;
|
||||
/* 0x2AC */ u8 eyeTexIndex;
|
||||
/* 0x2AE */ Vec3s headRot;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "z_en_rg.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_80000000)
|
||||
|
||||
@@ -17,7 +16,6 @@ void EnRg_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnRg_Update(Actor* thisx, PlayState* play);
|
||||
void EnRg_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80BF4EBC(EnRg* this, PlayState* play);
|
||||
void func_80BF4FC4(EnRg* this, PlayState* play);
|
||||
|
||||
s32 D_80BF5C10;
|
||||
@@ -118,9 +116,16 @@ s32 D_80BF57E4[][4] = {
|
||||
{ 56, 34, 44, 41 }, { 60, 38, 50, 45 }, { 67, 42, 55, 49 }, { 74, 47, 61, 54 },
|
||||
};
|
||||
|
||||
AnimationInfoS D_80BF5914[] = {
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
typedef enum EnRgAnimation {
|
||||
/* -1 */ RG_ANIM_NONE = -1,
|
||||
/* 0 */ RG_ANIM_0,
|
||||
/* 1 */ RG_ANIM_1,
|
||||
/* 2 */ RG_ANIM_MAX
|
||||
} EnRgAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[RG_ANIM_MAX] = {
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 }, // RG_ANIM_0
|
||||
{ &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, 0 }, // RG_ANIM_1
|
||||
};
|
||||
|
||||
static TexturePtr sDustTextures[] = {
|
||||
@@ -139,62 +144,45 @@ Color_RGBA8 D_80BF5960[] = {
|
||||
{ 0, 0, 0, 0 },
|
||||
};
|
||||
|
||||
Vec3f D_80BF596C[] = {
|
||||
{ -2473.0f, 39.0f, 7318.0f }, { -2223.0f, 142.0f, 7184.0f }, { -2281.0f, 41.0f, 7718.0f },
|
||||
{ -2136.0f, 96.0f, 7840.0f }, { -2432.0f, 6.0f, 7857.0f }, { -2412.0f, 139.0f, 6872.0f },
|
||||
{ -2719.0f, 39.0f, 7110.0f }, { -2289.0f, 67.0f, 7463.0f }, { -2820.0f, 85.0f, 6605.0f },
|
||||
{ -2088.0f, 160.0f, 7584.0f }, { -2503.0f, 1.0f, 7643.0f },
|
||||
};
|
||||
|
||||
EffectTireMarkInit D_80BF59F0 = {
|
||||
0,
|
||||
62,
|
||||
{ 0, 0, 15, 100 },
|
||||
};
|
||||
|
||||
TexturePtr D_80BF59F8[] = {
|
||||
gGoronEyeOpenTex, gGoronEyeHalfTex, gGoronEyeClosedTex, gGoronEyeHalfTex, gGoronEyeClosed2Tex,
|
||||
};
|
||||
|
||||
void func_80BF3920(EnRgStruct* ptr, PlayState* play) {
|
||||
void func_80BF3920(EnRgStruct* ptr, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
f32 temp_f20;
|
||||
u8 phi_fp = false;
|
||||
s32 i;
|
||||
s32 idx;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < 32; i++, ptr++) {
|
||||
if ((ptr->unk_00 >= 4) && (ptr->unk_00 < 7)) {
|
||||
if (!phi_fp) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustMaterialDL);
|
||||
phi_fp = true;
|
||||
}
|
||||
|
||||
Matrix_Push();
|
||||
|
||||
if (play) {}
|
||||
temp_f20 = (f32)ptr->unk_02 / ptr->unk_01;
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, D_80BF5954[ptr->unk_00 - 4].r, D_80BF5954[ptr->unk_00 - 4].g,
|
||||
D_80BF5954[ptr->unk_00 - 4].b, (u8)(temp_f20 * 255.0f));
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, D_80BF5960[ptr->unk_00 - 4].r, D_80BF5960[ptr->unk_00 - 4].g,
|
||||
D_80BF5960[ptr->unk_00 - 4].b, 0);
|
||||
|
||||
Matrix_Translate(ptr->unk_10.x, ptr->unk_10.y, ptr->unk_10.z, MTXMODE_NEW);
|
||||
Matrix_Scale(ptr->unk_34, ptr->unk_34, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
idx = temp_f20 * 7.0f;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(sDustTextures[idx]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustModelDL);
|
||||
|
||||
Matrix_Pop();
|
||||
if ((ptr->unk_00 < 4) || (ptr->unk_00 >= 7)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!phi_fp) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustMaterialDL);
|
||||
phi_fp = true;
|
||||
}
|
||||
|
||||
Matrix_Push();
|
||||
|
||||
temp_f20 = (f32)ptr->unk_02 / ptr->unk_01;
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, D_80BF5954[ptr->unk_00 - 4].r, D_80BF5954[ptr->unk_00 - 4].g,
|
||||
D_80BF5954[ptr->unk_00 - 4].b, (u8)(temp_f20 * 255.0f));
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, D_80BF5960[ptr->unk_00 - 4].r, D_80BF5960[ptr->unk_00 - 4].g,
|
||||
D_80BF5960[ptr->unk_00 - 4].b, 0);
|
||||
|
||||
Matrix_Translate(ptr->unk_10.x, ptr->unk_10.y, ptr->unk_10.z, MTXMODE_NEW);
|
||||
Matrix_Scale(ptr->unk_34, ptr->unk_34, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(sDustTextures[(s32)(temp_f20 * 7.0f)]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustModelDL);
|
||||
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -277,13 +265,13 @@ s32 func_80BF3F14(EnRg* this, PlayState* play) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_80BF3FF8(EnRg* this) {
|
||||
this->skelAnime.playSpeed = this->unk_314;
|
||||
void EnRg_UpdateSkelAnime(EnRg* this) {
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
s32 func_80BF4024(EnRg* this, PlayState* play) {
|
||||
if ((play->csCtx.state == CS_STATE_IDLE) && (this->unk_334 == 1)) {
|
||||
if ((play->csCtx.state == CS_STATE_IDLE) && (this->animIndex == RG_ANIM_1)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 2.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_CIRCLE);
|
||||
}
|
||||
@@ -296,15 +284,15 @@ s32 func_80BF4024(EnRg* this, PlayState* play) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_80BF409C(EnRg* this, s32 arg1) {
|
||||
s32 ret = false;
|
||||
s32 EnRg_ChangeAnim(EnRg* this, s32 animIndex) {
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if (arg1 != this->unk_334) {
|
||||
this->unk_334 = arg1;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80BF5914, arg1);
|
||||
this->unk_314 = this->skelAnime.playSpeed;
|
||||
if (this->animIndex != animIndex) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
}
|
||||
return ret;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void func_80BF40F4(EnRg* this) {
|
||||
@@ -354,8 +342,8 @@ s32 func_80BF42BC(EnRg* this, f32 arg1) {
|
||||
sp24 = 5460.0f * sp2C;
|
||||
|
||||
this->actor.scale.x = 0.01f - (Math_SinS(sp24) * 0.01f);
|
||||
this->actor.scale.y = (Math_SinS(sp24) * 0.01f) + 0.01f;
|
||||
this->actor.scale.z = (Math_SinS(sp24) * 0.01f) + 0.01f;
|
||||
this->actor.scale.y = 0.01f + (Math_SinS(sp24) * 0.01f);
|
||||
this->actor.scale.z = 0.01f + (Math_SinS(sp24) * 0.01f);
|
||||
|
||||
this->actor.shape.yOffset = this->actor.scale.y * 100.0f * 14.0f;
|
||||
if (!(this->unk_310 & 0x1000)) {
|
||||
@@ -396,12 +384,12 @@ s32 func_80BF43FC(EnRg* this) {
|
||||
}
|
||||
|
||||
s32 func_80BF4560(EnRg* this, PlayState* play) {
|
||||
s32 temp_v0 = SurfaceType_GetSceneExitIndex(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
s32 sceneExitIndex = SurfaceType_GetSceneExitIndex(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
|
||||
if ((temp_v0 < 4) || (temp_v0 >= 19)) {
|
||||
temp_v0 = -1;
|
||||
if ((sceneExitIndex < 4) || (sceneExitIndex >= 19)) {
|
||||
sceneExitIndex = -1;
|
||||
}
|
||||
return temp_v0;
|
||||
return sceneExitIndex;
|
||||
}
|
||||
|
||||
s32 func_80BF45B4(EnRg* this) {
|
||||
@@ -447,7 +435,7 @@ s32 func_80BF45B4(EnRg* this) {
|
||||
this->unk_310 &= ~0x800;
|
||||
this->unk_310 &= ~0x40;
|
||||
if ((this->unk_18C != NULL) && (this->unk_18C->id == ACTOR_PLAYER)) {
|
||||
D_80BF5C10 = 0;
|
||||
D_80BF5C10 = false;
|
||||
}
|
||||
this->unk_18C = NULL;
|
||||
this->unk_324 = 0;
|
||||
@@ -483,7 +471,7 @@ s32 func_80BF47AC(EnRg* this, PlayState* play) {
|
||||
} else if (this->numCheckpointsAheadOfPlayer == -1) {
|
||||
phi_f0 = phi_f2 * 1.6f;
|
||||
} else {
|
||||
phi_f0 = 2.0f * phi_f2;
|
||||
phi_f0 = phi_f2 * 2.0f;
|
||||
}
|
||||
|
||||
if (phi_f0 > 0.0f) {
|
||||
@@ -564,16 +552,15 @@ void func_80BF4AB8(EnRg* this, PlayState* play) {
|
||||
} while (phi_s0 != NULL);
|
||||
}
|
||||
|
||||
if ((phi_s0 == NULL) && (D_80BF5C10 == 0) && (this->unk_326 == 0) &&
|
||||
(player->stateFlags3 & PLAYER_STATE3_80000) && (player->invincibilityTimer == 0) &&
|
||||
func_80BF4220(this, play, &player->actor)) {
|
||||
if ((phi_s0 == NULL) && !D_80BF5C10 && (this->unk_326 == 0) && (player->stateFlags3 & PLAYER_STATE3_80000) &&
|
||||
(player->invincibilityTimer == 0) && func_80BF4220(this, play, &player->actor)) {
|
||||
this->unk_18C = &player->actor;
|
||||
this->unk_310 |= 0x800;
|
||||
D_80BF5C10 = 1;
|
||||
D_80BF5C10 = true;
|
||||
}
|
||||
} else if ((this->unk_18C != NULL) && !func_80BF4220(this, play, this->unk_18C)) {
|
||||
if (this->unk_18C->id == ACTOR_PLAYER) {
|
||||
D_80BF5C10 = 0;
|
||||
D_80BF5C10 = false;
|
||||
}
|
||||
this->unk_18C = NULL;
|
||||
this->unk_310 &= ~0x800;
|
||||
@@ -603,7 +590,7 @@ void func_80BF4AB8(EnRg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->unk_18C != NULL) && (this->unk_18C->id == ACTOR_PLAYER)) {
|
||||
D_80BF5C10 = 0;
|
||||
D_80BF5C10 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -613,10 +600,21 @@ void func_80BF4AB8(EnRg* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80BF4D64(Vec3f* arg0) {
|
||||
return Math3D_XZBoundCheck(-1261.0f, -901.0f, -1600.0f, -1520.0f, arg0->x, arg0->z);
|
||||
/**
|
||||
* Returns true if the specified position is in the finish line.
|
||||
* The range extends a little bit beyond the finish line's in-game visual.
|
||||
*/
|
||||
s32 EnRg_IsInFinishLine(Vec3f* pos) {
|
||||
return Math3D_XZBoundCheck(-1261.0f, -901.0f, -1600.0f, -1520.0f, pos->x, pos->z);
|
||||
}
|
||||
|
||||
Vec3f D_80BF596C[] = {
|
||||
{ -2473.0f, 39.0f, 7318.0f }, { -2223.0f, 142.0f, 7184.0f }, { -2281.0f, 41.0f, 7718.0f },
|
||||
{ -2136.0f, 96.0f, 7840.0f }, { -2432.0f, 6.0f, 7857.0f }, { -2412.0f, 139.0f, 6872.0f },
|
||||
{ -2719.0f, 39.0f, 7110.0f }, { -2289.0f, 67.0f, 7463.0f }, { -2820.0f, 85.0f, 6605.0f },
|
||||
{ -2088.0f, 160.0f, 7584.0f }, { -2503.0f, 1.0f, 7643.0f },
|
||||
};
|
||||
|
||||
s32 func_80BF4DA8(EnRg* this) {
|
||||
s32 pad[4];
|
||||
s32 ret = false;
|
||||
@@ -639,7 +637,7 @@ s32 func_80BF4DA8(EnRg* this) {
|
||||
this->unk_310 &= ~0x800;
|
||||
|
||||
if ((this->unk_18C != NULL) && (this->unk_18C->id == ACTOR_PLAYER)) {
|
||||
D_80BF5C10 = 0;
|
||||
D_80BF5C10 = false;
|
||||
}
|
||||
|
||||
this->unk_18C = NULL;
|
||||
@@ -661,7 +659,7 @@ void func_80BF4EBC(EnRg* this, PlayState* play) {
|
||||
}
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_12_02)) {
|
||||
if (DECR(this->unk_318) == 0) {
|
||||
func_80BF409C(this, 1);
|
||||
EnRg_ChangeAnim(this, RG_ANIM_1);
|
||||
this->unk_310 &= ~8;
|
||||
this->unk_310 &= ~0x10;
|
||||
this->unk_310 |= 0x100;
|
||||
@@ -689,7 +687,7 @@ void func_80BF4FC4(EnRg* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && !(this->unk_310 & 0x1000) &&
|
||||
func_80BF4D64(&this->actor.world.pos)) {
|
||||
EnRg_IsInFinishLine(&this->actor.world.pos)) {
|
||||
this->unk_310 |= 0x1000;
|
||||
}
|
||||
|
||||
@@ -722,6 +720,12 @@ void func_80BF4FC4(EnRg* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
EffectTireMarkInit D_80BF59F0 = {
|
||||
0,
|
||||
62,
|
||||
{ 0, 0, 15, 100 },
|
||||
};
|
||||
|
||||
void EnRg_Init(Actor* thisx, PlayState* play) {
|
||||
EnRg* this = THIS;
|
||||
|
||||
@@ -730,8 +734,8 @@ void EnRg_Init(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
|
||||
GORON_LIMB_MAX);
|
||||
|
||||
this->unk_334 = -1;
|
||||
func_80BF409C(this, 0);
|
||||
this->animIndex = RG_ANIM_NONE;
|
||||
EnRg_ChangeAnim(this, RG_ANIM_0);
|
||||
this->skelAnime.curFrame = this->skelAnime.endFrame;
|
||||
|
||||
Collider_InitAndSetSphere(play, &this->collider2, &this->actor, &sSphereInit);
|
||||
@@ -786,7 +790,7 @@ void EnRg_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (!(this->unk_310 & 0x10)) {
|
||||
func_80BF40F4(this);
|
||||
func_80BF3FF8(this);
|
||||
EnRg_UpdateSkelAnime(this);
|
||||
func_80BF4024(this, play);
|
||||
}
|
||||
|
||||
@@ -829,15 +833,15 @@ s32 EnRg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
||||
s32 fidgetIndex;
|
||||
|
||||
switch (limbIndex) {
|
||||
case 10:
|
||||
case GORON_LIMB_BODY:
|
||||
fidgetIndex = 0;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
case GORON_LIMB_LEFT_UPPER_ARM:
|
||||
fidgetIndex = 1;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
case GORON_LIMB_RIGHT_UPPER_ARM:
|
||||
fidgetIndex = 2;
|
||||
break;
|
||||
|
||||
@@ -854,6 +858,10 @@ s32 EnRg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
||||
return false;
|
||||
}
|
||||
|
||||
static TexturePtr sEyeTextures[] = {
|
||||
gGoronEyeOpenTex, gGoronEyeHalfTex, gGoronEyeClosedTex, gGoronEyeHalfTex, gGoronEyeClosed2Tex,
|
||||
};
|
||||
|
||||
void EnRg_Draw(Actor* thisx, PlayState* play) {
|
||||
EnRg* this = THIS;
|
||||
|
||||
@@ -862,7 +870,7 @@ void EnRg_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80BF59F8[this->unk_31E]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->unk_31E]));
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnRg_OverrideLimbDraw, NULL, &this->actor);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_RG_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
struct EnRg;
|
||||
|
||||
@@ -33,10 +34,10 @@ typedef struct EnRg {
|
||||
/* 0x190 */ ColliderCylinder collider1;
|
||||
/* 0x1DC */ ColliderSphere collider2;
|
||||
/* 0x234 */ Path* path;
|
||||
/* 0x238 */ Vec3s jointTable[18];
|
||||
/* 0x2A4 */ Vec3s morphTable[18];
|
||||
/* 0x238 */ Vec3s jointTable[GORON_LIMB_MAX];
|
||||
/* 0x2A4 */ Vec3s morphTable[GORON_LIMB_MAX];
|
||||
/* 0x310 */ u16 unk_310;
|
||||
/* 0x314 */ f32 unk_314;
|
||||
/* 0x314 */ f32 animPlaySpeed;
|
||||
/* 0x318 */ s16 unk_318;
|
||||
/* 0x31A */ UNK_TYPE1 unk31A[2];
|
||||
/* 0x31C */ s16 unk_31C;
|
||||
@@ -47,7 +48,7 @@ typedef struct EnRg {
|
||||
/* 0x326 */ s16 unk_326;
|
||||
/* 0x328 */ s16 fidgetTableZ[ENRG_FIDGET_TABLE_LEN];
|
||||
/* 0x32E */ s16 fidgetTableY[ENRG_FIDGET_TABLE_LEN];
|
||||
/* 0x334 */ s32 unk_334;
|
||||
/* 0x334 */ s32 animIndex;
|
||||
/* 0x338 */ UNK_TYPE1 unk338[4];
|
||||
/* 0x33C */ s32 unk_33C;
|
||||
/* 0x340 */ s32 unk_340;
|
||||
|
||||
@@ -570,7 +570,7 @@ void func_808FAE50(EnRr* this, PlayState* play) {
|
||||
void func_808FAF94(EnRr* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 500, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 0x1F4, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if ((this->unk_1E6 == 0) && !(player->stateFlags2 & PLAYER_STATE2_80) &&
|
||||
(Player_GetMask(play) != PLAYER_MASK_STONE) &&
|
||||
@@ -582,7 +582,7 @@ void func_808FAF94(EnRr* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808FB088(EnRr* this, PlayState* play) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 500, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 0x1F4, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (Player_GetMask(play) == PLAYER_MASK_STONE) {
|
||||
func_808FA344(this);
|
||||
@@ -625,6 +625,9 @@ void func_808FB088(EnRr* this, PlayState* play) {
|
||||
func_808FA344(this);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -741,7 +744,7 @@ void func_808FB680(EnRr* this, PlayState* play) {
|
||||
if (this->unk_1E6 == 0) {
|
||||
this->actionFunc = func_808FAF94;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 10, 1000, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 10, 0x3E8, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if (this->actor.speed == 0.0f) {
|
||||
func_808FA238(this, 2.0f);
|
||||
@@ -854,8 +857,8 @@ void EnRr_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_324); i++) {
|
||||
ptr = &this->unk_324[i];
|
||||
Math_SmoothStepToS(&ptr->unk_1A.x, ptr->unk_14, 5, this->unk_210 * 1000.0f, 0);
|
||||
Math_SmoothStepToS(&ptr->unk_1A.z, ptr->unk_18, 5, this->unk_210 * 1000.0f, 0);
|
||||
Math_SmoothStepToS(&ptr->unk_1A.x, ptr->unk_14, 5, this->unk_210 * 0x3E8, 0);
|
||||
Math_SmoothStepToS(&ptr->unk_1A.z, ptr->unk_18, 5, this->unk_210 * 0x3E8, 0);
|
||||
Math_StepToF(&ptr->unk_08, ptr->unk_0C, this->unk_210 * 0.2f);
|
||||
Math_StepToF(&ptr->unk_00, ptr->unk_04, this->unk_210 * 300.0f);
|
||||
}
|
||||
@@ -938,9 +941,9 @@ void EnRr_Draw(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
|
||||
Matrix_MultZero(&this->unk_228);
|
||||
this->collider2.dim.pos.x = ((this->unk_228.x - spA4.x) * 0.85f) + spA4.x;
|
||||
this->collider2.dim.pos.y = ((this->unk_228.y - spA4.y) * 0.85f) + spA4.y;
|
||||
this->collider2.dim.pos.z = ((this->unk_228.z - spA4.z) * 0.85f) + spA4.z;
|
||||
this->collider2.dim.pos.x = LERPIMP(spA4.x, this->unk_228.x, 0.85f);
|
||||
this->collider2.dim.pos.y = LERPIMP(spA4.y, this->unk_228.y, 0.85f);
|
||||
this->collider2.dim.pos.z = LERPIMP(spA4.z, this->unk_228.z, 0.85f);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gLikeLikeDL);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ void EnRsn_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnRsn_Update(Actor* thisx, PlayState* play);
|
||||
void EnRsn_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80C25D84(EnRsn* this, PlayState* play);
|
||||
void EnRsn_DoNothing(EnRsn* this, PlayState* play);
|
||||
|
||||
ActorInit En_Rsn_InitVars = {
|
||||
/**/ ACTOR_EN_RSN,
|
||||
@@ -30,14 +30,21 @@ ActorInit En_Rsn_InitVars = {
|
||||
/**/ EnRsn_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfo sAnimationInfo[] = { { &gBombShopkeeperSwayAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f } };
|
||||
typedef enum RsnAnimation {
|
||||
/* 0 */ RSN_ANIM_SWAY,
|
||||
/* 1 */ RSN_ANIM_MAX
|
||||
} RsnAnimation;
|
||||
|
||||
static AnimationInfo sAnimationInfo[RSN_ANIM_MAX] = {
|
||||
{ &gBombShopkeeperSwayAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // RSN_ANIM_SWAY
|
||||
};
|
||||
|
||||
void func_80C25D40(EnRsn* this) {
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0);
|
||||
this->actionFunc = func_80C25D84;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, RSN_ANIM_SWAY);
|
||||
this->actionFunc = EnRsn_DoNothing;
|
||||
}
|
||||
|
||||
void func_80C25D84(EnRsn* this, PlayState* play) {
|
||||
void EnRsn_DoNothing(EnRsn* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnRsn_Init(Actor* thisx, PlayState* play) {
|
||||
@@ -61,14 +68,14 @@ void EnRsn_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk1D8, &this->unk1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
s32 EnRsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnRsn* this = THIS;
|
||||
|
||||
if (limbIndex == BOMB_SHOPKEEPER_LIMB_RIGHT_HAND) {
|
||||
Matrix_RotateXS(this->unk1D8.y, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ typedef struct EnRsn {
|
||||
/* 0x144 */ UNK_TYPE1 unk144[0x4C];
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ EnRsnActionFunc actionFunc;
|
||||
/* 0x1D8 */ Vec3s unk1D8;
|
||||
/* 0x1DE */ Vec3s unk1DE;
|
||||
/* 0x1D8 */ Vec3s headRot;
|
||||
/* 0x1DE */ Vec3s torsoRot;
|
||||
} EnRsn; // size = 0x1E4
|
||||
|
||||
#endif // Z_EN_RSN_H
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user