#include "soh/ShipInit.hpp"
#include "location.h"
#include "static_data.h"

void Rando::StaticData::RegisterSongLocations() {
    static bool registered = false;
    if (registered)
        return;
    registered = true;
    // clang-format off
    locationTable[RC_SHEIK_IN_FOREST] =              Location::Base(RC_SHEIK_IN_FOREST,              RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_SACRED_FOREST_MEADOW,      0x00, "Sheik in Forest",               "Sheik in Forest",               RHT_SHEIK_IN_FOREST,              RG_MINUET_OF_FOREST,   SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_MINUET_OF_FOREST),      true);
    locationTable[RC_SHEIK_IN_CRATER] =              Location::Base(RC_SHEIK_IN_CRATER,              RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_DEATH_MOUNTAIN_CRATER,     0x00, "Sheik in Crater",               "Sheik in Crater",               RHT_SHEIK_IN_CRATER,              RG_BOLERO_OF_FIRE,     SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_BOLERO_OF_FIRE),        true);
    locationTable[RC_SHEIK_IN_ICE_CAVERN] =          Location::Base(RC_SHEIK_IN_ICE_CAVERN,          RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_ICE_CAVERN,                0x00, "Sheik in Ice Cavern",           "Sheik in Ice Cavern",           RHT_SHEIK_IN_ICE_CAVERN,          RG_SERENADE_OF_WATER,  SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER),     true);
    locationTable[RC_SHEIK_AT_COLOSSUS] =            Location::Base(RC_SHEIK_AT_COLOSSUS,            RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_DESERT_COLOSSUS,           0x00, "Sheik at Colossus",             "Sheik at Colossus",             RHT_SHEIK_AT_COLOSSUS,            RG_REQUIEM_OF_SPIRIT,  SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT),     true);
    locationTable[RC_SHEIK_IN_KAKARIKO] =            Location::Base(RC_SHEIK_IN_KAKARIKO,            RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_KAKARIKO_VILLAGE,          0x00, "Sheik in Kakariko",             "Sheik in Kakariko",             RHT_SHEIK_IN_KAKARIKO,            RG_NOCTURNE_OF_SHADOW, SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL), true);
    locationTable[RC_SHEIK_AT_TEMPLE] =              Location::Base(RC_SHEIK_AT_TEMPLE,              RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_TEMPLE_OF_TIME,            0x00, "Sheik at Temple",               "Sheik at Temple",               RHT_SHEIK_AT_TEMPLE,              RG_PRELUDE_OF_LIGHT,   SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT),      true);
    locationTable[RC_SONG_FROM_IMPA] =               Location::Base(RC_SONG_FROM_IMPA,               RCQUEST_BOTH, RCTYPE_SONG_LOCATION, RCAREA_HYRULE_CASTLE,    ACTOR_ID_MAX, SCENE_ID_MAX,                    0x00, "Song from Impa",                "Song from Impa",                RHT_SONG_FROM_IMPA,               RG_ZELDAS_LULLABY,     SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY),        true);
    locationTable[RC_SONG_FROM_MALON] =              Location::Base(RC_SONG_FROM_MALON,              RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_LON_LON_RANCH,             0x00, "Song from Malon",               "Song from Malon",               RHT_SONG_FROM_MALON,              RG_EPONAS_SONG,        SpoilerCollectionCheck::RandomizerInf(RAND_INF_LEARNED_EPONA_SONG),             true);
    locationTable[RC_SONG_FROM_SARIA] =              Location::Base(RC_SONG_FROM_SARIA,              RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_SACRED_FOREST_MEADOW,      0x00, "Song from Saria",               "Song from Saria",               RHT_SONG_FROM_SARIA,              RG_SARIAS_SONG,        SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_SARIAS_SONG),           true);
    locationTable[RC_SONG_FROM_ROYAL_FAMILYS_TOMB] = Location::Base(RC_SONG_FROM_ROYAL_FAMILYS_TOMB, RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_ROYAL_FAMILYS_TOMB,        0x00, "Song from Royal Family's Tomb", "Song from Royal Family's Tomb", RHT_SONG_FROM_ROYAL_FAMILYS_TOMB, RG_SUNS_SONG,          SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_SUNS_SONG),             true);
    locationTable[RC_SONG_FROM_OCARINA_OF_TIME] =    Location::Base(RC_SONG_FROM_OCARINA_OF_TIME,    RCQUEST_BOTH, RCTYPE_SONG_LOCATION,                          ACTOR_ID_MAX, SCENE_HYRULE_FIELD,              0x00, "Song from Ocarina of Time",     "Song from Ocarina of Time",     RHT_SONG_FROM_OCARINA_OF_TIME,    RG_SONG_OF_TIME,       SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_SONG_OF_TIME),          true);
    locationTable[RC_SONG_FROM_WINDMILL] =           Location::Base(RC_SONG_FROM_WINDMILL,           RCQUEST_BOTH, RCTYPE_SONG_LOCATION, RCAREA_KAKARIKO_VILLAGE, ACTOR_ID_MAX, SCENE_WINDMILL_AND_DAMPES_GRAVE, 0x00, "Song from Windmill",            "Song from Windmill",            RHT_SONG_FROM_WINDMILL,           RG_SONG_OF_STORMS,     SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_LEARNED_SONG_OF_STORMS),        true);
    // clang-format-on
}

static RegisterShipInitFunc initSongLocations(Rando::StaticData::RegisterSongLocations);
