Added xml level + dtd.
This commit is contained in:
parent
b63df0c057
commit
48ce809334
2 changed files with 77 additions and 0 deletions
42
levels/level.dtd
Normal file
42
levels/level.dtd
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<!ELEMENT level (info, triangles, textures)>
|
||||||
|
|
||||||
|
<!ELEMENT info (name, desc, start)>
|
||||||
|
<!ELEMENT triangles (triangle)*>
|
||||||
|
<!ELEMENT textures (texture)*>
|
||||||
|
|
||||||
|
<!ELEMENT name (#PCDATA)>
|
||||||
|
<!ELEMENT desc (#PCDATA)>
|
||||||
|
<!ELEMENT start EMPTY>
|
||||||
|
<!ATTLIST start
|
||||||
|
x CDATA #REQUIRED
|
||||||
|
y CDATA #REQUIRED
|
||||||
|
z CDATA #REQUIRED
|
||||||
|
>
|
||||||
|
|
||||||
|
<!ELEMENT triangle (vertex, texcoords?, vertex, texcoords?, vertex, texcoords?)>
|
||||||
|
<!ATTLIST triangle
|
||||||
|
type (wall|floor) #REQUIRED
|
||||||
|
texture IDREF #IMPLIED
|
||||||
|
>
|
||||||
|
|
||||||
|
<!ELEMENT texture EMPTY>
|
||||||
|
<!ATTLIST texture
|
||||||
|
id ID #REQUIRED
|
||||||
|
name CDATA #REQUIRED
|
||||||
|
>
|
||||||
|
|
||||||
|
<!ELEMENT vertex EMPTY>
|
||||||
|
<!ATTLIST vertex
|
||||||
|
x CDATA #REQUIRED
|
||||||
|
y CDATA #REQUIRED
|
||||||
|
z CDATA #REQUIRED
|
||||||
|
>
|
||||||
|
|
||||||
|
<!ELEMENT texcoords EMPTY>
|
||||||
|
<!ATTLIST texcoords
|
||||||
|
s CDATA "0.0"
|
||||||
|
t CDATA "0.0"
|
||||||
|
r CDATA "0.0"
|
||||||
|
q CDATA "0.0"
|
||||||
|
>
|
||||||
|
|
35
levels/level2.xml
Normal file
35
levels/level2.xml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE level PUBLIC "-//libzoom//DTD level 0.1//EN" "level.dtd">
|
||||||
|
<level>
|
||||||
|
<info>
|
||||||
|
<name>Test Level</name>
|
||||||
|
<desc>Just a simple test level.</desc>
|
||||||
|
<start x="0.0" y="0.0" z="0.0"/>
|
||||||
|
</info>
|
||||||
|
<triangles>
|
||||||
|
<triangle type="wall" texture="t0">
|
||||||
|
<vertex x="-2.0" y="-2.0" z="-6.0"/><texcoords s="0.0" t="1.0"/>
|
||||||
|
<vertex x="2.0" y="-2.0" z="-6.0"/><texcoords s="1.0" t="1.0"/>
|
||||||
|
<vertex x="2.0" y="2.0" z="-6.0"/><texcoords s="1.0" t="0.0"/>
|
||||||
|
</triangle>
|
||||||
|
<triangle type="wall" texture="t0">
|
||||||
|
<vertex x="-2.0" y="-2.0" z="-6.0"/><texcoords s="0.0" t="1.0"/>
|
||||||
|
<vertex x="2.0" y="2.0" z="-6.0"/><texcoords s="1.0" t="0.0"/>
|
||||||
|
<vertex x="-2.0" y="2.0" z="-6.0"/><texcoords s="0.0" t="0.0"/>
|
||||||
|
</triangle>
|
||||||
|
<triangle type="wall" texture="t0">
|
||||||
|
<vertex x="-2.0" y="-2.0" z="2.0"/><texcoords s="1.0" t="1.0"/>
|
||||||
|
<vertex x="-2.0" y="2.0" z="2.0"/><texcoords s="1.0" t="0.0"/>
|
||||||
|
<vertex x="2.0" y="2.0" z="2.0"/><texcoords s="0.0" t="0.0"/>
|
||||||
|
</triangle>
|
||||||
|
<triangle type="wall" texture="t0">
|
||||||
|
<vertex x="-2.0" y="-2.0" z="2.0"/><texcoords s="1.0" t="1.0"/>
|
||||||
|
<vertex x="2.0" y="2.0" z="2.0"/><texcoords s="0.0" t="0.0"/>
|
||||||
|
<vertex x="2.0" y="-2.0" z="2.0"/><texcoords s="0.0" t="1.0"/>
|
||||||
|
</triangle>
|
||||||
|
</triangles>
|
||||||
|
<textures>
|
||||||
|
<texture id="t0" name="green.png"/>
|
||||||
|
</textures>
|
||||||
|
</level>
|
||||||
|
|
Reference in a new issue