Separate the worldmap into segments, so that only one segment at a time is displayed. This way, even dungeon maps can be displayed.

This commit is contained in:
Oskar Wiksten
2012-07-23 17:41:00 +02:00
parent 51883dbdf5
commit 99cf22814d
12 changed files with 437 additions and 469 deletions

View File

@@ -506,5 +506,6 @@
<string name="about_button4">About</string>
<string name="menu_button_worldmap">Map</string>
<string name="menu_button_worldmap_failed">Map cannot be displayed.</string>
<string name="display_worldmap_not_available">The map cannot be displayed from this location.</string>
</resources>

View File

@@ -1,378 +1,250 @@
<?xml version="1.0" encoding="utf-8"?>
<worldmap>
<div id="pwcave4" x-posx="327" x-posy="89" x-width="30" x-height="30" x-outside="0">pwcave4</div>
<div id="waytobrimhaven2" x-posx="342" x-posy="235" x-width="30" x-height="30" x-outside="1">waytobrimhaven2</div>
<div id="waytobrimhaven3" x-posx="373" x-posy="237" x-width="30" x-height="30" x-outside="1">waytobrimhaven3</div>
<div id="waytobrimhaven0" x-posx="277" x-posy="249" x-width="33" x-height="16" x-outside="1">waytobrimhaven0</div>
<div id="waytobrimhaven1" x-posx="311" x-posy="245" x-width="30" x-height="20" x-outside="1">waytobrimhaven1</div>
<div id="roadtocarntower1" x-posx="125" x-posy="298" x-width="30" x-height="20" x-outside="1">roadtocarntower1</div>
<div id="roadtocarntower0" x-posx="156" x-posy="298" x-width="30" x-height="20" x-outside="1">roadtocarntower0</div>
<div id="woodsettlement0" x-posx="210" x-posy="365" x-width="29" x-height="14" x-outside="1">woodsettlement0</div>
<div id="fallhaven_arcir_basement" x-posx="228" x-posy="397" x-width="12" x-height="9" x-outside="0">fallhaven_arcir_basement</div>
<div id="roadtocarntower2" x-posx="94" x-posy="298" x-width="30" x-height="26" x-outside="1">roadtocarntower2</div>
<div id="lodarcave7" x-posx="381" x-posy="410" x-width="15" x-height="20" x-outside="0">lodarcave7</div>
<div id="lodarcave5" x-posx="356" x-posy="377" x-width="25" x-height="20" x-outside="0">lodarcave5</div>
<div id="lodarcave6" x-posx="360" x-posy="398" x-width="20" x-height="23" x-outside="0">lodarcave6</div>
<div id="lodarcave3" x-posx="331" x-posy="325" x-width="30" x-height="30" x-outside="0">lodarcave3</div>
<div id="lodarcave4" x-posx="343" x-posy="356" x-width="25" x-height="20" x-outside="0">lodarcave4</div>
<div id="lodarcave1" x-posx="317" x-posy="273" x-width="18" x-height="30" x-outside="0">lodarcave1</div>
<div id="lodarcave2" x-posx="327" x-posy="304" x-width="15" x-height="20" x-outside="0">lodarcave2</div>
<div id="fields9" x-posx="125" x-posy="282" x-width="30" x-height="15" x-outside="1">fields9</div>
<div id="lodarcave0" x-posx="313" x-posy="272" x-width="20" x-height="15" x-outside="0">lodarcave0</div>
<div id="waterway9" x-posx="559" x-posy="218" x-width="30" x-height="30" x-outside="1">waterway9</div>
<div id="fields6" x-posx="187" x-posy="222" x-width="30" x-height="28" x-outside="1">fields6</div>
<div id="waterway8" x-posx="528" x-posy="218" x-width="30" x-height="30" x-outside="1">waterway8</div>
<div id="fields5" x-posx="156" x-posy="220" x-width="30" x-height="30" x-outside="1">fields5</div>
<div id="fields8" x-posx="156" x-posy="282" x-width="30" x-height="15" x-outside="1">fields8</div>
<div id="crossglen_cave" x-posx="172" x-posy="335" x-width="20" x-height="20" x-outside="0">crossglen_cave</div>
<div id="fields7" x-posx="218" x-posy="226" x-width="27" x-height="24" x-outside="1">fields7</div>
<div id="fields2" x-posx="156" x-posy="251" x-width="30" x-height="30" x-outside="1">fields2</div>
<div id="fields1" x-posx="187" x-posy="251" x-width="30" x-height="30" x-outside="1">fields1</div>
<div id="fields4" x-posx="218" x-posy="251" x-width="27" x-height="24" x-outside="1">fields4</div>
<div id="fields3" x-posx="135" x-posy="261" x-width="20" x-height="20" x-outside="1">fields3</div>
<div id="fields0" x-posx="187" x-posy="282" x-width="30" x-height="15" x-outside="1">fields0</div>
<div id="wild14_clearing" x-posx="326" x-posy="423" x-width="15" x-height="15" x-outside="1">wild14_clearing</div>
<div id="blackwater_mountain7" x-posx="34" x-posy="368" x-width="30" x-height="30" x-outside="0">blackwater_mountain7</div>
<div id="lodarhouse1" x-posx="395" x-posy="403" x-width="20" x-height="16" x-outside="0">lodarhouse1</div>
<div id="blackwater_mountain6" x-posx="31" x-posy="384" x-width="10" x-height="10" x-outside="0">blackwater_mountain6</div>
<div id="lodarhouse0" x-posx="387" x-posy="412" x-width="26" x-height="20" x-outside="0">lodarhouse0</div>
<div id="blackwater_mountain5" x-posx="22" x-posy="389" x-width="15" x-height="15" x-outside="0">blackwater_mountain5</div>
<div id="mountainlake10a" x-posx="703" x-posy="31" x-width="25" x-height="20" x-outside="1">mountainlake10a</div>
<div id="blackwater_mountain4" x-posx="22" x-posy="401" x-width="15" x-height="15" x-outside="1">blackwater_mountain4</div>
<div id="blackwater_mountain9" x-posx="42" x-posy="350" x-width="17" x-height="23" x-outside="0">blackwater_mountain9</div>
<div id="blackwater_mountain8" x-posx="47" x-posy="378" x-width="20" x-height="20" x-outside="0">blackwater_mountain8</div>
<div id="crossglen_farmhouse" x-posx="160" x-posy="364" x-width="10" x-height="8" x-outside="0">crossglen_farmhouse</div>
<div id="fallhaven_storage" x-posx="248" x-posy="407" x-width="15" x-height="10" x-outside="0">fallhaven_storage</div>
<div id="pwcave2" x-posx="296" x-posy="58" x-width="30" x-height="30" x-outside="0">pwcave2</div>
<div id="pwcave3" x-posx="327" x-posy="58" x-width="30" x-height="30" x-outside="0">pwcave3</div>
<div id="pwcave0" x-posx="316" x-posy="120" x-width="11" x-height="30" x-outside="0">pwcave0</div>
<div id="pwcave1" x-posx="296" x-posy="89" x-width="30" x-height="30" x-outside="0">pwcave1</div>
<div id="wild16_cave" x-posx="92" x-posy="454" x-width="20" x-height="15" x-outside="0">wild16_cave</div>
<div id="lodarcave4a" x-posx="369" x-posy="358" x-width="20" x-height="20" x-outside="0">lodarcave4a</div>
<div id="wild3" x-posx="181" x-posy="384" x-width="20" x-height="20" x-outside="1">wild3</div>
<div id="wild2" x-posx="160" x-posy="384" x-width="20" x-height="20" x-outside="1">wild2</div>
<div id="wild5" x-posx="167" x-posy="405" x-width="20" x-height="20" x-outside="1">wild5</div>
<div id="wild4" x-posx="209" x-posy="349" x-width="20" x-height="15" x-outside="1">wild4</div>
<div id="wild7" x-posx="155" x-posy="457" x-width="20" x-height="20" x-outside="1">wild7</div>
<div id="wild6" x-posx="163" x-posy="426" x-width="30" x-height="30" x-outside="1">wild6</div>
<div id="remgard_weapon" x-posx="621" x-posy="92" x-width="12" x-height="8" x-outside="0">remgard_weapon</div>
<div id="wild9" x-posx="194" x-posy="440" x-width="30" x-height="15" x-outside="1">wild9</div>
<div id="clearing_level2" x-posx="251" x-posy="463" x-width="15" x-height="15" x-outside="0">clearing_level2</div>
<div id="wild8" x-posx="134" x-posy="466" x-width="20" x-height="15" x-outside="1">wild8</div>
<div id="clearing_level1" x-posx="244" x-posy="461" x-width="20" x-height="16" x-outside="0">clearing_level1</div>
<div id="blackwater_mountain0" x-posx="61" x-posy="467" x-width="20" x-height="15" x-outside="1">blackwater_mountain0</div>
<div id="blackwater_mountain1" x-posx="19" x-posy="439" x-width="20" x-height="20" x-outside="1">blackwater_mountain1</div>
<div id="blackwater_mountain2" x-posx="19" x-posy="428" x-width="20" x-height="10" x-outside="1">blackwater_mountain2</div>
<div id="blackwater_mountain3" x-posx="22" x-posy="417" x-width="15" x-height="10" x-outside="1">blackwater_mountain3</div>
<div id="vilegard_erttu" x-posx="368" x-posy="470" x-width="10" x-height="8" x-outside="0">vilegard_erttu</div>
<div id="flagstone_upper" x-posx="111" x-posy="480" x-width="20" x-height="12" x-outside="0">flagstone_upper</div>
<div id="wild1" x-posx="187" x-posy="351" x-width="21" x-height="21" x-outside="1">wild1</div>
<div id="wild0" x-posx="187" x-posy="329" x-width="21" x-height="21" x-outside="1">wild0</div>
<div id="wild17" x-posx="40" x-posy="453" x-width="20" x-height="20" x-outside="1">wild17</div>
<div id="wild15" x-posx="343" x-posy="446" x-width="20" x-height="15" x-outside="1">wild15</div>
<div id="mountainlake13a" x-posx="627" x-posy="50" x-width="15" x-height="25" x-outside="1">mountainlake13a</div>
<div id="wild16" x-posx="82" x-posy="467" x-width="20" x-height="15" x-outside="1">wild16</div>
<div id="wild13" x-posx="301" x-posy="434" x-width="20" x-height="15" x-outside="1">wild13</div>
<div id="flagstone0" x-posx="103" x-posy="467" x-width="30" x-height="30" x-outside="1">flagstone0</div>
<div id="wild14" x-posx="322" x-posy="439" x-width="20" x-height="16" x-outside="1">wild14</div>
<div id="wild11" x-posx="246" x-posy="432" x-width="20" x-height="20" x-outside="1">wild11</div>
<div id="wild12" x-posx="280" x-posy="424" x-width="20" x-height="20" x-outside="1">wild12</div>
<div id="wild10" x-posx="225" x-posy="432" x-width="20" x-height="20" x-outside="1">wild10</div>
<div id="waterway6" x-posx="404" x-posy="218" x-width="30" x-height="30" x-outside="1">waterway6</div>
<div id="waterway7" x-posx="435" x-posy="218" x-width="30" x-height="30" x-outside="1">waterway7</div>
<div id="waterway4" x-posx="381" x-posy="156" x-width="30" x-height="30" x-outside="1">waterway4</div>
<div id="waterway5" x-posx="389" x-posy="187" x-width="30" x-height="30" x-outside="1">waterway5</div>
<div id="flagstone1" x-posx="120" x-posy="486" x-width="20" x-height="11" x-outside="0">flagstone1</div>
<div id="waterway2" x-posx="350" x-posy="148" x-width="30" x-height="30" x-outside="1">waterway2</div>
<div id="flagstone2" x-posx="132" x-posy="481" x-width="11" x-height="30" x-outside="0">flagstone2</div>
<div id="loneford10" x-posx="250" x-posy="245" x-width="11" x-height="11" x-outside="0">loneford10</div>
<div id="waterway3" x-posx="319" x-posy="148" x-width="30" x-height="20" x-outside="1">waterway3</div>
<div id="woodhouse3" x-posx="221" x-posy="362" x-width="16" x-height="8" x-outside="0">woodhouse3</div>
<div id="waterway0" x-posx="288" x-posy="190" x-width="30" x-height="30" x-outside="1">waterway0</div>
<div id="lodar8cave0" x-posx="308" x-posy="319" x-width="25" x-height="17" x-outside="0">lodar8cave0</div>
<div id="flagstone3" x-posx="138" x-posy="512" x-width="20" x-height="13" x-outside="0">flagstone3</div>
<div id="waterway1" x-posx="319" x-posy="169" x-width="30" x-height="30" x-outside="1">waterway1</div>
<div id="flagstone4" x-posx="159" x-posy="508" x-width="25" x-height="13" x-outside="0">flagstone4</div>
<div id="road4_gargoylecave" x-posx="433" x-posy="436" x-width="15" x-height="15" x-outside="1">road4_gargoylecave</div>
<div id="fallhaven_prison" x-posx="226" x-posy="395" x-width="15" x-height="10" x-outside="0">fallhaven_prison</div>
<div id="lonelyhouse1" x-posx="706" x-posy="37" x-width="15" x-height="10" x-outside="0">lonelyhouse1</div>
<div id="lonelyhouse0" x-posx="700" x-posy="35" x-width="15" x-height="10" x-outside="0">lonelyhouse0</div>
<div id="minerhouse0" x-posx="404" x-posy="328" x-width="20" x-height="8" x-outside="0">minerhouse0</div>
<div id="waytobrimhavencave3b" x-posx="462" x-posy="277" x-width="14" x-height="7" x-outside="0">waytobrimhavencave3b</div>
<div id="remgard_villager4" x-posx="639" x-posy="116" x-width="12" x-height="8" x-outside="0">remgard_villager4</div>
<div id="minerhouse4" x-posx="435" x-posy="299" x-width="26" x-height="8" x-outside="0">minerhouse4</div>
<div id="remgard_villager3" x-posx="669" x-posy="120" x-width="13" x-height="8" x-outside="0">remgard_villager3</div>
<div id="minerhouse3" x-posx="416" x-posy="317" x-width="16" x-height="8" x-outside="0">minerhouse3</div>
<div id="minerhouse2" x-posx="407" x-posy="315" x-width="20" x-height="8" x-outside="0">minerhouse2</div>
<div id="minerhouse1" x-posx="405" x-posy="320" x-width="20" x-height="8" x-outside="0">minerhouse1</div>
<div id="remgard_villager5" x-posx="619" x-posy="114" x-width="12" x-height="8" x-outside="0">remgard_villager5</div>
<div id="minerhouse8" x-posx="438" x-posy="336" x-width="16" x-height="8" x-outside="0">minerhouse8</div>
<div id="fallhaven_nocmar" x-posx="216" x-posy="394" x-width="12" x-height="8" x-outside="0">fallhaven_nocmar</div>
<div id="minerhouse7" x-posx="446" x-posy="331" x-width="16" x-height="8" x-outside="0">minerhouse7</div>
<div id="remgard_villager2" x-posx="670" x-posy="112" x-width="10" x-height="8" x-outside="0">remgard_villager2</div>
<div id="minerhouse6" x-posx="438" x-posy="330" x-width="12" x-height="8" x-outside="0">minerhouse6</div>
<div id="remgard_villager1" x-posx="665" x-posy="83" x-width="11" x-height="8" x-outside="0">remgard_villager1</div>
<div id="minerhouse5" x-posx="447" x-posy="311" x-width="16" x-height="8" x-outside="0">minerhouse5</div>
<div id="waytobrimhavencave3a" x-posx="468" x-posy="264" x-width="20" x-height="22" x-outside="0">waytobrimhavencave3a</div>
<div id="lodar12cave0" x-posx="378" x-posy="294" x-width="15" x-height="15" x-outside="0">lodar12cave0</div>
<div id="crossglen_hall" x-posx="170" x-posy="358" x-width="20" x-height="15" x-outside="0">crossglen_hall</div>
<div id="lodar12cave1" x-posx="386" x-posy="278" x-width="20" x-height="25" x-outside="0">lodar12cave1</div>
<div id="vilegard_ogam" x-posx="356" x-posy="500" x-width="8" x-height="7" x-outside="0">vilegard_ogam</div>
<div id="minerhouse9" x-posx="449" x-posy="338" x-width="12" x-height="8" x-outside="0">minerhouse9</div>
<div id="fallhaven_church" x-posx="243" x-posy="377" x-width="20" x-height="15" x-outside="0">fallhaven_church</div>
<div id="vilegard_chapel" x-posx="371" x-posy="481" x-width="18" x-height="14" x-outside="0">vilegard_chapel</div>
<div id="remgard_clothes" x-posx="653" x-posy="91" x-width="18" x-height="8" x-outside="0">remgard_clothes</div>
<div id="foaming_flask" x-posx="374" x-posy="437" x-width="20" x-height="13" x-outside="0">foaming_flask</div>
<div id="remgard_tavern1" x-posx="643" x-posy="91" x-width="25" x-height="20" x-outside="0">remgard_tavern1</div>
<div id="roadcave0" x-posx="232" x-posy="325" x-width="20" x-height="20" x-outside="0">roadcave0</div>
<div id="roadcave1" x-posx="246" x-posy="330" x-width="25" x-height="25" x-outside="0">roadcave1</div>
<div id="vilegard_sw" x-posx="357" x-posy="503" x-width="10" x-height="10" x-outside="1">vilegard_sw</div>
<div id="lostmine3" x-posx="457" x-posy="286" x-width="19" x-height="30" x-outside="0">lostmine3</div>
<div id="lostmine4" x-posx="460" x-posy="297" x-width="15" x-height="17" x-outside="0">lostmine4</div>
<div id="lostmine5" x-posx="460" x-posy="305" x-width="12" x-height="29" x-outside="0">lostmine5</div>
<div id="lostmine6" x-posx="462" x-posy="335" x-width="12" x-height="19" x-outside="0">lostmine6</div>
<div id="gapfiller1" x-posx="267" x-posy="432" x-width="12" x-height="12" x-outside="1">gapfiller1</div>
<div id="gapfiller3" x-posx="187" x-posy="373" x-width="11" x-height="10" x-outside="1">gapfiller3</div>
<div id="lostmine0" x-posx="434" x-posy="359" x-width="20" x-height="20" x-outside="1">lostmine0</div>
<div id="lostmine1" x-posx="421" x-posy="337" x-width="29" x-height="30" x-outside="0">lostmine1</div>
<div id="gapfiller4" x-posx="202" x-posy="380" x-width="15" x-height="15" x-outside="1">gapfiller4</div>
<div id="lostmine2" x-posx="444" x-posy="317" x-width="30" x-height="30" x-outside="0">lostmine2</div>
<div id="waytolake0" x-posx="628" x-posy="266" x-width="20" x-height="30" x-outside="1">waytolake0</div>
<div id="lostmine9" x-posx="448" x-posy="349" x-width="28" x-height="28" x-outside="0">lostmine9</div>
<div id="fallhaven_farmer" x-posx="264" x-posy="409" x-width="12" x-height="8" x-outside="0">fallhaven_farmer</div>
<div id="vilegard_n" x-posx="368" x-posy="469" x-width="20" x-height="20" x-outside="1">vilegard_n</div>
<div id="lostmine8" x-posx="470" x-posy="359" x-width="13" x-height="19" x-outside="0">lostmine8</div>
<div id="lostmine7" x-posx="461" x-posy="349" x-width="29" x-height="30" x-outside="0">lostmine7</div>
<div id="waytolostmine0" x-posx="403" x-posy="345" x-width="30" x-height="30" x-outside="1">waytolostmine0</div>
<div id="waytolake5" x-posx="666" x-posy="179" x-width="23" x-height="18" x-outside="0">waytolake5</div>
<div id="waytolake3" x-posx="651" x-posy="208" x-width="20" x-height="20" x-outside="1">waytolake3</div>
<div id="waytolake4" x-posx="650" x-posy="190" x-width="20" x-height="25" x-outside="0">waytolake4</div>
<div id="vilegard_s" x-posx="368" x-posy="490" x-width="20" x-height="20" x-outside="1">vilegard_s</div>
<div id="waytolake1" x-posx="649" x-posy="255" x-width="20" x-height="20" x-outside="1">waytolake1</div>
<div id="waytolake2" x-posx="649" x-posy="229" x-width="20" x-height="25" x-outside="1">waytolake2</div>
<div id="road5_house" x-posx="469" x-posy="457" x-width="11" x-height="8" x-outside="0">road5_house</div>
<div id="waytolostmine2" x-posx="434" x-posy="299" x-width="29" x-height="28" x-outside="1">waytolostmine2</div>
<div id="waytolostmine1" x-posx="403" x-posy="317" x-width="30" x-height="27" x-outside="1">waytolostmine1</div>
<div id="waytolostmine3" x-posx="434" x-posy="328" x-width="29" x-height="30" x-outside="1">waytolostmine3</div>
<div id="waytobrimhavencave1a" x-posx="358" x-posy="289" x-width="30" x-height="15" x-outside="0">waytobrimhavencave1a</div>
<div id="lostmine10" x-posx="468" x-posy="332" x-width="14" x-height="20" x-outside="0">lostmine10</div>
<div id="lostmine11" x-posx="471" x-posy="311" x-width="17" x-height="20" x-outside="0">lostmine11</div>
<div id="fallhaven_potions" x-posx="263" x-posy="391" x-width="10" x-height="8" x-outside="0">fallhaven_potions</div>
<div id="remgard_armour" x-posx="622" x-posy="81" x-width="15" x-height="10" x-outside="0">remgard_armour</div>
<div id="mountainlake13" x-posx="619" x-posy="20" x-width="30" x-height="29" x-outside="1">mountainlake13</div>
<div id="mountainlake12" x-posx="650" x-posy="8" x-width="29" x-height="19" x-outside="1">mountainlake12</div>
<div id="mountainlake11" x-posx="680" x-posy="4" x-width="30" x-height="25" x-outside="1">mountainlake11</div>
<div id="loneford4" x-posx="260" x-posy="246" x-width="13" x-height="10" x-outside="0">loneford4</div>
<div id="mountainlake10" x-posx="711" x-posy="0" x-width="30" x-height="30" x-outside="1">mountainlake10</div>
<div id="loneford3" x-posx="250" x-posy="245" x-width="21" x-height="11" x-outside="0">loneford3</div>
<div id="loneford2" x-posx="246" x-posy="249" x-width="30" x-height="26" x-outside="1">loneford2</div>
<div id="loneford1" x-posx="218" x-posy="276" x-width="30" x-height="30" x-outside="1">loneford1</div>
<div id="mountaincave3" x-posx="608" x-posy="235" x-width="20" x-height="20" x-outside="0">mountaincave3</div>
<div id="mountaincave2" x-posx="611" x-posy="256" x-width="25" x-height="30" x-outside="0">mountaincave2</div>
<div id="crossglen_farmhouse_basement" x-posx="161" x-posy="364" x-width="10" x-height="8" x-outside="0">crossglen_farmhouse_basement</div>
<div id="mountaincave1" x-posx="623" x-posy="287" x-width="20" x-height="20" x-outside="0">mountaincave1</div>
<div id="mountaincave0" x-posx="644" x-posy="287" x-width="20" x-height="20" x-outside="0">mountaincave0</div>
<div id="crossglen" x-posx="156" x-posy="353" x-width="30" x-height="30" x-outside="1">crossglen</div>
<div id="fallhaven_clothes" x-posx="265" x-posy="392" x-width="20" x-height="12" x-outside="0">fallhaven_clothes</div>
<div id="loneford5" x-posx="249" x-posy="254" x-width="9" x-height="8" x-outside="0">loneford5</div>
<div id="hauntedhouse2" x-posx="212" x-posy="349" x-width="15" x-height="10" x-outside="0">hauntedhouse2</div>
<div id="loneford6" x-posx="256" x-posy="251" x-width="13" x-height="10" x-outside="0">loneford6</div>
<div id="hauntedhouse1" x-posx="218" x-posy="349" x-width="10" x-height="8" x-outside="0">hauntedhouse1</div>
<div id="loneford7" x-posx="264" x-posy="257" x-width="9" x-height="8" x-outside="0">loneford7</div>
<div id="loneford8" x-posx="246" x-posy="263" x-width="12" x-height="8" x-outside="0">loneford8</div>
<div id="loneford9" x-posx="254" x-posy="261" x-width="20" x-height="9" x-outside="0">loneford9</div>
<div id="fallhaven_tavern" x-posx="221" x-posy="383" x-width="20" x-height="19" x-outside="0">fallhaven_tavern</div>
<div id="hauntedhouse4" x-posx="234" x-posy="350" x-width="10" x-height="8" x-outside="0">hauntedhouse4</div>
<div id="hauntedhouse3" x-posx="214" x-posy="353" x-width="25" x-height="20" x-outside="0">hauntedhouse3</div>
<div id="road1" x-posx="364" x-posy="443" x-width="25" x-height="25" x-outside="1">road1</div>
<div id="road3" x-posx="411" x-posy="457" x-width="25" x-height="15" x-outside="1">road3</div>
<div id="road2" x-posx="390" x-posy="453" x-width="20" x-height="19" x-outside="1">road2</div>
<div id="road5" x-posx="463" x-posy="460" x-width="20" x-height="15" x-outside="1">road5</div>
<div id="road4" x-posx="437" x-posy="452" x-width="25" x-height="20" x-outside="1">road4</div>
<div id="jan_pitcave1" x-posx="185" x-posy="399" x-width="10" x-height="10" x-outside="0">jan_pitcave1</div>
<div id="lodar5cave1" x-posx="313" x-posy="342" x-width="20" x-height="30" x-outside="0">lodar5cave1</div>
<div id="lodar5cave0" x-posx="305" x-posy="312" x-width="30" x-height="29" x-outside="0">lodar5cave0</div>
<div id="lodar21" x-posx="382" x-posy="363" x-width="20" x-height="20" x-outside="1">lodar21</div>
<div id="jan_pitcave3" x-posx="189" x-posy="428" x-width="10" x-height="10" x-outside="0">jan_pitcave3</div>
<div id="lodar5cave2" x-posx="298" x-posy="366" x-width="20" x-height="20" x-outside="0">lodar5cave2</div>
<div id="jan_pitcave2" x-posx="166" x-posy="404" x-width="30" x-height="30" x-outside="0">jan_pitcave2</div>
<div id="fallhaven_gravedigger" x-posx="269" x-posy="376" x-width="10" x-height="8" x-outside="0">fallhaven_gravedigger</div>
<div id="lodar20" x-posx="382" x-posy="332" x-width="20" x-height="30" x-outside="1">lodar20</div>
<div id="waterwayhouse" x-posx="352" x-posy="160" x-width="19" x-height="15" x-outside="0">waterwayhouse</div>
<div id="fallhaven_rigmor" x-posx="227" x-posy="376" x-width="15" x-height="10" x-outside="0">fallhaven_rigmor</div>
<div id="waytominingtown1a" x-posx="383" x-posy="405" x-width="19" x-height="12" x-outside="1">waytominingtown1a</div>
<div id="lostmine2a" x-posx="475" x-posy="329" x-width="19" x-height="21" x-outside="0">lostmine2a</div>
<div id="wild6_house" x-posx="179" x-posy="441" x-width="9" x-height="7" x-outside="0">wild6_house</div>
<div id="lodar8" x-posx="320" x-posy="320" x-width="30" x-height="30" x-outside="1">lodar8</div>
<div id="lodar9" x-posx="351" x-posy="275" x-width="30" x-height="25" x-outside="1">lodar9</div>
<div id="lodar6" x-posx="270" x-posy="320" x-width="18" x-height="30" x-outside="1">lodar6</div>
<div id="lodar7" x-posx="289" x-posy="320" x-width="30" x-height="30" x-outside="1">lodar7</div>
<div id="lodar4" x-posx="320" x-posy="294" x-width="30" x-height="25" x-outside="1">lodar4</div>
<div id="lodar5" x-posx="289" x-posy="304" x-width="30" x-height="15" x-outside="1">lodar5</div>
<div id="lodar2" x-posx="289" x-posy="273" x-width="30" x-height="30" x-outside="1">lodar2</div>
<div id="lodar3" x-posx="320" x-posy="273" x-width="30" x-height="20" x-outside="1">lodar3</div>
<div id="lodar10" x-posx="382" x-posy="275" x-width="20" x-height="25" x-outside="1">lodar10</div>
<div id="lodar12" x-posx="382" x-posy="301" x-width="20" x-height="30" x-outside="1">lodar12</div>
<div id="lodar11" x-posx="351" x-posy="301" x-width="30" x-height="30" x-outside="1">lodar11</div>
<div id="lodar14" x-posx="301" x-posy="351" x-width="19" x-height="30" x-outside="1">lodar14</div>
<div id="lodar13" x-posx="270" x-posy="351" x-width="30" x-height="12" x-outside="1">lodar13</div>
<div id="lodar16" x-posx="321" x-posy="351" x-width="29" x-height="30" x-outside="1">lodar16</div>
<div id="lodar15" x-posx="301" x-posy="382" x-width="19" x-height="19" x-outside="1">lodar15</div>
<div id="lodar18" x-posx="351" x-posy="332" x-width="30" x-height="30" x-outside="1">lodar18</div>
<div id="woodcave1" x-posx="198" x-posy="335" x-width="10" x-height="10" x-outside="0">woodcave1</div>
<div id="lodar17" x-posx="321" x-posy="382" x-width="29" x-height="19" x-outside="1">lodar17</div>
<div id="woodcave0" x-posx="202" x-posy="332" x-width="15" x-height="10" x-outside="0">woodcave0</div>
<div id="lostmine1a" x-posx="397" x-posy="332" x-width="23" x-height="17" x-outside="0">lostmine1a</div>
<div id="lodar19" x-posx="351" x-posy="363" x-width="30" x-height="20" x-outside="1">lodar19</div>
<div id="fallhaven_nw" x-posx="218" x-posy="380" x-width="30" x-height="30" x-outside="1">fallhaven_nw</div>
<div id="waterway12" x-posx="466" x-posy="218" x-width="30" x-height="30" x-outside="1">waterway12</div>
<div id="waterway11" x-posx="590" x-posy="218" x-width="30" x-height="30" x-outside="1">waterway11</div>
<div id="waterway14" x-posx="412" x-posy="156" x-width="30" x-height="30" x-outside="1">waterway14</div>
<div id="waterway13" x-posx="497" x-posy="218" x-width="30" x-height="30" x-outside="1">waterway13</div>
<div id="waterway15" x-posx="420" x-posy="187" x-width="22" x-height="30" x-outside="1">waterway15</div>
<div id="fallhaven_derelict" x-posx="215" x-posy="399" x-width="12" x-height="8" x-outside="0">fallhaven_derelict</div>
<div id="vilegard_armorer" x-posx="382" x-posy="494" x-width="12" x-height="8" x-outside="0">vilegard_armorer</div>
<div id="remgard_school" x-posx="647" x-posy="114" x-width="16" x-height="8" x-outside="0">remgard_school</div>
<div id="remgard_farmer2" x-posx="668" x-posy="98" x-width="11" x-height="8" x-outside="0">remgard_farmer2</div>
<div id="remgard_farmer3" x-posx="603" x-posy="118" x-width="12" x-height="8" x-outside="0">remgard_farmer3</div>
<div id="waterway11_east" x-posx="621" x-posy="219" x-width="30" x-height="25" x-outside="1">waterway11_east</div>
<div id="fallhaven_ne" x-posx="249" x-posy="380" x-width="30" x-height="30" x-outside="1">fallhaven_ne</div>
<div id="remgard_farmer1" x-posx="640" x-posy="82" x-width="10" x-height="8" x-outside="0">remgard_farmer1</div>
<div id="waterway10" x-posx="559" x-posy="249" x-width="30" x-height="18" x-outside="1">waterway10</div>
<div id="oldcave0" x-posx="366" x-posy="420" x-width="20" x-height="20" x-outside="0">oldcave0</div>
<div id="oldcave1" x-posx="380" x-posy="431" x-width="20" x-height="25" x-outside="0">oldcave1</div>
<div id="home" x-posx="158" x-posy="349" x-width="10" x-height="10" x-outside="0">home</div>
<div id="roadbeforecrossroads" x-posx="218" x-posy="316" x-width="21" x-height="20" x-outside="1">roadbeforecrossroads</div>
<div id="roadbeforecrossroads8" x-posx="343" x-posy="418" x-width="20" x-height="27" x-outside="1">roadbeforecrossroads8</div>
<div id="roadbeforecrossroads9" x-posx="364" x-posy="418" x-width="25" x-height="24" x-outside="1">roadbeforecrossroads9</div>
<div id="roadbeforecrossroads6" x-posx="301" x-posy="403" x-width="20" x-height="30" x-outside="1">roadbeforecrossroads6</div>
<div id="roadbeforecrossroads7" x-posx="322" x-posy="418" x-width="20" x-height="20" x-outside="1">roadbeforecrossroads7</div>
<div id="roadbeforecrossroads4" x-posx="280" x-posy="380" x-width="20" x-height="20" x-outside="1">roadbeforecrossroads4</div>
<div id="roadbeforecrossroads5" x-posx="280" x-posy="401" x-width="20" x-height="22" x-outside="1">roadbeforecrossroads5</div>
<div id="roadbeforecrossroads2" x-posx="240" x-posy="346" x-width="29" x-height="30" x-outside="1">roadbeforecrossroads2</div>
<div id="roadbeforecrossroads3" x-posx="270" x-posy="364" x-width="30" x-height="15" x-outside="1">roadbeforecrossroads3</div>
<div id="lodar1cave0" x-posx="238" x-posy="311" x-width="20" x-height="19" x-outside="0">lodar1cave0</div>
<div id="fallhaven_alaun" x-posx="236" x-posy="409" x-width="10" x-height="8" x-outside="0">fallhaven_alaun</div>
<div id="remgard_barn" x-posx="629" x-posy="114" x-width="12" x-height="8" x-outside="0">remgard_barn</div>
<div id="lodar1" x-posx="240" x-posy="308" x-width="17" x-height="11" x-outside="1">lodar1</div>
<div id="lodar0" x-posx="258" x-posy="289" x-width="30" x-height="30" x-outside="1">lodar0</div>
<div id="remgard_tavern0" x-posx="643" x-posy="91" x-width="25" x-height="20" x-outside="0">remgard_tavern0</div>
<div id="vilegard_wrye" x-posx="371" x-posy="476" x-width="13" x-height="8" x-outside="0">vilegard_wrye</div>
<div id="waytomountaincave1" x-posx="630" x-posy="275" x-width="15" x-height="19" x-outside="1">waytomountaincave1</div>
<div id="waytomountaincave0" x-posx="636" x-posy="245" x-width="15" x-height="29" x-outside="1">waytomountaincave0</div>
<div id="waytomountaincave2" x-posx="631" x-posy="295" x-width="30" x-height="20" x-outside="1">waytomountaincave2</div>
<div id="remgard_church" x-posx="633" x-posy="90" x-width="20" x-height="12" x-outside="0">remgard_church</div>
<div id="houseatcrossroads2" x-posx="199" x-posy="310" x-width="6" x-height="6" x-outside="0">houseatcrossroads2</div>
<div id="blackwater_mountain39" x-posx="101" x-posy="239" x-width="20" x-height="20" x-outside="0">blackwater_mountain39</div>
<div id="houseatcrossroads3" x-posx="199" x-posy="309" x-width="6" x-height="6" x-outside="0">houseatcrossroads3</div>
<div id="wild11_clearing" x-posx="249" x-posy="453" x-width="15" x-height="15" x-outside="1">wild11_clearing</div>
<div id="fallhaven_sw" x-posx="218" x-posy="411" x-width="30" x-height="20" x-outside="1">fallhaven_sw</div>
<div id="blackwater_mountain37" x-posx="119" x-posy="216" x-width="15" x-height="15" x-outside="0">blackwater_mountain37</div>
<div id="houseatcrossroads4" x-posx="199" x-posy="308" x-width="6" x-height="6" x-outside="0">houseatcrossroads4</div>
<div id="waytobrimhavencave0" x-posx="358" x-posy="260" x-width="30" x-height="24" x-outside="0">waytobrimhavencave0</div>
<div id="houseatcrossroads5" x-posx="202" x-posy="291" x-width="11" x-height="9" x-outside="0">houseatcrossroads5</div>
<div id="waterwayextention" x-posx="351" x-posy="179" x-width="14" x-height="14" x-outside="1">waterwayextention</div>
<div id="blackwater_mountain38" x-posx="92" x-posy="222" x-width="30" x-height="18" x-outside="0">blackwater_mountain38</div>
<div id="waytominingtown0" x-posx="322" x-posy="402" x-width="29" x-height="15" x-outside="1">waytominingtown0</div>
<div id="mountainlake3" x-posx="735" x-posy="128" x-width="25" x-height="28" x-outside="1">mountainlake3</div>
<div id="waytobrimhavencave1" x-posx="389" x-posy="268" x-width="30" x-height="30" x-outside="0">waytobrimhavencave1</div>
<div id="mountainlake2" x-posx="714" x-posy="141" x-width="20" x-height="17" x-outside="1">mountainlake2</div>
<div id="waytominingtown1" x-posx="352" x-posy="387" x-width="30" x-height="30" x-outside="1">waytominingtown1</div>
<div id="waytobrimhavencave2" x-posx="420" x-posy="268" x-width="30" x-height="30" x-outside="0">waytobrimhavencave2</div>
<div id="mountainlake1" x-posx="683" x-posy="128" x-width="30" x-height="30" x-outside="1">mountainlake1</div>
<div id="houseatcrossroads0" x-posx="197" x-posy="297" x-width="16" x-height="12" x-outside="0">houseatcrossroads0</div>
<div id="waytobrimhavencave3" x-posx="451" x-posy="268" x-width="30" x-height="30" x-outside="0">waytobrimhavencave3</div>
<div id="waytominingtown2" x-posx="383" x-posy="384" x-width="19" x-height="20" x-outside="1">waytominingtown2</div>
<div id="mountainlake0" x-posx="681" x-posy="159" x-width="20" x-height="30" x-outside="1">mountainlake0</div>
<div id="houseatcrossroads1" x-posx="197" x-posy="297" x-width="16" x-height="12" x-outside="0">houseatcrossroads1</div>
<div id="waytominingtown3" x-posx="403" x-posy="376" x-width="30" x-height="30" x-outside="1">waytominingtown3</div>
<div id="waytobrimhavencave4" x-posx="327" x-posy="268" x-width="30" x-height="30" x-outside="0">waytobrimhavencave4</div>
<div id="blackwater_mountain31" x-posx="119" x-posy="251" x-width="11" x-height="8" x-outside="0">blackwater_mountain31</div>
<div id="mountainlake7" x-posx="779" x-posy="53" x-width="16" x-height="20" x-outside="1">mountainlake7</div>
<div id="blackwater_mountain51" x-posx="121" x-posy="249" x-width="10" x-height="10" x-outside="0">blackwater_mountain51</div>
<div id="blackwater_mountain32" x-posx="111" x-posy="220" x-width="30" x-height="30" x-outside="1">blackwater_mountain32</div>
<div id="blackwater_mountain52" x-posx="121" x-posy="218" x-width="9" x-height="30" x-outside="0">blackwater_mountain52</div>
<div id="mountainlake6" x-posx="774" x-posy="74" x-width="19" x-height="29" x-outside="1">mountainlake6</div>
<div id="mountainlake5" x-posx="766" x-posy="104" x-width="29" x-height="20" x-outside="1">mountainlake5</div>
<div id="mountainlake4" x-posx="740" x-posy="111" x-width="25" x-height="16" x-outside="1">mountainlake4</div>
<div id="blackwater_mountain30" x-posx="113" x-posy="251" x-width="30" x-height="20" x-outside="1">blackwater_mountain30</div>
<div id="fallhaven_lumberjack" x-posx="224" x-posy="410" x-width="12" x-height="8" x-outside="0">fallhaven_lumberjack</div>
<div id="blackwater_mountain35" x-posx="8" x-posy="379" x-width="10" x-height="10" x-outside="0">blackwater_mountain35</div>
<div id="blackwater_mountain36" x-posx="117" x-posy="214" x-width="11" x-height="10" x-outside="0">blackwater_mountain36</div>
<div id="mountainlake9" x-posx="742" x-posy="0" x-width="30" x-height="30" x-outside="1">mountainlake9</div>
<div id="blackwater_mountain33" x-posx="20" x-posy="343" x-width="20" x-height="20" x-outside="0">blackwater_mountain33</div>
<div id="blackwater_mountain34" x-posx="14" x-posy="356" x-width="15" x-height="30" x-outside="0">blackwater_mountain34</div>
<div id="mountainlake8" x-posx="758" x-posy="31" x-width="20" x-height="30" x-outside="1">mountainlake8</div>
<div id="blackwater_mountain50" x-posx="102" x-posy="182" x-width="15" x-height="20" x-outside="0">blackwater_mountain50</div>
<div id="woodhouse0" x-posx="215" x-posy="366" x-width="12" x-height="8" x-outside="0">woodhouse0</div>
<div id="woodhouse2" x-posx="221" x-posy="362" x-width="16" x-height="8" x-outside="0">woodhouse2</div>
<div id="woodhouse1" x-posx="220" x-posy="367" x-width="12" x-height="8" x-outside="0">woodhouse1</div>
<div id="fallhaven_se" x-posx="249" x-posy="411" x-width="30" x-height="20" x-outside="1">fallhaven_se</div>
<div id="fields10" x-posx="104" x-posy="282" x-width="20" x-height="15" x-outside="1">fields10</div>
<div id="blackwater_mountain48" x-posx="103" x-posy="199" x-width="9" x-height="7" x-outside="0">blackwater_mountain48</div>
<div id="blackwater_mountain49" x-posx="103" x-posy="197" x-width="9" x-height="7" x-outside="0">blackwater_mountain49</div>
<div id="fields11" x-posx="246" x-posy="216" x-width="20" x-height="20" x-outside="1">fields11</div>
<div id="fallhaven_barn" x-posx="244" x-posy="392" x-width="17" x-height="10" x-outside="0">fallhaven_barn</div>
<div id="fields12" x-posx="267" x-posy="212" x-width="20" x-height="20" x-outside="1">fields12</div>
<div id="vilegard_tavern" x-posx="370" x-posy="493" x-width="17" x-height="10" x-outside="0">vilegard_tavern</div>
<div id="roadbeforecrossroads1" x-posx="240" x-posy="320" x-width="29" x-height="25" x-outside="1">roadbeforecrossroads1</div>
<div id="fallhaven_athamyr" x-posx="237" x-posy="390" x-width="10" x-height="8" x-outside="0">fallhaven_athamyr</div>
<div id="blackwater_mountain40" x-posx="77" x-posy="354" x-width="11" x-height="11" x-outside="1">blackwater_mountain40</div>
<div id="blackwater_mountain41" x-posx="59" x-posy="360" x-width="30" x-height="30" x-outside="0">blackwater_mountain41</div>
<div id="blackwater_mountain42" x-posx="34" x-posy="372" x-width="30" x-height="30" x-outside="0">blackwater_mountain42</div>
<div id="blackwater_mountain43" x-posx="129" x-posy="172" x-width="30" x-height="30" x-outside="0">blackwater_mountain43</div>
<div id="blackwater_mountain44" x-posx="112" x-posy="197" x-width="20" x-height="20" x-outside="0">blackwater_mountain44</div>
<div id="blackwater_mountain45" x-posx="100" x-posy="211" x-width="15" x-height="15" x-outside="0">blackwater_mountain45</div>
<div id="blackwater_mountain46" x-posx="103" x-posy="203" x-width="9" x-height="7" x-outside="0">blackwater_mountain46</div>
<div id="blackwater_mountain47" x-posx="101" x-posy="201" x-width="9" x-height="7" x-outside="0">blackwater_mountain47</div>
<div id="crossglen_smith" x-posx="154" x-posy="372" x-width="10" x-height="8" x-outside="0">crossglen_smith</div>
<div id="pwcave2a" x-posx="300" x-posy="36" x-width="20" x-height="25" x-outside="0">pwcave2a</div>
<div id="blackwater_mountain19" x-posx="81" x-posy="246" x-width="10" x-height="10" x-outside="0">blackwater_mountain19</div>
<div id="blackwater_mountain17" x-posx="69" x-posy="264" x-width="20" x-height="10" x-outside="0">blackwater_mountain17</div>
<div id="snakecave2" x-posx="131" x-posy="374" x-width="20" x-height="20" x-outside="0">snakecave2</div>
<div id="snakecave1" x-posx="152" x-posy="374" x-width="20" x-height="20" x-outside="0">snakecave1</div>
<div id="blackwater_mountain18" x-posx="70" x-posy="247" x-width="15" x-height="22" x-outside="0">blackwater_mountain18</div>
<div id="blackwater_mountain15" x-posx="81" x-posy="302" x-width="15" x-height="30" x-outside="1">blackwater_mountain15</div>
<div id="snakecave3" x-posx="123" x-posy="343" x-width="15" x-height="30" x-outside="0">snakecave3</div>
<div id="blackwater_mountain16" x-posx="83" x-posy="271" x-width="15" x-height="30" x-outside="1">blackwater_mountain16</div>
<div id="blackwater_mountain13" x-posx="0" x-posy="311" x-width="20" x-height="20" x-outside="0">blackwater_mountain13</div>
<div id="blackwater_mountain14" x-posx="60" x-posy="333" x-width="30" x-height="20" x-outside="1">blackwater_mountain14</div>
<div id="blackwater_mountain11" x-posx="39" x-posy="302" x-width="30" x-height="30" x-outside="1">blackwater_mountain11</div>
<div id="blackwater_mountain12" x-posx="10" x-posy="323" x-width="28" x-height="27" x-outside="1">blackwater_mountain12</div>
<div id="blackwater_mountain10" x-posx="39" x-posy="333" x-width="20" x-height="20" x-outside="1">blackwater_mountain10</div>
<div id="flagstone_inner" x-posx="111" x-posy="480" x-width="20" x-height="17" x-outside="0">flagstone_inner</div>
<div id="fallhaven_derelict2" x-posx="214" x-posy="402" x-width="25" x-height="19" x-outside="0">fallhaven_derelict2</div>
<div id="vilegard_kaori" x-posx="378" x-posy="471" x-width="10" x-height="8" x-outside="0">vilegard_kaori</div>
<div id="fallhaven_arcir" x-posx="232" x-posy="396" x-width="15" x-height="10" x-outside="0">fallhaven_arcir</div>
<div id="remgard_prison" x-posx="601" x-posy="109" x-width="19" x-height="10" x-outside="0">remgard_prison</div>
<div id="catacombs1" x-posx="243" x-posy="375" x-width="19" x-height="10" x-outside="0">catacombs1</div>
<div id="catacombs2" x-posx="244" x-posy="365" x-width="20" x-height="20" x-outside="0">catacombs2</div>
<div id="vilegard_smith" x-posx="380" x-posy="500" x-width="10" x-height="8" x-outside="0">vilegard_smith</div>
<div id="waterwaycave" x-posx="435" x-posy="209" x-width="15" x-height="15" x-outside="0">waterwaycave</div>
<div id="blackwater_mountain26" x-posx="46" x-posy="302" x-width="9" x-height="8" x-outside="0">blackwater_mountain26</div>
<div id="blackwater_mountain27" x-posx="50" x-posy="301" x-width="9" x-height="8" x-outside="0">blackwater_mountain27</div>
<div id="blackwater_mountain28" x-posx="58" x-posy="302" x-width="10" x-height="8" x-outside="0">blackwater_mountain28</div>
<div id="wild15_house" x-posx="349" x-posy="451" x-width="9" x-height="7" x-outside="0">wild15_house</div>
<div id="catacombs3" x-posx="259" x-posy="379" x-width="20" x-height="20" x-outside="0">catacombs3</div>
<div id="catacombs4" x-posx="267" x-posy="367" x-width="20" x-height="15" x-outside="0">catacombs4</div>
<div id="blackwater_mountain29" x-posx="50" x-posy="306" x-width="22" x-height="16" x-outside="0">blackwater_mountain29</div>
<div id="blackwater_mountain22" x-posx="44" x-posy="315" x-width="13" x-height="11" x-outside="0">blackwater_mountain22</div>
<div id="blackwater_mountain23" x-posx="40" x-posy="317" x-width="7" x-height="8" x-outside="0">blackwater_mountain23</div>
<div id="gargoylecave3" x-posx="403" x-posy="401" x-width="11" x-height="20" x-outside="0">gargoylecave3</div>
<div id="remgard1" x-posx="652" x-posy="83" x-width="30" x-height="30" x-outside="1">remgard1</div>
<div id="blackwater_mountain24" x-posx="40" x-posy="311" x-width="7" x-height="8" x-outside="0">blackwater_mountain24</div>
<div id="remgard0" x-posx="621" x-posy="76" x-width="30" x-height="30" x-outside="1">remgard0</div>
<div id="gargoylecave4" x-posx="419" x-posy="413" x-width="12" x-height="8" x-outside="0">gargoylecave4</div>
<div id="blackwater_mountain25" x-posx="40" x-posy="289" x-width="11" x-height="24" x-outside="0">blackwater_mountain25</div>
<div id="remgard3" x-posx="631" x-posy="107" x-width="20" x-height="25" x-outside="1">remgard3</div>
<div id="gargoylecave1" x-posx="428" x-posy="422" x-width="20" x-height="20" x-outside="0">gargoylecave1</div>
<div id="remgard2" x-posx="652" x-posy="114" x-width="29" x-height="20" x-outside="1">remgard2</div>
<div id="gargoylecave2" x-posx="407" x-posy="422" x-width="20" x-height="20" x-outside="0">gargoylecave2</div>
<div id="blackwater_mountain20" x-posx="87" x-posy="245" x-width="20" x-height="10" x-outside="0">blackwater_mountain20</div>
<div id="remgard4" x-posx="600" x-posy="107" x-width="30" x-height="30" x-outside="1">remgard4</div>
<div id="blackwater_mountain21" x-posx="54" x-posy="315" x-width="20" x-height="12" x-outside="0">blackwater_mountain21</div>
<div id="wild14_cave" x-posx="335" x-posy="432" x-width="15" x-height="15" x-outside="0">wild14_cave</div>
<div id="tradehouse0" x-posx="384" x-posy="385" x-width="18" x-height="12" x-outside="0">tradehouse0</div>
<div id="tradehouse1" x-posx="348" x-posy="419" x-width="18" x-height="8" x-outside="0">tradehouse1</div>
<div id="crossroads" x-posx="187" x-posy="298" x-width="30" x-height="30" x-outside="1">crossroads</div>
</worldmap>
<segment id="waytobrimhavencave" x="319" y="270">
<map id="waytobrimhavencave0" x="350" y="270" />
<map id="waytobrimhavencave1" x="381" y="278" />
<map id="waytobrimhavencave2" x="412" y="278" />
<map id="waytobrimhavencave3" x="443" y="278" />
<map id="waytobrimhavencave4" x="319" y="278" />
<map id="waytobrimhavencave1a" x="350" y="299" />
</segment>
<segment id="bwcave1" x="69" y="233">
<map id="blackwater_mountain39" x="118" y="233" />
<map id="blackwater_mountain19" x="86" y="240" />
<map id="blackwater_mountain17" x="69" y="264" />
<map id="blackwater_mountain18" x="70" y="241" />
<map id="blackwater_mountain20" x="97" y="239" />
</segment>
<segment id="flagstone" x="124" y="491">
<map id="flagstone2" x="124" y="491" />
<map id="flagstone3" x="130" y="522" />
<map id="flagstone4" x="151" y="518" />
</segment>
<segment id="world1" x="11" y="0">
<map id="lodar21" x="374" y="373" />
<map id="lodar20" x="374" y="342" />
<map id="waytominingtown1a" x="375" y="415" />
<map id="waytobrimhaven2" x="334" y="245" />
<map id="waytobrimhaven3" x="365" y="247" />
<map id="waytobrimhaven0" x="269" y="259" />
<map id="waytobrimhaven1" x="303" y="255" />
<map id="roadtocarntower1" x="117" y="308" />
<map id="roadtocarntower0" x="148" y="308" />
<map id="woodsettlement0" x="202" y="375" />
<map id="roadtocarntower2" x="86" y="308" />
<map id="lodar8" x="312" y="330" />
<map id="lodar9" x="343" y="285" />
<map id="lodar6" x="262" y="330" />
<map id="lodar7" x="281" y="330" />
<map id="lodar4" x="312" y="304" />
<map id="lodar5" x="281" y="314" />
<map id="fields9" x="117" y="292" />
<map id="lodar2" x="281" y="283" />
<map id="lodar3" x="312" y="283" />
<map id="lodar10" x="374" y="285" />
<map id="waterway9" x="551" y="228" />
<map id="fields6" x="179" y="232" />
<map id="waterway8" x="520" y="228" />
<map id="fields5" x="148" y="230" />
<map id="lodar12" x="374" y="311" />
<map id="fields8" x="148" y="292" />
<map id="lodar11" x="343" y="311" />
<map id="fields7" x="210" y="236" />
<map id="lodar14" x="293" y="361" />
<map id="fields2" x="148" y="261" />
<map id="lodar13" x="262" y="361" />
<map id="fields1" x="179" y="261" />
<map id="lodar16" x="313" y="361" />
<map id="fields4" x="210" y="261" />
<map id="lodar15" x="293" y="392" />
<map id="fields3" x="127" y="271" />
<map id="lodar18" x="343" y="342" />
<map id="lodar17" x="313" y="392" />
<map id="fields0" x="179" y="292" />
<map id="lodar19" x="343" y="373" />
<map id="wild14_clearing" x="318" y="433" />
<map id="fallhaven_nw" x="210" y="390" />
<map id="waterway12" x="458" y="228" />
<map id="waterway11" x="582" y="228" />
<map id="mountainlake10a" x="725" y="31" />
<map id="waterway14" x="404" y="166" />
<map id="waterway13" x="489" y="228" />
<map id="blackwater_mountain4" x="14" y="411" />
<map id="waterway15" x="412" y="197" />
<map id="waterway11_east" x="613" y="229" />
<map id="fallhaven_ne" x="241" y="390" />
<map id="waterway10" x="551" y="259" />
<map id="wild3" x="173" y="394" />
<map id="wild2" x="152" y="394" />
<map id="wild5" x="159" y="415" />
<map id="wild4" x="201" y="359" />
<map id="wild7" x="147" y="467" />
<map id="wild6" x="155" y="436" />
<map id="wild9" x="186" y="450" />
<map id="wild8" x="126" y="476" />
<map id="blackwater_mountain0" x="53" y="477" />
<map id="blackwater_mountain1" x="11" y="449" />
<map id="roadbeforecrossroads" x="210" y="326" />
<map id="blackwater_mountain2" x="11" y="438" />
<map id="blackwater_mountain3" x="14" y="427" />
<map id="wild1" x="179" y="361" />
<map id="wild0" x="179" y="339" />
<map id="wild17" x="32" y="463" />
<map id="wild15" x="335" y="456" />
<map id="roadbeforecrossroads8" x="335" y="428" />
<map id="mountainlake13a" x="649" y="50" />
<map id="wild16" x="74" y="477" />
<map id="roadbeforecrossroads9" x="356" y="428" />
<map id="wild13" x="293" y="444" />
<map id="roadbeforecrossroads6" x="293" y="413" />
<map id="flagstone0" x="95" y="477" />
<map id="wild14" x="314" y="449" />
<map id="roadbeforecrossroads7" x="314" y="428" />
<map id="wild11" x="238" y="442" />
<map id="roadbeforecrossroads4" x="272" y="390" />
<map id="wild12" x="272" y="434" />
<map id="roadbeforecrossroads5" x="272" y="411" />
<map id="roadbeforecrossroads2" x="232" y="356" />
<map id="wild10" x="217" y="442" />
<map id="roadbeforecrossroads3" x="262" y="374" />
<map id="waterway6" x="396" y="228" />
<map id="waterway7" x="427" y="228" />
<map id="waterway4" x="373" y="166" />
<map id="waterway5" x="381" y="197" />
<map id="waterway2" x="342" y="158" />
<map id="waterway3" x="311" y="158" />
<map id="waterway0" x="280" y="200" />
<map id="waterway1" x="311" y="179" />
<map id="road4_gargoylecave" x="425" y="446" />
<map id="lodar1" x="232" y="318" />
<map id="lodar0" x="250" y="299" />
<map id="waytomountaincave1" x="622" y="285" />
<map id="waytomountaincave0" x="628" y="255" />
<map id="waytomountaincave2" x="623" y="305" />
<map id="wild11_clearing" x="241" y="463" />
<map id="fallhaven_sw" x="210" y="421" />
<map id="waterwayextention" x="343" y="189" />
<map id="mountainlake3" x="757" y="128" />
<map id="waytominingtown0" x="314" y="412" />
<map id="mountainlake2" x="736" y="141" />
<map id="waytominingtown1" x="344" y="397" />
<map id="mountainlake1" x="705" y="128" />
<map id="waytominingtown2" x="375" y="394" />
<map id="mountainlake0" x="703" y="159" />
<map id="waytominingtown3" x="395" y="386" />
<map id="mountainlake7" x="801" y="53" />
<map id="mountainlake6" x="796" y="74" />
<map id="mountainlake5" x="788" y="104" />
<map id="mountainlake4" x="762" y="111" />
<map id="mountainlake9" x="764" y="0" />
<map id="vilegard_sw" x="349" y="513" />
<map id="mountainlake8" x="780" y="31" />
<map id="gapfiller1" x="259" y="442" />
<map id="lostmine0" x="426" y="369" />
<map id="gapfiller3" x="179" y="383" />
<map id="fallhaven_se" x="241" y="421" />
<map id="gapfiller4" x="194" y="390" />
<map id="fields10" x="96" y="292" />
<map id="waytolake0" x="650" y="266" />
<map id="fields11" x="238" y="226" />
<map id="fields12" x="259" y="222" />
<map id="vilegard_n" x="360" y="479" />
<map id="waytolostmine0" x="395" y="355" />
<map id="roadbeforecrossroads1" x="232" y="330" />
<map id="waytolake3" x="673" y="208" />
<map id="vilegard_s" x="360" y="500" />
<map id="waytolake1" x="671" y="255" />
<map id="waytolake2" x="671" y="229" />
<map id="waytolostmine2" x="426" y="309" />
<map id="waytolostmine1" x="395" y="327" />
<map id="waytolostmine3" x="426" y="338" />
<map id="mountainlake13" x="641" y="20" />
<map id="mountainlake12" x="672" y="8" />
<map id="mountainlake11" x="702" y="4" />
<map id="mountainlake10" x="733" y="0" />
<map id="loneford2" x="238" y="259" />
<map id="loneford1" x="210" y="286" />
<map id="crossglen" x="148" y="363" />
<map id="remgard1" x="674" y="83" />
<map id="remgard0" x="643" y="76" />
<map id="remgard3" x="653" y="107" />
<map id="remgard2" x="674" y="114" />
<map id="remgard4" x="622" y="107" />
<map id="road1" x="356" y="453" />
<map id="crossroads" x="179" y="308" />
<map id="road3" x="403" y="467" />
<map id="road2" x="382" y="463" />
<map id="road5" x="455" y="470" />
<map id="road4" x="429" y="462" />
</segment>
<segment id="blackwater" x="10" y="214">
<map id="blackwater_mountain15" x="81" y="302" />
<map id="blackwater_mountain16" x="83" y="271" />
<map id="blackwater_mountain40" x="77" y="354" />
<map id="blackwater_mountain32" x="128" y="214" />
<map id="blackwater_mountain14" x="60" y="333" />
<map id="blackwater_mountain11" x="39" y="302" />
<map id="blackwater_mountain30" x="130" y="245" />
<map id="blackwater_mountain12" x="10" y="323" />
<map id="blackwater_mountain10" x="39" y="333" />
</segment>
<segment id="pwcave" x="288" y="42">
<map id="pwcave4" x="319" y="99" />
<map id="pwcave2a" x="292" y="42" />
<map id="pwcave2" x="288" y="68" />
<map id="pwcave3" x="319" y="68" />
<map id="pwcave0" x="308" y="130" />
<map id="pwcave1" x="288" y="99" />
</segment>
<segment id="snakecave" x="115" y="353">
<map id="snakecave2" x="123" y="384" />
<map id="snakecave1" x="144" y="384" />
<map id="snakecave3" x="115" y="353" />
</segment>
<segment id="bwentry" x="14" y="350">
<map id="blackwater_mountain7" x="34" y="374" />
<map id="blackwater_mountain6" x="23" y="388" />
<map id="blackwater_mountain5" x="14" y="399" />
<map id="blackwater_mountain9" x="42" y="350" />
</segment>
<segment id="gargoylecave" x="395" y="411">
<map id="gargoylecave3" x="395" y="411" />
<map id="gargoylecave4" x="411" y="423" />
<map id="gargoylecave1" x="420" y="432" />
<map id="gargoylecave2" x="399" y="432" />
</segment>
<segment id="lodarcave" x="309" y="283">
<map id="lodarcave4a" x="361" y="366" />
<map id="lodarcave7" x="373" y="420" />
<map id="lodarcave5" x="348" y="387" />
<map id="lodarcave6" x="352" y="408" />
<map id="lodarcave3" x="323" y="335" />
<map id="lodarcave4" x="335" y="366" />
<map id="lodarcave1" x="309" y="283" />
<map id="lodarcave2" x="319" y="314" />
</segment>
<segment id="mountaincave" x="600" y="245">
<map id="mountaincave3" x="600" y="245" />
<map id="mountaincave2" x="603" y="266" />
<map id="mountaincave1" x="615" y="297" />
<map id="mountaincave0" x="636" y="297" />
</segment>
<segment id="bwcave2" x="105" y="208">
<map id="blackwater_mountain37" x="136" y="219" />
<map id="blackwater_mountain38" x="105" y="225" />
<map id="blackwater_mountain36" x="134" y="208" />
</segment>
<segment id="lodar5cave" x="284" y="322">
<map id="lodar5cave1" x="305" y="352" />
<map id="lodar5cave0" x="297" y="322" />
<map id="lodar5cave2" x="284" y="376" />
</segment>
<segment id="bwsettlement" x="113" y="166">
<map id="blackwater_mountain51" x="138" y="243" />
<map id="blackwater_mountain52" x="138" y="212" />
<map id="blackwater_mountain43" x="150" y="166" />
<map id="blackwater_mountain44" x="129" y="191" />
<map id="blackwater_mountain45" x="113" y="205" />
<map id="blackwater_mountain46" x="116" y="197" />
</segment>
</worldmap>

