diff --git a/AideDeJeu/AideDeJeuCmd/Program.cs b/AideDeJeu/AideDeJeuCmd/Program.cs index 3c5ca4a8..472a0fb3 100644 --- a/AideDeJeu/AideDeJeuCmd/Program.cs +++ b/AideDeJeu/AideDeJeuCmd/Program.cs @@ -403,13 +403,13 @@ namespace AideDeJeuCmd static string nsSvg = "http://www.w3.org/2000/svg"; static async Task ConvertMapsAsync() { - //await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\osgild"); - //await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\ferrance"); - //await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\fourche"); - //await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\hauterive"); - //await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\portsable"); - //await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\vercelise"); - //await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\xelys"); + await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\osgild"); + await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\ferrance"); + await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\fourche"); + await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\hauterive"); + await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\portsable"); + await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\vercelise"); + await ConvertMapAsync(@"..\..\..\..\..\Docs\Osgild\xelys"); await ConvertMapAsync(@"..\..\..\..\..\Docs\Alarian\alarian"); await ConvertMapAsync(@"..\..\..\..\..\Docs\Alarian\gramlin"); await ConvertMapAsync(@"..\..\..\..\..\Docs\Alarian\norven"); @@ -427,6 +427,7 @@ namespace AideDeJeuCmd document.Load($"{basename}.map"); var svg = new XmlDocument(); var svgElt = svg.CreateElement("svg", nsSvg); + svgElt.SetAttribute("id", "map"); svgElt.SetAttribute("style", "fill: transparent"); svg.AppendChild(svgElt); @@ -485,6 +486,11 @@ namespace AideDeJeuCmd } } svg.Save($"{basename}.svg"); + var html = File.ReadAllText($"{basename}.base.html"); + html = new Regex("()").Replace(html, svg.OuterXml); + + //html = html.Replace("", svg.ToString()); + File.WriteAllText($"{basename}.html", html, Encoding.UTF8); } static async Task ExtractYamlAsync() diff --git a/Docs/Alarian/alarian.base.html b/Docs/Alarian/alarian.base.html new file mode 100644 index 00000000..107aa539 --- /dev/null +++ b/Docs/Alarian/alarian.base.html @@ -0,0 +1,10 @@ + + + + + + +
+ + + diff --git a/Docs/Alarian/alarian.html b/Docs/Alarian/alarian.html index 15900df6..a052780d 100644 --- a/Docs/Alarian/alarian.html +++ b/Docs/Alarian/alarian.html @@ -1,10 +1,10 @@ - +
-
+NorvenYstaadTalbanYelinRhüGramlinSmitinRhagarron diff --git a/Docs/Alarian/alarian.svg b/Docs/Alarian/alarian.svg index 89598ade..79562a1a 100644 --- a/Docs/Alarian/alarian.svg +++ b/Docs/Alarian/alarian.svg @@ -1,4 +1,4 @@ - + diff --git a/Docs/Alarian/default.html b/Docs/Alarian/default.html new file mode 100644 index 00000000..9eb5cafa --- /dev/null +++ b/Docs/Alarian/default.html @@ -0,0 +1,20 @@ + + + + + +

Terres d'Alarian

+

Description Générale

+
+

Usage

+
Vous pouvez naviguer sur les cartes en cliquant sur les différents lieux, scroller en drag & drop et zoomer avec la molette de la souris.
+
+

Données

+
+

CGU

+
Cette aide de jeu utilise des marques déposées et/ou des droits d’auteurs qui sont la propriété de Black Book Editions comme l’y autorisent les conditions d’utilisation de Black Book Editions .
+
Cette aide de jeu n’est pas publiée par Black Book Editions et n’a pas reçu son aval ni une quelconque approbation de sa part .
+
Pour de plus amples informations sur Black Book Editions, consultez www.black-book-editions.fr.
+ + + diff --git a/Docs/Alarian/gramlin.base.html b/Docs/Alarian/gramlin.base.html new file mode 100644 index 00000000..617424c3 --- /dev/null +++ b/Docs/Alarian/gramlin.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/gramlin.html b/Docs/Alarian/gramlin.html index 617424c3..a71ac8ce 100644 --- a/Docs/Alarian/gramlin.html +++ b/Docs/Alarian/gramlin.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/gramlin.svg b/Docs/Alarian/gramlin.svg index 8dcfdbf6..fa14a45a 100644 --- a/Docs/Alarian/gramlin.svg +++ b/Docs/Alarian/gramlin.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/norven.base.html b/Docs/Alarian/norven.base.html new file mode 100644 index 00000000..a70b0185 --- /dev/null +++ b/Docs/Alarian/norven.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/norven.html b/Docs/Alarian/norven.html index a70b0185..4caffc2e 100644 --- a/Docs/Alarian/norven.html +++ b/Docs/Alarian/norven.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/norven.svg b/Docs/Alarian/norven.svg index 39ecba60..a3894b06 100644 --- a/Docs/Alarian/norven.svg +++ b/Docs/Alarian/norven.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/rhagarron.base.html b/Docs/Alarian/rhagarron.base.html new file mode 100644 index 00000000..22639f59 --- /dev/null +++ b/Docs/Alarian/rhagarron.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/rhu.base.html b/Docs/Alarian/rhu.base.html new file mode 100644 index 00000000..30c4f86c --- /dev/null +++ b/Docs/Alarian/rhu.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/rhu.html b/Docs/Alarian/rhu.html index 30c4f86c..851e5b1f 100644 --- a/Docs/Alarian/rhu.html +++ b/Docs/Alarian/rhu.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/rhu.svg b/Docs/Alarian/rhu.svg index dfdc2caa..f0aed2e4 100644 --- a/Docs/Alarian/rhu.svg +++ b/Docs/Alarian/rhu.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/scripts.js b/Docs/Alarian/scripts.js index 0d33faba..7d921a58 100644 --- a/Docs/Alarian/scripts.js +++ b/Docs/Alarian/scripts.js @@ -1,21 +1,119 @@ function init() { + var body = document.documentElement; var range = document.getElementById("range"); var map = document.getElementById("map"); map.style.width = "" + range.value + "%"; range.oninput = function() { map.style.width = "" + range.value + "%"; + console.log(range.value); } //range.addEventListener("wheel", onwheel); + addWheelListener(body, onwheel); + + var curYPos = 0, + curXPos = 0, + curDown = false; + +window.addEventListener('mousemove', function(e) { + if (curDown === true) { + window.scrollTo(document.body.scrollLeft + (curXPos - e.pageX), document.body.scrollTop + (curYPos - e.pageY)); + } + e.preventDefault(); +}); + +window.addEventListener('mousedown', function(e) { + curDown = true; + curYPos = e.pageY; + curXPos = e.pageX; + e.preventDefault(); +}); +window.addEventListener('mouseup', function(e) { + curDown = false; + e.preventDefault(); +}); + + } -function onwheel() { +function onwheel(e) { var range = document.getElementById("range"); var map = document.getElementById("map"); //alert(range.value); //var percent = range.value.toString().substring(0, range.length - 1); //alert(percent); - range.value = range.value + 10; + console.log(range.value); + range.value = parseInt(range.value) - Math.sign(e.deltaY) * 10; map.style.width = "" + range.value + "%"; + //map.style.width = "" + range.value + "%"; //map.style.width = "" + (parseInt(range.value) + 10) + "%"; console.log(range.value); -} \ No newline at end of file + e.preventDefault(); +} + + +// creates a global "addWheelListener" method +// example: addWheelListener( elem, function( e ) { console.log( e.deltaY ); e.preventDefault(); } ); +(function(window,document) { + + var prefix = "", _addEventListener, support; + + // detect event model + if ( window.addEventListener ) { + _addEventListener = "addEventListener"; + } else { + _addEventListener = "attachEvent"; + prefix = "on"; + } + + // detect available wheel event + support = "onwheel" in document.createElement("div") ? "wheel" : // Modern browsers support "wheel" + document.onmousewheel !== undefined ? "mousewheel" : // Webkit and IE support at least "mousewheel" + "DOMMouseScroll"; // let's assume that remaining browsers are older Firefox + + window.addWheelListener = function( elem, callback, useCapture ) { + _addWheelListener( elem, support, callback, useCapture ); + + // handle MozMousePixelScroll in older Firefox + if( support == "DOMMouseScroll" ) { + _addWheelListener( elem, "MozMousePixelScroll", callback, useCapture ); + } + }; + + function _addWheelListener( elem, eventName, callback, useCapture ) { + elem[ _addEventListener ]( prefix + eventName, support == "wheel" ? callback : function( originalEvent ) { + !originalEvent && ( originalEvent = window.event ); + + // create a normalized event object + var event = { + // keep a ref to the original event object + originalEvent: originalEvent, + target: originalEvent.target || originalEvent.srcElement, + type: "wheel", + deltaMode: originalEvent.type == "MozMousePixelScroll" ? 0 : 1, + deltaX: 0, + deltaY: 0, + deltaZ: 0, + preventDefault: function() { + originalEvent.preventDefault ? + originalEvent.preventDefault() : + originalEvent.returnValue = false; + } + }; + + // calculate deltaY (and deltaX) according to the event + if ( support == "mousewheel" ) { + event.deltaY = - 1/40 * originalEvent.wheelDelta; + // Webkit also support wheelDeltaX + originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX ); + } else { + event.deltaY = originalEvent.deltaY || originalEvent.detail; + } + + // it's time to fire the callback + return callback( event ); + + }, useCapture || false ); + } + +})(window,document); + diff --git a/Docs/Alarian/smitin.base.html b/Docs/Alarian/smitin.base.html new file mode 100644 index 00000000..628fbc03 --- /dev/null +++ b/Docs/Alarian/smitin.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/smitin.html b/Docs/Alarian/smitin.html index 628fbc03..4455a10b 100644 --- a/Docs/Alarian/smitin.html +++ b/Docs/Alarian/smitin.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/smitin.svg b/Docs/Alarian/smitin.svg index 09a38752..0bc45999 100644 --- a/Docs/Alarian/smitin.svg +++ b/Docs/Alarian/smitin.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/style.css b/Docs/Alarian/style.css index f917f5db..81ccf1d6 100644 --- a/Docs/Alarian/style.css +++ b/Docs/Alarian/style.css @@ -5,7 +5,12 @@ pre { } body { font-family: 'Noto Serif', serif; + margin: 0; + padding: 0; } h1 { font-family: 'UnifrakturCook', cursive; } +#range { + position: fixed; top: 0; left: 0; z-index: 2; visibility: hidden; +} \ No newline at end of file diff --git a/Docs/Alarian/talban.base.html b/Docs/Alarian/talban.base.html new file mode 100644 index 00000000..6f44457b --- /dev/null +++ b/Docs/Alarian/talban.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/talban.html b/Docs/Alarian/talban.html index 6f44457b..9a1ce6cd 100644 --- a/Docs/Alarian/talban.html +++ b/Docs/Alarian/talban.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/talban.svg b/Docs/Alarian/talban.svg index 44972a94..dd0f1775 100644 --- a/Docs/Alarian/talban.svg +++ b/Docs/Alarian/talban.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/talbethhav.base.html b/Docs/Alarian/talbethhav.base.html new file mode 100644 index 00000000..9fc2846f --- /dev/null +++ b/Docs/Alarian/talbethhav.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/talbethhav.html b/Docs/Alarian/talbethhav.html index 9fc2846f..4521524c 100644 --- a/Docs/Alarian/talbethhav.html +++ b/Docs/Alarian/talbethhav.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/talbethhav.svg b/Docs/Alarian/talbethhav.svg index 075c5a07..b26980c1 100644 --- a/Docs/Alarian/talbethhav.svg +++ b/Docs/Alarian/talbethhav.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/yagotalb.base.html b/Docs/Alarian/yagotalb.base.html new file mode 100644 index 00000000..7a8a82db --- /dev/null +++ b/Docs/Alarian/yagotalb.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/yagotalb.html b/Docs/Alarian/yagotalb.html index 7a8a82db..edf57cfc 100644 --- a/Docs/Alarian/yagotalb.html +++ b/Docs/Alarian/yagotalb.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/yagotalb.svg b/Docs/Alarian/yagotalb.svg index beb11bf4..a68ffda1 100644 --- a/Docs/Alarian/yagotalb.svg +++ b/Docs/Alarian/yagotalb.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/yelin.base.html b/Docs/Alarian/yelin.base.html new file mode 100644 index 00000000..6c3604cc --- /dev/null +++ b/Docs/Alarian/yelin.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/yelin.html b/Docs/Alarian/yelin.html index 6c3604cc..2f04d2d7 100644 --- a/Docs/Alarian/yelin.html +++ b/Docs/Alarian/yelin.html @@ -1,10 +1,10 @@ - +
-
+
diff --git a/Docs/Alarian/yelin.svg b/Docs/Alarian/yelin.svg index c42f3237..30db18fe 100644 --- a/Docs/Alarian/yelin.svg +++ b/Docs/Alarian/yelin.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Docs/Alarian/ystaad.base.html b/Docs/Alarian/ystaad.base.html new file mode 100644 index 00000000..9e4f4328 --- /dev/null +++ b/Docs/Alarian/ystaad.base.html @@ -0,0 +1,10 @@ + + + + + + +
+
+ + diff --git a/Docs/Alarian/ystaad.html b/Docs/Alarian/ystaad.html index 9e4f4328..849e6b98 100644 --- a/Docs/Alarian/ystaad.html +++ b/Docs/Alarian/ystaad.html @@ -1,10 +1,10 @@ - +
-
+ diff --git a/Docs/Alarian/ystaad.svg b/Docs/Alarian/ystaad.svg index 8b7dcd14..9dcc80df 100644 --- a/Docs/Alarian/ystaad.svg +++ b/Docs/Alarian/ystaad.svg @@ -1,4 +1,4 @@ - + diff --git a/Docs/Osgild/default.html b/Docs/Osgild/default.html index a91e7caf..643613fe 100644 --- a/Docs/Osgild/default.html +++ b/Docs/Osgild/default.html @@ -10,7 +10,7 @@
Source : Anathazerin : p 7

Usage

-
Vous pouvez naviguer sur les cartes en cliquant sur les différents lieux et zoomer avec le slider en haut à gauche de chaque carte.
+
Vous pouvez naviguer sur les cartes en cliquant sur les différents lieux, scroller en drag & drop et zoomer avec la molette de la souris.

Données

diff --git a/Docs/Osgild/ferrance.base.html b/Docs/Osgild/ferrance.base.html new file mode 100644 index 00000000..a219cd30 --- /dev/null +++ b/Docs/Osgild/ferrance.base.html @@ -0,0 +1,15 @@ + + + + + + +

Ferrance

+
Capitale de la principauté d'Arly
+
Lieux importants : L'académie de magie
+
Source : Anathazerin : p7, S4 Les Faux-Monnayeurs p88
+
Carte par Romje :
+
+
+ + diff --git a/Docs/Osgild/ferrance.html b/Docs/Osgild/ferrance.html index a219cd30..9811fa20 100644 --- a/Docs/Osgild/ferrance.html +++ b/Docs/Osgild/ferrance.html @@ -1,4 +1,4 @@ - + @@ -10,6 +10,6 @@
Source : Anathazerin : p7, S4 Les Faux-Monnayeurs p88
Carte par Romje :
-
+ diff --git a/Docs/Osgild/ferrance.map.html b/Docs/Osgild/ferrance.map similarity index 75% rename from Docs/Osgild/ferrance.map.html rename to Docs/Osgild/ferrance.map index d9e98e55..43eec69b 100644 --- a/Docs/Osgild/ferrance.map.html +++ b/Docs/Osgild/ferrance.map @@ -6,9 +6,9 @@ -Océan Pelurique -Océan Pelurique -Port-Sable -Fourche -Valastir +Océan Pelurique +Océan Pelurique +Port-Sable +Fourche +Valastir diff --git a/Docs/Osgild/ferrance.svg b/Docs/Osgild/ferrance.svg index ca7a31aa..845e50f5 100644 --- a/Docs/Osgild/ferrance.svg +++ b/Docs/Osgild/ferrance.svg @@ -1,26 +1,26 @@ - + - + Océan Pelurique - + Océan Pelurique - + Port-Sable - + Fourche - + Valastir diff --git a/Docs/Osgild/fourche.base.html b/Docs/Osgild/fourche.base.html new file mode 100644 index 00000000..331d46e8 --- /dev/null +++ b/Docs/Osgild/fourche.base.html @@ -0,0 +1,14 @@ + + + + + + +

Fourche

+
Ville marchande
+ +
Carte par Romje :
+
+
+ + diff --git a/Docs/Osgild/fourche.html b/Docs/Osgild/fourche.html index 331d46e8..3668fbf5 100644 --- a/Docs/Osgild/fourche.html +++ b/Docs/Osgild/fourche.html @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@
Carte par Romje :
-
+ diff --git a/Docs/Osgild/fourche.map.html b/Docs/Osgild/fourche.map similarity index 80% rename from Docs/Osgild/fourche.map.html rename to Docs/Osgild/fourche.map index b2013795..45252f9c 100644 --- a/Docs/Osgild/fourche.map.html +++ b/Docs/Osgild/fourche.map @@ -6,8 +6,8 @@ -Virylène -Hauterive -Wyks -Ferrance +Virylène +Hauterive +Wyks +Ferrance diff --git a/Docs/Osgild/fourche.svg b/Docs/Osgild/fourche.svg index 937e7d63..c7aba487 100644 --- a/Docs/Osgild/fourche.svg +++ b/Docs/Osgild/fourche.svg @@ -1,21 +1,21 @@ - + - + Virylène - + Hauterive - + Wyks - + Ferrance diff --git a/Docs/Osgild/hauterive.base.html b/Docs/Osgild/hauterive.base.html new file mode 100644 index 00000000..f36ae5e9 --- /dev/null +++ b/Docs/Osgild/hauterive.base.html @@ -0,0 +1,15 @@ + + + + + + +

Hauterive

+
Ville fortifiée
+
Lieux importants : Castel-Froid, la Bibliothèque du baron, la Tour de l’alchimiste
+ +
Carte par Romje :
+
+
+ + diff --git a/Docs/Osgild/hauterive.html b/Docs/Osgild/hauterive.html index f36ae5e9..bfadfc7e 100644 --- a/Docs/Osgild/hauterive.html +++ b/Docs/Osgild/hauterive.html @@ -1,4 +1,4 @@ - + @@ -10,6 +10,6 @@
Carte par Romje :
-
+ diff --git a/Docs/Osgild/hauterive.map.html b/Docs/Osgild/hauterive.map similarity index 89% rename from Docs/Osgild/hauterive.map.html rename to Docs/Osgild/hauterive.map index 15b1879d..bc6eb9c8 100644 --- a/Docs/Osgild/hauterive.map.html +++ b/Docs/Osgild/hauterive.map @@ -6,5 +6,5 @@ -Vercélise +Vercélise diff --git a/Docs/Osgild/hauterive.svg b/Docs/Osgild/hauterive.svg index ccb430f2..1b5b2344 100644 --- a/Docs/Osgild/hauterive.svg +++ b/Docs/Osgild/hauterive.svg @@ -1,6 +1,6 @@ - + - + Vercélise diff --git a/Docs/Osgild/osgild.base.html b/Docs/Osgild/osgild.base.html new file mode 100644 index 00000000..ee361ff6 --- /dev/null +++ b/Docs/Osgild/osgild.base.html @@ -0,0 +1,11 @@ + + + + + + +

Terres d'Osgild

+
+
+ + diff --git a/Docs/Osgild/osgild.html b/Docs/Osgild/osgild.html index ee361ff6..a3a4a754 100644 --- a/Docs/Osgild/osgild.html +++ b/Docs/Osgild/osgild.html @@ -1,4 +1,4 @@ - + @@ -6,6 +6,6 @@

Terres d'Osgild

-
+
HauteriveVercéliseVirylèneValormeFourcheMyrluneKrönFort-BoueuxHauteriveClairvalAuberge du Vieux-PontTwembyWyksGoruz KalRampartFerranceMerlithPort-SableValastir???5FondsacFort CollineBenastirFourchevive ?Ormile???7???8KaerimborSyndorilTimvirFeltenKeln???9Kaer-UndünFalèzeFleckBois ArdentKeltiumVeltiumFengPanderiumForocTor-AngulMurlinThormLizièreJarellSalmarezRivekPort-libreSalantBonlieu???10???11Monastir???12PiémontForterive???13Valpir???14XelysMadukSinysGuildeIlduranUldamarOkmurHauterocheMar-IridanPaleseauxLycanisIllistarGuarProvince d'ArsheimVercéliseCoeur-du-boisComté de PonantVirylèneRoyaumes du NordKrönDésert des MorterochesLac SinarClairvalBois de MyrvielBois DormantFourcheGoruz KalRampartTwembyWyksBois d'AstreisPrincipauté d'ArlyFerranceValastirBenastirFondsacFort CollineOrmileOcéan PeluriqueBois de MuirPort-SableDésert de TanithMonts ArgentésKaerimborHauts de HurlerocheLac ThuléaForêt de HautesylveSyndorilBonlieuMonastirForteriveBois de BaramXelysMarches du PiémontValpirPiémontMadukSinysSalantBlanc MaraisUldamarMontagne de feuForêt de Luir-An-DoralOkmurDuché de PerikIlduranMer des RoseauxPort-libreBois ArdentNoir MaraisFleckKaer-UndünPays de DornFalèzeForêt de PrimevalTimvirFeltenKelnRoyaumes BarbaresKeltiumProtectorat de FerVeltiumPanderiumForêt SombreTor-AngulGuarIllistarMurlinThormLizièreBaronnie de BordantSalmarezIles NénupharsGuildeRivekJarellMer MauveForocIles d'OuisterFengHauterocheRoyaume de CobisLycanisPaleseauxMarais du DragonMar-IridanMonts ViergesMarais de Bourbe-VieuxFort-BoueuxMonts GriseuxFaille des MondesMonts OgredentsMur de KeltMur de KeltMassif des CiméalesChaîne des Serres du MondeMonts EthernosTerres d'Osgild
diff --git a/Docs/Osgild/osgild.map.html b/Docs/Osgild/osgild.map similarity index 100% rename from Docs/Osgild/osgild.map.html rename to Docs/Osgild/osgild.map diff --git a/Docs/Osgild/osgild.svg b/Docs/Osgild/osgild.svg index ae45c1dd..6cad11c4 100644 --- a/Docs/Osgild/osgild.svg +++ b/Docs/Osgild/osgild.svg @@ -1,4 +1,4 @@ - + @@ -115,9 +115,9 @@ Benastir - + - ???6 + Fourchevive ? diff --git a/Docs/Osgild/portsable.base.html b/Docs/Osgild/portsable.base.html new file mode 100644 index 00000000..d3913c08 --- /dev/null +++ b/Docs/Osgild/portsable.base.html @@ -0,0 +1,12 @@ + + + + + + +

Port-Sable

+
Carte par Romje :
+
+
+ + diff --git a/Docs/Osgild/portsable.html b/Docs/Osgild/portsable.html index d3913c08..c5758c45 100644 --- a/Docs/Osgild/portsable.html +++ b/Docs/Osgild/portsable.html @@ -1,4 +1,4 @@ - + @@ -7,6 +7,6 @@

Port-Sable

Carte par Romje :
-
+ diff --git a/Docs/Osgild/portsable.map.html b/Docs/Osgild/portsable.map similarity index 78% rename from Docs/Osgild/portsable.map.html rename to Docs/Osgild/portsable.map index 07a2e3f0..381d3b95 100644 --- a/Docs/Osgild/portsable.map.html +++ b/Docs/Osgild/portsable.map @@ -6,7 +6,7 @@ -Océan Pelurique -Ferrance -Désert de Tanith +Océan Pelurique +Ferrance +Désert de Tanith diff --git a/Docs/Osgild/portsable.svg b/Docs/Osgild/portsable.svg index b4d63a94..884b0bf4 100644 --- a/Docs/Osgild/portsable.svg +++ b/Docs/Osgild/portsable.svg @@ -1,16 +1,16 @@ - + - + Océan Pelurique - + Ferrance - + Désert de Tanith diff --git a/Docs/Osgild/scripts.js b/Docs/Osgild/scripts.js index 0d33faba..7d921a58 100644 --- a/Docs/Osgild/scripts.js +++ b/Docs/Osgild/scripts.js @@ -1,21 +1,119 @@ function init() { + var body = document.documentElement; var range = document.getElementById("range"); var map = document.getElementById("map"); map.style.width = "" + range.value + "%"; range.oninput = function() { map.style.width = "" + range.value + "%"; + console.log(range.value); } //range.addEventListener("wheel", onwheel); + addWheelListener(body, onwheel); + + var curYPos = 0, + curXPos = 0, + curDown = false; + +window.addEventListener('mousemove', function(e) { + if (curDown === true) { + window.scrollTo(document.body.scrollLeft + (curXPos - e.pageX), document.body.scrollTop + (curYPos - e.pageY)); + } + e.preventDefault(); +}); + +window.addEventListener('mousedown', function(e) { + curDown = true; + curYPos = e.pageY; + curXPos = e.pageX; + e.preventDefault(); +}); +window.addEventListener('mouseup', function(e) { + curDown = false; + e.preventDefault(); +}); + + } -function onwheel() { +function onwheel(e) { var range = document.getElementById("range"); var map = document.getElementById("map"); //alert(range.value); //var percent = range.value.toString().substring(0, range.length - 1); //alert(percent); - range.value = range.value + 10; + console.log(range.value); + range.value = parseInt(range.value) - Math.sign(e.deltaY) * 10; map.style.width = "" + range.value + "%"; + //map.style.width = "" + range.value + "%"; //map.style.width = "" + (parseInt(range.value) + 10) + "%"; console.log(range.value); -} \ No newline at end of file + e.preventDefault(); +} + + +// creates a global "addWheelListener" method +// example: addWheelListener( elem, function( e ) { console.log( e.deltaY ); e.preventDefault(); } ); +(function(window,document) { + + var prefix = "", _addEventListener, support; + + // detect event model + if ( window.addEventListener ) { + _addEventListener = "addEventListener"; + } else { + _addEventListener = "attachEvent"; + prefix = "on"; + } + + // detect available wheel event + support = "onwheel" in document.createElement("div") ? "wheel" : // Modern browsers support "wheel" + document.onmousewheel !== undefined ? "mousewheel" : // Webkit and IE support at least "mousewheel" + "DOMMouseScroll"; // let's assume that remaining browsers are older Firefox + + window.addWheelListener = function( elem, callback, useCapture ) { + _addWheelListener( elem, support, callback, useCapture ); + + // handle MozMousePixelScroll in older Firefox + if( support == "DOMMouseScroll" ) { + _addWheelListener( elem, "MozMousePixelScroll", callback, useCapture ); + } + }; + + function _addWheelListener( elem, eventName, callback, useCapture ) { + elem[ _addEventListener ]( prefix + eventName, support == "wheel" ? callback : function( originalEvent ) { + !originalEvent && ( originalEvent = window.event ); + + // create a normalized event object + var event = { + // keep a ref to the original event object + originalEvent: originalEvent, + target: originalEvent.target || originalEvent.srcElement, + type: "wheel", + deltaMode: originalEvent.type == "MozMousePixelScroll" ? 0 : 1, + deltaX: 0, + deltaY: 0, + deltaZ: 0, + preventDefault: function() { + originalEvent.preventDefault ? + originalEvent.preventDefault() : + originalEvent.returnValue = false; + } + }; + + // calculate deltaY (and deltaX) according to the event + if ( support == "mousewheel" ) { + event.deltaY = - 1/40 * originalEvent.wheelDelta; + // Webkit also support wheelDeltaX + originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX ); + } else { + event.deltaY = originalEvent.deltaY || originalEvent.detail; + } + + // it's time to fire the callback + return callback( event ); + + }, useCapture || false ); + } + +})(window,document); + diff --git a/Docs/Osgild/style.css b/Docs/Osgild/style.css index f917f5db..81ccf1d6 100644 --- a/Docs/Osgild/style.css +++ b/Docs/Osgild/style.css @@ -5,7 +5,12 @@ pre { } body { font-family: 'Noto Serif', serif; + margin: 0; + padding: 0; } h1 { font-family: 'UnifrakturCook', cursive; } +#range { + position: fixed; top: 0; left: 0; z-index: 2; visibility: hidden; +} \ No newline at end of file diff --git a/Docs/Osgild/vercelise.base.html b/Docs/Osgild/vercelise.base.html new file mode 100644 index 00000000..b2e3a66d --- /dev/null +++ b/Docs/Osgild/vercelise.base.html @@ -0,0 +1,18 @@ + + + + + + +

Vercélise

+
Ville (~700 habitants)
+
Bourgmestre : Barral Rogenat
+
Rivière : La Reverdie
+
Lieux importants : L’hôtel de ville, le temple, la chapelle de Chloris, l’auberge au toit fleuri, le lac
+
Activité : Agriculture, élevage, pêche
+ +
Carte par Romje :
+
+
+ + diff --git a/Docs/Osgild/vercelise.html b/Docs/Osgild/vercelise.html index b2e3a66d..66272a60 100644 --- a/Docs/Osgild/vercelise.html +++ b/Docs/Osgild/vercelise.html @@ -1,4 +1,4 @@ - + @@ -13,6 +13,6 @@
Carte par Romje :
-
+ diff --git a/Docs/Osgild/vercelise.map.html b/Docs/Osgild/vercelise.map similarity index 85% rename from Docs/Osgild/vercelise.map.html rename to Docs/Osgild/vercelise.map index 14bc5b9e..04b2403c 100644 --- a/Docs/Osgild/vercelise.map.html +++ b/Docs/Osgild/vercelise.map @@ -6,6 +6,6 @@ -Hauterive -Virylène +Hauterive +Virylène diff --git a/Docs/Osgild/vercelise.svg b/Docs/Osgild/vercelise.svg index 0e540961..0e28261a 100644 --- a/Docs/Osgild/vercelise.svg +++ b/Docs/Osgild/vercelise.svg @@ -1,11 +1,11 @@ - + - + Hauterive - + Virylène diff --git a/Docs/Osgild/xelys.base.html b/Docs/Osgild/xelys.base.html new file mode 100644 index 00000000..1d1c07fd --- /dev/null +++ b/Docs/Osgild/xelys.base.html @@ -0,0 +1,16 @@ + + + + + + +

Xelys

+
Cité-état, ville troglodyte, creusée dans les parois d’un canyon
+
Aussi appelée Porte d’Or ou Cité des Voleurs
+
Abrite de nombreuses compagnies de Mercenaires et aussi une importante communauté de nains
+
Source : Anathazerin : S5 Le Pic d’Anddalf p100
+
Carte par Romje :
+
+
+ + diff --git a/Docs/Osgild/xelys.html b/Docs/Osgild/xelys.html index 1d1c07fd..5c57fd05 100644 --- a/Docs/Osgild/xelys.html +++ b/Docs/Osgild/xelys.html @@ -1,4 +1,4 @@ - + @@ -11,6 +11,6 @@
Source : Anathazerin : S5 Le Pic d’Anddalf p100
Carte par Romje :
-
+ diff --git a/Docs/Osgild/xelys.map.html b/Docs/Osgild/xelys.map similarity index 80% rename from Docs/Osgild/xelys.map.html rename to Docs/Osgild/xelys.map index 41a7ce22..8fafa305 100644 --- a/Docs/Osgild/xelys.map.html +++ b/Docs/Osgild/xelys.map @@ -6,7 +6,7 @@ -Forterive -Bois de Baram -Kaerimbor +Forterive +Bois de Baram +Kaerimbor diff --git a/Docs/Osgild/xelys.svg b/Docs/Osgild/xelys.svg index bbbb5648..001e3909 100644 --- a/Docs/Osgild/xelys.svg +++ b/Docs/Osgild/xelys.svg @@ -1,16 +1,16 @@ - + - + Forterive - + Bois de Baram - + Kaerimbor diff --git a/Docs/alariantest.html b/Docs/alariantest.html index ebcda9a1..506ab9e3 100644 --- a/Docs/alariantest.html +++ b/Docs/alariantest.html @@ -13,9 +13,10 @@ } --> +
- +
diff --git a/Docs/scripts.js b/Docs/scripts.js new file mode 100644 index 00000000..7d921a58 --- /dev/null +++ b/Docs/scripts.js @@ -0,0 +1,119 @@ +function init() { + var body = document.documentElement; + var range = document.getElementById("range"); + var map = document.getElementById("map"); + map.style.width = "" + range.value + "%"; + range.oninput = function() { + map.style.width = "" + range.value + "%"; + console.log(range.value); + } + //range.addEventListener("wheel", onwheel); + addWheelListener(body, onwheel); + + var curYPos = 0, + curXPos = 0, + curDown = false; + +window.addEventListener('mousemove', function(e) { + if (curDown === true) { + window.scrollTo(document.body.scrollLeft + (curXPos - e.pageX), document.body.scrollTop + (curYPos - e.pageY)); + } + e.preventDefault(); +}); + +window.addEventListener('mousedown', function(e) { + curDown = true; + curYPos = e.pageY; + curXPos = e.pageX; + e.preventDefault(); +}); +window.addEventListener('mouseup', function(e) { + curDown = false; + e.preventDefault(); +}); + + +} + +function onwheel(e) { + var range = document.getElementById("range"); + var map = document.getElementById("map"); + //alert(range.value); + //var percent = range.value.toString().substring(0, range.length - 1); + //alert(percent); + console.log(range.value); + range.value = parseInt(range.value) - Math.sign(e.deltaY) * 10; + map.style.width = "" + range.value + "%"; + //map.style.width = "" + range.value + "%"; + //map.style.width = "" + (parseInt(range.value) + 10) + "%"; + console.log(range.value); + e.preventDefault(); +} + + +// creates a global "addWheelListener" method +// example: addWheelListener( elem, function( e ) { console.log( e.deltaY ); e.preventDefault(); } ); +(function(window,document) { + + var prefix = "", _addEventListener, support; + + // detect event model + if ( window.addEventListener ) { + _addEventListener = "addEventListener"; + } else { + _addEventListener = "attachEvent"; + prefix = "on"; + } + + // detect available wheel event + support = "onwheel" in document.createElement("div") ? "wheel" : // Modern browsers support "wheel" + document.onmousewheel !== undefined ? "mousewheel" : // Webkit and IE support at least "mousewheel" + "DOMMouseScroll"; // let's assume that remaining browsers are older Firefox + + window.addWheelListener = function( elem, callback, useCapture ) { + _addWheelListener( elem, support, callback, useCapture ); + + // handle MozMousePixelScroll in older Firefox + if( support == "DOMMouseScroll" ) { + _addWheelListener( elem, "MozMousePixelScroll", callback, useCapture ); + } + }; + + function _addWheelListener( elem, eventName, callback, useCapture ) { + elem[ _addEventListener ]( prefix + eventName, support == "wheel" ? callback : function( originalEvent ) { + !originalEvent && ( originalEvent = window.event ); + + // create a normalized event object + var event = { + // keep a ref to the original event object + originalEvent: originalEvent, + target: originalEvent.target || originalEvent.srcElement, + type: "wheel", + deltaMode: originalEvent.type == "MozMousePixelScroll" ? 0 : 1, + deltaX: 0, + deltaY: 0, + deltaZ: 0, + preventDefault: function() { + originalEvent.preventDefault ? + originalEvent.preventDefault() : + originalEvent.returnValue = false; + } + }; + + // calculate deltaY (and deltaX) according to the event + if ( support == "mousewheel" ) { + event.deltaY = - 1/40 * originalEvent.wheelDelta; + // Webkit also support wheelDeltaX + originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX ); + } else { + event.deltaY = originalEvent.deltaY || originalEvent.detail; + } + + // it's time to fire the callback + return callback( event ); + + }, useCapture || false ); + } + +})(window,document); +