summaryrefslogtreecommitdiffstats
path: root/levels
diff options
context:
space:
mode:
Diffstat (limited to 'levels')
-rw-r--r--levels/level.dtd42
-rw-r--r--levels/level2.xml35
2 files changed, 77 insertions, 0 deletions
diff --git a/levels/level.dtd b/levels/level.dtd
new file mode 100644
index 0000000..29397bc
--- /dev/null
+++ b/levels/level.dtd
@@ -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"
+>
+
diff --git a/levels/level2.xml b/levels/level2.xml
new file mode 100644
index 0000000..67a5f43
--- /dev/null
+++ b/levels/level2.xml
@@ -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>
+