View File

@@ -2,6 +2,7 @@ package com.gpl.rpg.AndorsTrail.activity;
import java.io.File;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
@@ -11,13 +12,15 @@ import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
import com.gpl.rpg.AndorsTrail.controller.WorldMapController;
import com.gpl.rpg.AndorsTrail.util.Coord;
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment;
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment.WorldMapSegmentMap;
import com.gpl.rpg.AndorsTrail.util.L;
public class DisplayWorldMapActivity extends Activity {
private WorldContext world;
private WebView displayworldmap_webview;
private String worldMapSegmentName;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -34,7 +37,14 @@ public class DisplayWorldMapActivity extends Activity {
displayworldmap_webview = (WebView) findViewById(R.id.displayworldmap_webview);
displayworldmap_webview.setBackgroundColor(getResources().getColor(android.R.color.black));
displayworldmap_webview.getSettings().setBuiltInZoomControls(true);
displayworldmap_webview.getSettings().setJavaScriptEnabled(true);
enableJavascript();
worldMapSegmentName = getIntent().getStringExtra("worldMapSegmentName");
}
@SuppressLint("SetJavaScriptEnabled")
public void enableJavascript() {
displayworldmap_webview.getSettings().setJavaScriptEnabled(true);
}
@Override
@@ -44,21 +54,21 @@ public class DisplayWorldMapActivity extends Activity {
}
private void update() {
File worldmap = WorldMapController.getCombinedWorldMapFile();
File worldmap = WorldMapController.getCombinedWorldMapFile(worldMapSegmentName);
if (!worldmap.exists()) {
Toast.makeText(this, getResources().getString(R.string.menu_button_worldmap_failed), Toast.LENGTH_LONG).show();
this.finish();
}
WorldMapSegment segment = world.maps.worldMapSegments.get(worldMapSegmentName);
WorldMapSegmentMap map = segment.maps.get(world.model.currentMap.name);
if (map == null) this.finish();
String url = "file://" + worldmap.getAbsolutePath();
Coord playerWorldPosition = WorldMapController.getPlayerWorldPosition(world);
if (playerWorldPosition != null) {
url += "?"
+ playerWorldPosition.x * WorldMapController.WORLDMAP_DISPLAY_TILESIZE
String url = "file://" + worldmap.getAbsolutePath() + "?"
+ (world.model.player.position.x + map.worldPosition.x) * WorldMapController.WORLDMAP_DISPLAY_TILESIZE
+ ","
+ (playerWorldPosition.y-1) * WorldMapController.WORLDMAP_DISPLAY_TILESIZE;
}
+ (world.model.player.position.y + map.worldPosition.y-1) * WorldMapController.WORLDMAP_DISPLAY_TILESIZE;
L.log("Showing " + url);
displayworldmap_webview.loadUrl(url);
}

View File

@@ -11,6 +11,7 @@ import com.gpl.rpg.AndorsTrail.context.ViewContext;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
import com.gpl.rpg.AndorsTrail.controller.CombatController;
import com.gpl.rpg.AndorsTrail.controller.MovementController;
import com.gpl.rpg.AndorsTrail.controller.WorldMapController;
import com.gpl.rpg.AndorsTrail.model.actor.Monster;
import com.gpl.rpg.AndorsTrail.model.actor.Player;
import com.gpl.rpg.AndorsTrail.model.item.ItemContainer.ItemEntry;
@@ -215,7 +216,7 @@ public final class MainActivity extends Activity {
.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem arg0) {
startActivity(new Intent(MainActivity.this, DisplayWorldMapActivity.class));
WorldMapController.displayWorldMap(MainActivity.this, world);
return true;
}
});

