+const ITEM_MAP = [
+ 'aga',
+ 'armos',
+ 'arrghus',
+ 'big-key',
+ 'blind',
+ 'blue-boomerang',
+ 'blue-mail',
+ 'blue-pendant',
+ 'blue-potion',
+ 'bombos',
+ 'bomb',
+ 'book',
+ 'boots',
+ 'bottle-bee',
+ 'bottle-good-bee',
+ 'bottle',
+ 'bowless-silvers',
+ 'bow',
+ 'bugnet',
+ 'bunny-head',
+ 'byrna',
+ 'cape',
+ 'chest',
+ 'compass',
+ 'crystal',
+ 'crystal-switch-blue',
+ 'crystal-switch',
+ 'crystal-switch-red',
+ 'duck',
+ 'ether',
+ 'fairy',
+ 'fighter-shield',
+ 'fighter-sword',
+ 'fire-rod',
+ 'fire-shield',
+ 'flippers',
+ 'flute',
+ 'ganon',
+ 'glove',
+ 'gold-sword',
+ 'green-mail',
+ 'green-pendant',
+ 'green-potion',
+ 'gt',
+ 'half-magic',
+ 'hammer',
+ 'heart-0',
+ 'heart-1',
+ 'heart-2',
+ 'heart-3',
+ 'heart-container',
+ 'heart-piece',
+ 'helma',
+ 'hookshot',
+ 'ice-rod',
+ 'kholdstare',
+ 'lamp',
+ 'lanmolas',
+ 'link-head',
+ 'map',
+ 'master-sword',
+ 'mirror',
+ 'mirror-shield',
+ 'mitts',
+ 'moldorm',
+ 'moonpearl',
+ 'mothula',
+ 'mushroom',
+ 'open-chest',
+ 'powder',
+ 'quake',
+ 'quarter-magic',
+ 'red-bomb',
+ 'red-boomerang',
+ 'red-crystal',
+ 'red-mail',
+ 'red-pendant',
+ 'red-potion',
+ 'shovel',
+ 'silvers',
+ 'small-key',
+ 'somaria',
+ 'sword-1',
+ 'sword-2',
+ 'sword-3',
+ 'sword-4',
+ 'tempered-sword',
+ 'triforce-piece',
+ 'triforce',
+ 'trinexx',
+ 'vitreous',
+];
+
+const ITEM_MAP_WIDTH = 8;
+
+const ITEM_MAP_HEIGHT = Math.ceil(ITEM_MAP.length / ITEM_MAP_WIDTH);
+
+const ITEM_MAP_URL = '/items-v2.png';
+
+const isOnItemMap = name => ITEM_MAP.includes(name);
+
+const getItemMapX = name => ITEM_MAP.indexOf(name) % ITEM_MAP_WIDTH;
+
+const getItemMapY = name => Math.floor(ITEM_MAP.indexOf(name) / ITEM_MAP_WIDTH);
+
+const getItemMapStyle = name => {
+ const x = getItemMapX(name);
+ const y = getItemMapY(name);
+ return {
+ backgroundImage: `url(${ITEM_MAP_URL})`,
+ backgroundPosition: `-${x * 100}% -${y * 100}%`,
+ backgroundSize: `${ITEM_MAP_WIDTH * 100}% ${ITEM_MAP_HEIGHT * 100}%`,
+ };
+};
+