- const dwDungeons = React.useMemo(() => DW_DUNGEONS.map(mapDungeon), [mapDungeon]);
- const dwLocations = React.useMemo(() => DW_LOCATIONS.map(mapLocation), [mapLocation]);
+ const dwDungeons = React.useMemo(() =>
+ (config.worldState === 'inverted' ? INVERTED_DW_DUNGEONS : DW_DUNGEONS)
+ .map(mapDungeon)
+ , [mapDungeon]);
+ const dwLocations = React.useMemo(() =>
+ (config.worldState === 'inverted' ? INVERTED_DW_LOCATIONS : DW_LOCATIONS)
+ .map(mapLocation)
+ , [mapLocation]);
+
+ const layout = React.useMemo(() => {
+ if (config.mapLayout === 'vertical') {
+ return {
+ width: 1,
+ height: 2,
+ viewBox: '0 0 1 2',
+ lwTransform: '',
+ dwTransform: 'translate(0 1)',
+ };
+ } else {
+ return {
+ width: 2,
+ height: 1,
+ viewBox: '0 0 2 1',
+ lwTransform: '',
+ dwTransform: 'translate(1 0)',
+ };
+ }
+ }, [config]);