mirror of https://github.com/zeldaret/oot.git
				
				
				
			Merge branch 'main' into enRu1-actions-speakable
This commit is contained in:
		
						commit
						93f134b9fc
					
				| 
						 | 
				
			
			@ -891,7 +891,7 @@ typedef enum LinkAge {
 | 
			
		|||
#define INFTABLE_138 0x138
 | 
			
		||||
#define INFTABLE_139 0x139
 | 
			
		||||
#define INFTABLE_140 0x140
 | 
			
		||||
#define INFTABLE_141 0x141
 | 
			
		||||
#define INFTABLE_MET_RUTO_FIRST_TIME 0x141
 | 
			
		||||
#define INFTABLE_LEARNED_WHY_RUTO_IN_JABU_JABU 0x142
 | 
			
		||||
#define INFTABLE_BECAME_CARRIER_FOR_RUTO 0x143
 | 
			
		||||
#define INFTABLE_144 0x144
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,14 +44,14 @@ void EnRu1_Fountain_TreadingWater(EnRu1* this, PlayState* play);
 | 
			
		|||
void EnRu1_Fountain_StartingSwimBack(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Fountain_SwimmingBack(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Fountain_FinishingSwimBack(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECA94(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECAB4(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECAD4(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECB18(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECB60(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECBB8(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECC1C(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AECC84(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_RangeCheck(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_InitPosition(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_FacingLink(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_TurningAround(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_WalkingAwayAccel(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_WalkingAwayConstant(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_FallingDownHole(EnRu1* this, PlayState* play);
 | 
			
		||||
void EnRu1_Meeting_End(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AED304(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AED324(EnRu1* this, PlayState* play);
 | 
			
		||||
void func_80AED344(EnRu1* this, PlayState* play);
 | 
			
		||||
| 
						 | 
				
			
			@ -146,52 +146,52 @@ static s32 sUnused = 0;
 | 
			
		|||
static u32 D_80AF1938 = 0;
 | 
			
		||||
 | 
			
		||||
static EnRu1ActionFunc sActionFuncs[] = {
 | 
			
		||||
    EnRu1_Fountain_GazingAtLink,      // ENRU1_ACTION_FOUNTAIN_GAZING_AT_LINK
 | 
			
		||||
    EnRu1_Fountain_Diving,            // ENRU1_ACTION_FOUNTAIN_DIVING
 | 
			
		||||
    EnRu1_Fountain_Resurfacing,       // ENRU1_ACTION_FOUNTAIN_RESURFACING
 | 
			
		||||
    EnRu1_Fountain_TreadingWater,     // ENRU1_ACTION_FOUNTAIN_TREADING_WATER
 | 
			
		||||
    EnRu1_Fountain_StartingSwimBack,  // ENRU1_ACTION_FOUNTAIN_STARTING_SWIM_BACK
 | 
			
		||||
    EnRu1_Fountain_SwimmingBack,      // ENRU1_ACTION_FOUNTAIN_SWIMMING_BACK
 | 
			
		||||
    EnRu1_Fountain_FinishingSwimBack, // ENRU1_ACTION_FOUNTAIN_FINISHING_SWIM_BACK
 | 
			
		||||
    func_80AECA94,                    // ENRU1_ACTION_07
 | 
			
		||||
    func_80AECAB4,                    // ENRU1_ACTION_08
 | 
			
		||||
    func_80AECAD4,                    // ENRU1_ACTION_09
 | 
			
		||||
    func_80AECB18,                    // ENRU1_ACTION_10
 | 
			
		||||
    func_80AECB60,                    // ENRU1_ACTION_11
 | 
			
		||||
    func_80AECBB8,                    // ENRU1_ACTION_12
 | 
			
		||||
    func_80AECC1C,                    // ENRU1_ACTION_13
 | 
			
		||||
    func_80AECC84,                    // ENRU1_ACTION_14
 | 
			
		||||
    func_80AED304,                    // ENRU1_ACTION_15
 | 
			
		||||
    func_80AED324,                    // ENRU1_ACTION_16
 | 
			
		||||
    func_80AED344,                    // ENRU1_ACTION_17
 | 
			
		||||
    func_80AED374,                    // ENRU1_ACTION_18
 | 
			
		||||
    func_80AED3A4,                    // ENRU1_ACTION_19
 | 
			
		||||
    func_80AED3E0,                    // ENRU1_ACTION_20
 | 
			
		||||
    func_80AED414,                    // ENRU1_ACTION_21
 | 
			
		||||
    EnRu1_Speakable_PreSpawn,         // ENRU1_ACTION_PRE_SPAWN_SPEAKABLE
 | 
			
		||||
    EnRu1_Speakable_Spawn,            // ENRU1_ACTION_SPAWN_SPEAKABLE
 | 
			
		||||
    EnRu1_Speakable_Idle,             // ENRU1_ACTION_IDLE_SPEAKABLE
 | 
			
		||||
    EnRu1_Speakable_JabuTalk,         // ENRU1_ACTION_TALK_IN_JABU
 | 
			
		||||
    EnRu1_Speakable_TakingSeat,       // ENRU1_ACTION_TAKING_SEAT
 | 
			
		||||
    func_80AEEBD4,                    // ENRU1_ACTION_27
 | 
			
		||||
    func_80AEEC5C,                    // ENRU1_ACTION_28
 | 
			
		||||
    func_80AEECF0,                    // ENRU1_ACTION_29
 | 
			
		||||
    func_80AEED58,                    // ENRU1_ACTION_30
 | 
			
		||||
    func_80AEEDCC,                    // ENRU1_ACTION_31
 | 
			
		||||
    func_80AEEE34,                    // ENRU1_ACTION_32
 | 
			
		||||
    func_80AEEE9C,                    // ENRU1_ACTION_33
 | 
			
		||||
    func_80AEEF08,                    // ENRU1_ACTION_34
 | 
			
		||||
    func_80AEEF5C,                    // ENRU1_ACTION_35
 | 
			
		||||
    func_80AEF9D8,                    // ENRU1_ACTION_36
 | 
			
		||||
    func_80AEFA2C,                    // ENRU1_ACTION_37
 | 
			
		||||
    func_80AEFAAC,                    // ENRU1_ACTION_38
 | 
			
		||||
    func_80AEFB04,                    // ENRU1_ACTION_39
 | 
			
		||||
    func_80AEFB68,                    // ENRU1_ACTION_40
 | 
			
		||||
    func_80AEFCE8,                    // ENRU1_ACTION_41
 | 
			
		||||
    func_80AEFBC8,                    // ENRU1_ACTION_42
 | 
			
		||||
    func_80AEFC24,                    // ENRU1_ACTION_43
 | 
			
		||||
    EnRu1_ThroneRoom_Idle,            // ENRU1_ACTION_THRONE_IDLE
 | 
			
		||||
    EnRu1_ThroneRoom_Talk,            // ENRU1_ACTION_THRONE_TALK
 | 
			
		||||
    EnRu1_Fountain_GazingAtLink,       // ENRU1_ACTION_FOUNTAIN_GAZING_AT_LINK
 | 
			
		||||
    EnRu1_Fountain_Diving,             // ENRU1_ACTION_FOUNTAIN_DIVING
 | 
			
		||||
    EnRu1_Fountain_Resurfacing,        // ENRU1_ACTION_FOUNTAIN_RESURFACING
 | 
			
		||||
    EnRu1_Fountain_TreadingWater,      // ENRU1_ACTION_FOUNTAIN_TREADING_WATER
 | 
			
		||||
    EnRu1_Fountain_StartingSwimBack,   // ENRU1_ACTION_FOUNTAIN_STARTING_SWIM_BACK
 | 
			
		||||
    EnRu1_Fountain_SwimmingBack,       // ENRU1_ACTION_FOUNTAIN_SWIMMING_BACK
 | 
			
		||||
    EnRu1_Fountain_FinishingSwimBack,  // ENRU1_ACTION_FOUNTAIN_FINISHING_SWIM_BACK
 | 
			
		||||
    EnRu1_Meeting_RangeCheck,          // ENRU1_ACTION_MEETING_RANGE_CHECK
 | 
			
		||||
    EnRu1_Meeting_InitPosition,        // ENRU1_ACTION_MEETING_INIT_POSITION
 | 
			
		||||
    EnRu1_Meeting_FacingLink,          // ENRU1_ACTION_MEETING_FACING_LINK
 | 
			
		||||
    EnRu1_Meeting_TurningAround,       // ENRU1_ACTION_MEETING_TURNING_AROUND
 | 
			
		||||
    EnRu1_Meeting_WalkingAwayAccel,    // ENRU1_ACTION_MEETING_WALKING_AWAY_ACCEL
 | 
			
		||||
    EnRu1_Meeting_WalkingAwayConstant, // ENRU1_ACTION_MEETING_WALKING_AWAY_CONSTANT
 | 
			
		||||
    EnRu1_Meeting_FallingDownHole,     // ENRU1_ACTION_MEETING_FALLING_DOWN_HOLE
 | 
			
		||||
    EnRu1_Meeting_End,                 // ENRU1_ACTION_MEETING_END
 | 
			
		||||
    func_80AED304,                     // ENRU1_ACTION_15
 | 
			
		||||
    func_80AED324,                     // ENRU1_ACTION_16
 | 
			
		||||
    func_80AED344,                     // ENRU1_ACTION_17
 | 
			
		||||
    func_80AED374,                     // ENRU1_ACTION_18
 | 
			
		||||
    func_80AED3A4,                     // ENRU1_ACTION_19
 | 
			
		||||
    func_80AED3E0,                     // ENRU1_ACTION_20
 | 
			
		||||
    func_80AED414,                     // ENRU1_ACTION_21
 | 
			
		||||
    EnRu1_Speakable_PreSpawn,          // ENRU1_ACTION_PRE_SPAWN_SPEAKABLE
 | 
			
		||||
    EnRu1_Speakable_Spawn,             // ENRU1_ACTION_SPAWN_SPEAKABLE
 | 
			
		||||
    EnRu1_Speakable_Idle,              // ENRU1_ACTION_IDLE_SPEAKABLE
 | 
			
		||||
    EnRu1_Speakable_JabuTalk,          // ENRU1_ACTION_TALK_IN_JABU
 | 
			
		||||
    EnRu1_Speakable_TakingSeat,        // ENRU1_ACTION_TAKING_SEAT
 | 
			
		||||
    func_80AEEBD4,                     // ENRU1_ACTION_27
 | 
			
		||||
    func_80AEEC5C,                     // ENRU1_ACTION_28
 | 
			
		||||
    func_80AEECF0,                     // ENRU1_ACTION_29
 | 
			
		||||
    func_80AEED58,                     // ENRU1_ACTION_30
 | 
			
		||||
    func_80AEEDCC,                     // ENRU1_ACTION_31
 | 
			
		||||
    func_80AEEE34,                     // ENRU1_ACTION_32
 | 
			
		||||
    func_80AEEE9C,                     // ENRU1_ACTION_33
 | 
			
		||||
    func_80AEEF08,                     // ENRU1_ACTION_34
 | 
			
		||||
    func_80AEEF5C,                     // ENRU1_ACTION_35
 | 
			
		||||
    func_80AEF9D8,                     // ENRU1_ACTION_36
 | 
			
		||||
    func_80AEFA2C,                     // ENRU1_ACTION_37
 | 
			
		||||
    func_80AEFAAC,                     // ENRU1_ACTION_38
 | 
			
		||||
    func_80AEFB04,                     // ENRU1_ACTION_39
 | 
			
		||||
    func_80AEFB68,                     // ENRU1_ACTION_40
 | 
			
		||||
    func_80AEFCE8,                     // ENRU1_ACTION_41
 | 
			
		||||
    func_80AEFBC8,                     // ENRU1_ACTION_42
 | 
			
		||||
    func_80AEFC24,                     // ENRU1_ACTION_43
 | 
			
		||||
    EnRu1_ThroneRoom_Idle,             // ENRU1_ACTION_THRONE_IDLE
 | 
			
		||||
    EnRu1_ThroneRoom_Talk,             // ENRU1_ACTION_THRONE_TALK
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = {
 | 
			
		||||
| 
						 | 
				
			
			@ -845,9 +845,9 @@ void EnRu1_Fountain_FinishingSwimBack(EnRu1* this, PlayState* play) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void EnRu1_InitInJabuJabuHolesRoom(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if (!GET_INFTABLE(INFTABLE_141)) {
 | 
			
		||||
    if (!GET_INFTABLE(INFTABLE_MET_RUTO_FIRST_TIME)) {
 | 
			
		||||
        EnRu1_AnimationChange(this, &gRutoChildWait2Anim, ANIMMODE_LOOP, 0, false);
 | 
			
		||||
        this->action = ENRU1_ACTION_07;
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_RANGE_CHECK;
 | 
			
		||||
        EnRu1_SetMouth(this, ENRU1_MOUTH_FROWNING);
 | 
			
		||||
    } else if (GET_INFTABLE(INFTABLE_147) && !GET_INFTABLE(INFTABLE_140) && !GET_INFTABLE(INFTABLE_145)) {
 | 
			
		||||
        if (!func_80AEB020(this, play)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -869,11 +869,14 @@ void EnRu1_InitInJabuJabuHolesRoom(EnRu1* this, PlayState* play) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC40C(EnRu1* this) {
 | 
			
		||||
    f32 unk_26C = this->unk_26C;
 | 
			
		||||
/**
 | 
			
		||||
 * Accelerates Ruto forward as she starts to walk away. This lasts for eight frames.
 | 
			
		||||
 */
 | 
			
		||||
void EnRu1_AccelerateAway(EnRu1* this) {
 | 
			
		||||
    f32 walkingFrame = this->walkingFrame;
 | 
			
		||||
 | 
			
		||||
    if (unk_26C < 8.0f) {
 | 
			
		||||
        this->actor.speed = (((kREG(3) * 0.01f) + 2.7f) / 8.0f) * unk_26C;
 | 
			
		||||
    if (walkingFrame < 8.0f) {
 | 
			
		||||
        this->actor.speed = (((kREG(3) * 0.01f) + 2.7f) / 8.0f) * walkingFrame;
 | 
			
		||||
    } else {
 | 
			
		||||
        this->actor.speed = (kREG(3) * 0.01f) + 2.7f;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -881,19 +884,25 @@ void func_80AEC40C(EnRu1* this) {
 | 
			
		|||
    Actor_MoveXZGravity(&this->actor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC4CC(EnRu1* this) {
 | 
			
		||||
/**
 | 
			
		||||
 * Moves Ruto forward at a constant speed walking away from Link.
 | 
			
		||||
 */
 | 
			
		||||
void EnRu1_MoveForwardConstant(EnRu1* this) {
 | 
			
		||||
    this->actor.velocity.y = -1.0f;
 | 
			
		||||
    Actor_MoveXZGravity(&this->actor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC4F4(EnRu1* this) {
 | 
			
		||||
/**
 | 
			
		||||
 * Accelerate's Ruto's actor downward as she falls down the hole.
 | 
			
		||||
 */
 | 
			
		||||
void EnRu1_AccelerateDownHole(EnRu1* this) {
 | 
			
		||||
    f32* speedXZ = &this->actor.speed;
 | 
			
		||||
    f32* unk_26C = &this->unk_26C;
 | 
			
		||||
    f32* walkingFrame = &this->walkingFrame;
 | 
			
		||||
 | 
			
		||||
    if (this->unk_26C < 8.0f) {
 | 
			
		||||
        *unk_26C += 1.0f;
 | 
			
		||||
        *speedXZ *= (8.0f - *unk_26C) / 8.0f;
 | 
			
		||||
        this->actor.velocity.y = -*unk_26C * (((kREG(4) * 0.01f) + 13.0f) / 8.0f);
 | 
			
		||||
    if (this->walkingFrame < 8.0f) {
 | 
			
		||||
        *walkingFrame += 1.0f;
 | 
			
		||||
        *speedXZ *= (8.0f - *walkingFrame) / 8.0f;
 | 
			
		||||
        this->actor.velocity.y = -*walkingFrame * (((kREG(4) * 0.01f) + 13.0f) / 8.0f);
 | 
			
		||||
    } else {
 | 
			
		||||
        *speedXZ = 0.0f;
 | 
			
		||||
        this->actor.velocity.y = -((kREG(4) * 0.01f) + 13.0f);
 | 
			
		||||
| 
						 | 
				
			
			@ -901,7 +910,7 @@ void func_80AEC4F4(EnRu1* this) {
 | 
			
		|||
    Actor_MoveXZGravity(&this->actor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
s32 func_80AEC5FC(EnRu1* this, PlayState* play) {
 | 
			
		||||
s32 EnRu1_IsPlayerInRangeForFirstEncounter(EnRu1* this, PlayState* play) {
 | 
			
		||||
    Player* player = GET_PLAYER(play);
 | 
			
		||||
    f32 thisPosZ = this->actor.world.pos.z;
 | 
			
		||||
    f32 playerPosZ = player->actor.world.pos.z;
 | 
			
		||||
| 
						 | 
				
			
			@ -912,46 +921,49 @@ s32 func_80AEC5FC(EnRu1* this, PlayState* play) {
 | 
			
		|||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC650(EnRu1* this) {
 | 
			
		||||
void EnRu1_PlayStepSfx(EnRu1* this) {
 | 
			
		||||
    s32 pad[2];
 | 
			
		||||
 | 
			
		||||
    if (this->unk_280 == 0) {
 | 
			
		||||
    if (this->isFalling == 0) {
 | 
			
		||||
        if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 7.0f)) {
 | 
			
		||||
            Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_JABU);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC6B0(EnRu1* this) {
 | 
			
		||||
void EnRu1_PlayFallingSfx(EnRu1* this) {
 | 
			
		||||
    Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_FALL_DOWN_DIRT);
 | 
			
		||||
    Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_VO_RT_FALL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC6E4(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if ((EnRu1_CheckCueMatchingId(play, 4, 3)) && (this->unk_280 == 0)) {
 | 
			
		||||
/**
 | 
			
		||||
 * Checks if Ruto is standing over the Jabu Jabu hole and initiates her reaction to falling.
 | 
			
		||||
 */
 | 
			
		||||
void EnRu1_RespondToFalling(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if ((EnRu1_CheckCueMatchingId(play, 4, 3)) && (this->isFalling == 0)) {
 | 
			
		||||
        Animation_Change(&this->skelAnime, &gRutoChildBringArmsUpAnim, 1.0f, 0,
 | 
			
		||||
                         Animation_GetLastFrame(&gRutoChildBringArmsUpAnim), ANIMMODE_ONCE, -8.0f);
 | 
			
		||||
        this->unk_280 = 1;
 | 
			
		||||
        func_80AEC6B0(this);
 | 
			
		||||
        this->isFalling = 1;
 | 
			
		||||
        EnRu1_PlayFallingSfx(this);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC780(EnRu1* this, PlayState* play) {
 | 
			
		||||
void EnRu1_CheckStartFirstEncounter(EnRu1* this, PlayState* play) {
 | 
			
		||||
    s32 pad;
 | 
			
		||||
    Player* player = GET_PLAYER(play);
 | 
			
		||||
 | 
			
		||||
    if ((func_80AEC5FC(this, play)) && (!Play_InCsMode(play)) &&
 | 
			
		||||
    if ((EnRu1_IsPlayerInRangeForFirstEncounter(this, play)) && (!Play_InCsMode(play)) &&
 | 
			
		||||
        (!(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) &&
 | 
			
		||||
        (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
 | 
			
		||||
 | 
			
		||||
        play->csCtx.script = gRutoFirstMeetingCs;
 | 
			
		||||
        gSaveContext.cutsceneTrigger = 1;
 | 
			
		||||
        player->speedXZ = 0.0f;
 | 
			
		||||
        this->action = ENRU1_ACTION_08;
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_INIT_POSITION;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC81C(EnRu1* this, PlayState* play) {
 | 
			
		||||
void EnRu1_SetupPositionForFirstEncounter(EnRu1* this, PlayState* play) {
 | 
			
		||||
    CsCmdActorCue* cue;
 | 
			
		||||
    s16 newRotY;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -963,109 +975,109 @@ void func_80AEC81C(EnRu1* this, PlayState* play) {
 | 
			
		|||
        newRotY = cue->rot.y;
 | 
			
		||||
        this->actor.shape.rot.y = newRotY;
 | 
			
		||||
        this->actor.world.rot.y = newRotY;
 | 
			
		||||
        this->action = ENRU1_ACTION_09;
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_FACING_LINK;
 | 
			
		||||
        this->drawConfig = ENRU1_DRAW_OPA;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC8B8(EnRu1* this, PlayState* play) {
 | 
			
		||||
void EnRu1_CheckTurnAround(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if (EnRu1_CheckCueMatchingId(play, 3, 3)) {
 | 
			
		||||
        Animation_Change(&this->skelAnime, &gRutoChildTurnAroundAnim, 1.0f, 0,
 | 
			
		||||
                         Animation_GetLastFrame(&gRutoChildTurnAroundAnim), ANIMMODE_ONCE, -8.0f);
 | 
			
		||||
        this->action = ENRU1_ACTION_10;
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_TURNING_AROUND;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC93C(EnRu1* this, UNK_TYPE arg1) {
 | 
			
		||||
    if (arg1 != 0) {
 | 
			
		||||
void EnRu1_StartWalkingAway(EnRu1* this, s32 doneTurning) {
 | 
			
		||||
    if (doneTurning) {
 | 
			
		||||
        Animation_Change(&this->skelAnime, &gRutoChildWalkAnim, 1.0f, 0, Animation_GetLastFrame(&gRutoChildWalkAnim),
 | 
			
		||||
                         ANIMMODE_LOOP, -8.0f);
 | 
			
		||||
        this->actor.world.rot.y += 0x8000;
 | 
			
		||||
        this->action = ENRU1_ACTION_11;
 | 
			
		||||
        this->unk_26C = 0.0f;
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_WALKING_AWAY_ACCEL;
 | 
			
		||||
        this->walkingFrame = 0.0f;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AEC9C4(EnRu1* this) {
 | 
			
		||||
    this->unk_26C += 1.0f;
 | 
			
		||||
    if (this->unk_26C >= 8.0f) {
 | 
			
		||||
        this->action = ENRU1_ACTION_12;
 | 
			
		||||
        this->unk_26C = 0.0f;
 | 
			
		||||
void EnRu1_AdvanceWalkingAway(EnRu1* this) {
 | 
			
		||||
    this->walkingFrame += 1.0f;
 | 
			
		||||
    if (this->walkingFrame >= 8.0f) {
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_WALKING_AWAY_CONSTANT;
 | 
			
		||||
        this->walkingFrame = 0.0f;
 | 
			
		||||
        this->actor.velocity.y = -1.0f;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECA18(EnRu1* this) {
 | 
			
		||||
void EnRu1_CheckStartFalling(EnRu1* this) {
 | 
			
		||||
    if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
 | 
			
		||||
        s32 pad;
 | 
			
		||||
 | 
			
		||||
        this->action = ENRU1_ACTION_13;
 | 
			
		||||
        this->unk_26C = 0.0f;
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_FALLING_DOWN_HOLE;
 | 
			
		||||
        this->walkingFrame = 0.0f;
 | 
			
		||||
        this->actor.velocity.y = 0.0f;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECA44(EnRu1* this, PlayState* play) {
 | 
			
		||||
void EnRu1_FinishFirstEncounter(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if (EnRu1_CheckCueMatchingId(play, 5, 3)) {
 | 
			
		||||
        SET_INFTABLE(INFTABLE_141);
 | 
			
		||||
        this->action = ENRU1_ACTION_14;
 | 
			
		||||
        SET_INFTABLE(INFTABLE_MET_RUTO_FIRST_TIME);
 | 
			
		||||
        this->action = ENRU1_ACTION_MEETING_END;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECA94(EnRu1* this, PlayState* play) {
 | 
			
		||||
    func_80AEC780(this, play);
 | 
			
		||||
void EnRu1_Meeting_RangeCheck(EnRu1* this, PlayState* play) {
 | 
			
		||||
    EnRu1_CheckStartFirstEncounter(this, play);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECAB4(EnRu1* this, PlayState* play) {
 | 
			
		||||
    func_80AEC81C(this, play);
 | 
			
		||||
void EnRu1_Meeting_InitPosition(EnRu1* this, PlayState* play) {
 | 
			
		||||
    EnRu1_SetupPositionForFirstEncounter(this, play);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECAD4(EnRu1* this, PlayState* play) {
 | 
			
		||||
void EnRu1_Meeting_FacingLink(EnRu1* this, PlayState* play) {
 | 
			
		||||
    EnRu1_UpdateSkelAnime(this);
 | 
			
		||||
    EnRu1_UpdateEyes(this);
 | 
			
		||||
    func_80AEAECC(this, play);
 | 
			
		||||
    func_80AEC8B8(this, play);
 | 
			
		||||
    EnRu1_CheckTurnAround(this, play);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECB18(EnRu1* this, PlayState* play) {
 | 
			
		||||
    s32 something;
 | 
			
		||||
void EnRu1_Meeting_TurningAround(EnRu1* this, PlayState* play) {
 | 
			
		||||
    s32 doneAnim;
 | 
			
		||||
 | 
			
		||||
    something = EnRu1_UpdateSkelAnime(this);
 | 
			
		||||
    doneAnim = EnRu1_UpdateSkelAnime(this);
 | 
			
		||||
    EnRu1_UpdateEyes(this);
 | 
			
		||||
    func_80AEAECC(this, play);
 | 
			
		||||
    func_80AEC93C(this, something);
 | 
			
		||||
    EnRu1_StartWalkingAway(this, doneAnim);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECB60(EnRu1* this, PlayState* play) {
 | 
			
		||||
    func_80AEC40C(this);
 | 
			
		||||
void EnRu1_Meeting_WalkingAwayAccel(EnRu1* this, PlayState* play) {
 | 
			
		||||
    EnRu1_AccelerateAway(this);
 | 
			
		||||
    EnRu1_UpdateSkelAnime(this);
 | 
			
		||||
    EnRu1_UpdateEyes(this);
 | 
			
		||||
    func_80AEAECC(this, play);
 | 
			
		||||
    func_80AEC650(this);
 | 
			
		||||
    func_80AEC9C4(this);
 | 
			
		||||
    EnRu1_PlayStepSfx(this);
 | 
			
		||||
    EnRu1_AdvanceWalkingAway(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECBB8(EnRu1* this, PlayState* play) {
 | 
			
		||||
    func_80AEC4CC(this);
 | 
			
		||||
    func_80AEC6E4(this, play);
 | 
			
		||||
void EnRu1_Meeting_WalkingAwayConstant(EnRu1* this, PlayState* play) {
 | 
			
		||||
    EnRu1_MoveForwardConstant(this);
 | 
			
		||||
    EnRu1_RespondToFalling(this, play);
 | 
			
		||||
    EnRu1_UpdateSkelAnime(this);
 | 
			
		||||
    EnRu1_UpdateEyes(this);
 | 
			
		||||
    func_80AEAECC(this, play);
 | 
			
		||||
    func_80AEC650(this);
 | 
			
		||||
    func_80AECA18(this);
 | 
			
		||||
    EnRu1_PlayStepSfx(this);
 | 
			
		||||
    EnRu1_CheckStartFalling(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECC1C(EnRu1* this, PlayState* play) {
 | 
			
		||||
    func_80AEC4F4(this);
 | 
			
		||||
    func_80AEC6E4(this, play);
 | 
			
		||||
void EnRu1_Meeting_FallingDownHole(EnRu1* this, PlayState* play) {
 | 
			
		||||
    EnRu1_AccelerateDownHole(this);
 | 
			
		||||
    EnRu1_RespondToFalling(this, play);
 | 
			
		||||
    EnRu1_UpdateSkelAnime(this);
 | 
			
		||||
    EnRu1_UpdateEyes(this);
 | 
			
		||||
    func_80AEAECC(this, play);
 | 
			
		||||
    func_80AEC650(this);
 | 
			
		||||
    func_80AECA44(this, play);
 | 
			
		||||
    EnRu1_PlayStepSfx(this);
 | 
			
		||||
    EnRu1_FinishFirstEncounter(this, play);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void func_80AECC84(EnRu1* this, PlayState* play) {
 | 
			
		||||
void EnRu1_Meeting_End(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if (play->csCtx.state == CS_STATE_IDLE) {
 | 
			
		||||
        Actor_Kill(&this->actor);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -1135,8 +1147,8 @@ s32 func_80AECF6C(EnRu1* this, PlayState* play) {
 | 
			
		|||
    f32 temp2;
 | 
			
		||||
    s32 pad2[5];
 | 
			
		||||
 | 
			
		||||
    this->unk_26C += 1.0f;
 | 
			
		||||
    if ((player->actor.speed == 0.0f) && (this->unk_26C >= 3.0f)) {
 | 
			
		||||
    this->walkingFrame += 1.0f;
 | 
			
		||||
    if ((player->actor.speed == 0.0f) && (this->walkingFrame >= 3.0f)) {
 | 
			
		||||
        otherPlayer = GET_PLAYER(play);
 | 
			
		||||
        player->actor.world.pos.x = otherPlayer->unk_450.x;
 | 
			
		||||
        player->actor.world.pos.y = otherPlayer->unk_450.y;
 | 
			
		||||
| 
						 | 
				
			
			@ -1191,7 +1203,7 @@ void func_80AED110(EnRu1* this) {
 | 
			
		|||
void func_80AED154(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if (func_80AED084(this, WARP_BLUE_RUTO_STATE_ENTERED)) {
 | 
			
		||||
        this->action = ENRU1_ACTION_19;
 | 
			
		||||
        this->unk_26C = 0.0f;
 | 
			
		||||
        this->walkingFrame = 0.0f;
 | 
			
		||||
        func_80AECEB4(this, play);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1256,7 +1268,7 @@ void func_80AED414(EnRu1* this, PlayState* play) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void EnRu1_InitInJabuJabuBasement(EnRu1* this, PlayState* play) {
 | 
			
		||||
    if (GET_INFTABLE(INFTABLE_141) && !GET_INFTABLE(INFTABLE_145) && !GET_INFTABLE(INFTABLE_140) &&
 | 
			
		||||
    if (GET_INFTABLE(INFTABLE_MET_RUTO_FIRST_TIME) && !GET_INFTABLE(INFTABLE_145) && !GET_INFTABLE(INFTABLE_140) &&
 | 
			
		||||
        !GET_INFTABLE(INFTABLE_147)) {
 | 
			
		||||
        if (!func_80AEB020(this, play)) {
 | 
			
		||||
            s8 actorRoom;
 | 
			
		||||
| 
						 | 
				
			
			@ -1707,7 +1719,7 @@ s32 func_80AEE6D0(EnRu1* this, PlayState* play) {
 | 
			
		|||
                             Animation_GetLastFrame(&gRutoChildSquirmAnim), ANIMMODE_LOOP, -8.0f);
 | 
			
		||||
            func_80AED600(this);
 | 
			
		||||
            this->action = ENRU1_ACTION_34;
 | 
			
		||||
            this->unk_26C = 0.0f;
 | 
			
		||||
            this->walkingFrame = 0.0f;
 | 
			
		||||
            play->csCtx.script = gRutoFoundSapphireCs;
 | 
			
		||||
            gSaveContext.cutsceneTrigger = 1;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -2302,7 +2314,7 @@ void EnRu1_ThroneRoom_Talk(EnRu1* this, PlayState* play) {
 | 
			
		|||
void EnRu1_InitBesideDoorSwitch(EnRu1* this, PlayState* play) {
 | 
			
		||||
    s8 actorRoom;
 | 
			
		||||
 | 
			
		||||
    if (GET_INFTABLE(INFTABLE_141) && GET_INFTABLE(INFTABLE_140) && !GET_INFTABLE(INFTABLE_145) &&
 | 
			
		||||
    if (GET_INFTABLE(INFTABLE_MET_RUTO_FIRST_TIME) && GET_INFTABLE(INFTABLE_140) && !GET_INFTABLE(INFTABLE_145) &&
 | 
			
		||||
        (!(func_80AEB020(this, play)))) {
 | 
			
		||||
        EnRu1_AnimationChange(this, &gRutoChildWait2Anim, ANIMMODE_LOOP, 0, false);
 | 
			
		||||
        actorRoom = this->actor.room;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,12 +26,12 @@ typedef struct EnRu1 {
 | 
			
		|||
    /* 0x0260 */ s16 mouth;
 | 
			
		||||
    /* 0x0264 */ s32 action;
 | 
			
		||||
    /* 0x0268 */ s32 drawConfig;
 | 
			
		||||
    /* 0x026C */ f32 unk_26C;
 | 
			
		||||
    /* 0x026C */ f32 walkingFrame;
 | 
			
		||||
    /* 0x0270 */ f32 treadTimer;
 | 
			
		||||
    /* 0x0274 */ char unk_274[0x4];
 | 
			
		||||
    /* 0x0278 */ DoorWarp1* blueWarp;
 | 
			
		||||
    /* 0x027C */ f32 unk_27C;
 | 
			
		||||
    /* 0x0280 */ s32 unk_280;
 | 
			
		||||
    /* 0x0280 */ s32 isFalling;
 | 
			
		||||
    /* 0x0284 */ s8 roomNum1;
 | 
			
		||||
    /* 0x0285 */ s8 roomNum2;
 | 
			
		||||
    /* 0x0286 */ s8 roomNum3;
 | 
			
		||||
| 
						 | 
				
			
			@ -68,14 +68,14 @@ typedef enum EnRu1Action {
 | 
			
		|||
    /*  4 */ ENRU1_ACTION_FOUNTAIN_STARTING_SWIM_BACK,
 | 
			
		||||
    /*  5 */ ENRU1_ACTION_FOUNTAIN_SWIMMING_BACK,
 | 
			
		||||
    /*  6 */ ENRU1_ACTION_FOUNTAIN_FINISHING_SWIM_BACK,
 | 
			
		||||
    /*  7 */ ENRU1_ACTION_07,
 | 
			
		||||
    /*  8 */ ENRU1_ACTION_08,
 | 
			
		||||
    /*  9 */ ENRU1_ACTION_09,
 | 
			
		||||
    /* 10 */ ENRU1_ACTION_10,
 | 
			
		||||
    /* 11 */ ENRU1_ACTION_11,
 | 
			
		||||
    /* 12 */ ENRU1_ACTION_12,
 | 
			
		||||
    /* 13 */ ENRU1_ACTION_13,
 | 
			
		||||
    /* 14 */ ENRU1_ACTION_14,
 | 
			
		||||
    /*  7 */ ENRU1_ACTION_MEETING_RANGE_CHECK,
 | 
			
		||||
    /*  8 */ ENRU1_ACTION_MEETING_INIT_POSITION,
 | 
			
		||||
    /*  9 */ ENRU1_ACTION_MEETING_FACING_LINK,
 | 
			
		||||
    /* 10 */ ENRU1_ACTION_MEETING_TURNING_AROUND,
 | 
			
		||||
    /* 11 */ ENRU1_ACTION_MEETING_WALKING_AWAY_ACCEL,
 | 
			
		||||
    /* 12 */ ENRU1_ACTION_MEETING_WALKING_AWAY_CONSTANT,
 | 
			
		||||
    /* 13 */ ENRU1_ACTION_MEETING_FALLING_DOWN_HOLE,
 | 
			
		||||
    /* 14 */ ENRU1_ACTION_MEETING_END,
 | 
			
		||||
    /* 15 */ ENRU1_ACTION_15,
 | 
			
		||||
    /* 16 */ ENRU1_ACTION_16,
 | 
			
		||||
    /* 17 */ ENRU1_ACTION_17,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue