libzoom: XML level loader implemented.
zoom: Converted old test level to XML.
This commit is contained in:
parent
48ce809334
commit
3b2e35b66b
7 changed files with 20 additions and 433 deletions
|
@ -1,7 +1,7 @@
|
||||||
<!ELEMENT level (info, triangles, textures)>
|
<!ELEMENT level (info, rooms, textures)>
|
||||||
|
|
||||||
<!ELEMENT info (name, desc, start)>
|
<!ELEMENT info (name, desc, start)>
|
||||||
<!ELEMENT triangles (triangle)*>
|
<!ELEMENT rooms (room)*>
|
||||||
<!ELEMENT textures (texture)*>
|
<!ELEMENT textures (texture)*>
|
||||||
|
|
||||||
<!ELEMENT name (#PCDATA)>
|
<!ELEMENT name (#PCDATA)>
|
||||||
|
@ -13,9 +13,12 @@
|
||||||
z CDATA #REQUIRED
|
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
|
<!ATTLIST triangle
|
||||||
type (wall|floor) #REQUIRED
|
type (wall|floor) #IMPLIED
|
||||||
|
visible (true|false) "true"
|
||||||
texture IDREF #IMPLIED
|
texture IDREF #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@ -32,11 +35,18 @@
|
||||||
z CDATA #REQUIRED
|
z CDATA #REQUIRED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT texcoords EMPTY>
|
<!ELEMENT normal EMPTY>
|
||||||
<!ATTLIST texcoords
|
<!ATTLIST normal
|
||||||
s CDATA "0.0"
|
x CDATA #REQUIRED
|
||||||
t CDATA "0.0"
|
y CDATA #REQUIRED
|
||||||
r CDATA "0.0"
|
z CDATA #REQUIRED
|
||||||
q CDATA "0.0"
|
>
|
||||||
|
|
||||||
|
<!ELEMENT texcoords EMPTY>
|
||||||
|
<!ATTLIST texcoords
|
||||||
|
s CDATA #REQUIRED
|
||||||
|
t CDATA #IMPLIED
|
||||||
|
r CDATA #IMPLIED
|
||||||
|
q CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
BIN
levels/level.lvl
BIN
levels/level.lvl
Binary file not shown.
Binary file not shown.
|
@ -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
|
|
Binary file not shown.
|
@ -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
|
|
|
@ -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>
|
|
||||||
|
|
Reference in a new issue