#include "Cutscene/Cutscene.hpp"
#include "Unknown/UnkStruct_027e09a4.hpp"
#include "Unknown/UnkStruct_027e09b8.hpp"

const CutsceneParamsEntry gCSParamsEntries[CutsceneIndex_Max] = {
    {
        // CutsceneIndex_TitleScreen
        .mUnk_00            = "d00_01",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_TitleScreen,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_TitleScreen,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0048,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_Intro
        .mUnk_00            = "d02_01",
        .mSceneIndex        = SceneIndex_f_first,
        .mRoomIndex         = 0x0A,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_Intro,
        .mNextSceneIndex    = SceneIndex_f_first,
        .mNextRoomIndex     = 0x0A,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = true,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0049,
        .mFlag              = AdventureFlag_WatchedIntroCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_EngineerCertificate
        .mUnk_00            = "d03_01",
        .mSceneIndex        = SceneIndex_f_hyral,
        .mRoomIndex         = 0x06,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_EngineerCertificate,
        .mNextSceneIndex    = SceneIndex_f_hyral,
        .mNextRoomIndex     = 0x06,
        .mNextSpawnIndex    = 0x04,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x004A,
        .mFlag              = AdventureFlag_ObtainedEngineerCertificate,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_SpiritTowerSplit_01 (Rails disappearing)
        .mUnk_00            = "d04_01",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x03,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_SpiritTowerSplit_01,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x02,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_SpiritTowerSplit_02,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x004B,
        .mFlag              = AdventureFlag_WatchedSpiritTowerSplitCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_SpiritTowerSplit_02 (Spirit Tower split)
        .mUnk_00            = "d04_02",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x02,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_SpiritTowerSplit_02,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x03,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_SpiritTowerSplit_03,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x004C,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_SpiritTowerSplit_03 (Tower parts aligning)
        .mUnk_00            = "d04_03",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x03,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_SpiritTowerSplit_03,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x03,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_SpiritTowerSplit_04,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x004D,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_SpiritTowerSplit_04 (Demon Train appearing)
        .mUnk_00            = "d04_04",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x03,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_SpiritTowerSplit_04,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x03,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_SpiritTowerSplit_05,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0062,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_SpiritTowerSplit_05 (Zelda becoming a ghost)
        .mUnk_00            = "d04_05",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x03,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_SpiritTowerSplit_05,
        .mNextSceneIndex    = SceneIndex_f_hyral,
        .mNextRoomIndex     = 0x03,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0062,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_WalkingToSpiritTower
        .mUnk_00            = "d05_01",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x03,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_WalkingToSpiritTower,
        .mNextSceneIndex    = SceneIndex_d_main_f,
        .mNextRoomIndex     = 0x01,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_FirstAnjeanMeeting,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x004E,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_FirstAnjeanMeeting
        .mUnk_00            = "d06_01",
        .mSceneIndex        = SceneIndex_d_main_f,
        .mRoomIndex         = 0x01,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_FirstAnjeanMeeting,
        .mNextSceneIndex    = SceneIndex_d_main_f,
        .mNextRoomIndex     = 0x01,
        .mNextSpawnIndex    = 0x04,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x004F,
        .mFlag              = AdventureFlag_MetAnjeanFirstTime,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_FirstPhantomPossession
        .mUnk_00            = "d07_01",
        .mSceneIndex        = SceneIndex_d_main,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x02,
        .mCutsceneIndex     = CutsceneIndex_FirstPhantomPossession,
        .mNextSceneIndex    = SceneIndex_d_main,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x02,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0050,
        .mFlag              = AdventureFlag_WatchedFirstPhantomPossessionCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_ForestTempleCompleted_01 (Altar appearing in boss room)
        .mUnk_00            = "d08_01",
        .mSceneIndex        = SceneIndex_b_forest,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_ForestTempleCompleted_01,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x01,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_ForestTempleCompleted_02,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0051,
        .mFlag              = AdventureFlag_WatchedForestTempleCompletedCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_ForestTempleCompleted_02 (Forest Realm Spirit Tracks restoring)
        .mUnk_00            = "d08_02",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x01,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_ForestTempleCompleted_02,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x02,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_ForestTempleCompleted_03,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0052,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_ForestTempleCompleted_03 (First part of Spirit Tower split re-attatching)
        .mUnk_00            = "d08_03",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x02,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_ForestTempleCompleted_03,
        .mNextSceneIndex    = SceneIndex_b_forest,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x02,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0053,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_BlizzardTempleCompleted_01 (Altar appearing in boss room)
        .mUnk_00            = "d09_01",
        .mSceneIndex        = SceneIndex_b_snow,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_BlizzardTempleCompleted_01,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x06,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_BlizzardTempleCompleted_02,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0054,
        .mFlag              = AdventureFlag_WatchedBlizzardTempleCompletedCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_BlizzardTempleCompleted_02 (Snow Realm Spirit Tracks restoring)
        .mUnk_00            = "d09_02",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x06,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_BlizzardTempleCompleted_02,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x07,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_BlizzardTempleCompleted_03,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0055,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_BlizzardTempleCompleted_03 (Second part of Spirit Tower split re-attatching)
        .mUnk_00            = "d09_03",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x07,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_BlizzardTempleCompleted_03,
        .mNextSceneIndex    = SceneIndex_b_snow,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0053,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_MarineTempleCompleted_01 (Altar appearing in boss room)
        .mUnk_00            = "d10_01",
        .mSceneIndex        = SceneIndex_b_water,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x01,
        .mCutsceneIndex     = CutsceneIndex_MarineTempleCompleted_01,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x04,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_MarineTempleCompleted_02,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0056,
        .mFlag              = AdventureFlag_WatchedMarineTempleCompletedCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_MarineTempleCompleted_02 (Ocean Realm Spirit Tracks restoring)
        .mUnk_00            = "d10_02",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x04,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MarineTempleCompleted_02,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x05,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_MarineTempleCompleted_03,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0057,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_MarineTempleCompleted_03 (Third part of Spirit Tower split re-attatching)
        .mUnk_00            = "d10_03",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x05,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MarineTempleCompleted_03,
        .mNextSceneIndex    = SceneIndex_b_water,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x01,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0053,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_StavenInTOSAfterFireGlyph_01 (Staven appearing in ToS)
        .mUnk_00            = "d11_01",
        .mSceneIndex        = SceneIndex_d_main,
        .mRoomIndex         = 0x0F,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_StavenInTOSAfterFireGlyph_01,
        .mNextSceneIndex    = SceneIndex_d_main_f,
        .mNextRoomIndex     = 0x01,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_StavenInTOSAfterFireGlyph_02,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0061,
        .mFlag              = AdventureFlag_MetStavenInTOSAfterFireGlyphCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_StavenInTOSAfterFireGlyph_02 (Zelda and Link falling inside tower's lobby)
        .mUnk_00            = "d11_02",
        .mSceneIndex        = SceneIndex_d_main_f,
        .mRoomIndex         = 0x01,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_StavenInTOSAfterFireGlyph_02,
        .mNextSceneIndex    = SceneIndex_d_main_f,
        .mNextRoomIndex     = 0x01,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x004F,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_MountainTempleCompleted_01 (Altar appearing in boss room)
        .mUnk_00            = "d12_01",
        .mSceneIndex        = SceneIndex_b_flame,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MountainTempleCompleted_01,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x08,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_MountainTempleCompleted_02,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0058,
        .mFlag              = AdventureFlag_WatchedMountainTempleCompletedCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_MountainTempleCompleted_02 (Fire Realm Spirit Tracks restoring)
        .mUnk_00            = "d12_02",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x08,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MountainTempleCompleted_02,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x02,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_MountainTempleCompleted_03,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0059,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_MountainTempleCompleted_03 (Fourth part of Spirit Tower split re-attatching)
        .mUnk_00            = "d12_03",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x09,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MountainTempleCompleted_03,
        .mNextSceneIndex    = SceneIndex_b_flame,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x01,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0053,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_StavenPreBattle
        .mUnk_00            = "d13_01",
        .mSceneIndex        = SceneIndex_b_deago,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x02,
        .mCutsceneIndex     = CutsceneIndex_StavenPreBattle,
        .mNextSceneIndex    = SceneIndex_b_deago,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005A,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_StavenPostBattle
        .mUnk_00            = "d14_01",
        .mSceneIndex        = SceneIndex_b_deago,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_StavenPostBattle,
        .mNextSceneIndex    = SceneIndex_b_deago,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x03,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005A,
        .mFlag              = AdventureFlag_WatchedStavenPostBattleCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_MalladusOnTOSSummit_01 (Malladus appearing)
        .mUnk_00            = "d15_01",
        .mSceneIndex        = SceneIndex_d_main_a,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MalladusOnTOSSummit_01,
        .mNextSceneIndex    = SceneIndex_d_main_a,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_MalladusOnTOSSummit_02,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005B,
        .mFlag              = AdventureFlag_WatchedMalladusOnTOSSummitCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_MalladusOnTOSSummit_02 (Malladus and Cole leaving with the Demon Train)
        .mUnk_00            = "d15_02",
        .mSceneIndex        = SceneIndex_d_main_a,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MalladusOnTOSSummit_02,
        .mNextSceneIndex    = SceneIndex_f_passenger,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_PassengerCarAnjeanBowOfLight,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005B,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_PassengerCarAnjeanBowOfLight
        .mUnk_00            = "d16_01",
        .mSceneIndex        = SceneIndex_f_passenger,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_PassengerCarAnjeanBowOfLight,
        .mNextSceneIndex    = SceneIndex_f_passenger,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005C,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_LokomoSword
        .mUnk_00            = "d17_01",
        .mSceneIndex        = SceneIndex_f_passenger,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_LokomoSword,
        .mNextSceneIndex    = SceneIndex_t_area2,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x07,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005C,
        .mFlag              = AdventureFlag_WatchedLokomoSwordCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_PassengerCarBeforeMalladusFight
        .mUnk_00            = "d18_01",
        .mSceneIndex        = SceneIndex_f_passenger,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_PassengerCarBeforeMalladusFight,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x0A,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_BoardingDemonTrain,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005C,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_BoardingDemonTrain
        .mUnk_00            = "d19_01",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x0A,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_BoardingDemonTrain,
        .mNextSceneIndex    = SceneIndex_b_last1,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005D,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_BeforeMalladusBeast_01 (Demon Train getting destroyed)
        .mUnk_00            = "d20_01",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x0A,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_BeforeMalladusBeast_01,
        .mNextSceneIndex    = SceneIndex_b_last2,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_BeforeMalladusBeast_02,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005D,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_BeforeMalladusBeast_02 (Zelda getting her body back)
        .mUnk_00            = "d20_02",
        .mSceneIndex        = SceneIndex_b_last2,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_BeforeMalladusBeast_02,
        .mNextSceneIndex    = SceneIndex_b_last2,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_BeforeMalladusBeast_03,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0060,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_BeforeMalladusBeast_03 (Beast Malladus appearing)
        .mUnk_00            = "d20_03",
        .mSceneIndex        = SceneIndex_b_last2,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_BeforeMalladusBeast_03,
        .mNextSceneIndex    = SceneIndex_b_last2,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0060,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_PreCredits
        .mUnk_00            = "d21_01",
        .mSceneIndex        = SceneIndex_b_last2,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_PreCredits,
        .mNextSceneIndex    = SceneIndex_f_hyral,
        .mNextRoomIndex     = 0x05,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_Credits_01,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x002D,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_Credits_01 (Credits followed by first ending)
        .mUnk_00            = "d23_01",
        .mSceneIndex        = SceneIndex_f_hyral,
        .mRoomIndex         = 0x05,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_Credits_01,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_TitleScreen,
        .mNextIsCS          = true,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005E,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_Credits_02 (Credits followed by second ending)
        .mUnk_00            = "d23_02",
        .mSceneIndex        = SceneIndex_f_hyral,
        .mRoomIndex         = 0x05,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_Credits_02,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_TitleScreen,
        .mNextIsCS          = true,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005E,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_Credits_03 (Credits followed by third ending)
        .mUnk_00            = "d23_03",
        .mSceneIndex        = SceneIndex_f_hyral,
        .mRoomIndex         = 0x05,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_Credits_03,
        .mNextSceneIndex    = SceneIndex_demo_train,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_TitleScreen,
        .mNextIsCS          = true,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005E,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_SpiritPipes
        .mUnk_00            = "d24_01",
        .mSceneIndex        = SceneIndex_f_hyral,
        .mRoomIndex         = 0x05,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_SpiritPipes,
        .mNextSceneIndex    = SceneIndex_f_hyral,
        .mNextRoomIndex     = 0x05,
        .mNextSpawnIndex    = 0x01,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x005F,
        .mFlag              = AdventureFlag_ObtainedSpiritPipes,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
    {
        // CutsceneIndex_ForestTracksRestoredFromGlyph
        .mUnk_00            = "d25_01",
        .mSceneIndex        = SceneIndex_demo_train,
        .mRoomIndex         = 0x02,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_ForestTracksRestoredFromGlyph,
        .mNextSceneIndex    = SceneIndex_d_main,
        .mNextRoomIndex     = 0x02,
        .mNextSpawnIndex    = 0x01,
        .mNextCutsceneIndex = CutsceneIndex_None,
        .mNextIsCS          = false,
        .mUnk_0D            = false,
        .mUnk_0E            = 0x0053,
        .mFlag              = AdventureFlag_ForestTracksRestoredFromGlyphCS,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 1,
        .mUnk_18            = 0,
    },
    {
        // CutsceneIndex_MalladusBeastDestroyed
        .mUnk_00            = "d26_01",
        .mSceneIndex        = SceneIndex_b_last2,
        .mRoomIndex         = 0x00,
        .mSpawnIndex        = 0x00,
        .mCutsceneIndex     = CutsceneIndex_MalladusBeastDestroyed,
        .mNextSceneIndex    = SceneIndex_b_last2,
        .mNextRoomIndex     = 0x00,
        .mNextSpawnIndex    = 0x00,
        .mNextCutsceneIndex = CutsceneIndex_PreCredits,
        .mNextIsCS          = false,
        .mUnk_0D            = true,
        .mUnk_0E            = 0x0060,
        .mFlag              = AdventureFlag_None,
        .mUnk_12            = 0x0000,
        .mUnk_14            = 0,
        .mUnk_18            = 1,
    },
};

CutsceneParamsEntry *Cutscene_GetParamEntry(s32 csIndex) {
    return (CutsceneParamsEntry *) &gCSParamsEntries[csIndex];
}

s32 func_ov000_020a7840(unk32 param1, unk32 param2) {}

bool Cutscene_IsAdventureFlagSet(s32 csIndex) {
    CutsceneParamsEntry *pEntry = Cutscene_GetParamEntry(csIndex);

    if (pEntry->mFlag == AdventureFlag_None) {
        return false;
    }

    return data_027e09b8->HasAdventureFlag(pEntry->mFlag);
}
