diff options
author | neoraider <devnull@localhost> | 2007-05-14 19:38:01 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-05-14 19:38:01 +0200 |
commit | 3b2e35b66b0df22093505270bbabfc868a0a9a2b (patch) | |
tree | fa492dafaf383ca95c7799c9432fdaa464ed07c7 | |
parent | 48ce809334713ef75d0f3c8d6b5c9fab16e2f335 (diff) | |
download | zoom-3b2e35b66b0df22093505270bbabfc868a0a9a2b.tar zoom-3b2e35b66b0df22093505270bbabfc868a0a9a2b.zip |
libzoom: XML level loader implemented.
zoom: Converted old test level to XML.
-rw-r--r-- | levels/level.dtd | 26 | ||||
-rwxr-xr-x | levels/level.lvl | bin | 2111 -> 1066 bytes | |||
-rwxr-xr-x | levels/level1.lvl | bin | 1399 -> 0 bytes | |||
-rwxr-xr-x | levels/level1.txt | 122 | ||||
-rwxr-xr-x | levels/level2.lvl | bin | 3879 -> 0 bytes | |||
-rwxr-xr-x | levels/level2.txt | 266 | ||||
-rw-r--r-- | levels/level2.xml | 35 |
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 Binary files differindex f6e324f..c93ba04 100755 --- a/levels/level.lvl +++ b/levels/level.lvl diff --git a/levels/level1.lvl b/levels/level1.lvl Binary files differdeleted file mode 100755 index cefb91b..0000000 --- a/levels/level1.lvl +++ /dev/null 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 Binary files differdeleted file mode 100755 index b8e7b9a..0000000 --- a/levels/level2.lvl +++ /dev/null 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> - |