diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-03-05 16:07:07 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-03-05 16:07:07 -0500 |
commit | 13f946689e28e99ac71172925f63f4320798a0ee (patch) | |
tree | ba30132da24aa70b0d2daffc96ac3b3f63d57df6 /res | |
parent | dbc486d5cc0fa6b7cdb690fb4591f292d33e9ecc (diff) | |
download | therapy-13f946689e28e99ac71172925f63f4320798a0ee.tar.gz therapy-13f946689e28e99ac71172925f63f4320798a0ee.tar.bz2 therapy-13f946689e28e99ac71172925f63f4320798a0ee.zip |
Added entity indexing
Changed the world format so that map objects are indexed (per map). The next available map object index is cached for each map.
Diffstat (limited to 'res')
-rw-r--r-- | res/maps.xml | 10 | ||||
-rw-r--r-- | res/maps.xsd | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/res/maps.xml b/res/maps.xml index c561912..81fe743 100644 --- a/res/maps.xml +++ b/res/maps.xml | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
2 | <world nextmap="6" lastmap="0" startx="203" starty="44" startmap="0"><root>0</root><map id="0" expanded="true" title="Everything Is Embarrassing"><environment type="0">0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,20,0,0,0,0,0,0,0,18,9,8,10,8,11,8,10,10,8,11,8,9,10,21,0, | 2 | <world nextmap="6" lastmap="1" startx="203" starty="44" startmap="0"><root>0</root><map id="0" expanded="true" title="Everything Is Embarrassing" nextObject="0"><environment type="0">0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,20,0,0,0,0,0,0,0,18,9,8,10,8,11,8,10,10,8,11,8,9,10,21,0, |
3 | 0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,8,8,17,0,0,0,0,0,0,0,0,0,0,0,0,0,22,21, | 3 | 0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,8,8,17,0,0,0,0,0,0,0,0,0,0,0,0,0,22,21, |
4 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,8,8,8,8,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, | 4 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,8,8,8,8,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, |
5 | 0,19,0,0,0,0,0,0,0,0,0,0,0,18,8,8,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, | 5 | 0,19,0,0,0,0,0,0,0,0,0,0,0,18,8,8,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, |
@@ -23,7 +23,7 @@ | |||
23 | 0,0,0,0,24,3,1,2,1,1,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,27,1,3,2,26,0,0,0,0,0,0, | 23 | 0,0,0,0,24,3,1,2,1,1,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,27,1,3,2,26,0,0,0,0,0,0, |
24 | 1,2,3,1,25,0,0,0,0,0,20,0,0,0,0,0,0,19,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,27,1,2,2,4,3,1, | 24 | 1,2,3,1,25,0,0,0,0,0,20,0,0,0,0,0,0,19,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,27,1,2,2,4,3,1, |
25 | 0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0, | 25 | 0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0, |
26 | </environment><adjacent dir="left" type="warp" map="1"/><child>1</child><child>4</child><child>5</child></map><map id="1" expanded="false" title="It's A Trap!"><environment type="0">0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | 26 | </environment><adjacent dir="left" type="warp" map="1"/><child>1</child><child>4</child><child>5</child></map><map id="1" expanded="false" title="It's A Trap!" nextObject="2"><environment type="0">0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
27 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0, | 27 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0, |
28 | 0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0, | 28 | 0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0, |
29 | 0,0,0,0,0,0,0,19,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | 29 | 0,0,0,0,0,0,0,19,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
@@ -47,7 +47,7 @@ | |||
47 | 0,0,0,27,2,2,3,3,3,4,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | 47 | 0,0,0,27,2,2,3,3,3,4,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
48 | 0,20,0,0,0,0,0,19,0,0,27,1,1,1,2,2,2,26,0,0,0,0,0,0,0,0,0,0,24,4,2,2,1,3,2,2,1,2,2,3, | 48 | 0,20,0,0,0,0,0,19,0,0,27,1,1,1,2,2,2,26,0,0,0,0,0,0,0,0,0,0,24,4,2,2,1,3,2,2,1,2,2,3, |
49 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,19,0,0,0,0,0, | 49 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,19,0,0,0,0,0, |
50 | </environment><entity type="checkpoint" x="262" y="156"/><adjacent dir="right" type="warp" map="0"/><adjacent dir="down" type="warp" map="4"/></map><map id="4" expanded="false" title="The Visitors"><environment type="0">0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, | 50 | </environment><entity type="checkpoint" x="262" y="156" index="0"/><entity type="checkpoint" x="76" y="141" index="1"/><adjacent dir="right" type="warp" map="0"/><adjacent dir="down" type="warp" map="4"/></map><map id="4" expanded="false" title="The Visitors" nextObject="0"><environment type="0">0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, |
51 | 0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,20,0,0,0,0, | 51 | 0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,20,0,0,0,0, |
52 | 0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, | 52 | 0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, |
53 | 0,0,0,0,19,0,0,0,0,0,0,0,0,0,20,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, | 53 | 0,0,0,0,19,0,0,0,0,0,0,0,0,0,20,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, |
@@ -71,7 +71,7 @@ | |||
71 | 0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, | 71 | 0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, |
72 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0, | 72 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0, |
73 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, | 73 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0, |
74 | </environment><adjacent dir="up" type="warp" map="1"/><adjacent dir="down" type="warp" map="5"/></map><map id="5" expanded="false" title="Now Is The Hour"><environment type="0">0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0, | 74 | </environment><adjacent dir="up" type="warp" map="1"/><adjacent dir="down" type="warp" map="5"/></map><map id="5" expanded="false" title="Now Is The Hour" nextObject="1"><environment type="0">0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0, |
75 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0, | 75 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0, |
76 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,20,0,0,0,0,0,0,0, | 76 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,13,0,0,0,20,0,0,0,0,0,0,0, |
77 | 0,0,0,19,0,0,0,0,0,0,0,0,19,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,19,0,0,0,0,0, | 77 | 0,0,0,19,0,0,0,0,0,0,0,0,19,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,19,0,0,0,0,0, |
@@ -95,4 +95,4 @@ | |||
95 | 2,2,2,2,2,2,26,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,12,0,0,0,0,0,0,0,0,0, | 95 | 2,2,2,2,2,2,26,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,12,0,0,0,0,0,0,0,0,0, |
96 | 0,0,0,0,0,0,27,1,3,4,2,1,3,2,1,1,2,4,1,1,1,3,1,1,4,2,1,3,4,1,25,19,0,0,0,0,0,0,0,0, | 96 | 0,0,0,0,0,0,27,1,3,4,2,1,3,2,1,1,2,4,1,1,1,3,1,1,4,2,1,3,4,1,25,19,0,0,0,0,0,0,0,0, |
97 | 0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | 97 | 0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
98 | </environment><entity type="movplat" x="98" y="145"><item id="dir">1</item><item id="len">90</item><item id="speed">30</item></entity><adjacent dir="up" type="warp" map="4"/></map></world> | 98 | </environment><entity type="movplat" x="98" y="145" index="0"><item id="dir">1</item><item id="len">90</item><item id="speed">30</item></entity><adjacent dir="up" type="warp" map="4"/></map></world> |
diff --git a/res/maps.xsd b/res/maps.xsd index 9d36fab..64fd21f 100644 --- a/res/maps.xsd +++ b/res/maps.xsd | |||
@@ -54,6 +54,7 @@ | |||
54 | <xs:attribute name="type" type="xs:string" use="required" /> | 54 | <xs:attribute name="type" type="xs:string" use="required" /> |
55 | <xs:attribute name="x" type="xs:integer" use="required" /> | 55 | <xs:attribute name="x" type="xs:integer" use="required" /> |
56 | <xs:attribute name="y" type="xs:integer" use="required" /> | 56 | <xs:attribute name="y" type="xs:integer" use="required" /> |
57 | <xs:attribute name="index" type="xs:integer" use="required" /> | ||
57 | </xs:complexType> | 58 | </xs:complexType> |
58 | </xs:element> | 59 | </xs:element> |
59 | 60 | ||
@@ -77,6 +78,7 @@ | |||
77 | </xs:restriction> | 78 | </xs:restriction> |
78 | </xs:simpleType> | 79 | </xs:simpleType> |
79 | </xs:attribute> | 80 | </xs:attribute> |
81 | <xs:attribute name="nextObject" type="xs:integer" use="required" /> | ||
80 | </xs:complexType> | 82 | </xs:complexType> |
81 | </xs:element> | 83 | </xs:element> |
82 | </xs:sequence> | 84 | </xs:sequence> |