#include "item_list.hpp"

#include "logic.hpp"
#include <array>
#include "z64item.h"

using namespace Logic;

static std::array<Item, KEY_ENUM_MAX> itemTable;

void ItemTable_Init() {                                    //English name                       French                              Spanish                                     Item Type       getItemID       advancement    logic           hint key
    itemTable[NONE]                              = Item(Text{"No Item",                         "Rien",                             "Sin Objeto"},                              ITEMTYPE_EVENT, GI_RUPEE_GREEN,    false,      &noVariable,    NONE);
    itemTable[KOKIRI_SWORD]                      = Item(Text{"Kokiri Sword",                    "Épée Kokiri",                      "Espada Kokiri"},                           ITEMTYPE_ITEM,  GI_SWORD_KOKIRI,   true,       &KokiriSword,   KOKIRI_SWORD);
  //[MASTER_SWORD]
    itemTable[GIANTS_KNIFE]                      = Item(Text{"Giant's Knife",                   "Lame des Géants",                  "Espada de Biggoron"},                      ITEMTYPE_ITEM,  GI_SWORD_KNIFE,    false,      &noVariable,    GIANTS_KNIFE);
    itemTable[BIGGORON_SWORD]                    = Item(Text{"Biggoron's Sword",                "Épée de Biggoron",                 "Espada de Biggoron"},                      ITEMTYPE_ITEM,  GI_SWORD_BGS,      true,       &BiggoronSword, BIGGORON_SWORD);
    itemTable[DEKU_SHIELD]                       = Item(Text{"Deku Shield",                     "Bouclier Mojo",                    "Escudo deku"},                             ITEMTYPE_ITEM,  GI_SHIELD_DEKU,    false,      &noVariable,    DEKU_SHIELD);
    itemTable[HYLIAN_SHIELD]                     = Item(Text{"Hylian Shield",                   "Bouclier Hylien",                  "Escudo hyliano"},                          ITEMTYPE_ITEM,  GI_SHIELD_HYLIAN,  false,      &noVariable,    HYLIAN_SHIELD);
    itemTable[MIRROR_SHIELD]                     = Item(Text{"Mirror Shield",                   "Bouclier Miroir",                  "Escudo espejo"},                           ITEMTYPE_ITEM,  GI_SHIELD_MIRROR,  true,       &MirrorShield,  MIRROR_SHIELD);
    itemTable[GORON_TUNIC]                       = Item(Text{"Goron Tunic",                     "Tunique Goron",                    "Sayo goron"},                              ITEMTYPE_ITEM,  GI_TUNIC_GORON,    true,       &GoronTunic,    GORON_TUNIC);
    itemTable[ZORA_TUNIC]                        = Item(Text{"Zora Tunic",                      "Tunique Zora",                     "Sayo zora"},                               ITEMTYPE_ITEM,  GI_TUNIC_ZORA,     true,       &ZoraTunic,     ZORA_TUNIC);
    itemTable[IRON_BOOTS]                        = Item(Text{"Iron Boots",                      "Bottes de plomb",                  "Botas de hierro"},                         ITEMTYPE_ITEM,  GI_BOOTS_IRON,     true,       &IronBoots,     IRON_BOOTS);
    itemTable[HOVER_BOOTS]                       = Item(Text{"Hover Boots",                     "Bottes des airs",                  "Botas voladoras"},                         ITEMTYPE_ITEM,  GI_BOOTS_HOVER,    true,       &HoverBoots,    HOVER_BOOTS);


    itemTable[BOOMERANG]                         = Item(Text{"Boomerang",                       "Boomerang",                        "Búmeran"},                                 ITEMTYPE_ITEM,  GI_BOOMERANG,      true,       &Boomerang,     BOOMERANG);
    itemTable[LENS_OF_TRUTH]                     = Item(Text{"Lens of Truth",                   "Monocle de Vérité",                "Lupa de la Verdad"},                       ITEMTYPE_ITEM,  GI_LENS,           true,       &LensOfTruth,   LENS_OF_TRUTH);
    itemTable[MEGATON_HAMMER]                    = Item(Text{"Megaton Hammer",                  "Masse des Titans",                 "Martillo Megatón"},                        ITEMTYPE_ITEM,  GI_HAMMER,         true,       &Hammer,        MEGATON_HAMMER);
    itemTable[STONE_OF_AGONY]                    = Item(Text{"Stone of Agony",                  "Pierre de Souffrance",             "Piedra de la Agonía"},                     ITEMTYPE_ITEM,  GI_STONE_OF_AGONY, true,       &ShardOfAgony,  STONE_OF_AGONY);
    itemTable[DINS_FIRE]                         = Item(Text{"Din's Fire",                      "Feu de Din",                       "Fuego de Din"},                            ITEMTYPE_ITEM,  GI_DINS_FIRE,      true,       &DinsFire,      DINS_FIRE);
    itemTable[FARORES_WIND]                      = Item(Text{"Farore's Wind",                   "Vent de Farore",                   "Viento de Farore"},                        ITEMTYPE_ITEM,  GI_FARORES_WIND,   true,       &FaroresWind,   FARORES_WIND);
    itemTable[NAYRUS_LOVE]                       = Item(Text{"Nayru's Love",                    "Amour de Nayru",                   "Amor de Nayru"},                           ITEMTYPE_ITEM,  GI_NAYRUS_LOVE,    true,       &NayrusLove,    NAYRUS_LOVE);
    itemTable[FIRE_ARROWS]                       = Item(Text{"Fire Arrow",                      "Flèche de Feu",                    "Flecha de fuego"},                         ITEMTYPE_ITEM,  GI_ARROW_FIRE,     true,       &FireArrows,    FIRE_ARROWS);
    itemTable[ICE_ARROWS]                        = Item(Text{"Ice Arrow",                       "Flèche de Glace",                  "Flecha de hielo"},                         ITEMTYPE_ITEM,  GI_ARROW_ICE,      true,       &IceArrows,     ICE_ARROWS);
    itemTable[LIGHT_ARROWS]                      = Item(Text{"Light Arrow",                     "Flèche de Lumière",                "Flecha de luz"},                           ITEMTYPE_ITEM,  GI_ARROW_LIGHT,    true,       &LightArrows,   LIGHT_ARROWS);
    itemTable[GERUDO_MEMBERSHIP_CARD]            = Item(Text{"Gerudo Membership Card",          "Carte Gerudo",                     "Pase de socio gerudo"},                    ITEMTYPE_ITEM,  GI_GERUDO_CARD,    true,       &GerudoToken,   GERUDO_MEMBERSHIP_CARD);
    itemTable[MAGIC_BEAN]                        = Item(Text{"Magic Bean",                      "Haricots Magiques",                "Habichuelas mágicas"},                     ITEMTYPE_ITEM,  GI_BEAN,           true,       &MagicBean,     MAGIC_BEAN);
    itemTable[MAGIC_BEAN_PACK]                   = Item(Text{"Magic Bean Pack",                 "Paquet de Haricots Magiques",      "Lote de habichuelas mágicas"},             ITEMTYPE_ITEM,  0xC9,              true,       &MagicBeanPack, MAGIC_BEAN_PACK);
    itemTable[DOUBLE_DEFENSE]                    = Item(Text{"Double Defense",                  "Double Défence",                   "Doble poder defensivo"},                   ITEMTYPE_ITEM,  0xB8,              true,       &DoubleDefense, DOUBLE_DEFENSE);

    itemTable[WEIRD_EGG]                         = Item(Text{"Weird Egg",                       "Oeuf Curieux",                     "Huevo extraño"},                           ITEMTYPE_ITEM,  GI_WEIRD_EGG,      true,       &WeirdEgg,      WEIRD_EGG);
//  itemTable[CUCCO]                             = Item(Text{"Cucco",                           "Cocotte",                          "Cuco"},                                    ITEMTYPE_ITEM,  GI_CUCCO,          true,       &Cucco,         CUCCO);
    itemTable[ZELDAS_LETTER]                     = Item(Text{"Zelda's Letter",                  "Lettre de Zelda",                  "Carta de Zelda"},                          ITEMTYPE_ITEM,  GI_LETTER_ZELDA,   true,       &ZeldasLetter,  ZELDAS_LETTER);
//  itemTable[KEATON_MASK]                       = Item(Text{"Keaton Mask",                     "Masque du Renard",                 "Careta de Keaton"},                        ITEMTYPE_ITEM,  GI_MASK_KEATON,    true,       &KeatonMask,    KEATON_MASK);
//  itemTable[SKULL_MASK]                        = Item(Text{"Skull Mask",                      "Masque de Mort",                   "Máscara de calavera"},                     ITEMTYPE_ITEM,  GI_MASK_SKULL,     true,       &SkullMask,     SKULL_MASK);
//  itemTable[SPOOKY_MASK]                       = Item(Text{"Spooky Mask",                     "Masque d'Effroi",                  "Máscara tenebrosa"},                       ITEMTYPE_ITEM,  GI_MASK_SPOOKY,    true,       &SpookyMask,    SPOOKY_MASK);
//  itemTable[BUNNY_HOOD]                        = Item(Text{"Bunny Hood",                      "Masque du Lapin",                  "Capucha de conejo"},                       ITEMTYPE_ITEM,  GI_MASK_BUNNY,     true,       &BunnyHood,     BUNNY_HOOD);
//  itemTable[GORON_MASK]                        = Item(Text{"Goron Mask",                      "Masque de Goron",                  "Máscara Goron"},                           ITEMTYPE_ITEM,  GI_MASK_GORON,     true,       &GoronMask,     GORON_MASK);
//  itemTable[ZORA_MASK]                         = Item(Text{"Zora Mask",                       "Masque de Zora",                   "Máscara Zora"},                            ITEMTYPE_ITEM,  GI_MASK_ZORA,      true,       &ZoraMask,      ZORA_MASK);
//  itemTable[GERUDO_MASK]                       = Item(Text{"Gerudo Mask",                     "Masque de Gerudo",                 "Máscara Gerudo"},                          ITEMTYPE_ITEM,  GI_MASK_GERUDO,    true,       &GerudoMask,    GERUDO_MASK);
//  itemTable[MASK_OF_TRUTH]                     = Item(Text{"Mask of Truth",                   "Masque de Vérité",                 "Máscara de la Verdad"},                    ITEMTYPE_ITEM,  GI_MASK_MASK,      true,       &MaskofTruth,   MASK_OF_TRUTH);
    itemTable[POCKET_EGG]                        = Item(Text{"Pocket Egg",                      "Oeuf de poche",                    "Huevo de bolsillo"},                       ITEMTYPE_ITEM,  GI_POCKET_EGG,     true,       &PocketEgg,     POCKET_EGG);
//  itemTable[POCKET_CUCCO]                      = Item(Text{"Pocket Cucco",                    "Cocotte de poche",                 "Cuco de bolsillo"},                        ITEMTYPE_ITEM,  GI_POCKET_CUCCO,   true,       &PocketCucco,   POCKET_CUCCO);
    itemTable[COJIRO]                            = Item(Text{"Cojiro",                          "P'tit Poulet",                     "Cojiro"},                                  ITEMTYPE_ITEM,  GI_COJIRO,         true,       &Cojiro,        COJIRO);
    itemTable[ODD_MUSHROOM]                      = Item(Text{"Odd Mushroom",                    "Champignon Suspect",               "Champiñón extraño"},                       ITEMTYPE_ITEM,  GI_ODD_MUSHROOM,   true,       &OddMushroom,   ODD_MUSHROOM);
    itemTable[ODD_POTION]                      = Item(Text{"Odd Potion",                        "Mixture Suspecte",                 "Medicina rara"},                           ITEMTYPE_ITEM,  GI_ODD_POTION,     true,       &OddPoultice,   ODD_POTION);
    itemTable[POACHERS_SAW]                      = Item(Text{"Poacher's Saw",                   "Scie du Chasseur",                 "Sierra del furtivo"},                      ITEMTYPE_ITEM,  GI_SAW,            true,       &PoachersSaw,   POACHERS_SAW);
    itemTable[BROKEN_SWORD]                      = Item(Text{"Broken Goron's Sword",            "Épée Brisée de Goron",             "Espada goron rota"},                       ITEMTYPE_ITEM,  GI_SWORD_BROKEN,   true,       &BrokenSword,   BROKEN_SWORD);
    itemTable[PRESCRIPTION]                      = Item(Text{"Prescription",                    "Ordonnance",                       "Receta"},                                  ITEMTYPE_ITEM,  GI_PRESCRIPTION,   true,       &Prescription,  PRESCRIPTION);
    itemTable[EYEBALL_FROG]                      = Item(Text{"Eyeball Frog",                    "Crapaud-qui-louche",               "Rana de ojos saltones"},                   ITEMTYPE_ITEM,  GI_FROG,           true,       &EyeballFrog,   EYEBALL_FROG);
    itemTable[EYEDROPS]                          = Item(Text{"World's Finest Eyedrops",         "Super Gouttes",                    "Supergotas oculares"},                     ITEMTYPE_ITEM,  GI_EYEDROPS,       true,       &Eyedrops,      EYEDROPS);
    itemTable[CLAIM_CHECK]                       = Item(Text{"Claim Check",                     "Certificat",                       "Recibo"},                                  ITEMTYPE_ITEM,  GI_CLAIM_CHECK,    true,       &ClaimCheck,    CLAIM_CHECK);

    itemTable[GOLD_SKULLTULA_TOKEN]              = Item(Text{"Gold Skulltula Token",            "Symbole de Skulltula d'Or",         "Símbolo de skulltula dorada"},             ITEMTYPE_TOKEN, GI_SKULL_TOKEN,    true,       &GoldSkulltulaTokens, GOLD_SKULLTULA_TOKEN);

    //Progression Items
    itemTable[PROGRESSIVE_HOOKSHOT]              = Item(Text{"Progressive Hookshot",            "Grappin (prog.)",                  "Gancho progresivo"},                       ITEMTYPE_ITEM,     0x80, true,  &ProgressiveHookshot,   PROGRESSIVE_HOOKSHOT);
    itemTable[PROGRESSIVE_STRENGTH]              = Item(Text{"Progressive Strength Upgrade",    "Amélioration de Force (prog.)",    "Fuerza progresiva"},                       ITEMTYPE_ITEM,     0x81, true,  &ProgressiveStrength,   PROGRESSIVE_STRENGTH);
    itemTable[PROGRESSIVE_BOMB_BAG]              = Item(Text{"Progressive Bomb Bag",            "Sac de Bombes (prog.)",            "Saco de bombas progresivo"},               ITEMTYPE_ITEM,     0x82, true,  &ProgressiveBombBag,    PROGRESSIVE_BOMB_BAG);
    itemTable[PROGRESSIVE_BOW]                   = Item(Text{"Progressive Bow",                 "Arc (prog.)",                      "Arco progresivo"},                         ITEMTYPE_ITEM,     0x83, true,  &ProgressiveBow,        PROGRESSIVE_BOW);
    itemTable[PROGRESSIVE_SLINGSHOT]             = Item(Text{"Progressive Slingshot",           "Lance-Pierre (prog.)",             "Resortera progresiva"},                    ITEMTYPE_ITEM,     0x84, true,  &ProgressiveBulletBag,  PROGRESSIVE_SLINGSHOT);
    itemTable[PROGRESSIVE_WALLET]                = Item(Text{"Progressive Wallet",              "Bourse (prog.)",                   "Bolsa de rupias progresiva"},              ITEMTYPE_ITEM,     0x85, true,  &ProgressiveWallet,     PROGRESSIVE_WALLET);
    itemTable[PROGRESSIVE_SCALE]                 = Item(Text{"Progressive Scale",               "Écaille (prog.)",                  "Escama progresiva"},                       ITEMTYPE_ITEM,     0x86, true,  &ProgressiveScale,      PROGRESSIVE_SCALE);
    itemTable[PROGRESSIVE_NUT_UPGRADE]           = Item(Text{"Progressive Nut Capacity",        "Capacité de Noix (prog.)",         "Capacidad de nueces deku progresiva"},     ITEMTYPE_ITEM,     0x87, false, &noVariable,            PROGRESSIVE_NUT_UPGRADE);
    itemTable[PROGRESSIVE_STICK_UPGRADE]         = Item(Text{"Progressive Stick Capacity",      "Capacité de Bâtons (prog.)",       "Capacidad de palos deku progresiva"},      ITEMTYPE_ITEM,     0x88, false, &noVariable,            PROGRESSIVE_STICK_UPGRADE);
    itemTable[PROGRESSIVE_BOMBCHUS]              = Item(Text{"Progressive Bombchu",             "Missiles (prog.)",                 "Bombchus progresivos"},                    ITEMTYPE_ITEM,     0x89, true,  &Bombchus,              PROGRESSIVE_BOMBCHUS);
    itemTable[PROGRESSIVE_MAGIC_METER]           = Item(Text{"Progressive Magic Meter",         "Jauge de Magie (prog.)",           "Poder mágico progresivo"},                 ITEMTYPE_ITEM,     0x8A, true,  &ProgressiveMagic,      PROGRESSIVE_MAGIC_METER);
    itemTable[PROGRESSIVE_OCARINA]               = Item(Text{"Progressive Ocarina",             "Ocarina (prog.)",                  "Ocarina progresiva"},                      ITEMTYPE_ITEM,     0x8B, true,  &ProgressiveOcarina,    PROGRESSIVE_OCARINA);
    itemTable[PROGRESSIVE_GORONSWORD]            = Item(Text{"Progressive Goron Sword",         "Épée Goron (prog.)",               "Espada Goron progresiva"},                 ITEMTYPE_ITEM,     0xD4, true,  &ProgressiveGiantKnife, PROGRESSIVE_GORONSWORD);

    //Bottles
    itemTable[EMPTY_BOTTLE]                      = Item(Text{"Empty Bottle",                    "Bouteille Vide",                   "Botella vacía"},                           ITEMTYPE_ITEM,     0x0F, true, &Bottles, EMPTY_BOTTLE);
    itemTable[BOTTLE_WITH_MILK]                  = Item(Text{"Bottle with Milk",                "Bouteille avec du Lait",           "Botella de leche Lon Lon"},                ITEMTYPE_ITEM,     0x14, true, &Bottles, BOTTLE_WITH_MILK);
    itemTable[BOTTLE_WITH_RED_POTION]            = Item(Text{"Bottle with Red Potion",          "Bouteille avec une Potion Rouge",        "Botella de poción roja"},                  ITEMTYPE_ITEM,     0x8C, true, &Bottles, BOTTLE_WITH_RED_POTION);
    itemTable[BOTTLE_WITH_GREEN_POTION]          = Item(Text{"Bottle with Green Potion",        "Bouteille avec une Potion Verte",        "Botella de poción verde"},                 ITEMTYPE_ITEM,     0x8D, true, &Bottles, BOTTLE_WITH_GREEN_POTION);
    itemTable[BOTTLE_WITH_BLUE_POTION]           = Item(Text{"Bottle with Blue Potion",         "Bouteille avec une Potion Bleue",        "Botella de poción azul"},                  ITEMTYPE_ITEM,     0x8E, true, &Bottles, BOTTLE_WITH_BLUE_POTION);
    itemTable[BOTTLE_WITH_FAIRY]                 = Item(Text{"Bottle with Fairy",               "Bouteille avec une Fée",           "Hada en una botella"},                     ITEMTYPE_ITEM,     0x8F, true, &Bottles, BOTTLE_WITH_FAIRY);
    itemTable[BOTTLE_WITH_FISH]                  = Item(Text{"Bottle with Fish",                "Bouteille avec un Poisson",        "Pez en una botella"},                      ITEMTYPE_ITEM,     0x90, true, &Bottles, BOTTLE_WITH_FISH);
    itemTable[BOTTLE_WITH_BLUE_FIRE]             = Item(Text{"Bottle with Blue Fire",           "Bouteille avec une Flamme Bleue",  "Botella de fuego azul"},                   ITEMTYPE_ITEM,     0x91, true, &Bottles, BOTTLE_WITH_BLUE_FIRE);
    itemTable[BOTTLE_WITH_BUGS]                  = Item(Text{"Bottle with Bugs",                "Bouteille avec des Insectes",      "Insecto en una botella"},                  ITEMTYPE_ITEM,     0x92, true, &Bottles, BOTTLE_WITH_BUGS);
    itemTable[BOTTLE_WITH_POE]                   = Item(Text{"Bottle with Poe",                 "Bouteille avec un Esprit",         "Poe en una botella"},                      ITEMTYPE_ITEM,     0x94, true, &Bottles, BOTTLE_WITH_POE);

    //Special bottles that can't immediately dump contents
    itemTable[RUTOS_LETTER]                      = Item(Text{"Bottle with Ruto's Letter",       "Bouteille avec la Lettre de Ruto", "Carta de Ruto"},                           ITEMTYPE_ITEM,     0x15, true, &RutosLetter,      RUTOS_LETTER);
    itemTable[BOTTLE_WITH_BIG_POE]               = Item(Text{"Bottle with Big Poe",             "Bouteille avec une Âme",           "Gran Poe en una botella"},                 ITEMTYPE_ITEM,     0x93, true, &BottleWithBigPoe, BOTTLE_WITH_BIG_POE);

    //Songs
    itemTable[ZELDAS_LULLABY]                    = Item(Text{"Zelda's Lullaby",                 "Berceuse de Zelda",                "Nana de Zelda"},                           ITEMTYPE_SONG,     0xC1, true, &ZeldasLullaby,    ZELDAS_LULLABY);
    itemTable[EPONAS_SONG]                       = Item(Text{"Epona's Song",                    "Chant d'Épona",                    "Canción de Epona"},                        ITEMTYPE_SONG,     0xC2, true, &EponasSong,       EPONAS_SONG);
    itemTable[SARIAS_SONG]                       = Item(Text{"Saria's Song",                    "Chant de Saria",                   "Canción de Saria"},                        ITEMTYPE_SONG,     0xC3, true, &SariasSong,       SARIAS_SONG);
    itemTable[SUNS_SONG]                         = Item(Text{"Sun's Song",                      "Chant du Soleil",                  "Canción del Sol"},                         ITEMTYPE_SONG,     0xC4, true, &SunsSong,         SUNS_SONG);
    itemTable[SONG_OF_TIME]                      = Item(Text{"Song of Time",                    "Chant du Temps",                   "Canción del tiempo"},                      ITEMTYPE_SONG,     0xC5, true, &SongOfTime,       SONG_OF_TIME);
    itemTable[SONG_OF_STORMS]                    = Item(Text{"Song of Storms",                  "Chant des Tempêtes",               "Canción de la tormenta"},                  ITEMTYPE_SONG,     0xC6, true, &SongOfStorms,     SONG_OF_STORMS);
    itemTable[MINUET_OF_FOREST]                  = Item(Text{"Minuet of Forest",                "Menuet des Bois",                  "Minueto del bosque"},                      ITEMTYPE_SONG,     0xBB, true, &MinuetOfForest,   MINUET_OF_FOREST);
    itemTable[BOLERO_OF_FIRE]                    = Item(Text{"Bolero of Fire",                  "Boléro du Feu",                    "Bolero del fuego"},                        ITEMTYPE_SONG,     0xBC, true, &BoleroOfFire,     BOLERO_OF_FIRE);
    itemTable[SERENADE_OF_WATER]                 = Item(Text{"Serenade of Water",               "Sérénade de l'Eau",                "Serenata del agua"},                       ITEMTYPE_SONG,     0xBD, true, &SerenadeOfWater,  SERENADE_OF_WATER);
    itemTable[REQUIEM_OF_SPIRIT]                 = Item(Text{"Requiem of Spirit",               "Requiem des Esprits",              "Réquiem del espíritu"},                    ITEMTYPE_SONG,     0xBE, true, &RequiemOfSpirit,  REQUIEM_OF_SPIRIT);
    itemTable[NOCTURNE_OF_SHADOW]                = Item(Text{"Nocturne of Shadow",              "Nocturne de l'Ombre",              "Nocturno de la sombra"},                   ITEMTYPE_SONG,     0xBF, true, &NocturneOfShadow, NOCTURNE_OF_SHADOW);
    itemTable[PRELUDE_OF_LIGHT]                  = Item(Text{"Prelude of Light",                "Prélude de la Lumière",            "Preludio de la luz"},                      ITEMTYPE_SONG,     0xC0, true, &PreludeOfLight,   PRELUDE_OF_LIGHT);

    //Maps and Compasses
    itemTable[DEKU_TREE_MAP]                     = Item(Text{"Great Deku Tree Map",             "Carte de l'Arbre Mojo",            "Mapa del Gran Árbol Deku"},                ITEMTYPE_MAP,      0xA5, false, &noVariable, DEKU_TREE_MAP);
    itemTable[DODONGOS_CAVERN_MAP]               = Item(Text{"Dodongo's Cavern Map",            "Carte de la Caverne Dodongo",      "Mapa de la Cueva de los Dodongos"},        ITEMTYPE_MAP,      0xA6, false, &noVariable, DODONGOS_CAVERN_MAP);
    itemTable[JABU_JABUS_BELLY_MAP]              = Item(Text{"Jabu-Jabu's Belly Map",           "Carte du Ventre de Jabu-Jabu",     "Mapa de la tripa de Jabu-Jabu"},           ITEMTYPE_MAP,      0xA7, false, &noVariable, JABU_JABUS_BELLY_MAP);
    itemTable[FOREST_TEMPLE_MAP]                 = Item(Text{"Forest Temple Map",               "Carte du Temple de la Forêt",      "Mapa del Templo del Bosque"},              ITEMTYPE_MAP,      0xA8, false, &noVariable, FOREST_TEMPLE_MAP);
    itemTable[FIRE_TEMPLE_MAP]                   = Item(Text{"Fire Temple Map",                 "Carte du Temple du Feu",           "Mapa del Templo del Fuego"},               ITEMTYPE_MAP,      0xA9, false, &noVariable, FIRE_TEMPLE_MAP);
    itemTable[WATER_TEMPLE_MAP]                  = Item(Text{"Water Temple Map",                "Carte du Temple de l'Eau",         "Mapa del Templo del Agua"},                ITEMTYPE_MAP,      0xAA, false, &noVariable, WATER_TEMPLE_MAP);
    itemTable[SPIRIT_TEMPLE_MAP]                 = Item(Text{"Spirit Temple Map",               "Carte du Temple de l'Esprit",      "Mapa del Templo del Espíritu"},            ITEMTYPE_MAP,      0xAB, false, &noVariable, SPIRIT_TEMPLE_MAP);
    itemTable[SHADOW_TEMPLE_MAP]                 = Item(Text{"Shadow Temple Map",               "Carte du Temple de l'Ombre",       "Mapa del Templo de la Sombra"},            ITEMTYPE_MAP,      0xAC, false, &noVariable, SHADOW_TEMPLE_MAP);
    itemTable[BOTTOM_OF_THE_WELL_MAP]            = Item(Text{"Bottom of the Well Map",          "Carte du Puits",                   "Mapa del fondo del pozo"},                 ITEMTYPE_MAP,      0xAD, false, &noVariable, BOTTOM_OF_THE_WELL_MAP);
    itemTable[ICE_CAVERN_MAP]                    = Item(Text{"Ice Cavern Map",                  "Carte de la Caverne Polaire",      "Mapa de la caverna de hielo"},             ITEMTYPE_MAP,      0xAE, false, &noVariable, ICE_CAVERN_MAP);

    itemTable[DEKU_TREE_COMPASS]                 = Item(Text{"Great Deku Tree Compass",         "Boussole de l'Arbre Mojo",         "Brújula del Gran Árbol Deku"},             ITEMTYPE_COMPASS,  0x9B, false, &noVariable, DEKU_TREE_COMPASS);
    itemTable[DODONGOS_CAVERN_COMPASS]           = Item(Text{"Dodongo's Cavern Compass",        "Boussole de la Caverne Dodongo",   "Brújula de la Cueva de los Dodongos"},     ITEMTYPE_COMPASS,  0x9C, false, &noVariable, DODONGOS_CAVERN_COMPASS);
    itemTable[JABU_JABUS_BELLY_COMPASS]          = Item(Text{"Jabu-Jabu's Belly Compass",       "Boussole du Ventre de Jabu-Jabu",  "Brújula de la tripa de Jabu-Jabu"},        ITEMTYPE_COMPASS,  0x9D, false, &noVariable, JABU_JABUS_BELLY_COMPASS);
    itemTable[FOREST_TEMPLE_COMPASS]             = Item(Text{"Forest Temple Compass",           "Boussole du Temple de la Forêt",   "Brújula del Templo del Bosque"},           ITEMTYPE_COMPASS,  0x9E, false, &noVariable, FOREST_TEMPLE_COMPASS);
    itemTable[FIRE_TEMPLE_COMPASS]               = Item(Text{"Fire Temple Compass",             "Boussole du Temple du Feu",        "Brújula del Templo del Fuego"},            ITEMTYPE_COMPASS,  0x9F, false, &noVariable, FIRE_TEMPLE_COMPASS);
    itemTable[WATER_TEMPLE_COMPASS]              = Item(Text{"Water Temple Compass",            "Boussole du Temple de l'Eau",      "Brújula del Templo del Agua"},             ITEMTYPE_COMPASS,  0xA0, false, &noVariable, WATER_TEMPLE_COMPASS);
    itemTable[SPIRIT_TEMPLE_COMPASS]             = Item(Text{"Spirit Temple Compass",           "Boussole du Temple de l'Esprit",   "Brújula del Templo del Espíritu"},         ITEMTYPE_COMPASS,  0xA1, false, &noVariable, SPIRIT_TEMPLE_COMPASS);
    itemTable[SHADOW_TEMPLE_COMPASS]             = Item(Text{"Shadow Temple Compass",           "Boussole du Temple de l'Ombre",    "Brújula del Templo de las Sombras"},       ITEMTYPE_COMPASS,  0xA2, false, &noVariable, SHADOW_TEMPLE_COMPASS);
    itemTable[BOTTOM_OF_THE_WELL_COMPASS]        = Item(Text{"Bottom of the Well Compass",      "Boussole du Puits",                "Brújula del fondo del pozo"},              ITEMTYPE_COMPASS,  0xA3, false, &noVariable, BOTTOM_OF_THE_WELL_COMPASS);
    itemTable[ICE_CAVERN_COMPASS]                = Item(Text{"Ice Cavern Compass",              "Boussole de la Caverne Polaire",   "Brújula de la caverna de hielo"},          ITEMTYPE_COMPASS,  0xA4, false, &noVariable, ICE_CAVERN_COMPASS);

    //Boss Keys
    itemTable[FOREST_TEMPLE_BOSS_KEY]            = Item(Text{"Forest Temple Big Key",           "Clé d'Or du Temple de la Forêt",   "Gran llave del Templo del Bosque"},        ITEMTYPE_BOSSKEY,  0x95, true, &BossKeyForestTemple, FOREST_TEMPLE_BOSS_KEY);
    itemTable[FIRE_TEMPLE_BOSS_KEY]              = Item(Text{"Fire Temple Big Key",             "Clé d'Or du Temple du Feu",        "Gran llave del Templo del Fuego"},         ITEMTYPE_BOSSKEY,  0x96, true, &BossKeyFireTemple,   FIRE_TEMPLE_BOSS_KEY);
    itemTable[WATER_TEMPLE_BOSS_KEY]             = Item(Text{"Water Temple Big Key",            "Clé d'Or du Temple de l'Eau",      "Gran llave del Templo del Agua"},          ITEMTYPE_BOSSKEY,  0x97, true, &BossKeyWaterTemple,  WATER_TEMPLE_BOSS_KEY);
    itemTable[SPIRIT_TEMPLE_BOSS_KEY]            = Item(Text{"Spirit Temple Big Key",           "Clé d'Or du Temple de l'Esprit",   "Gran llave del Templo del Espíritu"},      ITEMTYPE_BOSSKEY,  0x98, true, &BossKeySpiritTemple, SPIRIT_TEMPLE_BOSS_KEY);
    itemTable[SHADOW_TEMPLE_BOSS_KEY]            = Item(Text{"Shadow Temple Big Key",           "Clé d'Or du Temple de l'Ombre",    "Gran llave del Templo de las Sombras"},    ITEMTYPE_BOSSKEY,  0x99, true, &BossKeyShadowTemple, SHADOW_TEMPLE_BOSS_KEY);
    itemTable[GANONS_CASTLE_BOSS_KEY]            = Item(Text{"Ganon's Castle Big Key",          "Clé d'Or du Château de Ganon",     "Gran llave del Castillo de Ganon"},        ITEMTYPE_BOSSKEY,  0x9A, true, &BossKeyGanonsCastle, GANONS_CASTLE_BOSS_KEY);

    //Small Keys
    itemTable[FOREST_TEMPLE_SMALL_KEY]           = Item(Text{"Forest Temple Small Key",         "Petite Clé du Temple de la Forêt", "Llave del Templo del Bosque"},             ITEMTYPE_SMALLKEY,          0xAF, true, &ForestTempleKeys,          FOREST_TEMPLE_SMALL_KEY);
    itemTable[FIRE_TEMPLE_SMALL_KEY]             = Item(Text{"Fire Temple Small Key",           "Petite Clé du Temple du Feu",      "Llave del Templo del Fuego"},              ITEMTYPE_SMALLKEY,          0xB0, true, &FireTempleKeys,            FIRE_TEMPLE_SMALL_KEY);
    itemTable[WATER_TEMPLE_SMALL_KEY]            = Item(Text{"Water Temple Small Key",          "Petite Clé du Temple de l'Eau",    "Llave del Templo del Agua"},               ITEMTYPE_SMALLKEY,          0xB1, true, &WaterTempleKeys,           WATER_TEMPLE_SMALL_KEY);
    itemTable[SPIRIT_TEMPLE_SMALL_KEY]           = Item(Text{"Spirit Temple Small Key",         "Petite Clé du Temple de l'Esprit", "Llave del Templo del Espíritu"},           ITEMTYPE_SMALLKEY,          0xB2, true, &SpiritTempleKeys,          SPIRIT_TEMPLE_SMALL_KEY);
    itemTable[SHADOW_TEMPLE_SMALL_KEY]           = Item(Text{"Shadow Temple Small Key",         "Petite Clé du Temple de l'Ombre",  "Llave del Templo de las Sombras"},         ITEMTYPE_SMALLKEY,          0xB3, true, &ShadowTempleKeys,          SHADOW_TEMPLE_SMALL_KEY);
    itemTable[BOTTOM_OF_THE_WELL_SMALL_KEY]      = Item(Text{"Bottom of the Well Small Key",    "Petite Clé du Puits",              "Llave del fondo del pozo"},                ITEMTYPE_SMALLKEY,          0xB4, true, &BottomOfTheWellKeys,       BOTTOM_OF_THE_WELL_SMALL_KEY);
    itemTable[GERUDO_TRAINING_GROUNDS_SMALL_KEY] = Item(Text{"Training Grounds Small Key",      "Petite Clé du Gymnase Gerudo",     "Llave del Centro de Instrucción"},         ITEMTYPE_SMALLKEY,          0xB5, true, &GerudoTrainingGroundsKeys, GERUDO_TRAINING_GROUNDS_SMALL_KEY);
    itemTable[GERUDO_FORTRESS_SMALL_KEY]         = Item(Text{"Gerudo Fortress Small Key",       "Petite Clé du Repaire des Voleurs","Llave de la Fortaleza Gerudo"},            ITEMTYPE_FORTRESS_SMALLKEY, 0xB6, true, &GerudoFortressKeys,        GERUDO_FORTRESS_SMALL_KEY);
    itemTable[GANONS_CASTLE_SMALL_KEY]           = Item(Text{"Ganon's Castle Small Key",        "Petite Clé du Château de Ganon",   "Llave del Castillo de Ganon"},             ITEMTYPE_SMALLKEY,          0xB7, true, &GanonsCastleKeys,          GANONS_CASTLE_SMALL_KEY);
    itemTable[TREASURE_GAME_SMALL_KEY]           = Item(Text{"Chest Game Small Key",            "Petite Clé du jeu la Chasse-aux-Trésors",     "Llave del Cofre del Tesoro"},              ITEMTYPE_ITEM,              0xDE, true, &TreasureGameKeys,          TREASURE_GAME_SMALL_KEY);

    // Key Rings
    itemTable[FOREST_TEMPLE_KEY_RING]           = Item(Text{"Forest Temple Key Ring",           "Trousseau du Temple de la Forêt",  "Llavero del Templo del Bosque"},           ITEMTYPE_SMALLKEY,          0xD5, true, &ForestTempleKeys,          FOREST_TEMPLE_KEY_RING);
    itemTable[FIRE_TEMPLE_KEY_RING]             = Item(Text{"Fire Temple Key Ring",             "Trousseau du Temple du Feu",       "Llavero del Templo del Fuego"},            ITEMTYPE_SMALLKEY,          0xD6, true, &FireTempleKeys,            FIRE_TEMPLE_KEY_RING);
    itemTable[WATER_TEMPLE_KEY_RING]            = Item(Text{"Water Temple Key Ring",            "Trousseau du Temple de l'Eau",     "Llavero del Templo del Agua"},             ITEMTYPE_SMALLKEY,          0xD7, true, &WaterTempleKeys,           WATER_TEMPLE_KEY_RING);
    itemTable[SPIRIT_TEMPLE_KEY_RING]           = Item(Text{"Spirit Temple Key Ring",           "Trousseau du Temple de l'Esprit",  "Llavero del Templo del Espíritu"},         ITEMTYPE_SMALLKEY,          0xD8, true, &SpiritTempleKeys,          SPIRIT_TEMPLE_KEY_RING);
    itemTable[SHADOW_TEMPLE_KEY_RING]           = Item(Text{"Shadow Temple Key Ring",           "Trousseau du Temple de l'Ombre",   "Llavero del Templo de las Sombras"},       ITEMTYPE_SMALLKEY,          0xD9, true, &ShadowTempleKeys,          SHADOW_TEMPLE_KEY_RING);
    itemTable[BOTTOM_OF_THE_WELL_KEY_RING]      = Item(Text{"Bottom of the Well Key Ring",      "Trousseau du Puits",               "Llavero del fondo del pozo"},              ITEMTYPE_SMALLKEY,          0xDA, true, &BottomOfTheWellKeys,       BOTTOM_OF_THE_WELL_KEY_RING);
    itemTable[GERUDO_TRAINING_GROUNDS_KEY_RING] = Item(Text{"Training Grounds Key Ring",        "Trousseau du Gymnase Gerudo",      "Llavero del Centro de Instrucción"},       ITEMTYPE_SMALLKEY,          0xDB, true, &GerudoTrainingGroundsKeys, GERUDO_TRAINING_GROUNDS_KEY_RING);
    itemTable[GERUDO_FORTRESS_KEY_RING]         = Item(Text{"Gerudo Fortress Key Ring",         "Trousseau du Repaire des Voleurs", "Llavero de la Fortaleza Gerudo"},          ITEMTYPE_FORTRESS_SMALLKEY, 0xDC, true, &GerudoFortressKeys,        GERUDO_FORTRESS_KEY_RING);
    itemTable[GANONS_CASTLE_KEY_RING]           = Item(Text{"Ganon's Castle Key Ring",          "Trousseau du Château de Ganon",    "Llavero del Castillo de Ganon"},           ITEMTYPE_SMALLKEY,          0xDD, true, &GanonsCastleKeys,          GANONS_CASTLE_KEY_RING);

    //Stones and Medallions
    itemTable[KOKIRI_EMERALD]                    = Item(Text{"Kokiri's Emerald",                "Émeraude Kokiri",                  "Esmeralda de los Kokiri"},                 ITEMTYPE_DUNGEONREWARD, 0xCB,  true, &KokiriEmerald,   KOKIRI_EMERALD);
    itemTable[GORON_RUBY]                        = Item(Text{"Goron's Ruby",                    "Rubis Goron",                      "Rubí de los Goron"},                       ITEMTYPE_DUNGEONREWARD, 0xCC,  true, &GoronRuby,       GORON_RUBY);
    itemTable[ZORA_SAPPHIRE]                     = Item(Text{"Zora's Sapphire",                 "Saphir Zora",                      "Zafiro de los Zora"},                      ITEMTYPE_DUNGEONREWARD, 0xCD,  true, &ZoraSapphire,    ZORA_SAPPHIRE);
    itemTable[FOREST_MEDALLION]                  = Item(Text{"Forest Medallion",                "Médaillon de la Forêt",            "Medallón del Bosque"},                     ITEMTYPE_DUNGEONREWARD, 0xCE,  true, &ForestMedallion, FOREST_MEDALLION);
    itemTable[FIRE_MEDALLION]                    = Item(Text{"Fire Medallion",                  "Médaillon du Feu",                 "Medallón del Fuego"},                      ITEMTYPE_DUNGEONREWARD, 0xCF,  true, &FireMedallion,   FIRE_MEDALLION);
    itemTable[WATER_MEDALLION]                   = Item(Text{"Water Medallion",                 "Médaillon de l'Eau",               "Medallón del Agua"},                       ITEMTYPE_DUNGEONREWARD, 0xD0,  true, &WaterMedallion,  WATER_MEDALLION);
    itemTable[SPIRIT_MEDALLION]                  = Item(Text{"Spirit Medallion",                "Médaillon de l'Esprit",            "Medallón del Espíritu"},                   ITEMTYPE_DUNGEONREWARD, 0xD1,  true, &SpiritMedallion, SPIRIT_MEDALLION);
    itemTable[SHADOW_MEDALLION]                  = Item(Text{"Shadow Medallion",                "Médaillon de l'Ombre",             "Medallón de la Sombra"},                   ITEMTYPE_DUNGEONREWARD, 0xD2,  true, &ShadowMedallion, SHADOW_MEDALLION);
    itemTable[LIGHT_MEDALLION]                   = Item(Text{"Light Medallion",                 "Médaillon de la Lumière",          "Medallón de la Luz"},                      ITEMTYPE_DUNGEONREWARD, 0xD3,  true, &LightMedallion,  LIGHT_MEDALLION);

    //Generic Items
    itemTable[RECOVERY_HEART]                    = Item(Text{"Recovery Heart",                  "Coeur de Vie",                     "Corazón"},                                 ITEMTYPE_ITEM, GI_HEART,             false, &noVariable,     RECOVERY_HEART);
    itemTable[GREEN_RUPEE]                       = Item(Text{"Green Rupee",                     "Rubis Vert",                       "Rupia verde"},                             ITEMTYPE_ITEM, GI_RUPEE_GREEN,       false, &noVariable,     GREEN_RUPEE);
    itemTable[BLUE_RUPEE]                        = Item(Text{"Blue Rupee",                      "Rubis Bleu",                       "Rupia azul"},                              ITEMTYPE_ITEM, GI_RUPEE_BLUE,        false, &noVariable,     BLUE_RUPEE);
    itemTable[RED_RUPEE]                         = Item(Text{"Red Rupee",                       "Rubis Rouge",                      "Rupia roja"},                              ITEMTYPE_ITEM, GI_RUPEE_RED,         false, &noVariable,     RED_RUPEE);
    itemTable[PURPLE_RUPEE]                      = Item(Text{"Purple Rupee",                    "Rubis Pourpre",                    "Rupia morada"},                            ITEMTYPE_ITEM, GI_RUPEE_PURPLE,      false, &noVariable,     PURPLE_RUPEE);
    itemTable[HUGE_RUPEE]                        = Item(Text{"Huge Rupee",                      "Énorme Rubis",                     "Rupia gigante"},                           ITEMTYPE_ITEM, GI_RUPEE_GOLD,        false, &noVariable,     HUGE_RUPEE);
    itemTable[PIECE_OF_HEART]                    = Item(Text{"Piece of Heart",                  "Quart de Coeur",                   "Pieza de corazón"},                        ITEMTYPE_ITEM, GI_HEART_PIECE,       true,  &PieceOfHeart,   PIECE_OF_HEART);
    itemTable[HEART_CONTAINER]                   = Item(Text{"Heart Container",                 "Réceptacle de Coeur",              "Contenedor de corazón"},                   ITEMTYPE_ITEM, GI_HEART_CONTAINER_2, true,  &HeartContainer, HEART_CONTAINER);
    itemTable[ICE_TRAP]                          = Item(Text{"Ice Trap",                        "Piège de Glace",                   "Trampa de hielo"},                         ITEMTYPE_ITEM, GI_ICE_TRAP,          false, &noVariable,     ICE_TRAP);
    itemTable[MILK]                              = Item(Text{"Milk",                            "Lait",                             "Leche Lon Lon"},                           ITEMTYPE_ITEM, GI_MILK,              false, &noVariable,     NONE);

    //Refills
    itemTable[BOMBS_5]                           = Item(Text{"Bombs (5)",                       "Bombes (5)",                       "Bombas (5)"},                              ITEMTYPE_REFILL, GI_BOMBS_5,        false, &noVariable,  BOMBS_5);
    itemTable[BOMBS_10]                          = Item(Text{"Bombs (10)",                      "Bombes (10)",                      "Bombas (10)"},                             ITEMTYPE_REFILL, GI_BOMBS_10,       false, &noVariable,  BOMBS_10);
    itemTable[BOMBS_20]                          = Item(Text{"Bombs (20)",                      "Bombes (20)",                      "Bombas (20)"},                             ITEMTYPE_REFILL, GI_BOMBS_20,       false, &noVariable,  BOMBS_20);
    itemTable[BOMBCHU_5]                         = Item(Text{"Bombchu (5)",                     "Missiles (5)",                     "Bombchus (5)"},                            ITEMTYPE_REFILL, GI_BOMBCHUS_5,     true,  &Bombchus5,   BOMBCHU_5);
    itemTable[BOMBCHU_10]                        = Item(Text{"Bombchu (10)",                    "Missiles (10)",                    "Bombchus (10)"},                           ITEMTYPE_REFILL, GI_BOMBCHUS_10,    true,  &Bombchus10,  BOMBCHU_10);
    itemTable[BOMBCHU_20]                        = Item(Text{"Bombchu (20)",                    "Missiles (20)",                    "Bombchus (20)"},                           ITEMTYPE_REFILL, GI_BOMBCHUS_20,    true,  &Bombchus20,  BOMBCHU_20);
    itemTable[BOMBCHU_DROP]                      = Item(Text{"Bombchu Drop",                    "Drop Missiles",                    "Bombchus"},                                ITEMTYPE_DROP,   GI_BOMBCHUS_10,    true,  &BombchuDrop, NONE);
    itemTable[ARROWS_5]                          = Item(Text{"Arrows (5)",                      "Flèches (5)",                      "Flechas (5)"},                             ITEMTYPE_REFILL, GI_ARROWS_SMALL,   false, &noVariable,  ARROWS_5);
    itemTable[ARROWS_10]                         = Item(Text{"Arrows (10)",                     "Flèches (10)",                     "Flechas (10)"},                            ITEMTYPE_REFILL, GI_ARROWS_MEDIUM,  false, &noVariable,  ARROWS_10);
    itemTable[ARROWS_30]                         = Item(Text{"Arrows (30)",                     "Flèches (30)",                     "Flechas (30)"},                            ITEMTYPE_REFILL, GI_ARROWS_LARGE,   false, &noVariable,  ARROWS_30);
    itemTable[DEKU_NUTS_5]                       = Item(Text{"Deku Nuts (5)",                   "Noix Mojo (5)",                    "Nueces deku (5)"},                         ITEMTYPE_REFILL, GI_NUTS_5,         false, &noVariable,  DEKU_NUTS_5);
    itemTable[DEKU_NUTS_10]                      = Item(Text{"Deku Nuts (10)",                  "Noix Mojo (10)",                   "Nueces deku (10)"},                        ITEMTYPE_REFILL, GI_NUTS_10,        false, &noVariable,  DEKU_NUTS_10);
    itemTable[DEKU_SEEDS_30]                     = Item(Text{"Deku Seeds (30)",                 "Graines Mojo (30)",                "Semillas deku (30)"},                      ITEMTYPE_REFILL, GI_SEEDS_30,       false, &noVariable,  DEKU_SEEDS_30);
    itemTable[DEKU_STICK_1]                      = Item(Text{"Deku Stick (1)",                  "Bâton Mojo (1)",                   "Palo deku (1)"},                           ITEMTYPE_REFILL, GI_STICKS_1,       false, &noVariable,  DEKU_STICK_1);
    itemTable[RED_POTION_REFILL]                 = Item(Text{"Red Potion Refill",               "Recharge de Potion Rouge",         "Recarga de poción roja"},                  ITEMTYPE_REFILL, GI_POTION_RED,     false, &noVariable,  NONE);
    itemTable[GREEN_POTION_REFILL]               = Item(Text{"Green Potion Refill",             "Recharge de Potion Verte",         "Recarga de poción verde"},                 ITEMTYPE_REFILL, GI_POTION_GREEN,   false, &noVariable,  NONE);
    itemTable[BLUE_POTION_REFILL]                = Item(Text{"Blue Potion Refill",              "Recharge de Potion Bleue",         "Recarga de poción azul"},                  ITEMTYPE_REFILL, GI_POTION_BLUE,    false, &noVariable,  NONE);

    //Treasure Game
    itemTable[TREASURE_GAME_HEART]               = Item(Text{"Piece of Heart (Treasure Chest Minigame)",    "Quart de Coeur (Chasse-aux-Trésors)",   "Pieza de corazón (Cofre del Tesoro)"},     ITEMTYPE_ITEM, GI_HEART_PIECE_WIN,  true,  &PieceOfHeart, TREASURE_GAME_HEART);
    itemTable[TREASURE_GAME_GREEN_RUPEE]         = Item(Text{"Green Rupee (Treasure Chest Minigame)",       "Rubis Vert (Chasse-aux-Trésors)",      "Rupia Verde (Cofre del Tesoro)"},          ITEMTYPE_ITEM, GI_RUPEE_GREEN_LOSE, false, &noVariable,   TREASURE_GAME_GREEN_RUPEE);

    //Shop Items                                                                                                                                                                                                                                     price
    itemTable[BUY_DEKU_NUT_5]                    = Item(Text{"Buy Deku Nut (5)",                "Acheter: Noix Mojo (5)",           "Comprar nueces deku (5)"},                 ITEMTYPE_SHOP, 0x00, true,  &Nuts,           DEKU_NUTS_5,               15);
    itemTable[BUY_ARROWS_30]                     = Item(Text{"Buy Arrows (30)",                 "Acheter: Flèches (30)",            "Comprar flechas (30)"},                    ITEMTYPE_SHOP, 0x01, true,  &BuyArrow,       ARROWS_30,                 60);
    itemTable[BUY_ARROWS_50]                     = Item(Text{"Buy Arrows (50)",                 "Acheter: Flèches (50)",            "Comprar flechas (50)"},                    ITEMTYPE_SHOP, 0x02, true,  &BuyArrow,       ARROWS_30,                 90);
    itemTable[BUY_BOMBS_525]                     = Item(Text{"Buy Bombs (5) [25]",              "Acheter: Bombes (5) [25]",         "Comprar bombas (5) [25]"},                 ITEMTYPE_SHOP, 0x03, true,  &BuyBomb,        BOMBS_5,                   25);
    itemTable[BUY_DEKU_NUT_10]                   = Item(Text{"Buy Deku Nut (10)",               "Acheter: Noix Mojo (10)",          "Comprar Nueces deku (10)"},                ITEMTYPE_SHOP, 0x04, true,  &Nuts,           DEKU_NUTS_10,              30);
    itemTable[BUY_DEKU_STICK_1]                  = Item(Text{"Buy Deku Stick (1)",              "Acheter: Bâton Mojo (1)",          "Comprar palos deku (1)"},                  ITEMTYPE_SHOP, 0x05, true,  &Sticks,         DEKU_STICK_1,              10);
    itemTable[BUY_BOMBS_10]                      = Item(Text{"Buy Bombs (10)",                  "Acheter: Bombes (10)",             "Comprar Bombas (10)"},                     ITEMTYPE_SHOP, 0x06, true,  &BuyBomb,        BOMBS_10,                  50);
    itemTable[BUY_FISH]                          = Item(Text{"Buy Fish",                        "Acheter: Poisson",                 "Comprar pez"},                             ITEMTYPE_SHOP, 0x07, true,  &FishAccess,     BOTTLE_WITH_FISH,         200);
    itemTable[BUY_RED_POTION_30]                 = Item(Text{"Buy Red Potion [30]",             "Acheter: Potion Rouge [30]",       "Comprar poción roja [30]"},                ITEMTYPE_SHOP, 0x08, false, &noVariable,     BOTTLE_WITH_RED_POTION,    30);
    itemTable[BUY_GREEN_POTION]                  = Item(Text{"Buy Green Potion",                "Acheter: Potion Verte",            "Comprar poción verde"},                    ITEMTYPE_SHOP, 0x09, true,  &BuyGPotion,     BOTTLE_WITH_GREEN_POTION,  30);
    itemTable[BUY_BLUE_POTION]                   = Item(Text{"Buy Blue Potion",                 "Acheter: Potion Bleue",            "Comprar poción azul"},                     ITEMTYPE_SHOP, 0x0A, true,  &BuyBPotion,     BOTTLE_WITH_BLUE_POTION,  100);
    itemTable[BUY_HYLIAN_SHIELD]                 = Item(Text{"Buy Hylian Shield",               "Acheter: Bouclier Hylien",         "Comprar escudo hyliano"},                  ITEMTYPE_SHOP, 0x0C, true,  &HylianShield,   HYLIAN_SHIELD,             80);
    itemTable[BUY_DEKU_SHIELD]                   = Item(Text{"Buy Deku Shield",                 "Acheter: Bouclier Mojo",           "Comprar escudo deku"},                     ITEMTYPE_SHOP, 0x0D, true,  &DekuShield,     DEKU_SHIELD,               40);
    itemTable[BUY_GORON_TUNIC]                   = Item(Text{"Buy Goron Tunic",                 "Acheter: Tunique Goron",           "Comprar sayo goron"},                      ITEMTYPE_SHOP, 0x0E, true,  &GoronTunic,     GORON_TUNIC,              200);
    itemTable[BUY_ZORA_TUNIC]                    = Item(Text{"Buy Zora Tunic",                  "Acheter: Tunique Zora",            "Comprar sayo zora"},                       ITEMTYPE_SHOP, 0x0F, true,  &ZoraTunic,      ZORA_TUNIC,               300);
    itemTable[BUY_HEART]                         = Item(Text{"Buy Heart",                       "Acheter: Coeur de Vie",            "Comprar corazón"},                         ITEMTYPE_SHOP, 0x10, false, &noVariable,     RECOVERY_HEART,            10);
    itemTable[BUY_BOMBCHU_10]                    = Item(Text{"Buy Bombchu (10)",                "Acheter: Missiles (10)",           "Comprar bombchus (10)"},                   ITEMTYPE_SHOP, 0x15, true,  &BuyBombchus10,  BOMBCHU_10,                99);
    itemTable[BUY_BOMBCHU_20]                    = Item(Text{"Buy Bombchu (20)",                "Acheter: Missiles (20)",           "Comprar bombchus (20)"},                   ITEMTYPE_SHOP, 0x16, true,  &BuyBombchus20,  BOMBCHU_20,               180);
    itemTable[BUY_BOMBCHU_5]                     = Item(Text{"Buy Bombchu (5)",                 "Acheter: Missiles (5)",            "Comprar bombchus (5)"},                    ITEMTYPE_SHOP, 0x18, true,  &BuyBombchus5,   BOMBCHU_5,                 60);
    itemTable[BUY_DEKU_SEEDS_30]                 = Item(Text{"Buy Deku Seeds (30)",             "Acheter: Graines Mojo (30)",       "Comprar semillas deku (30)"},              ITEMTYPE_SHOP, 0x1D, true,  &BuySeed,        DEKU_SEEDS_30,             30);
    itemTable[SOLD_OUT]                          = Item(Text{"Sold Out",                        "Vendu",                            "Vendido"},                                 ITEMTYPE_SHOP, 0x26, false, &noVariable,     NONE,                       0);
    itemTable[BUY_BLUE_FIRE]                     = Item(Text{"Buy Blue Fire",                   "Acheter: Flamme Bleue",            "Comprar fuego azul"},                      ITEMTYPE_SHOP, 0x27, true,  &BlueFireAccess, BOTTLE_WITH_BLUE_FIRE,    300);
    itemTable[BUY_BOTTLE_BUG]                    = Item(Text{"Buy Bottle Bug",                  "Acheter: Insecte en bouteille",    "Comprar bichos"},                          ITEMTYPE_SHOP, 0x28, true,  &BugsAccess,     BOTTLE_WITH_BUGS,          50);
    itemTable[BUY_POE]                           = Item(Text{"Buy Poe",                         "Acheter: Esprit",           "Comprar Poe"},                             ITEMTYPE_SHOP, 0x2A, false, &noVariable,     BOTTLE_WITH_BIG_POE,       30);
    itemTable[BUY_FAIRYS_SPIRIT]                 = Item(Text{"Buy Fairy's Spirit",              "Acheter: Esprit de Fée",                     "Comprar hada"},                            ITEMTYPE_SHOP, 0x2B, true,  &FairyAccess,    BOTTLE_WITH_FAIRY,         50);
    itemTable[BUY_ARROWS_10]                     = Item(Text{"Buy Arrows (10)",                 "Acheter: Flèches (10)",            "Comprar flechas (10)"},                    ITEMTYPE_SHOP, 0x2C, true,  &BuyArrow,       ARROWS_10,                 20);
    itemTable[BUY_BOMBS_20]                      = Item(Text{"Buy Bombs (20)",                  "Acheter: Bombes (20)",             "Comprar bombas (20)"},                     ITEMTYPE_SHOP, 0x2D, true,  &BuyBomb,        BOMBS_20,                  80);
    itemTable[BUY_BOMBS_30]                      = Item(Text{"Buy Bombs (30)",                  "Acheter: Bombes (30)",             "Comprar bombas (30)"},                     ITEMTYPE_SHOP, 0x2E, true,  &BuyBomb,        BOMBS_20,                 120);
    itemTable[BUY_BOMBS_535]                     = Item(Text{"Buy Bombs (5) [35]",              "Acheter: Bombes (5) [35]",         "Comprar bombas (5) [35]"},                 ITEMTYPE_SHOP, 0x2F, true,  &BuyBomb,        BOMBS_5,                   35);
    itemTable[BUY_RED_POTION_40]                 = Item(Text{"Buy Red Potion [40]",             "Acheter: Potion Rouge [40]",       "Comprar poción roja [40]"},                ITEMTYPE_SHOP, 0x30, false, &noVariable,     BOTTLE_WITH_RED_POTION,    40);
    itemTable[BUY_RED_POTION_50]                 = Item(Text{"Buy Red Potion [50]",             "Acheter: Potion Rouge [50]",       "Comprar poción roja [50]"},                ITEMTYPE_SHOP, 0x31, false, &noVariable,     BOTTLE_WITH_RED_POTION,    50);

    itemTable[TRIFORCE]                          = Item(Text{"Triforce",                        "Triforce",                         "Trifuerza"},                               ITEMTYPE_EVENT, GI_RUPEE_RED_LOSE,  false, &noVariable, NONE);
    itemTable[HINT]                              = Item(Text{"Hint",                            "Indice",                           "Pista"},                                   ITEMTYPE_EVENT, GI_RUPEE_BLUE_LOSE, false, &noVariable, NONE);

//  itemTable[HOOKSHOT]                          = Item(Text{"Hookshot",                        "Grappin",                          "Gancho"},                                  ITEMTYPE_ITEM, 0x80, true,  &ProgressiveHookshot, HOOKSHOT);
//  itemTable[LONGSHOT]                          = Item(Text{"Longshot",                        "Super-Grappin",                    "Supergancho"},                             ITEMTYPE_ITEM, 0x80, true,  &ProgressiveHookshot, LONGSHOT);
//  itemTable[FAIRY_OCARINA]                     = Item(Text{"Fairy Ocarina",                   "Ocarina des fées",                 "Ocarina de las Hadas"},                    ITEMTYPE_ITEM, 0x8B, true,  &ProgressiveOcarina, FAIRY_OCARINA);
//  itemTable[OCARINA_OF_TIME]                   = Item(Text{"Ocarina of Time",                 "Ocarina du Temps",                 "Ocarina del Tiempo"},                      ITEMTYPE_ITEM, 0x8B, true,  &ProgressiveOcarina, OCARINA_OF_TIME);
//  itemTable[BOMB_BAG]                          = Item(Text{"Bomb Bag",                        "Sac de Bombes",                    "Saco de bombas"},                          ITEMTYPE_ITEM, 0x82, true,  &ProgressiveBombBag, BOMB_BAG);
//  itemTable[BIG_BOMB_BAG]                      = Item(Text{"Big Bomb Bag",                    "Grand Sac de Bombes",              "Saco de bombas grande"},                   ITEMTYPE_ITEM, 0x82, true,  &ProgressiveBombBag, BIG_BOMB_BAG);
//  itemTable[BIGGEST_BOMB_BAG]                  = Item(Text{"Biggest Bomb Bag",                "Énorme Sac de Bombes",             "Saco de bombas gigante"},                  ITEMTYPE_ITEM, 0x82, true,  &ProgressiveBombBag, BIGGEST_BOMB_BAG);
//  itemTable[FAIRY_BOW]                         = Item(Text{"Fairy Bow",                       "Arc des Fées",                     "Arco de las Hadas"},                       ITEMTYPE_ITEM, 0x83, true,  &ProgressiveBow, FAIRY_BOW);
//  itemTable[BIG_QUIVER]                        = Item(Text{"Big Quiver",                      "Grand carquois",                   "Carcaj grande"},                           ITEMTYPE_ITEM, 0x83, true,  &ProgressiveBow, BIG_QUIVER);
//  itemTable[BIGGEST_QUIVER]                    = Item(Text{"Biggest Quiver",                  "Énorme carquois",                  "Carcaj gigante"},                          ITEMTYPE_ITEM, 0x83, true,  &ProgressiveBow, BIGGEST_QUIVER);
//  itemTable[FAIRY_SLINGSHOT]                   = Item(Text{"Fairy Slingshot",                 "Lance-Pierre des Fées",            "Resortera de las hadas"},                  ITEMTYPE_ITEM, 0x84, true,  &ProgressiveBulletBag, FAIRY_SLINGSHOT);
//  itemTable[BIG_BULLET_BAG]                    = Item(Text{"Big Deku Seed Bullet Bag",        "Grand sac de graines mojo",        "Bolsa de semillas deku grande"},           ITEMTYPE_ITEM, 0x84, true,  &ProgressiveBulletBag, BIG_BULLET_BAG);
//  itemTable[BIGGEST_BULLET_BAD]                = Item(Text{"Biggest Deku Seed Bullet Bag",    "Énorme sac de graines mojo",       "Bolsa de semillas deku gigante"},          ITEMTYPE_ITEM, 0x84, true,  &ProgressiveBulletBag, BIGGEST_BULLET_BAD);
//  itemTable[GORONS_BRACELET]                   = Item(Text{"Goron's Bracelet",                "Bracelet Goron",                   "Brazalete de los Goron"},                  ITEMTYPE_ITEM, 0x81, true,  &ProgressiveStrength, GORONS_BRACELET);
//  itemTable[SILVER_GAUNTLETS]                  = Item(Text{"Silver Gauntlets",                "Gantelets d'argent",               "Guantes de plata"},                        ITEMTYPE_ITEM, 0x81, true,  &ProgressiveStrength, SILVER_GAUNTLETS);
//  itemTable[GOLDEN_GAUNTLETS]                  = Item(Text{"Golden Gauntlets",                "Gantelets d'or",                   "Guantes de oro"},                          ITEMTYPE_ITEM, 0x81, true,  &ProgressiveStrength, GOLDEN_GAUNTLETS);
//  itemTable[SILVER_SCALE]                      = Item(Text{"Silver Scale",                    "Écaille d'argent",                 "Escama de Plata"},                         ITEMTYPE_ITEM, 0x86, true,  &ProgressiveScale, SILVER_SCALE);
//  itemTable[GOLDEN_SCALE]                      = Item(Text{"Golden Scale",                    "Écaille d'or",                     "Escama de Oro"},                           ITEMTYPE_ITEM, 0x86, true,  &ProgressiveScale, GOLDEN_SCALE);
//  itemTable[ADULT_WALLET]                      = Item(Text{"Adult Wallet",                    "Bourse d'adulte",                  "Bolsa de adulto"},                         ITEMTYPE_ITEM, 0x85, true,  &ProgressiveWallet, ADULT_WALLET);
//  itemTable[GIANT_WALLET]                      = Item(Text{"Giant Wallet",                    "Bourse de géant",                  "Bolsa gigante"},                           ITEMTYPE_ITEM, 0x85, true,  &ProgressiveWallet, GIANT_WALLET);
//  itemTable[TYCOON_WALLET]                     = Item(Text{"Tycoon Wallet",                   "Bourse de star",                   "Bolsa de ricachón"},                       ITEMTYPE_ITEM, 0x85, true,  &ProgressiveWallet, TYCOON_WALLET);
//  itemTable[DEKU_NUT_CAPACITY_30]              = Item(Text{"Deku Nut Capacity (30)",          "Capacité de noix Mojo (20)",       "Capacidad de nueces deku (40)"},           ITEMTYPE_ITEM, 0x87, false, &noVariable, DEKU_NUT_CAPACITY_30);
//  itemTable[DEKU_NUT_CAPACITY_40]              = Item(Text{"Deku Nut Capacity (40)",          "Capacité de noix Mojo (30)",       "Capacidad de nueces deku (50)"},           ITEMTYPE_ITEM, 0x87, false, &noVariable, DEKU_NUT_CAPACITY_40);
//  itemTable[DEKU_NUT_CAPACITY_20]              = Item(Text{"Deku Stick Capacity (20)",        "Capacité de Bâtons Mojo (20)",     "Capacidad de palos deku (20)"},            ITEMTYPE_ITEM, 0x88, false, &noVariable, DEKU_NUT_CAPACITY_20);
//  itemTable[DEKU_NUT_CAPACITY_30]              = Item(Text{"Deku Nut Capacity (30)",          "Capacité de noix Mojo (20)",       "Capacidad de nueces deku (40)"},           ITEMTYPE_ITEM, 0x88, false, &noVariable, DEKU_NUT_CAPACITY_30);
//  itemTable[MAGIC_METER]                       = Item(Text{"Magic Meter",                     "Jauge de Magie",                   "Poder mágico"},                            ITEMTYPE_ITEM, 0x8A, true,  &ProgressiveMagic, MAGIC_METER);
//  itemTable[ENHANCED_MAGIC_METER]              = Item(Text{"Enhanced Magic Meter",            "Jauge de Magie améliorée",         "Poder mágico mejorado"},                   ITEMTYPE_ITEM, 0x8A, true,  &ProgressiveMagic, ENHANCED_MAGIC_METER);

}

Item& ItemTable(const uint32_t itemKey) {
    return itemTable[itemKey];
}

//This function should only be used to place items containing hint text
//at gossip stone locations.
void NewItem(const uint32_t itemKey, const Item item) {
    if (itemKey <= BUY_RED_POTION_50) {
      printf("\x1b[25;0HWARNING: ATTEMPTED TO OVERWRITE ITEM %lu\n", itemKey);
      return;
    }

    itemTable[itemKey] = item;
}
