summaryrefslogtreecommitdiffstats
path: root/levels
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-05-14 19:38:01 +0200
committerneoraider <devnull@localhost>2007-05-14 19:38:01 +0200
commit3b2e35b66b0df22093505270bbabfc868a0a9a2b (patch)
treefa492dafaf383ca95c7799c9432fdaa464ed07c7 /levels
parent48ce809334713ef75d0f3c8d6b5c9fab16e2f335 (diff)
downloadzoom-3b2e35b66b0df22093505270bbabfc868a0a9a2b.tar
zoom-3b2e35b66b0df22093505270bbabfc868a0a9a2b.zip
libzoom: XML level loader implemented.
zoom: Converted old test level to XML.
Diffstat (limited to 'levels')
-rw-r--r--levels/level.dtd26
-rwxr-xr-xlevels/level.lvlbin2111 -> 1066 bytes
-rwxr-xr-xlevels/level1.lvlbin1399 -> 0 bytes
-rwxr-xr-xlevels/level1.txt122
-rwxr-xr-xlevels/level2.lvlbin3879 -> 0 bytes
-rwxr-xr-xlevels/level2.txt266
-rw-r--r--levels/level2.xml35
7 files changed, 18 insertions, 431 deletions
diff --git a/levels/level.dtd b/levels/level.dtd
index 29397bc..6b757f9 100644
--- a/levels/level.dtd
+++ b/levels/level.dtd
@@ -1,7 +1,7 @@
-<!ELEMENT level (info, triangles, textures)>
+<!ELEMENT level (info, rooms, textures)>
<!ELEMENT info (name, desc, start)>
-<!ELEMENT triangles (triangle)*>
+<!ELEMENT rooms (room)*>
<!ELEMENT textures (texture)*>
<!ELEMENT name (#PCDATA)>
@@ -13,9 +13,12 @@
z CDATA #REQUIRED
>
-<!ELEMENT triangle (vertex, texcoords?, vertex, texcoords?, vertex, texcoords?)>
+<!ELEMENT room (triangle)*>
+
+<!ELEMENT triangle (vertex, normal?, texcoords?, vertex, normal?, texcoords?, vertex, normal?, texcoords?)>
<!ATTLIST triangle
- type (wall|floor) #REQUIRED
+ type (wall|floor) #IMPLIED
+ visible (true|false) "true"
texture IDREF #IMPLIED
>
@@ -32,11 +35,18 @@
z CDATA #REQUIRED
>
+<!ELEMENT normal EMPTY>
+<!ATTLIST normal
+ 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"
+ s CDATA #REQUIRED
+ t CDATA #IMPLIED
+ r CDATA #IMPLIED
+ q CDATA #IMPLIED
>
diff --git a/levels/level.lvl b/levels/level.lvl
index f6e324f..c93ba04 100755
--- a/levels/level.lvl
+++ b/levels/level.lvl
Binary files differ
diff --git a/levels/level1.lvl b/levels/level1.lvl
deleted file mode 100755
index cefb91b..0000000
--- a/levels/level1.lvl
+++ /dev/null
Binary files differ
diff --git a/levels/level1.txt b/levels/level1.txt
deleted file mode 100755
index c0592c8..0000000
--- a/levels/level1.txt
+++ /dev/null
@@ -1,122 +0,0 @@
-room
- triangle wall
- vertices
- -10 -10 -10
- 10 -10 -10
- 10 10 -10
- texture blue.png
- 0 0
- 10 0
- 10 10
- end
- triangle wall
- vertices
- -10 -10 -10
- 10 10 -10
- -10 10 -10
- texture blue.png
- 0 0
- 10 10
- 0 10
- end
- triangle wall
- vertices
- -10 -10 10
- -10 10 10
- 10 10 10
- texture blue.png
- 10 10
- 0 10
- 0 0
- end
- triangle wall
- vertices
- -10 -10 10
- 10 10 10
- 10 -10 10
- texture blue.png
- 10 10
- 0 0
- 10 0
- end
- triangle wall
- vertices
- -10 10 -10
- 10 10 -10
- 10 10 10
- texture blue.png
- 0 0
- 10 0
- 10 10
- end
- triangle wall
- vertices
- -10 10 -10
- 10 10 10
- -10 10 10
- texture blue.png
- 0 0
- 10 10
- 0 10
- end
- triangle floor
- vertices
- -10 -10 10
- 10 -10 10
- 10 -10 -10
- texture blue.png
- 0 10
- 10 10
- 10 0
- end
- triangle floor
- vertices
- -10 -10 10
- 10 -10 -10
- -10 -10 -10
- texture blue.png
- 0 10
- 10 0
- 0 0
- end
- triangle wall
- vertices
- -10 -10 -10
- -10 10 -10
- -10 10 10
- texture blue.png
- 10 10
- 10 0
- 0 0
- end
- triangle wall
- vertices
- -10 -10 -10
- -10 10 10
- -10 -10 10
- texture blue.png
- 10 10
- 0 0
- 0 10
- end
- triangle wall
- vertices
- 10 -10 10
- 10 10 10
- 10 10 -10
- texture blue.png
- 10 10
- 10 0
- 0 0
- end
- triangle wall
- vertices
- 10 -10 10
- 10 10 -10
- 10 -10 -10
- texture blue.png
- 10 10
- 0 0
- 0 10
- end
-end
diff --git a/levels/level2.lvl b/levels/level2.lvl
deleted file mode 100755
index b8e7b9a..0000000
--- a/levels/level2.lvl
+++ /dev/null
Binary files differ
diff --git a/levels/level2.txt b/levels/level2.txt
deleted file mode 100755
index ce888f3..0000000
--- a/levels/level2.txt
+++ /dev/null
@@ -1,266 +0,0 @@
-room
- triangle wall
- vertices
- -2 -2 -6
- 2 -2 -6
- 2 2 -6
- texture green.png
- 0 1
- 1 1
- 1 0
- end
- triangle wall
- vertices
- -2 -2 -6
- 2 2 -6
- -2 2 -6
- texture green.png
- 0 1
- 1 0
- 0 0
- end
- triangle wall
- vertices
- -2 -2 2
- -2 2 2
- 2 2 2
- texture green.png
- 1 1
- 1 0
- 0 0
- end
- triangle wall
- vertices
- -2 -2 2
- 2 2 2
- 2 -2 2
- texture green.png
- 1 1
- 0 0
- 0 1
- end
- triangle wall
- vertices
- -2 2 -6
- 2 2 -6
- 2 2 -2
- texture metallic.png
- 0 1
- 0 0
- 2 0
- end
- triangle wall
- vertices
- -2 2 -6
- 2 2 -2
- -2 2 -2
- texture metallic.png
- 0 1
- 2 0
- 2 1
- end
- triangle wall
- vertices
- -2 2 -2
- 2 2 -2
- 2 2 2
- texture metallic.png
- 0 1
- 0 0
- 2 0
- end
- triangle wall
- vertices
- -2 2 -2
- 2 2 2
- -2 2 2
- texture metallic.png
- 0 1
- 2 0
- 2 1
- end
- triangle floor
- vertices
- -2 -2 2
- 2 -2 2
- 2 -2 -6
- texture light.png
- 0 0
- 0 1
- 2 1
- end
- triangle floor
- vertices
- -2 -2 2
- 2 -2 -6
- -2 -2 -6
- texture light.png
- 0 0
- 2 1
- 2 0
- end
- triangle wall
- vertices
- -2 -2 -6
- -2 2 -6
- -2 2 2
- texture green.png
- 2 1
- 2 0
- 0 0
- end
- triangle wall
- vertices
- -2 -2 -6
- -2 2 2
- -2 -2 2
- texture green.png
- 2 1
- 0 0
- 0 1
- end
- triangle wall
- vertices
- 2 -2 2
- 2 2 2
- 2 2 -2
- texture green.png
- 1 1
- 1 0
- 0 0
- end
- triangle wall
- vertices
- 2 -2 2
- 2 2 -2
- 2 -2 -2
- texture green.png
- 1 1
- 0 0
- 0 1
- end
- triangle floor
- vertices
- 2 -2 -2
- 6 -2 -2
- 6 -2 -10
- texture light.png
- 0 0
- 0 1
- 2 1
- end
- triangle floor
- vertices
- 2 -2 -2
- 6 -2 -10
- 2 -2 -10
- texture light.png
- 0 0
- 2 1
- 2 0
- end
- triangle wall
- vertices
- 2 2 -2
- 2 2 -10
- 6 2 -10
- texture metallic.png
- 2 1
- 0 1
- 0 0
- end
- triangle wall
- vertices
- 2 2 -2
- 6 2 -10
- 6 2 -2
- texture metallic.png
- 2 1
- 0 0
- 2 0
- end
- triangle wall
- vertices
- 2 -2 -10
- 6 -2 -10
- 6 2 -10
- texture green.png
- 0 1
- 1 1
- 1 0
- end
- triangle wall
- vertices
- 2 -2 -10
- 6 2 -10
- 2 2 -10
- texture green.png
- 0 1
- 1 0
- 0 0
- end
- triangle wall
- vertices
- 2 -2 -10
- 2 2 -10
- 2 2 -6
- texture green.png
- 1 1
- 1 0
- 0 0
- end
- triangle wall
- vertices
- 2 -2 -10
- 2 2 -6
- 2 -2 -6
- texture green.png
- 1 1
- 0 0
- 0 1
- end
- triangle wall
- vertices
- 2 -2 -2
- 2 2 -2
- 6 2 -2
- texture green.png
- 1 1
- 1 0
- 0 0
- end
- triangle wall
- vertices
- 2 -2 -2
- 6 2 -2
- 6 -2 -2
- texture green.png
- 1 1
- 0 0
- 0 1
- end
- triangle wall
- vertices
- 6 -2 -2
- 6 2 -2
- 6 2 -10
- texture green.png
- 2 1
- 2 0
- 0 0
- end
- triangle wall
- vertices
- 6 -2 -2
- 6 2 -10
- 6 -2 -10
- texture green.png
- 2 1
- 0 0
- 0 1
- end
- object medipak100
- 4 -1 -8
- object medipak100
- 4 -1 -4
-end
diff --git a/levels/level2.xml b/levels/level2.xml
deleted file mode 100644
index 67a5f43..0000000
--- a/levels/level2.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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>
-