#include "kkj_26.h"

EvtScript N(EVS_Scene_WhereIsMario) = {
    EVT_CALL(DisablePlayerInput, TRUE)
    EVT_CALL(DisablePlayerPhysics, TRUE)
    EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 1, 8)
    EVT_CALL(DisablePartnerAI, 0)
    EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -500, 0)
    EVT_CALL(RotateModel, MODEL_o85, 80, 0, -1, 0)
    EVT_CALL(RotateModel, MODEL_o83, 80, 0, 1, 0)
    EVT_CALL(RotateModel, MODEL_o86, 80, 0, -1, 0)
    EVT_CALL(RotateModel, MODEL_o84, 80, 0, 1, 0)
    EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 550, 30, -20)
    EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0))
    EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-10.0))
    EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(570.0), 0)
    EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
    EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
    EVT_WAIT(50)
    EVT_CALL(func_802D1270, 550, -20, EVT_FLOAT(2.0))
    EVT_WAIT(30)
    EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms)
    EVT_WAIT(10)
    EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle)
    EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0032)
    EVT_CALL(FadeOutMusic, 0, 4000)
    EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0))
    EVT_EXEC_WAIT(N(EVS_GotoMap_hos_00_1))
    EVT_CALL(EnablePartnerAI)
    EVT_CALL(DisablePlayerPhysics, FALSE)
    EVT_CALL(DisablePlayerInput, FALSE)
    EVT_RETURN
    EVT_END
};

EvtScript N(EVS_Scene_AfterAllSpiritsRescued) = {
    EVT_CALL(DisablePlayerInput, TRUE)
    EVT_CALL(DisablePartnerAI, 0)
    EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 1, 8)
    EVT_CALL(InterpPlayerYaw, 90, 0)
    EVT_CALL(SetNpcPos, NPC_PARTNER, 500, 50, 0)
    EVT_CALL(SetNpcYaw, NPC_PARTNER, 90)
    EVT_WAIT(30)
    EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 500, 30, -20)
    EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
    EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0))
    EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
    EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
    EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
    EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms)
    EVT_WAIT(10)
    EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle)
    EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_015E)
    EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms)
    EVT_WAIT(10)
    EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle)
    EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_015F)
    EVT_CALL(PlayerFaceNpc, NPC_PARTNER, 5)
    EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0160)
    EVT_WAIT(10)
    EVT_CALL(EnablePartnerAI)
    EVT_CALL(func_802D1270, 480, -20, EVT_FLOAT(2.0))
    EVT_CALL(SetPlayerAnimation, ANIM_Peach2_OpenDoors)
    EVT_SET(LVar0, kkj_26_ENTRY_0)
    EVT_SET(LVar1, COLLIDER_ttw)
    EVT_SET(LVar2, MODEL_o85)
    EVT_SET(LVar3, MODEL_o83)
    EVT_SET(LVar4, MODEL_o86)
    EVT_SET(LVar5, MODEL_o84)
    EVT_EXEC(ExitSplitDoubleDoor)
    EVT_WAIT(17)
    EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_A)
    EVT_WAIT(100)
    EVT_CALL(DisablePlayerInput, FALSE)
    EVT_RETURN
    EVT_END
};
