1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-06-08 09:31:52 +00:00
This commit is contained in:
Jordan Longstaff 2025-06-08 00:27:27 +09:00 committed by GitHub
commit 533b76ccd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 160 additions and 133 deletions

View file

@ -37,13 +37,13 @@ void EnRu1_Destroy(Actor* thisx, PlayState* play);
void EnRu1_Update(Actor* thisx, PlayState* play); void EnRu1_Update(Actor* thisx, PlayState* play);
void EnRu1_Draw(Actor* thisx, PlayState* play); void EnRu1_Draw(Actor* thisx, PlayState* play);
void func_80AEC0B4(EnRu1* this, PlayState* play); void EnRu1_GazingAtLink(EnRu1* this, PlayState* play);
void func_80AEC100(EnRu1* this, PlayState* play); void EnRu1_DivingIntoFountain(EnRu1* this, PlayState* play);
void func_80AEC130(EnRu1* this, PlayState* play); void EnRu1_Resurfacing(EnRu1* this, PlayState* play);
void func_80AEC17C(EnRu1* this, PlayState* play); void EnRu1_Treading(EnRu1* this, PlayState* play);
void func_80AEC1D4(EnRu1* this, PlayState* play); void EnRu1_StartingSwimBack(EnRu1* this, PlayState* play);
void func_80AEC244(EnRu1* this, PlayState* play); void EnRu1_SwimmingBack(EnRu1* this, PlayState* play);
void func_80AEC2C0(EnRu1* this, PlayState* play); void EnRu1_FinishingSwimBack(EnRu1* this, PlayState* play);
void func_80AECA94(EnRu1* this, PlayState* play); void func_80AECA94(EnRu1* this, PlayState* play);
void func_80AECAB4(EnRu1* this, PlayState* play); void func_80AECAB4(EnRu1* this, PlayState* play);
void func_80AECAD4(EnRu1* this, PlayState* play); void func_80AECAD4(EnRu1* this, PlayState* play);
@ -154,13 +154,29 @@ static s32 sUnused = 0;
static u32 D_80AF1938 = 0; static u32 D_80AF1938 = 0;
static EnRu1ActionFunc sActionFuncs[] = { static EnRu1ActionFunc sActionFuncs[] = {
func_80AEC0B4, func_80AEC100, func_80AEC130, func_80AEC17C, func_80AEC1D4, func_80AEC244, func_80AEC2C0, EnRu1_GazingAtLink, EnRu1_DivingIntoFountain,
func_80AECA94, func_80AECAB4, func_80AECAD4, func_80AECB18, func_80AECB60, func_80AECBB8, func_80AECC1C, EnRu1_Resurfacing, EnRu1_Treading,
func_80AECC84, func_80AED304, func_80AED324, func_80AED344, func_80AED374, func_80AED3A4, func_80AED3E0, EnRu1_StartingSwimBack, EnRu1_SwimmingBack,
func_80AED414, func_80AEF29C, func_80AEF2AC, func_80AEF2D0, func_80AEF354, func_80AEF3A8, func_80AEEBD4, EnRu1_FinishingSwimBack, func_80AECA94,
func_80AEEC5C, func_80AEECF0, func_80AEED58, func_80AEEDCC, func_80AEEE34, func_80AEEE9C, func_80AEEF08, func_80AECAB4, func_80AECAD4,
func_80AEEF5C, func_80AEF9D8, func_80AEFA2C, func_80AEFAAC, func_80AEFB04, func_80AEFB68, func_80AEFCE8, func_80AECB18, func_80AECB60,
func_80AEFBC8, func_80AEFC24, func_80AEFECC, func_80AEFF40, func_80AECBB8, func_80AECC1C,
func_80AECC84, func_80AED304,
func_80AED324, func_80AED344,
func_80AED374, func_80AED3A4,
func_80AED3E0, func_80AED414,
func_80AEF29C, func_80AEF2AC,
func_80AEF2D0, func_80AEF354,
func_80AEF3A8, func_80AEEBD4,
func_80AEEC5C, func_80AEECF0,
func_80AEED58, func_80AEEDCC,
func_80AEEE34, func_80AEEE9C,
func_80AEEF08, func_80AEEF5C,
func_80AEF9D8, func_80AEFA2C,
func_80AEFAAC, func_80AEFB04,
func_80AEFB68, func_80AEFCE8,
func_80AEFBC8, func_80AEFC24,
func_80AEFECC, func_80AEFF40,
}; };
static EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = { static EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = {
@ -299,7 +315,7 @@ CsCmdActorCue* EnRu1_GetCue(PlayState* play, s32 cueChannel) {
return cue; return cue;
} }
s32 func_80AEAFA0(PlayState* play, u16 cueId, s32 cueChannel) { s32 EnRu1_CheckCueMatchingId(PlayState* play, u16 cueId, s32 cueChannel) {
CsCmdActorCue* cue = EnRu1_GetCue(play, cueChannel); CsCmdActorCue* cue = EnRu1_GetCue(play, cueChannel);
if ((cue != NULL) && (cue->id == cueId)) { if ((cue != NULL) && (cue->id == cueId)) {
@ -308,7 +324,7 @@ s32 func_80AEAFA0(PlayState* play, u16 cueId, s32 cueChannel) {
return false; return false;
} }
s32 func_80AEAFE0(PlayState* play, u16 cueId, s32 cueChannel) { s32 EnRu1_CheckCueNotMatchingId(PlayState* play, u16 cueId, s32 cueChannel) {
CsCmdActorCue* cue = EnRu1_GetCue(play, cueChannel); CsCmdActorCue* cue = EnRu1_GetCue(play, cueChannel);
if ((cue != NULL) && (cue->id != cueId)) { if ((cue != NULL) && (cue->id != cueId)) {
@ -455,16 +471,16 @@ void EnRu1_InitOutsideJabuJabu(EnRu1* this, PlayState* play) {
EnRu1_SetMouth(this, ENRU1_MOUTH_SMILING); EnRu1_SetMouth(this, ENRU1_MOUTH_SMILING);
} }
CsCmdActorCue* EnRu1_GetCueChannel3(PlayState* play) { CsCmdActorCue* EnRu1_GetFountainCue(PlayState* play) {
return EnRu1_GetCue(play, 3); return EnRu1_GetCue(play, 3);
} }
s32 func_80AEB458(PlayState* play, u16 cueId) { s32 EnRu1_CheckFountainCueMatchingId(PlayState* play, u16 cueId) {
return func_80AEAFA0(play, cueId, 3); return EnRu1_CheckCueMatchingId(play, cueId, 3);
} }
s32 func_80AEB480(PlayState* play, u16 cueId) { s32 EnRu1_CheckFountainCueNotMatchingId(PlayState* play, u16 cueId) {
return func_80AEAFE0(play, cueId, 3); return EnRu1_CheckCueNotMatchingId(play, cueId, 3);
} }
void EnRu1_SpawnRipple(EnRu1* this, PlayState* play, s16 radiusMax, s16 life) { void EnRu1_SpawnRipple(EnRu1* this, PlayState* play, s16 radiusMax, s16 life) {
@ -477,15 +493,15 @@ void EnRu1_SpawnRipple(EnRu1* this, PlayState* play, s16 radiusMax, s16 life) {
EffectSsGRipple_Spawn(play, &pos, 100, radiusMax, life); EffectSsGRipple_Spawn(play, &pos, 100, radiusMax, life);
} }
void func_80AEB50C(EnRu1* this, PlayState* play) { void EnRu1_SpawnRippleTreading(EnRu1* this, PlayState* play) {
this->unk_270 += 1.0f; this->treadTimer += 1.0f;
if (this->unk_270 >= kREG(3) + 10.0f) { if (this->treadTimer >= kREG(3) + 10.0f) {
EnRu1_SpawnRipple(this, play, kREG(1) + 500, 0); EnRu1_SpawnRipple(this, play, kREG(1) + 500, 0);
this->unk_270 = 0.0f; this->treadTimer = 0.0f;
} }
} }
void func_80AEB59C(EnRu1* this, PlayState* play) { void EnRu1_SpawnThreeRipples(EnRu1* this, PlayState* play) {
EnRu1_SpawnRipple(this, play, kREG(2) + 500, 0); EnRu1_SpawnRipple(this, play, kREG(2) + 500, 0);
EnRu1_SpawnRipple(this, play, kREG(2) + 500, kREG(3) + 10.0f); EnRu1_SpawnRipple(this, play, kREG(2) + 500, kREG(3) + 10.0f);
EnRu1_SpawnRipple(this, play, kREG(2) + 500, (kREG(3) + 10.0f) * 2.0f); EnRu1_SpawnRipple(this, play, kREG(2) + 500, (kREG(3) + 10.0f) * 2.0f);
@ -501,7 +517,10 @@ void EnRu1_SpawnSplash(EnRu1* this, PlayState* play) {
EffectSsGSplash_Spawn(play, &pos, NULL, NULL, 1, 0); EffectSsGSplash_Spawn(play, &pos, NULL, NULL, 1, 0);
} }
void func_80AEB6E0(EnRu1* this, PlayState* play) { /**
* Used twice: once to start resurfacing, and once to start swimming toward Link.
*/
void EnRu1_StartMovingInWater(EnRu1* this, PlayState* play) {
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) { if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) {
@ -510,7 +529,7 @@ void func_80AEB6E0(EnRu1* this, PlayState* play) {
} }
} }
void func_80AEB738(EnRu1* this, PlayState* play) { void EnRu1_MoveInWater(EnRu1* this, PlayState* play) {
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
skelAnime->baseTransl = skelAnime->jointTable[0]; skelAnime->baseTransl = skelAnime->jointTable[0];
@ -521,11 +540,11 @@ void func_80AEB738(EnRu1* this, PlayState* play) {
} }
} }
void func_80AEB7D0(EnRu1* this) { void EnRu1_StopMovingInWater(EnRu1* this) {
this->skelAnime.movementFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y); this->skelAnime.movementFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
} }
f32 func_80AEB7E0(CsCmdActorCue* cue, PlayState* play) { f32 EnRu1_GetSwimProximityToLink(CsCmdActorCue* cue, PlayState* play) {
s32 csCurFrame = play->csCtx.curFrame; s32 csCurFrame = play->csCtx.curFrame;
if ((csCurFrame < cue->endFrame) && (cue->endFrame - cue->startFrame > 0)) { if ((csCurFrame < cue->endFrame) && (cue->endFrame - cue->startFrame > 0)) {
@ -536,12 +555,12 @@ f32 func_80AEB7E0(CsCmdActorCue* cue, PlayState* play) {
return 1.0f; return 1.0f;
} }
f32 func_80AEB87C(f32 arg0, s32 arg1, s32 arg2) { f32 EnRu1_GetLinearPosition(f32 scale, s32 startPos, s32 endPos) {
return (((f32)arg2 - arg1) * arg0) + arg1; return (((f32)endPos - startPos) * scale) + startPos;
} }
void func_80AEB89C(EnRu1* this, PlayState* play) { void EnRu1_InitPositionFromFountainCue(EnRu1* this, PlayState* play) {
CsCmdActorCue* cue = EnRu1_GetCueChannel3(play); CsCmdActorCue* cue = EnRu1_GetFountainCue(play);
if (cue != NULL) { if (cue != NULL) {
this->actor.world.rot.y = this->actor.shape.rot.y = cue->rot.y; this->actor.world.rot.y = this->actor.shape.rot.y = cue->rot.y;
@ -552,68 +571,70 @@ void func_80AEB89C(EnRu1* this, PlayState* play) {
} }
} }
void func_80AEB914(EnRu1* this, PlayState* play) { // Why are there two of these?
func_80AEB89C(this, play); void EnRu1_InitPositionDivingIntoFountain(EnRu1* this, PlayState* play) {
EnRu1_InitPositionFromFountainCue(this, play);
} }
void func_80AEB934(EnRu1* this, PlayState* play) { void EnRu1_InitPositionResurfacing(EnRu1* this, PlayState* play) {
func_80AEB89C(this, play); EnRu1_InitPositionFromFountainCue(this, play);
} }
void func_80AEB954(EnRu1* this, PlayState* play) { void EnRu1_StartSwimmingTowardLink(EnRu1* this, PlayState* play) {
func_80AEB6E0(this, play); EnRu1_StartMovingInWater(this, play);
} }
void func_80AEB974(EnRu1* this, PlayState* play) { void EnRu1_SwimTowardLink(EnRu1* this, PlayState* play) {
Vec3f* thisPos; Vec3f* thisPos;
f32 sp30; f32 swimProximity;
CsCmdActorCue* cue = EnRu1_GetCueChannel3(play); CsCmdActorCue* cue = EnRu1_GetFountainCue(play);
s32 pad; s32 pad;
if (cue != NULL) { if (cue != NULL) {
sp30 = func_80AEB7E0(cue, play); swimProximity = EnRu1_GetSwimProximityToLink(cue, play);
thisPos = &this->actor.world.pos; thisPos = &this->actor.world.pos;
thisPos->x = func_80AEB87C(sp30, cue->startPos.x, cue->endPos.x); thisPos->x = EnRu1_GetLinearPosition(swimProximity, cue->startPos.x, cue->endPos.x);
thisPos->y = func_80AEB87C(sp30, cue->startPos.y, cue->endPos.y); thisPos->y = EnRu1_GetLinearPosition(swimProximity, cue->startPos.y, cue->endPos.y);
thisPos->z = func_80AEB87C(sp30, cue->startPos.z, cue->endPos.z); thisPos->z = EnRu1_GetLinearPosition(swimProximity, cue->startPos.z, cue->endPos.z);
} }
} }
void func_80AEBA0C(EnRu1* this, PlayState* play) { // And why are there two of these?
func_80AEB6E0(this, play); void EnRu1_StartSwimmingAwayFromLink(EnRu1* this, PlayState* play) {
EnRu1_StartMovingInWater(this, play);
} }
void func_80AEBA2C(EnRu1* this, PlayState* play) { void EnRu1_SwimAwayFromLink(EnRu1* this, PlayState* play) {
s32 pad; s32 pad;
Vec3f* unk_364 = &this->unk_364; Vec3f* treadPos = &this->treadPos;
Vec3f* thisPos; Vec3f* thisPos;
f32 temp_ret_2; f32 proximity;
CsCmdActorCue* cue = EnRu1_GetCueChannel3(play); CsCmdActorCue* cue = EnRu1_GetFountainCue(play);
s32 pad2; s32 pad2;
if (cue != NULL) { if (cue != NULL) {
temp_ret_2 = func_80AEB7E0(cue, play); proximity = EnRu1_GetSwimProximityToLink(cue, play);
thisPos = &this->actor.world.pos; thisPos = &this->actor.world.pos;
thisPos->x = func_80AEB87C(temp_ret_2, unk_364->x, cue->endPos.x); thisPos->x = EnRu1_GetLinearPosition(proximity, treadPos->x, cue->endPos.x);
thisPos->y = func_80AEB87C(temp_ret_2, unk_364->y, cue->endPos.y); thisPos->y = EnRu1_GetLinearPosition(proximity, treadPos->y, cue->endPos.y);
thisPos->z = func_80AEB87C(temp_ret_2, unk_364->z, cue->endPos.z); thisPos->z = EnRu1_GetLinearPosition(proximity, treadPos->z, cue->endPos.z);
} }
} }
void func_80AEBAFC(EnRu1* this) { void EnRu1_PlayDivingEntrySfx(EnRu1* this) {
if (this->unk_298 == 0) { if (this->unk_298 == 0) {
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_DIVE_INTO_WATER); Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_DIVE_INTO_WATER);
this->unk_298 = 1; this->unk_298 = 1;
} }
} }
void func_80AEBB3C(EnRu1* this) { void EnRu1_PlayResurfacingSfx(EnRu1* this) {
if (Animation_OnFrame(&this->skelAnime, 5.0f)) { if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_FACE_UP); Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_FACE_UP);
} }
} }
void func_80AEBB78(EnRu1* this) { void EnRu1_PlaySwimStrokeSfx(EnRu1* this) {
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
if (Animation_OnFrame(skelAnime, 4.0f) || Animation_OnFrame(skelAnime, 13.0f) || if (Animation_OnFrame(skelAnime, 4.0f) || Animation_OnFrame(skelAnime, 13.0f) ||
@ -622,13 +643,16 @@ void func_80AEBB78(EnRu1* this) {
} }
} }
void func_80AEBBF4(EnRu1* this) { void EnRu1_PlaySubmergeSfx(EnRu1* this) {
if (Animation_OnFrame(&this->skelAnime, 8.0f)) { if (Animation_OnFrame(&this->skelAnime, 8.0f)) {
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_SUBMERGE); Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_SUBMERGE);
} }
} }
void func_80AEBC30(PlayState* play) { /**
* Plays the splashing sound effect when Link falls backwards into the Zora's Fountain waters.
*/
void EnRu1_LinkFallsIntoFountain(PlayState* play) {
Player* player; Player* player;
if (play->csCtx.curFrame == 205) { if (play->csCtx.curFrame == 205) {
@ -638,85 +662,88 @@ void func_80AEBC30(PlayState* play) {
} }
} }
void func_80AEBC84(EnRu1* this, PlayState* play) { /**
* Ruto giggles at Link outside of Jabu-Jabu.
*/
void EnRu1_PlayGiggleSfx(EnRu1* this, PlayState* play) {
if (play->csCtx.curFrame == 130) { if (play->csCtx.curFrame == 130) {
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_VO_RT_LAUGH_0); Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_VO_RT_LAUGH_0);
} }
} }
void func_80AEBCB8(EnRu1* this, UNK_TYPE arg1) { void EnRu1_StartBackSwimming(EnRu1* this, s32 isSwimming) {
if (arg1 != 0) { if (isSwimming != 0) {
Animation_Change(&this->skelAnime, &gRutoChildSwimOnBackAnim, 1.0f, 0, Animation_Change(&this->skelAnime, &gRutoChildSwimOnBackAnim, 1.0f, 0,
Animation_GetLastFrame(&gRutoChildSwimOnBackAnim), ANIMMODE_LOOP, -8.0f); Animation_GetLastFrame(&gRutoChildSwimOnBackAnim), ANIMMODE_LOOP, -8.0f);
} }
} }
void func_80AEBD1C(EnRu1* this, PlayState* play) { void EnRu1_EnterFountainWater(EnRu1* this, PlayState* play) {
if (func_80AEB480(play, 2)) { if (EnRu1_CheckFountainCueNotMatchingId(play, 2)) {
this->action = 1; this->action = 1;
this->drawConfig = 0; this->drawConfig = 0;
func_80AEB914(this, play); EnRu1_InitPositionDivingIntoFountain(this, play);
func_80AEAECC(this, play); func_80AEAECC(this, play);
EnRu1_SpawnSplash(this, play); EnRu1_SpawnSplash(this, play);
func_80AEB59C(this, play); EnRu1_SpawnThreeRipples(this, play);
} }
} }
void func_80AEBD94(EnRu1* this, PlayState* play) { void EnRu1_Resurface(EnRu1* this, PlayState* play) {
s32 pad[2]; s32 pad[2];
f32 frameCount; f32 frameCount;
if (func_80AEB480(play, 3)) { if (EnRu1_CheckFountainCueNotMatchingId(play, 3)) {
frameCount = Animation_GetLastFrame(&gRutoChildResurfaceAnim); frameCount = Animation_GetLastFrame(&gRutoChildResurfaceAnim);
func_80AEB934(this, play); EnRu1_InitPositionResurfacing(this, play);
func_80AEB738(this, play); EnRu1_MoveInWater(this, play);
Animation_Change(&this->skelAnime, &gRutoChildResurfaceAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f); Animation_Change(&this->skelAnime, &gRutoChildResurfaceAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
this->action = 2; this->action = 2;
this->drawConfig = 1; this->drawConfig = 1;
} }
} }
void func_80AEBE3C(EnRu1* this, PlayState* play, s32 arg2) { void EnRu1_ResurfaceProgress(EnRu1* this, PlayState* play, s32 isResurfaced) {
s32 pad[2]; s32 pad[2];
if (arg2 != 0) { if (isResurfaced != 0) {
f32 frameCount = Animation_GetLastFrame(&gRutoChildTreadWaterAnim); f32 frameCount = Animation_GetLastFrame(&gRutoChildTreadWaterAnim);
func_80AEB7D0(this); EnRu1_StopMovingInWater(this);
Animation_Change(&this->skelAnime, &gRutoChildTreadWaterAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f); Animation_Change(&this->skelAnime, &gRutoChildTreadWaterAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
this->action = 3; this->action = 3;
} else { } else {
func_80AEB954(this, play); EnRu1_StartSwimmingTowardLink(this, play);
} }
} }
void func_80AEBEC8(EnRu1* this, PlayState* play) { void EnRu1_StopTreading(EnRu1* this, PlayState* play) {
s32 pad[2]; s32 pad[2];
f32 frameCount; f32 frameCount;
if (func_80AEB458(play, 6)) { if (EnRu1_CheckFountainCueMatchingId(play, 6)) {
frameCount = Animation_GetLastFrame(&gRutoChildTransitionToSwimOnBackAnim); frameCount = Animation_GetLastFrame(&gRutoChildTransitionToSwimOnBackAnim);
func_80AEB738(this, play); EnRu1_MoveInWater(this, play);
Animation_Change(&this->skelAnime, &gRutoChildTransitionToSwimOnBackAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE, Animation_Change(&this->skelAnime, &gRutoChildTransitionToSwimOnBackAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE,
-8.0f); -8.0f);
this->action = 4; this->action = 4;
} }
} }
void func_80AEBF60(EnRu1* this, PlayState* play) { void EnRu1_TransitionToBackSwimming(EnRu1* this, PlayState* play) {
if (func_80AEB480(play, 6)) { if (EnRu1_CheckFountainCueNotMatchingId(play, 6)) {
s32 pad; s32 pad;
func_80AEB7D0(this); EnRu1_StopMovingInWater(this);
this->action = 5; this->action = 5;
this->unk_364 = this->actor.world.pos; this->treadPos = this->actor.world.pos;
} else { } else {
func_80AEBA0C(this, play); EnRu1_StartSwimmingAwayFromLink(this, play);
} }
} }
void func_80AEBFD8(EnRu1* this, PlayState* play) { void EnRu1_EndSwimBack(EnRu1* this, PlayState* play) {
CsCmdActorCue* cue = EnRu1_GetCueChannel3(play); CsCmdActorCue* cue = EnRu1_GetFountainCue(play);
f32 frameCount; f32 frameCount;
u16 csCurFrame; u16 csCurFrame;
u16 endFrame; u16 endFrame;
@ -734,74 +761,74 @@ void func_80AEBFD8(EnRu1* this, PlayState* play) {
} }
} }
void func_80AEC070(EnRu1* this, PlayState* play, UNK_TYPE arg2) { void EnRu1_EndGivingSapphire(EnRu1* this, PlayState* play, UNK_TYPE arg2) {
if ((func_80AEB458(play, 8)) && (arg2 != 0)) { if ((EnRu1_CheckFountainCueMatchingId(play, 8)) && (arg2 != 0)) {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
} }
void func_80AEC0B4(EnRu1* this, PlayState* play) { void EnRu1_GazingAtLink(EnRu1* this, PlayState* play) {
func_80AEB89C(this, play); EnRu1_InitPositionFromFountainCue(this, play);
EnRu1_UpdateSkelAnime(this); EnRu1_UpdateSkelAnime(this);
func_80AEBC84(this, play); EnRu1_PlayGiggleSfx(this, play);
func_80AEBC30(play); EnRu1_LinkFallsIntoFountain(play);
func_80AEBD1C(this, play); EnRu1_EnterFountainWater(this, play);
} }
void func_80AEC100(EnRu1* this, PlayState* play) { void EnRu1_DivingIntoFountain(EnRu1* this, PlayState* play) {
func_80AEBAFC(this); EnRu1_PlayDivingEntrySfx(this);
func_80AEBD94(this, play); EnRu1_Resurface(this, play);
} }
void func_80AEC130(EnRu1* this, PlayState* play) { void EnRu1_Resurfacing(EnRu1* this, PlayState* play) {
s32 something = EnRu1_UpdateSkelAnime(this); s32 doneAnim = EnRu1_UpdateSkelAnime(this);
func_80AEAECC(this, play); func_80AEAECC(this, play);
func_80AEBB3C(this); EnRu1_PlayResurfacingSfx(this);
func_80AEBE3C(this, play, something); EnRu1_ResurfaceProgress(this, play, doneAnim);
} }
void func_80AEC17C(EnRu1* this, PlayState* play) { void EnRu1_Treading(EnRu1* this, PlayState* play) {
func_80AEB974(this, play); EnRu1_SwimTowardLink(this, play);
func_80AEAECC(this, play); func_80AEAECC(this, play);
EnRu1_UpdateSkelAnime(this); EnRu1_UpdateSkelAnime(this);
func_80AEB50C(this, play); EnRu1_SpawnRippleTreading(this, play);
func_80AEBEC8(this, play); EnRu1_StopTreading(this, play);
} }
void func_80AEC1D4(EnRu1* this, PlayState* play) { void EnRu1_StartingSwimBack(EnRu1* this, PlayState* play) {
s32 something; s32 doneAnim;
something = EnRu1_UpdateSkelAnime(this); doneAnim = EnRu1_UpdateSkelAnime(this);
func_80AEAECC(this, play); func_80AEAECC(this, play);
EnRu1_UpdateEyes(this); EnRu1_UpdateEyes(this);
func_80AEB50C(this, play); EnRu1_SpawnRippleTreading(this, play);
func_80AEBCB8(this, something); EnRu1_StartBackSwimming(this, doneAnim);
func_80AEBBF4(this); EnRu1_PlaySubmergeSfx(this);
func_80AEBF60(this, play); EnRu1_TransitionToBackSwimming(this, play);
} }
void func_80AEC244(EnRu1* this, PlayState* play) { void EnRu1_SwimmingBack(EnRu1* this, PlayState* play) {
s32 something; s32 doneAnim;
something = EnRu1_UpdateSkelAnime(this); doneAnim = EnRu1_UpdateSkelAnime(this);
func_80AEBA2C(this, play); EnRu1_SwimAwayFromLink(this, play);
func_80AEAECC(this, play); func_80AEAECC(this, play);
EnRu1_UpdateEyes(this); EnRu1_UpdateEyes(this);
func_80AEB50C(this, play); EnRu1_SpawnRippleTreading(this, play);
func_80AEBCB8(this, something); EnRu1_StartBackSwimming(this, doneAnim);
func_80AEBB78(this); EnRu1_PlaySwimStrokeSfx(this);
func_80AEBFD8(this, play); EnRu1_EndSwimBack(this, play);
} }
void func_80AEC2C0(EnRu1* this, PlayState* play) { void EnRu1_FinishingSwimBack(EnRu1* this, PlayState* play) {
s32 something; s32 doneAnim;
something = EnRu1_UpdateSkelAnime(this); doneAnim = EnRu1_UpdateSkelAnime(this);
func_80AEAECC(this, play); func_80AEAECC(this, play);
EnRu1_UpdateEyes(this); EnRu1_UpdateEyes(this);
func_80AEB50C(this, play); EnRu1_SpawnRippleTreading(this, play);
func_80AEC070(this, play, something); EnRu1_EndGivingSapphire(this, play, doneAnim);
} }
void EnRu1_InitInJabuJabuHolesRoom(EnRu1* this, PlayState* play) { void EnRu1_InitInJabuJabuHolesRoom(EnRu1* this, PlayState* play) {
@ -888,7 +915,7 @@ void func_80AEC6B0(EnRu1* this) {
} }
void func_80AEC6E4(EnRu1* this, PlayState* play) { void func_80AEC6E4(EnRu1* this, PlayState* play) {
if ((func_80AEAFA0(play, 4, 3)) && (this->unk_280 == 0)) { if ((EnRu1_CheckCueMatchingId(play, 4, 3)) && (this->unk_280 == 0)) {
Animation_Change(&this->skelAnime, &gRutoChildBringArmsUpAnim, 1.0f, 0, Animation_Change(&this->skelAnime, &gRutoChildBringArmsUpAnim, 1.0f, 0,
Animation_GetLastFrame(&gRutoChildBringArmsUpAnim), ANIMMODE_ONCE, -8.0f); Animation_GetLastFrame(&gRutoChildBringArmsUpAnim), ANIMMODE_ONCE, -8.0f);
this->unk_280 = 1; this->unk_280 = 1;
@ -915,7 +942,7 @@ void func_80AEC81C(EnRu1* this, PlayState* play) {
CsCmdActorCue* cue; CsCmdActorCue* cue;
s16 newRotY; s16 newRotY;
if (func_80AEAFE0(play, 1, 3)) { if (EnRu1_CheckCueNotMatchingId(play, 1, 3)) {
cue = play->csCtx.actorCues[3]; cue = play->csCtx.actorCues[3];
this->actor.world.pos.x = cue->startPos.x; this->actor.world.pos.x = cue->startPos.x;
this->actor.world.pos.y = cue->startPos.y; this->actor.world.pos.y = cue->startPos.y;
@ -929,7 +956,7 @@ void func_80AEC81C(EnRu1* this, PlayState* play) {
} }
void func_80AEC8B8(EnRu1* this, PlayState* play) { void func_80AEC8B8(EnRu1* this, PlayState* play) {
if (func_80AEAFA0(play, 3, 3)) { if (EnRu1_CheckCueMatchingId(play, 3, 3)) {
Animation_Change(&this->skelAnime, &gRutoChildTurnAroundAnim, 1.0f, 0, Animation_Change(&this->skelAnime, &gRutoChildTurnAroundAnim, 1.0f, 0,
Animation_GetLastFrame(&gRutoChildTurnAroundAnim), ANIMMODE_ONCE, -8.0f); Animation_GetLastFrame(&gRutoChildTurnAroundAnim), ANIMMODE_ONCE, -8.0f);
this->action = 10; this->action = 10;
@ -966,7 +993,7 @@ void func_80AECA18(EnRu1* this) {
} }
void func_80AECA44(EnRu1* this, PlayState* play) { void func_80AECA44(EnRu1* this, PlayState* play) {
if (func_80AEAFA0(play, 5, 3)) { if (EnRu1_CheckCueMatchingId(play, 5, 3)) {
SET_INFTABLE(INFTABLE_141); SET_INFTABLE(INFTABLE_141);
this->action = 14; this->action = 14;
} }
@ -2012,7 +2039,7 @@ void func_80AEF624(EnRu1* this, PlayState* play) {
CsCmdActorCue* cue2; CsCmdActorCue* cue2;
s16 newRotTmp; s16 newRotTmp;
if (func_80AEAFE0(play, 1, 3)) { if (EnRu1_CheckCueNotMatchingId(play, 1, 3)) {
frameCount = Animation_GetLastFrame(&gRutoChildWalkToAndHoldUpSapphireAnim); frameCount = Animation_GetLastFrame(&gRutoChildWalkToAndHoldUpSapphireAnim);
// this weird part with the redundant variable is necessary to match for some reason // this weird part with the redundant variable is necessary to match for some reason
cue2 = play->csCtx.actorCues[3]; cue2 = play->csCtx.actorCues[3];
@ -2048,7 +2075,7 @@ void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
} }
void func_80AEF79C(EnRu1* this, PlayState* play) { void func_80AEF79C(EnRu1* this, PlayState* play) {
if (func_80AEAFE0(play, 2, 3)) { if (EnRu1_CheckCueNotMatchingId(play, 2, 3)) {
Animation_Change(&this->skelAnime, &gRutoChildBringHandsDownAnim, 1.0f, 0, Animation_Change(&this->skelAnime, &gRutoChildBringHandsDownAnim, 1.0f, 0,
Animation_GetLastFrame(&gRutoChildBringHandsDownAnim), ANIMMODE_ONCE, -8.0f); Animation_GetLastFrame(&gRutoChildBringHandsDownAnim), ANIMMODE_ONCE, -8.0f);
this->action = 39; this->action = 39;

View file

@ -27,7 +27,7 @@ typedef struct EnRu1 {
/* 0x0264 */ s32 action; /* 0x0264 */ s32 action;
/* 0x0268 */ s32 drawConfig; /* 0x0268 */ s32 drawConfig;
/* 0x026C */ f32 unk_26C; /* 0x026C */ f32 unk_26C;
/* 0x0270 */ f32 unk_270; /* 0x0270 */ f32 treadTimer;
/* 0x0274 */ char unk_274[0x4]; /* 0x0274 */ char unk_274[0x4];
/* 0x0278 */ DoorWarp1* blueWarp; /* 0x0278 */ DoorWarp1* blueWarp;
/* 0x027C */ f32 unk_27C; /* 0x027C */ f32 unk_27C;
@ -55,7 +55,7 @@ typedef struct EnRu1 {
/* 0x0358 */ f32 bobDepth; /* 0x0358 */ f32 bobDepth;
/* 0x035C */ s16 bobPhase; /* 0x035C */ s16 bobPhase;
/* 0x0360 */ f32 isSinking; /* 0x0360 */ f32 isSinking;
/* 0x0364 */ Vec3f unk_364; /* 0x0364 */ Vec3f treadPos;
/* 0x0370 */ f32 carryIdleTimer; /* 0x0370 */ f32 carryIdleTimer;
/* 0x0374 */ NpcInteractInfo interactInfo; /* 0x0374 */ NpcInteractInfo interactInfo;
} EnRu1; // size = 0x039C } EnRu1; // size = 0x039C