View File

@@ -36,7 +36,8 @@ public final class Constants {
public static final String FILENAME_SAVEGAME_QUICKSAVE = "savegame";
public static final String FILENAME_SAVEGAME_DIRECTORY = "andors-trail";
public static final String FILENAME_WORLDMAP_DIRECTORY = "worldmap";
public static final String FILENAME_WORLDMAP_HTMLFILE = "worldmap.html";
public static final String FILENAME_WORLDMAP_HTMLFILE_PREFIX = "worldmap_";
public static final String FILENAME_WORLDMAP_HTMLFILE_SUFFIX = ".html";
public static final String FILENAME_SAVEGAME_FILENAME_PREFIX = "savegame";

View File

@@ -5,6 +5,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
@@ -12,13 +13,18 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.AsyncTask;
import android.os.Environment;
import android.widget.Toast;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.activity.DisplayWorldMapActivity;
import com.gpl.rpg.AndorsTrail.activity.MainActivity;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
import com.gpl.rpg.AndorsTrail.model.map.LayeredTileMap;
import com.gpl.rpg.AndorsTrail.model.map.MapLayer;
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment;
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment.WorldMapSegmentMap;
import com.gpl.rpg.AndorsTrail.resource.tiles.TileCollection;
import com.gpl.rpg.AndorsTrail.util.Coord;
import com.gpl.rpg.AndorsTrail.util.L;
@@ -30,55 +36,53 @@ public final class WorldMapController {
public static void updateWorldMap(final WorldContext world, final PredefinedMap map, final LayeredTileMap mapTiles, final TileCollection cachedTiles, final Resources res) {
if (!shouldUpdateWorldMap(map)) return;
final String worldMapSegmentName = world.maps.getWorldMapSegmentNameForMap(map.name);
if (worldMapSegmentName == null) return;
if (!shouldUpdateWorldMap(map, worldMapSegmentName)) return;
(new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... arg0) {
final MapRenderer renderer = new MapRenderer(world, map, mapTiles, cachedTiles);
updateCachedBitmap(map, renderer);
try {
updateCombinedWorldMap(res, world);
} catch (IOException e) {}
updateCachedBitmap(map, renderer);
updateWorldMapSegment(res, world, worldMapSegmentName);
} catch (IOException e) {
L.log("Error creating worldmap file for map " + map.name + " : " + e.toString());
}
return null;
}
}).execute();
}
private static boolean isVisibleOnWorldMap(PredefinedMap map) {
return map.isOutdoors;
}
private static boolean shouldUpdateWorldMap(PredefinedMap map) {
if (!isVisibleOnWorldMap(map)) return false;
if (!map.visited) return true;
private static boolean shouldUpdateWorldMap(PredefinedMap map, String worldMapSegmentName) {
if (!map.visited) return true;
File file = getFileForMap(map);
if (!file.exists()) return true;
if (map.lastVisitVersion < AndorsTrailApplication.CURRENT_VERSION) return true;
file = getCombinedWorldMapFile();
file = getCombinedWorldMapFile(worldMapSegmentName);
if (!file.exists()) return true;
return false;
}
private static void updateCachedBitmap(PredefinedMap map, MapRenderer renderer) {
private static void updateCachedBitmap(PredefinedMap map, MapRenderer renderer) throws IOException {
File file = getFileForMap(map);
if (file.exists()) return;
try {
Bitmap image = renderer.drawMap();
ensureWorldmapDirectoryExists();
FileOutputStream fos = new FileOutputStream(file);
image.compress(Bitmap.CompressFormat.PNG, 70, fos);
fos.flush();
fos.close();
image.recycle();
} catch (IOException e) {
L.log("Error creating worldmap file for map " + map.name + " : " + e.toString());
if (file.exists()) {
if (map.lastVisitVersion == AndorsTrailApplication.CURRENT_VERSION) return;
}
Bitmap image = renderer.drawMap();
ensureWorldmapDirectoryExists();
FileOutputStream fos = new FileOutputStream(file);
image.compress(Bitmap.CompressFormat.PNG, 70, fos);
fos.flush();
fos.close();
image.recycle();
}
private static final class MapRenderer {
@@ -135,35 +139,39 @@ public final class WorldMapController {
dir = new File(dir, Constants.FILENAME_WORLDMAP_DIRECTORY);
if (!dir.exists()) dir.mkdir();
}
public static File getFileForMap(PredefinedMap map) {
File root = getWorldmapDirectory();
return new File(root, map.name + ".png");
public static File getFileForMap(PredefinedMap map) { return getFileForMap(map.name); }
public static File getFileForMap(String mapName) {
return new File(getWorldmapDirectory(), mapName + ".png");
}
public static File getWorldmapDirectory() {
File dir = Environment.getExternalStorageDirectory();
dir = new File(dir, Constants.FILENAME_SAVEGAME_DIRECTORY);
return new File(dir, Constants.FILENAME_WORLDMAP_DIRECTORY);
}
public static File getCombinedWorldMapFile() {
return new File(getWorldmapDirectory(), Constants.FILENAME_WORLDMAP_HTMLFILE);
public static File getCombinedWorldMapFile(String segmentName) {
return new File(getWorldmapDirectory(), Constants.FILENAME_WORLDMAP_HTMLFILE_PREFIX + segmentName + Constants.FILENAME_WORLDMAP_HTMLFILE_SUFFIX);
}
private static String getCombinedWorldMapAsHtml(Resources res, WorldContext world) throws IOException {
private static String getWorldMapSegmentAsHtml(Resources res, WorldContext world, String segmentName) throws IOException {
WorldMapSegment segment = world.maps.worldMapSegments.get(segmentName);
StringBuffer sb = new StringBuffer();
Coord offsetWorldmapTo = new Coord(999999, 999999);
for (PredefinedMap map : world.maps.predefinedMaps) {
File f = WorldMapController.getFileForMap(map);
for (WorldMapSegmentMap map : segment.maps.values()) {
File f = WorldMapController.getFileForMap(map.mapName);
if (!f.exists()) continue;
offsetWorldmapTo.x = Math.min(offsetWorldmapTo.x, map.worldMapPosition.x);
offsetWorldmapTo.y = Math.min(offsetWorldmapTo.y, map.worldMapPosition.y);
offsetWorldmapTo.x = Math.min(offsetWorldmapTo.x, map.worldPosition.x);
offsetWorldmapTo.y = Math.min(offsetWorldmapTo.y, map.worldPosition.y);
}
for (PredefinedMap map : world.maps.predefinedMaps) {
File f = WorldMapController.getFileForMap(map);
for (WorldMapSegmentMap segmentMap : segment.maps.values()) {
File f = WorldMapController.getFileForMap(segmentMap.mapName);
if (!f.exists()) continue;
PredefinedMap map = world.maps.findPredefinedMap(segmentMap.mapName);
sb
.append("<img src=\"")
.append(f.getName())
@@ -174,9 +182,9 @@ public final class WorldMapController {
.append("px; height: ")
.append(map.size.height * WorldMapController.WORLDMAP_DISPLAY_TILESIZE)
.append("px; position: absolute; left: ")
.append((map.worldMapPosition.x - offsetWorldmapTo.x) * WorldMapController.WORLDMAP_DISPLAY_TILESIZE)
.append((segmentMap.worldPosition.x - offsetWorldmapTo.x) * WorldMapController.WORLDMAP_DISPLAY_TILESIZE)
.append("px; top: ")
.append((map.worldMapPosition.y - offsetWorldmapTo.y) * WorldMapController.WORLDMAP_DISPLAY_TILESIZE)
.append((segmentMap.worldPosition.y - offsetWorldmapTo.y) * WorldMapController.WORLDMAP_DISPLAY_TILESIZE)
.append("px;\" />");
}
@@ -186,21 +194,23 @@ public final class WorldMapController {
.replace("{{offsety}}", Integer.toString(offsetWorldmapTo.y * WorldMapController.WORLDMAP_DISPLAY_TILESIZE));
}
private static void updateCombinedWorldMap(Resources res, WorldContext world) throws IOException {
String mapAsHtml = getCombinedWorldMapAsHtml(res, world);
File outputFile = new File(WorldMapController.getWorldmapDirectory(), Constants.FILENAME_WORLDMAP_HTMLFILE);
private static void updateWorldMapSegment(Resources res, WorldContext world, String segmentName) throws IOException {
String mapAsHtml = getWorldMapSegmentAsHtml(res, world, segmentName);
File outputFile = getCombinedWorldMapFile(segmentName);
PrintWriter pw = new PrintWriter(outputFile);
pw.write(mapAsHtml);
pw.close();
}
public static Coord getPlayerWorldPosition(WorldContext world) {
PredefinedMap map = world.model.currentMap;
if (!isVisibleOnWorldMap(map)) return null;
public static void displayWorldMap(MainActivity mainActivity, WorldContext world) {
String worldMapSegmentName = world.maps.getWorldMapSegmentNameForMap(world.model.currentMap.name);
if (worldMapSegmentName == null) {
Toast.makeText(mainActivity, mainActivity.getResources().getString(R.string.display_worldmap_not_available), Toast.LENGTH_LONG).show();
return;
}
return new Coord(
world.model.player.position.x + map.worldMapPosition.x,
world.model.player.position.y + map.worldMapPosition.y
);
Intent intent = new Intent(mainActivity, DisplayWorldMapActivity.class);
intent.putExtra("worldMapSegmentName", worldMapSegmentName);
mainActivity.startActivity(intent);
}
}

View File

@@ -4,6 +4,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
@@ -11,6 +12,7 @@ import com.gpl.rpg.AndorsTrail.util.L;
public final class MapCollection {
public final ArrayList<PredefinedMap> predefinedMaps = new ArrayList<PredefinedMap>();
public final HashMap<String, WorldMapSegment> worldMapSegments = new HashMap<String, WorldMapSegment>();
public MapCollection() {}
@@ -29,6 +31,13 @@ public final class MapCollection {
m.reset();
}
}
public String getWorldMapSegmentNameForMap(String mapName) {
for (WorldMapSegment segment : worldMapSegments.values()) {
if (segment.containsMap(mapName)) return segment.name;
}
return null;
}
// ====== PARCELABLE ===================================================================

View File

@@ -24,7 +24,6 @@ public final class PredefinedMap {
public final int xmlResourceId;
public final String name;
public final Size size;
public final Coord worldMapPosition = new Coord();
public final MapObject[] eventObjects;
public final MonsterSpawnArea[] spawnAreas;
public final ArrayList<Loot> groundBags = new ArrayList<Loot>();
@@ -35,7 +34,7 @@ public final class PredefinedMap {
public final boolean[][] isWalkable;
public final ArrayList<BloodSplatter> splatters = new ArrayList<BloodSplatter>();
public PredefinedMap(int xmlResourceId, String name, Size size, boolean[][] isWalkable, MapObject[] eventObjects, MonsterSpawnArea[] spawnAreas, boolean hasFOW, boolean isOutdoors) {
this.xmlResourceId = xmlResourceId;
this.name = name;
@@ -220,6 +219,7 @@ public final class PredefinedMap {
}
groundBags.clear();
visited = false;
lastVisitVersion = 0;
}
public boolean isRecentlyVisited() {

View File

@@ -10,6 +10,7 @@ import org.xmlpull.v1.XmlPullParserException;
import com.gpl.rpg.AndorsTrail.util.Base64;
import com.gpl.rpg.AndorsTrail.util.L;
import com.gpl.rpg.AndorsTrail.util.XmlResourceParserUtils;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
@@ -41,7 +42,7 @@ public final class TMXMapFileParser {
map.height = xrp.getAttributeIntValue(null, "height", -1);
map.tilewidth = xrp.getAttributeIntValue(null, "tilewidth", -1);
map.tileheight = xrp.getAttributeIntValue(null, "tileheight", -1);
readCurrentTagUntilEnd(xrp, new TagHandler() {
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
public void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException {
if (tagName.equals("tileset")) {
tileSets.add(readTMXTileSet(xrp));
@@ -81,7 +82,7 @@ public final class TMXMapFileParser {
if (s.equals("map")) {
map.width = xrp.getAttributeIntValue(null, "width", -1);
map.height = xrp.getAttributeIntValue(null, "height", -1);
readCurrentTagUntilEnd(xrp, new TagHandler() {
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
public void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException {
if (tagName.equals("tileset")) {
tileSets.add(readTMXTileSet(xrp));
@@ -111,7 +112,7 @@ public final class TMXMapFileParser {
ts.name = xrp.getAttributeValue(null, "name");
ts.tilewidth = xrp.getAttributeIntValue(null, "tilewidth", -1);
ts.tileheight = xrp.getAttributeIntValue(null, "tileheight", -1);
readCurrentTagUntilEnd(xrp, new TagHandler() {
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
public void handleTag(XmlResourceParser xrp, String tagName) {
if (tagName.equals("image")) {
ts.imageSource = xrp.getAttributeValue(null, "source");
@@ -130,7 +131,7 @@ public final class TMXMapFileParser {
group.name = xrp.getAttributeValue(null, "name");
group.width = xrp.getAttributeIntValue(null, "width", 1);
group.height = xrp.getAttributeIntValue(null, "height", 1);
readCurrentTagUntilEnd(xrp, new TagHandler() {
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
public void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException {
if (tagName.equals("object")) {
group.objects.add(readTMXObject(xrp));
@@ -148,7 +149,7 @@ public final class TMXMapFileParser {
object.y = xrp.getAttributeIntValue(null, "y", -1);
object.width = xrp.getAttributeIntValue(null, "width", -1);
object.height = xrp.getAttributeIntValue(null, "height", -1);
readCurrentTagUntilEnd(xrp, new TagHandler() {
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
public void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException {
if (tagName.equals("property")) {
object.properties.add(readTMXProperty(xrp));
@@ -164,7 +165,7 @@ public final class TMXMapFileParser {
layer.width = xrp.getAttributeIntValue(null, "width", 1);
layer.height = xrp.getAttributeIntValue(null, "height", 1);
layer.gids = new int[layer.width][layer.height];
readCurrentTagUntilEnd(xrp, new TagHandler() {
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
public void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException {
if (tagName.equals("data")) {
readTMXMapLayerData(xrp, layer);
@@ -226,23 +227,6 @@ public final class TMXMapFileParser {
}
}
private interface TagHandler {
void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException;
}
private static void readCurrentTagUntilEnd(XmlResourceParser xrp, TagHandler handler) throws XmlPullParserException, IOException {
String outerTagName = xrp.getName();
String tagName;
int eventType;
while ((eventType = xrp.next()) != XmlResourceParser.END_DOCUMENT) {
if (eventType == XmlResourceParser.START_TAG) {
tagName = xrp.getName();
handler.handleTag(xrp, tagName);
} else if (eventType == XmlResourceParser.END_TAG) {
tagName = xrp.getName();
if (tagName.equals(outerTagName)) return;
}
}
}
/*
private static String getHexString(byte v) {
String result = Integer.toHexString(v & 0xff);

View File

@@ -0,0 +1,25 @@
package com.gpl.rpg.AndorsTrail.model.map;
import java.util.HashMap;
import com.gpl.rpg.AndorsTrail.util.Coord;
public final class WorldMapSegment {
public final String name;
public final HashMap<String, WorldMapSegmentMap> maps = new HashMap<String, WorldMapSegmentMap>();
public WorldMapSegment(String name) {
this.name = name;
}
public boolean containsMap(String mapName) { return maps.containsKey(mapName); }
public static final class WorldMapSegmentMap {
public final String mapName;
public final Coord worldPosition;
public WorldMapSegmentMap(String mapName, Coord worldPosition) {
this.mapName = mapName;
this.worldPosition = worldPosition;
}
}
}

View File

@@ -1,11 +1,18 @@
package com.gpl.rpg.AndorsTrail.resource.parsers;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParserException;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import com.gpl.rpg.AndorsTrail.model.map.MapCollection;
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment;
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment.WorldMapSegmentMap;
import com.gpl.rpg.AndorsTrail.util.Coord;
import com.gpl.rpg.AndorsTrail.util.L;
import com.gpl.rpg.AndorsTrail.util.XmlResourceParserUtils;
public final class WorldMapParser {
public static void read(Resources r, int xmlResourceId, final MapCollection maps) {
@@ -18,12 +25,9 @@ public final class WorldMapParser {
while ((eventType = xrp.next()) != XmlResourceParser.END_DOCUMENT) {
if (eventType == XmlResourceParser.START_TAG) {
String s = xrp.getName();
if (s.equals("div")) {
String mapName = xrp.getAttributeValue(null, "id");
PredefinedMap map = maps.findPredefinedMap(mapName);
if (map == null) continue;
map.worldMapPosition.x = xrp.getAttributeIntValue(null, "x-posx", -1);
map.worldMapPosition.y = xrp.getAttributeIntValue(null, "x-posy", -1);
if (s.equals("segment")) {
WorldMapSegment segment = parseSegment(xrp, maps);
maps.worldMapSegments.put(segment.name, segment);
}
}
}
@@ -33,4 +37,26 @@ public final class WorldMapParser {
}
}
private static WorldMapSegment parseSegment(XmlResourceParser xrp, MapCollection maps) throws XmlPullParserException, IOException {
String segmentName = xrp.getAttributeValue(null, "id");
final WorldMapSegment segment = new WorldMapSegment(segmentName);
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
@Override
public void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException {
if (tagName.equals("map")) {
String mapName = xrp.getAttributeValue(null, "id");
Coord mapPosition = new Coord(
xrp.getAttributeIntValue(null, "x", -1),
xrp.getAttributeIntValue(null, "y", -1)
);
WorldMapSegmentMap map = new WorldMapSegmentMap(mapName, mapPosition);
segment.maps.put(mapName, map);
}
}
});
return segment;
}
}

View File

@@ -0,0 +1,29 @@
package com.gpl.rpg.AndorsTrail.util;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParserException;
import android.content.res.XmlResourceParser;
public final class XmlResourceParserUtils {
public static interface TagHandler {
void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException;
}
public static void readCurrentTagUntilEnd(XmlResourceParser xrp, TagHandler handler) throws XmlPullParserException, IOException {
String outerTagName = xrp.getName();
String tagName;
int eventType;
while ((eventType = xrp.next()) != XmlResourceParser.END_DOCUMENT) {
if (eventType == XmlResourceParser.START_TAG) {
tagName = xrp.getName();
handler.handleTag(xrp, tagName);
} else if (eventType == XmlResourceParser.END_TAG) {
tagName = xrp.getName();
if (tagName.equals(outerTagName)) return;
}
}
}
}