Thomas Buck пре 10 година
родитељ
комит
291973fe8f

+ 1
- 1
Makefile Прегледај датотеку

@@ -98,7 +98,7 @@ LD_FLAGS+=-lGL -lGLU
98 98
 endif
99 99
 
100 100
 RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
101
-	-fomit-frame-pointer -fexpensive-optimizations -O2
101
+	-fomit-frame-pointer -O2
102 102
 
103 103
 DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0 $(DEBUG_DEFS)
104 104
 

+ 9
- 2
README.md Прегледај датотеку

@@ -6,10 +6,14 @@ This project aims to get OpenRaider in a more usable state.
6 6
 
7 7
 If you just want to see OpenRaider doing something, without installing any of the dependencies needed to build OpenRaider, install [XQuartz](http://xquartz.macosforge.org/trac) (if you don't have it already) and grab the Mac App Bundle from the [most recent release](https://github.com/xythobuz/OpenRaider/releases).
8 8
 
9
+## Documentation
10
+
11
+All included documentation was moved into the [OpenRaider Repo Wiki](https://github.com/xythobuz/OpenRaider/wiki/_pages)!
12
+
9 13
 ## Configuration
10 14
 
11 15
 OpenRaider needs some configuration files, and level data and assets from custom levels or the Tomb Raider games.
12
-These are stored in `~/.OpenRaider`. Running the included `setup.sh` will create/copy the necessary files and directories.
16
+These are stored in `~/.OpenRaider`. Running the included `setup.sh` will create/copy the necessary files and directories. The Mac App Bundle will do this for you automatically.
13 17
 
14 18
 ## Dependencies
15 19
 
@@ -30,7 +34,10 @@ To get Sound, you need [freealut](https://github.com/vancegroup/freealut). Get,
30 34
 
31 35
 ## Building
32 36
 
33
-Just `make debug` and run `bin/debug/OpenRaider` for a debug build.
37
+If you installed the dependencies using MacPorts, you'll need to have `/opt/local/bin` in your `$PATH` before you can execute make.
38
+If you're using Bash, the MacPorts installer should have automatically edited your configuration.
39
+
40
+Just run `make debug` and run `bin/debug/OpenRaider` for a debug build.
34 41
 `make release` builds a release binary.
35 42
 `make bundle` creates a Mac App Bundle that also runs the setup script, if necessary.
36 43
 `make bundle-image` packs the App Bundle into a DMG ready for distribution.

+ 0
- 308
doc/TR4-Format.html Прегледај датотеку

@@ -1,308 +0,0 @@
1
-<html>
2
-<head>
3
-<style>
4
-H2 { background-color:#A0DAFE }
5
-table.code	{ background-color:#FECEA0 }
6
-td.type_data { width:80; font-weight:bold }
7
-td.comment { background-color:#FFB369 }
8
-</style>
9
-</head>
10
-<body>
11
-
12
-<center>
13
-<h1>TR4 file format</h1>
14
-</center>
15
-
16
-<br>
17
-<h3>Contributors: Rgbold, Turbo Pascal, Yuri Zhivago, Dr. Willard, TRWad, Popov, others ?</h3>
18
-
19
-This document describes only differences between TR3 and TR4 file format. Please, refer to the TRosetta Stone document
20
-to get informations about TR1 / TR2 and TR3 file format.<br>
21
-This document is not complete, there are yet some unknowns. Feel free to fill in the blanks and let us know that we can
22
-modify this document.
23
-<br><br>
24
-<ul>
25
-<li><a href="#TypesUsed">Types used</a></li>
26
-<li><a href="#GeneralFormat">General format of a .TR4 file</a></li>
27
-<li><a href="#GeometryBlock">Format of the geometry block</a></li>
28
-	<ul>
29
-		<li><a href="#RoomLights">Room Lights</a></li>
30
-		<li><a href="#TriQuads">Tri & Quad polys in mesh objects</a></li>
31
-		<li><a href="#FlyByCameras">Flyby cameras</a></li>
32
-		<li><a href="#AIData">Cinematic frames replaced by AI data</a></li>
33
-		<li><a href="#SpriteTexture">Changes in tr2_sprite_texture</a></li>
34
-		<li><a href="#MeshObjects">Mesh objects</a></li>
35
-		<li><a href="#ObjectTextures">Object textures</a></li>
36
-		<li><a href="#Animations">Animations</a></li>
37
-		<li><a href="#Miscellaneous">Miscellaneous</a></li>
38
-	</ul>
39
-</ul>
40
-<br>
41
-<hr>
42
-<h2><a name="TypesUsed">Types used</a></h2>
43
-
44
-<table border="1">
45
-<tr bgcolor="#e0e0e0"><th>name</th><th>size</th></tr>
46
-<tr><th>bit8</th><td>a signed 8 bits</td></tr>
47
-<tr><th>bitu8</th><td>an unsigned 8 bits</td></tr>
48
-<tr><th>bit16</th><td>a signed 16 bits</td></tr>
49
-<tr><th>bitu16</th><td>an unsigned 16 bits</td></tr>
50
-<tr><th>bit32</th><td>a signed 32 bits</td></tr>
51
-<tr><th>bitu32</th><td>an unsigned 32 bits</td></tr>
52
-<tr><th>float</th><td>a 4 bytes float</td></tr>
53
-</table>
54
-<br>
55
-Other types can be used: if it's the case, refer to the TRosetta Stone document to have their definitions (for eg: tr2_color)
56
-
57
-<h2><a name="GeneralFormat">General format of a .TR4 file</a></h2>
58
-
59
-<table class="code" cellspacing="0">
60
-<tr><td class="type_data">bitu32</td><td>"TR4",0</td><td>&nbsp;</td></tr>
61
-<tr><td class="type_data">bitu16</td><td>Number of non bumped room tiles</td><td>&nbsp;</td></tr>
62
-<tr><td class="type_data">bitu16</td><td>Number of tiles for objects</td><td>&nbsp;</td></tr>
63
-<tr><td class="type_data">bitu16</td><td>Number of bumped room tiles</td><td>&nbsp;</td></tr>
64
-<tr><td class="type_data">bitu32</td><td>Uncompressed size of texture 1</td><td>&nbsp;</td></tr>
65
-<tr><td class="type_data">bitu32</td><td>Compressed size of texture 1</td><td>&nbsp;</td></tr>
66
-<tr><td class="type_data">bitu8[]</td><td>(compressed) Texture 1 (32 bits texture)</td><td>&nbsp;</td></tr>
67
-<tr><td class="type_data">bitu32</td><td>Uncompressed size of texture 2</td><td>&nbsp;</td></tr>
68
-<tr><td class="type_data">bitu32</td><td>Compressed size of texture 2</td><td>&nbsp;</td></tr>
69
-<tr><td class="type_data">bitu8[]</td><td>(compressed) Texture 2 (16 bits texture)</td><td>&nbsp;</td></tr>
70
-<tr><td class="type_data">bitu32</td><td>Uncompressed size of texture 3</td><td>&nbsp;</td></tr>
71
-<tr><td class="type_data">bitu32</td><td>Compressed size of texture 3</td><td>&nbsp;</td></tr>
72
-<tr><td class="type_data">bitu8[]</td><td>(compressed) Texture 3 (32 bits texture)<td>-> a 256x512 texture with the font & sky</td></tr>
73
-<tr><td class="type_data">bitu32</td><td>Uncompressed size of geometry</td><td>&nbsp;</td></tr>
74
-<tr><td class="type_data">bitu32</td><td>Compressed size of geometry</td><td>&nbsp;</td></tr>
75
-<tr><td class="type_data">bitu8[]</td><td>(compressed) <a href="#GeometryBlock">Geometry</a></td><td>&nbsp;</td></tr>
76
-<tr><td class="type_data">bitu32</td><td>num_sounds</td><td>&nbsp;</td></tr>
77
-<tr><td colspan="3"><b>num_sounds * struct TR4_TrailingSound</b></td></tr>
78
-<tr><td colspan="3">{</td></tr>
79
-<tr><td class="type_data">bitu32</td><td>UncompSize;</td><td class="comment">// Uncompressed sound size</td></tr>
80
-<tr><td class="type_data">bitu32</td><td>CompSize;</td><td class="comment">// Compressed sound size -> compression is ADPCM (WAV format)</td></tr>
81
-<tr><td class="type_data">bitu8</td><td>sound_data[];</td><td class="comment">// data of the sound - size is CompSize bitu8</td></tr>
82
-<tr><td colspan="3">}</td></tr>
83
-</table>
84
-<br>
85
-<u>Notes</u>
86
-
87
-<ul>
88
-<li>the compression used is the zlib one</li>
89
-<li>sounds have a Riff wave format</li>
90
-<li>for the level to be played correctly with the TRLE engine, sounds must not be compressed.
91
-In addition, they must be at 22.05 Khz / 16 bits per sample / mono (at least, this format works !)</li>
92
-</ul>
93
-
94
-<h2><a name="GeometryBlock">Format of the geometry block</a></h2>
95
-
96
--> same structures than in TR3 format, except:
97
-
98
-<h3><a name="RoomLights">Room Lights</a></h3>
99
-
100
-<table class="code" cellspacing="0">
101
-<tr><td colspan="3" class="comment">// Follows a D3D light structure, I think, could be wrong (46 bytes)</td></tr>
102
-<tr><td colspan="3">typedef struct</td></tr>
103
-<tr><td colspan="3">{</td></tr>
104
-<tr><td class="type_data">bit32</td><td>Xposition;</td><td class="comment">// world coords</td></tr>
105
-<tr><td class="type_data">bit32</td><td>Yposition;</td><td class="comment">// world coords</td></tr>
106
-<tr><td class="type_data">bit32</td><td>Zposition;</td><td class="comment">// world coords</td></tr>
107
-<tr><td class="type_data">tr2_colour</td><td>Color;</td><td class="comment">// three bytes rgb values</td></tr>
108
-<tr><td class="type_data">bitu8</td><td>LightType;</td><td class="comment">// same as D3D (i.e. 2 is for spotlight)</td></tr>
109
-<tr><td class="type_data">bitu8</td><td>unknown;</td><td class="comment">// always 0xff?</td></tr>
110
-<tr><td class="type_data">bitu8</td><td>Intensity;</td><td class="comment">&nbsp;</td></tr>
111
-<tr><td class="type_data">float</td><td>In;</td><td class="comment">&nbsp;</td></tr>
112
-<tr><td class="type_data">float</td><td>Out;</td><td class="comment">&nbsp;</td></tr>
113
-<tr><td class="type_data">float</td><td>Length;</td><td class="comment">&nbsp;</td></tr>
114
-<tr><td class="type_data">float</td><td>Cutoff;</td><td class="comment">&nbsp;</td></tr>
115
-<tr><td class="type_data">float</td><td>X,Y,Z;<td class="comment">// direction??</td></tr>
116
-<tr><td colspan="3">} <b>tr4_room_light</b>;</td></tr>
117
-</table>
118
-
119
-<h3><a name="TriQuads">Tri & Quad polys in mesh objects</a></h3>
120
-
121
-<table class="code" cellspacing="0">
122
-<tr><td colspan="3" class="comment">// Triangle surface (10 bytes)</td></tr>
123
-<tr><td colspan="3">typedef struct</td></tr>
124
-<tr><td colspan="3">{</td></tr>
125
-<tr><td class="type_data">bitu16</td><td>Vertices[3];</td><td class="comment">// The 3 vertices of a tri</td></tr>
126
-<tr><td class="type_data">bitu16</td><td>Texture;</td><td class="comment">// Object-texture index</td></tr>
127
-<tr><td class="type_data">bitu16</td><td>Lighting;</td><td class="comment">// transparency flag & strength of the hilight</td></tr>
128
-<tr><td colspan="3">} <b>tr4_face3</b>;</td></tr>
129
-</table>
130
-<br>
131
-<table class="code" cellspacing="0">
132
-<tr><td colspan="3" class="comment">// Quadrangle surface (12 bytes)</td></tr>
133
-<tr><td colspan="3">typedef struct</td></tr>
134
-<tr><td colspan="3">{</td></tr>
135
-<tr><td class="type_data">bitu16</td><td>Vertices[4];</td><td class="comment">// The 4 vertices of a quad</td></tr>
136
-<tr><td class="type_data">bitu16</td><td>Texture;</td><td class="comment">// Object-texture index</td></tr>
137
-<tr><td class="type_data">bitu16</td><td>Lighting;</td><td class="comment">// transparency flag & strength of the hilight</td></tr>
138
-<tr><td colspan="3">} <b>tr4_face4</b>;</td></tr>
139
-</table>
140
-<br>
141
-The new field Lighting has this layout:<br><br>
142
-
143
-<table border="1">
144
-<td><nobr>Bit 0</nobr></td><td>if set, alpha channel = intensity (same meaning that when the Attribute field of tr2_object_texture is 2. Cf TRosetta stone document)</td></tr>
145
-<td valign="top"><nobr>Bits 1->7</nobr></td><td>strength of the hilight. In TR4, objects can exhibit some kind of light reflection when seen from some particular angles.
146
-These bits give the strength of this effect: the more bigger the value is, the more visible is the effect.</td></tr>
147
-</table>
148
-<br>
149
-<u>Notes</u>
150
-
151
-<ul>
152
-<li>As in TR3, the Texture field can have its bit 15 set -> only for tris & quads used by rooms - unknown meaning</li>
153
-<li>The extra field Lighting exists only for tris / quads making <u>meshes</u> (used by moveables and static meshes), <u>not</u>
154
-for tris / quads making rooms !</li>
155
-</ul>
156
-
157
-<h3><a name="FlyByCameras">Flyby cameras</a></h3>
158
-
159
-Before SoundSources (cf. TRosetta stone document) is a new field for Flyby_Camera data:<br><br>
160
-
161
-<table class="code" cellspacing="0">
162
-<tr><td class="type_data">bitu32</td><td>Number_of_FBCameras;</td><td>&nbsp;</td></tr>
163
-<tr><td colspan="3" class="comment">// Data for a flyby camera (40 bytes)</td></tr>
164
-<tr><td colspan="3">typedef struct</td></tr>
165
-<tr><td colspan="3">{</td></tr>
166
-<tr><td class="type_data">bit32</td><td>pos[6];</td><td class="comment">// Positions ? (x1,y1,z1,x2,y2,z2)</td></tr>
167
-<tr><td class="type_data">bitu8</td><td>index[2];</td><td class="comment">// A pair of indices</td></tr>
168
-<tr><td class="type_data">bitu16</td><td>Unknown[5];</td><td class="comment">// ??</td></tr>
169
-<tr><td class="type_data">bit32</td><td>ID;</td><td class="comment">// Index of something</td></tr>
170
-<tr><td colspan="3">} <b>tr4_extra_camera</b>;</td></tr>
171
-</table>
172
-
173
-<h3><a name="AIData">Cinematic frames replaced by AI data</a></h3>
174
-
175
-There are no cinematic frames in TR4. Instead of that, there is the following structure:<br><br>
176
-
177
-<table class="code" cellspacing="0">
178
-<tr><td class="type_data">bitu32</td><td>num_AIData;</td><td>// this field replaces the bitu16 NumCinematicFrames of TR1/2/3 levels</td></tr>
179
-<tr><td colspan="3" class="comment">// Data for a AI object (24 bytes)</td></tr>
180
-<tr><td colspan="3">typedef struct</td></tr>
181
-<tr><td colspan="3">{</td></tr>
182
-<tr><td class="type_data">bitu16</td><td>ObjectID;</td><td class="comment">// the objectID from the AI object (AI_FOLLOW is 402)</td></tr>
183
-<tr><td class="type_data">bitu16</td><td>Room;</td><td class="comment">&nbsp;</td></tr>
184
-<tr><td class="type_data">bit32</td><td>X,Y,A;</td><td class="comment">&nbsp;</td></tr>
185
-<tr><td class="type_data">bitu16</td><td>OCB;</td><td class="comment">&nbsp;</td></tr>
186
-<tr><td class="type_data">bitu16</td><td>Flags;</td><td class="comment">// The trigger flags (button 1-5, first button has value 2)</td></tr>
187
-<tr><td class="type_data">bit32</td><td>Angle;</td><td class="comment">// rotation</td></tr>
188
-<tr><td colspan="3">} <b>tr4_AI_object</b>;</td></tr>
189
-</table>
190
-
191
-<h3><a name="SpriteTexture">Changes in tr2_sprite_texture</a></h3>
192
-
193
-This structure has the same size than before but some of its fields have changed of meaning:<br><br>
194
-
195
-<table class="code" cellspacing="0">
196
-<tr><td colspan="3" class="comment">// Data for a sprite (16 bytes)</td></tr>
197
-<tr><td colspan="3">typedef struct</td></tr>
198
-<tr><td colspan="3">{</td></tr>
199
-<tr><td class="type_data">bitu16</td><td>Tile;</td><td class="comment">&nbsp;</td></tr>
200
-<tr><td class="type_data">bitu8</td><td>unknown1;</td><td class="comment">// ??</td></tr>
201
-<tr><td class="type_data">bitu8</td><td>unknown2;</td><td class="comment">// ??</td></tr>
202
-<tr><td class="type_data">bit16</td><td>Width;</td><td class="comment">// = (real_width-1) * 256</td></tr>
203
-<tr><td class="type_data">bit16</td><td>Height;</td><td class="comment">// = (real_height-1) * 256</td></tr>
204
-<tr><td class="type_data">bit16</td><td>x1,y1;</td><td class="comment">// top-left corner of the texture</td></tr>
205
-<tr><td class="type_data">bit16</td><td>x2,y2;</td><td class="comment">// bottom-right corner of the texture</td></tr>
206
-<tr><td colspan="3">} <b>tr4_sprite_texture</b>;</td></tr>
207
-</table>
208
-<br>
209
-In addition, the NumSpriteTextures field (see TRosetta stone) is preceeded by the 3 ASCII bytes 'SPR'
210
-
211
-<h3><a name="MeshObjects">Mesh objects</a></h3>
212
-
213
-Meshes have no longer colored tris / quads. So, NumColoredRectangles, ColoredRectangles[], NumColoredTriangles, ColoredTriangles[]
214
-no longer exist in the tr2_mesh structure (cf. TRosetta stone document for the tr2_mesh_structure).
215
-
216
-<h3><a name="ObjectTextures">Object textures</a></h3>
217
-
218
-The NumObjectTextures field (see TRosetta stone) is now preceeded by \0TEX (4 bytes -> \0 is the bitu8 value 0). The structure
219
-tr2_object_texture itself has changed:<br><br>
220
-
221
-<table class="code" cellspacing="0">
222
-<tr><td colspan="3" class="comment">// Data for an object texture (38 bytes vice 20 in TR1/2/3)</td></tr>
223
-<tr><td colspan="3">typedef struct</td></tr>
224
-<tr><td colspan="3">{</td></tr>
225
-<tr><td class="type_data">bitu16</td><td>Attribute;</td><td class="comment">// same meaning than in TR3</td></tr>
226
-<tr><td class="type_data">bitu16</td><td>Tile;</td><td class="comment">// same meaning than in TR3</td></tr>
227
-<tr><td class="type_data">bitu16</td><td>Flags;</td><td class="comment">// new in TR4</td></tr>
228
-<tr><td class="type_data">tr2_object_texture_vert</td><td>Vertices[4];</td><td class="comment">// same meaning than in TR3</td></tr>
229
-<tr><td class="type_data">bitu32</td><td>Unknown1,Unknown2;</td><td class="comment">// new in TR4: x & y offset in something ?</td></tr>
230
-<tr><td class="type_data">bitu32</td><td>XSize,YSize;</td><td class="comment">// new in TR4: width-1 & height-1 of the object texture</td></tr>
231
-<tr><td colspan="3">} <b>tr4_object_texture</b>;</td></tr>
232
-</table>
233
-<br>
234
-Meaning of Flags:<br><br>
235
-
236
-<table border="1">
237
-<tr><td><nobr>Bits 0->2</nobr></td><td>mapping correction. It seems that these bits change the way the texture is applied...</td></tr>
238
-<tr><td><nobr>Bit 11->12</nobr></td><td>2 bits giving the bump mapping type. Can be 0x01 or 0x10. It's 0x00 if not bump mapped. Only textures
239
-for room or animated textures can be bump mapped, not meshes</td></tr>
240
-<tr><td><nobr>Bit 15</nobr></td><td>if set, the texture is for a tri/quad from a room or animated texture. If not set, the texture
241
-is for a mesh</td></tr>
242
-</table>
243
-<br>
244
-<u>Notes</u>
245
-
246
-<ul>
247
-<li>rgbold said that the Attribute field could have a value of "2" for 2-sided textures, but it seems wrong: this field has not changed in
248
-TR4 and the value "2" seems to mean alpha=intensity as in TR3</li>
249
-<li>Unknown1 and Unknown2 are said as beeing "XOffset and YOffset" by Dr.Willard, but it seems that changing these values do nothing...
250
-In addition, they seem not related to a second texturing as thought by Dr.Willard</li>
251
-<li>Tile is really bits 0 through 14: bit 15 is a flag which says, if set, that this object texture is for a triangle. If not set,
252
-the object texture is for a quad.</li>
253
-<li>In the texture coords now 0 is used for low value vice 1 (see the Xcoordinate and Ycoordinate fields of the
254
-tr2_object_texture_vert structure in the TRosetta Stone document)</li>
255
-</ul>
256
-
257
-<h3><a name="Animations">Animations</a></h3>
258
-
259
-The tr2_animation structure has changed a little:<br><br>
260
-
261
-<table class="code" cellspacing="0">
262
-<tr><td colspan="3" class="comment">// Data for an animation structure (40 bytes vice 32 in TR1/2/3)</td></tr>
263
-<tr><td colspan="3">typedef struct</td></tr>
264
-<tr><td colspan="3">{</td></tr>
265
-<tr><td class="type_data">bitu32</td><td>dwFrameOffset;</td><td class="comment">// same meaning than in TR3</td></tr>
266
-<tr><td class="type_data">bitu8</td><td>bFrameRate;</td><td class="comment">// same meaning than in TR3</td></tr>
267
-<tr><td class="type_data">bitu8</td><td>bFrameSize;</td><td class="comment">// same meaning than in TR3</td></tr>
268
-<tr><td class="type_data">bitu16</td><td>wStateId;</td><td class="comment">// same meaning than in TR3</td></tr>
269
-<tr><td class="type_data">bit16</td><td>Unknown;</td><td class="comment">// same meaning than in TR3</td></tr>
270
-<tr><td class="type_data">bit16</td><td>sSpeed;</td><td class="comment">// same meaning than in TR3</td></tr>
271
-<tr><td class="type_data">bitu16</td><td>wAccelLo;</td><td class="comment">// same meaning than in TR3</td></tr>
272
-<tr><td class="type_data">bit16</td><td>sAccelHi;</td><td class="comment">// same meaning than in TR3</td></tr>
273
-<tr><td class="type_data">bitu8</td><td>Unknown2[8];</td><td class="comment">// new in TR4</td></tr>
274
-<tr><td class="type_data">bitu16</td><td>wFrameStart;</td><td class="comment">// same meaning than in TR3</td></tr>
275
-<tr><td class="type_data">bitu16</td><td>wFrameEnd;</td><td class="comment">// same meaning than in TR3</td></tr>
276
-<tr><td class="type_data">bitu16</td><td>wNextAnimation;</td><td class="comment">// same meaning than in TR3</td></tr>
277
-<tr><td class="type_data">bitu16</td><td>wNextFrame;</td><td class="comment">// same meaning than in TR3</td></tr>
278
-<tr><td class="type_data">bitu16</td><td>wNumStateChanges;</td><td class="comment">// same meaning than in TR3</td></tr>
279
-<tr><td class="type_data">bitu16</td><td>wStateChangeOffset;</td><td class="comment">// same meaning than in TR3</td></tr>
280
-<tr><td class="type_data">bitu16</td><td>wNumAnimCommands;</td><td class="comment">// same meaning than in TR3</td></tr>
281
-<tr><td class="type_data">bitu16</td><td>wAnimCommand;</td><td class="comment">// same meaning than in TR3</td></tr>
282
-<tr><td colspan="3">} <b>tr4_animation</b>;</td></tr>
283
-</table>
284
-<br>
285
-<u>Notes</u>
286
-
287
-<ul>
288
-<li>The Unknown2[8] are not always 0 as thought by rgbold. When non zero, it seems that these bytes have the same sort of values than
289
-the existing (Unknown, sSpeed, wAccelLo, sAccelHi) fields (which count 8 bytes too). So these 8 unknowns could be
290
-(Unknown2,sSpeed2,wAccelLo2, sAccelHi2) fields...</li>
291
-<li>The wNumAnimCommands field can have wrong values (0xaaaa or 0xaaa7 for eg): don't know why, but if > 256, you could consider
292
-it to be 0 (that's what is done in TrViewer, but the real value is recorded to be use later when the level is saved: maybe
293
-the TR Engine needs this value...)</li>
294
-<li>Angles in animation frames have changed: in the single axe rotation case, you must multiply by 360/4096 instead
295
-of 360/1024 to get the angle in degrees (see the TRosetta Stone document for more informations about animation frames)</li>
296
-</ul>
297
-
298
-<h3><a name="Miscellaneous">Miscellaneous</a></h3>
299
-
300
-<ul>
301
-<li>There are no 8bit or 16 bit palettes</li>
302
-<li>There is no lightmap</li>
303
-<li>There are no 8 bits textures</li>
304
-<li>TR4 levels have an additional 6 bytes at the end of the uncompressed geometry block that seem to be always 0</li>
305
-</ul>
306
-
307
-</body>
308
-</html>

+ 0
- 473
doc/TR4-Notes.html
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 0
- 531
doc/TR5-Format.html Прегледај датотеку

@@ -1,531 +0,0 @@
1
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
-<!-- ================================================================================  -->
3
-<!-- This HTML file was created by AbiWord.                                            -->
4
-<!-- AbiWord is a free, Open Source word processor.                                    -->
5
-<!-- You may obtain more information about AbiWord at www.abisource.com                -->
6
-<!-- ================================================================================  -->
7
-
8
-<html>
9
-<head>
10
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" >
11
-<title>/home/mongoose/download/TR5format.html</title>
12
-<style type="text/css">
13
-body
14
-{
15
-	font-family: "Times New Roman";
16
-	margin-top: 0pt;
17
-	font-variant: normal;
18
-	margin-left: 0pt;
19
-	text-indent: 0in;
20
-	widows: 2;
21
-	font-style: normal;
22
-	font-weight: normal;
23
-	text-decoration: none;
24
-	color: 000000;
25
-	text-align: left;
26
-	margin-bottom: 0pt;
27
-	margin-right: 0pt;
28
-	font-size: 12pt;
29
-	font-stretch: normal;
30
-	background-color: #ffffff;
31
-}
32
-
33
-@media print
34
-{
35
-	body
36
-	{
37
-		padding-top: 1in; padding-bottom: 1in;
38
-		padding-left: 1in; padding-right: 1in;
39
-	}
40
-}
41
-
42
-.Default
43
-{
44
-	color: #000000;
45
-	font-family: "MS Sans Serif";
46
-	font-size: 10pt;
47
-}
48
-
49
-</style>
50
-</head>
51
-<body><div>
52
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'Times New Roman'; font-size: 16.000000pt">TR5 file format</span></p>
53
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
54
-</p>
55
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 14.000000pt">Note:</span></p>
56
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; items in </span><span style="text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">blue</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> are described in the TRosettaStone document.</span></p>
57
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; items in </span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">red</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> are unique/different and are described, if known,</span></p>
58
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 14.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in this document. </span></p>
59
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
60
-</p>
61
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">Disclaimer:&nbsp; This document is at a very early stage and all attempts to verify this information have been made.</span></p>
62
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HOWEVER, I do not guarantee any of the information to be correct. If you find something wrong, or better, if you find something new, please share it.&nbsp;</span></p>
63
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
64
-</p>
65
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This document describes a possible file format. It does not contain any algorithims. It does not contain any computer program&nbsp; source code. As such this document and it's contents cannot be copyrighted and cannot be considered a copyright infringement. HOWEVER, I am not a lawyer.</span></p>
66
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
67
-</p>
68
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks,</span></p>
69
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Roy</span></p>
70
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
71
-</p>
72
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
73
-</p>
74
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
75
-</p>
76
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">Note: Structures are NOT C++ structures.</span></p>
77
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Terminology for consistency with TRosettaStone document:&nbsp;</span></p>
78
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">	bit8	char</span></p>
79
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">	bitu8	unsigned char</span></p>
80
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">	bit16	short int</span></p>
81
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">	bitu16	unsigned short int</span></p>
82
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">	bit32	long</span></p>
83
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">	bitu32	unsigned long</span></p>
84
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p>
85
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">*********************************************************************</span></p>
86
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Version</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // version "TR4",0 (4 bytes)</span></p>
87
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16 NumRoomTextiles</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // number of room texture tiles (2 bytes)</span></p>
88
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16 NumObjectTextiles</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // number of object texture tiles (2 bytes)</span></p>
89
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16 NumBumpMapTextiles</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // number of bump map texture tiles (2 bytes)</span></p>
90
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Textile32UncompressedSize</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 32 bit textures uncompressed size</span></p>
91
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Textile32CompressedSize</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 32 bit textures compressed size </span></p>
92
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu8</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">&nbsp;</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Textile32[Textile32CompressedSize]</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // data bytes for the 32 bit textures (ZLIB compressed data)</span></p>
93
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Textile16UncompressedSize</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 16 bit textures uncompressed size </span></p>
94
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Textile16CompressedSize</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 16 bit textures compressed size </span></p>
95
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu8 Textile16[Textile16CompressedSize]</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // data bytes for the 16 bit textures (ZLIB compressed data)</span></p>
96
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Textile32MiscUncompressedSize</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 32 bit misc. (lettering, sky, etc) textures uncompressed size</span></p>
97
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Textile32MiscCompressedSize</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 32 bit misc.textures compressed size </span></p>
98
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu8 Textile32Misc[Textile32MiscCompressedSize]</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // data bytes for the 32 bit misc textures (ZLIB compressed data)</span></p>
99
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">32*bit8 Seperator</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 32 bytes of 0x00 (Late Note: Michiel has discovered the first 4 bytes here are 2 bitu16 flags</span></p>
100
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">for Lara type and weather, msg posted on the 'F*cking Pop Ups'&nbsp; board somewhere )</span></p>
101
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 LevelDataSize1</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // size of level data (count after LevelDataSize2 bitu32)</span></p>
102
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 LevelDataSize2</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; //&nbsp; repeat of above</span></p>
103
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Seperator</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 4 bytes of 0x00</span></p>
104
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 NumRooms</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // number of rooms (maximum 255 rooms (0-254)) (4 bytes)</span></p>
105
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Rooms[NumRooms]; // the actual room data </span></p>
106
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumFloorData; // number of floor data bitu16's to follow (4 bytes) </span></p>
107
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> FloorData[NumFloorData]; // floor data (NumFloorData * 2 bytes) </span></p>
108
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
109
-</p>
110
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumMeshData; // number of bitu16's of mesh data to follow (=Meshes[]) (4 bytes) </span></p>
111
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">struct { </span></p>
112
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_vertex</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Centre; // relative coordinates of mesh centre (6 bytes) </span></p>
113
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu8</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Unknown1[4]; // unknown (4 bytes) </span></p>
114
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bit16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumVertices; // number of vertices to follow (2 bytes) </span></p>
115
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_vertex</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Vertices[NumVertices]; // list of vertices (NumVertices * 6 bytes) </span></p>
116
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bit16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumNormals; // number of normals to follow (2 bytes) </span></p>
117
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_vertex</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Normals[NumNormals]; // list of normals (NumNormals * 6 bytes) (becomes Lights if NumNormals &lt; 0; 2 bytes) </span></p>
118
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bit16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumTexturedRectangles; // number of textured rectangles to follow (2 bytes) </span></p>
119
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_face4</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">TexturedRectangles[NumTexturedRectangles]; // list of textured rectangles (NumTexturedRectangles * 12 bytes) </span></p>
120
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bit16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumTexturedTriangles; // number of textured triangles to follow (2 bytes) </span></p>
121
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_face3</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">TexturedTriangles[NumTexturedTriangles]; // list of textured triangles (NumTexturedTriangles * 10 bytes) </span></p>
122
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">} Meshes[NumMeshPointers]; // note that NumMeshPointers comes </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">AFTER</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Meshes[] </span></p>
123
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
124
-</p>
125
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
126
-</p>
127
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumMeshPointers; // number of mesh pointers to follow (4 bytes) </span></p>
128
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> MeshPointers[NumMeshPointers]; // mesh pointer list (NumMeshPointers * 4 bytes) </span></p>
129
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumAnimations; // number of animations to follow (4 bytes) </span></p>
130
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_animation</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">Animations[NumAnimations]; // animation list (NumAnimations * 40 bytes) </span></p>
131
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumStateChanges; // number of state changes to follow (4 bytes) </span></p>
132
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_state_change</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> StateChanges[NumStateChanges]; // state-change list (NumStructures * 6 bytes) </span></p>
133
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumAnimDispatches; // number of animation dispatches to follow (4 bytes) </span></p>
134
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_anim_dispatch</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> AnimDispatches[NumAnimDispatches]; // animation-dispatch list list (NumAnimDispatches * 8 bytes) </span></p>
135
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumAnimCommands; // number of animation commands to follow (4 bytes) </span></p>
136
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_anim_command</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> AnimCommands[NumAnimCommands]; // animation-command list (NumAnimCommands * 2 bytes) </span></p>
137
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumMeshTrees; // number of MeshTrees to follow (4 bytes) </span></p>
138
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_meshtree</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> MeshTrees[NumMeshTrees]; // MeshTree list (NumMeshTrees * 4 bytes) </span></p>
139
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumFrames; // number of words of frame data to follow (4 bytes) </span></p>
140
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Frames[NumFrames]; // frame data (NumFrames * 2 bytes) </span></p>
141
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumMoveables; // number of moveables to follow (4 bytes) </span></p>
142
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_moveable</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">Moveables[NumMoveables]; // moveable list (NumMoveables * 20 bytes) </span></p>
143
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumStaticMeshes; // number of StaticMesh data records to follow (4 bytes) </span></p>
144
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_staticmesh</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> StaticMeshes[NumStaticMeshes]; // StaticMesh data (NumStaticMesh * 32 bytes) </span></p>
145
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">4*bitu8</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">&nbsp; </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">SPR; // "SPR" (4 bytes)</span></p>
146
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumSpriteTextures; // number of sprite textures to follow (4 bytes) </span></p>
147
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_sprite_texture</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> SpriteTextures[NumSpriteTextures]; // sprite texture list (NumSpriteTextures * 16 bytes) </span></p>
148
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumSpriteSequences; // number of sprite sequences records to follow (4 bytes) </span></p>
149
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_sprite_sequence</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> SpriteSequences[NumSpriteSequences]; // sprite sequence data (NumSpriteSequences * 8 bytes) </span></p>
150
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumCameras; // number of camera data records to follow (4 bytes) </span></p>
151
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_camera</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Cameras[NumCameras]; // camera data (NumCameras * 16 bytes) </span></p>
152
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">NumFlyByCameras; // number of fly by camera data records to follow (4 bytes)</span></p>
153
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 fly by camera </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">FlyByCameras[NumFlyByCameras];// fly by camera data (NumFlyByCameras * 40 bytes)</span></p>
154
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumSoundSources; // number of sound source data records to follow (4 bytes) </span></p>
155
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_sound_source</span><span style="text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">SoundSources[NumSoundSources]; // sound source data (NumSoundSources * 16 bytes) </span></p>
156
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumBoxes; // number of box data records to follow (4 bytes) </span></p>
157
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_box</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Boxes[NumBoxes]; // box data (NumBoxes * 8 bytes) </span></p>
158
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumOverlaps; // number of overlap records to follow (4 bytes) </span></p>
159
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Overlaps[NumOverlaps]; // overlap data (NumOverlaps * 2 bytes) </span></p>
160
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">10*bit16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Zones[NumBoxes]; // zone data (NumBoxes * 20 bytes) </span></p>
161
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumAnimatedTextures; // number of animated texture records to follow (4 bytes) </span></p>
162
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> AnimatedTextures[NumAnimatedTextures]; // animated texture data (NumAnimatedTextures * 2 bytes) </span></p>
163
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">5*bitu8</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">TEX; "TEX" (5 bytes)</span></p>
164
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumObjectTextures; // number of object textures to follow (4 bytes)&nbsp; </span></p>
165
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_object_texture</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">ObjectTextures[NumObjectTextures]; // object texture list (NumObjectTextures * 40 bytes) </span></p>
166
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumItems; // number of items to follow (4 bytes) </span></p>
167
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_item</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> Items[NumItems]; // item list (NumItems * 24 bytes) </span></p>
168
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumCinematicFrames; // number of cinematic frame records to follow (4 bytes) </span></p>
169
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_cinematic_frame</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">CinematicFrames[NumCinematicFrames]; // (NumCinematicFrames * 24 bytes) </span></p>
170
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumDemoData; // number of demo data records to follow (2 bytes) </span></p>
171
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu8</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> DemoData[NumDemoData]; // demo data (NumDemoData bytes) </span></p>
172
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bit16</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> SoundMap[450]; // sound map (900 bytes) </span></p>
173
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumSoundDetails; // number of sound-detail records to follow (4 bytes) </span></p>
174
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr2_sample_info</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> SoundDetails[NumSoundDetails]; // sound-detail list (NumSoundDetails * 8 bytes) </span></p>
175
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> NumSampleIndices; // number of sample indices to follow (4 bytes) </span></p>
176
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#0000ff; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> SampleIndices[NumSampleIndices]; // sample indices (NumSampleIndices * 4 bytes) </span></p>
177
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
178
-</p>
179
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">//////////////////////////////////////////////////////</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">TR5 ROOMS</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">///////////////////////////////////////////////////////////////////////////////////////////</span></p>
180
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
181
-</p>
182
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">In TR5 the room format was drastically changed. The room itself is made up of 'sections'. These sections</span></p>
183
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">encompass a 3 block by 3 block grid (actually 3069 pixels by 3069 pixels ). I will refer to these sections as </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">layers</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">.</span></p>
184
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">Some 'rooms' do not actually contain visible mesh data. I will refer to these rooms as </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">null rooms</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">.&nbsp;</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span></p>
185
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
186
-</p>
187
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
188
-</p>
189
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure [ FIRST NUMBER IS OFFSET IN BYTES FROM START OF ROOM STRUCTURE]</span></p>
190
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
191
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">0&nbsp;&nbsp;&nbsp; bitu32 XELA; // "XELA" (4 bytes)</span></p>
192
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">4&nbsp;&nbsp;&nbsp; bitu32 RoomDataSize; // size of the following data ( use this vice 'walking thru' to get next room) (4 bytes)</span></p>
193
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">8&nbsp;&nbsp;&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
194
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">12&nbsp; bitu32 EndSDOffset; // usually this number +&nbsp; 216 will give you the offset from the start of the room data to the end</span></p>
195
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of the Sector Data. HOWEVER have seen where this bitu32 is equal to -1 so it is better</span></p>
196
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to use the following bitu32 and + 216 + ((NumXSectors * NumZSectors)*8) if you need</span></p>
197
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to obtain this information. (4 bytes)</span></p>
198
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">16&nbsp;&nbsp; bitu32 StartSDOffset; // this number + 216 will give you the offset from the start of the room to the start of the&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sector data. (4 bytes)</span></p>
199
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">20</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">&nbsp;&nbsp; </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu32 Seperator; // will either be 0x00000000 or 0xCDCDCDCD (4 bytes)</span></p>
200
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">24&nbsp;&nbsp; bitu32 EndPortalOffset; // this number + 216 will give you the offset from the start of the room to the end of the&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; portal data. (4 bytes)</span></p>
201
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">28&nbsp;&nbsp; bit32 x; // X position of room ( world coordinates) (4 bytes)</span></p>
202
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">32&nbsp;&nbsp; bit32 Seperator; // 0x00000000 (4 bytes)</span></p>
203
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">36&nbsp;&nbsp; bit32 z; // Z position of room (world coordinates) (4 bytes)</span></p>
204
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">40&nbsp;&nbsp; bit32 yBottom; // lowest point in room (4 bytes)</span></p>
205
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">44&nbsp;&nbsp; bit32 yTop; // highest point in room (4 bytes)</span></p>
206
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">48&nbsp;&nbsp; bitu16 NumZSectors; // sector table width (2 bytes)</span></p>
207
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">50&nbsp;&nbsp; bitu16 NumXSectors; // sector table height (2 bytes)</span></p>
208
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">52&nbsp;&nbsp; bitu32 RoomColor; // ARGB format (blue is least significant byte) (4 bytes)</span></p>
209
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">56&nbsp;&nbsp; bitu16 NumRoomLights; // number of lights in this room (2 bytes)</span></p>
210
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">58&nbsp;&nbsp; bitu16 NumRoomStaticMeshes; // number of static meshes in this room (2 bytes)</span></p>
211
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">60&nbsp;&nbsp; bitu16 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownR1</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // usually 0x0001 however high byte is sometimes non zero (2 bytes)</span></p>
212
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">62&nbsp;&nbsp; bitu16 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownR2</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // usually 0x0000 however low byte is sometimes non zero (2 bytes)</span></p>
213
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">64&nbsp;&nbsp; bitu32 Filler; // always 0x00007FFF (4 bytes)</span></p>
214
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">68&nbsp;&nbsp; bitu32 Filler2; // always 0x00007FFF (4 bytes)</span></p>
215
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">72&nbsp;&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
216
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">76&nbsp;&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
217
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">80&nbsp;&nbsp; 6*bitu8 Seperator; // 6 bytes 0xFF </span></p>
218
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">86&nbsp;&nbsp;</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> bitu16 RoomFlag</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // 0x01 = water, 0x20 = wind, others unknown (2 bytes)</span></p>
219
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">88&nbsp; bitu16 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownR5</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown (2 bytes)</span></p>
220
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">90&nbsp; 10*bitu8 Seperator; // 10 bytes 0x00</span></p>
221
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">100 bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
222
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">104 bitu32 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownR6</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown (4 bytes)</span></p>
223
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">108&nbsp; float RoomX; // X position of room in world coordinates * If&nbsp; null room then this data will be 0xCDCDCDCD (4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bytes)</span></p>
224
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">112&nbsp; bitu32 Seperator; // 0x00000000 or 0xCDCDCDCD if null room. (4 bytes)</span></p>
225
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">116&nbsp; float RoomZ; // Z position of room in world coordinates * If null room then will be bitu32 0xCDCDCDCD (4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bytes)</span></p>
226
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">120&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
227
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">124&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
228
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">128&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
229
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">132&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
230
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">136&nbsp; bitu32 Seperator; // 0x00000000 unless null room then 0xCDCDCDCD (4 bytes)</span></p>
231
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">140&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
232
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">144&nbsp; bitu32 NumRoomTriangles; // total number of triangles this room (4 bytes)</span></p>
233
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">148&nbsp; bitu32 NumRoomRectangles; // total number of rectangles this room (4 bytes)</span></p>
234
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">152&nbsp; bitu32 Seperator; // 0x00000000 (4 bytes) </span></p>
235
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">156&nbsp; bitu32 LightSize; //&nbsp; size of light data (number of lights * 88) (4 bytes)</span></p>
236
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">160&nbsp; bitu32 NumRoomLights; // total number of lights this room (4 bytes)</span></p>
237
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">164&nbsp; bitu32 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownR7</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown, usually equals 0, 1, 2, or 3 (4 bytes)</span></p>
238
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">168&nbsp; bit32 UnknownR8; // usually equals room yTop. Sometimes a few blocks off. If null room then 0xCDCDCDCD</span></p>
239
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">172&nbsp; bit32 lyBottom; // equals room yBottom. If null room then 0xCDCDCDCD (4 bytes)</span></p>
240
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">176&nbsp; bitu32 NumLayers; // number of layers (pieces) this room (4 bytes)</span></p>
241
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">180&nbsp; bitu32 LayerOffset; // this number + 216 will give you an offset from the start of the room data to the start of the&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer data (4 bytes)</span></p>
242
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">184&nbsp; bitu32 VerticesOffset; // this number + 216 will give you an offset from the start of the room data to the start of the</span></p>
243
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verex data (4 bytes)</span></p>
244
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">188&nbsp; bitu32 PolyOffset; // this number + 216 will give you an offset from the start of the room data to the start of the&nbsp;</span></p>
245
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rectangle/triangle data (4 bytes)</span></p>
246
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">192&nbsp; bitu32 PolyOffset2; // same as above ? (4 bytes)</span></p>
247
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">196&nbsp; bitu32 VerticesSize; // size of vertices data block (4 bytes)</span></p>
248
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">200&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
249
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">204&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
250
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">208&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
251
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">212&nbsp; bitu32 Seperator; // 0xCDCDCDCD (4 bytes)</span></p>
252
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">216&nbsp; </span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 lights[LightSize]</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // data for the lights (88 bytes * NumRoomLights) </span></p>
253
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">tr2 SectorData[(NumXSectors * NumZSectors) * 8]; // normal sector data structure</span></p>
254
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 NumDoors; // number of portals (2 bytes)</span></p>
255
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">tr2 room door[NumDoors]; // normal portal structure (32 bytes * NumDoors)</span></p>
256
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Seperator; // 0xCDCD (2 bytes)</span></p>
257
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">tr2 room static mesh[NumStaticMeshes]; // normal room static mesh structure (20 bytes * NumRoomStaticMeshes)</span></p>
258
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room layer[NumLayers]</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // data for the room layers (pieces) (56 bytes * NumLayers)</span></p>
259
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room polygons[NumRoomRectangles + NumRoomTriangles]</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // data for the room polys (face4 and face3).&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Structured as</span></p>
260
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first layers rectangles then triangles, followed by the next layers rectangles and triangles,</span></p>
261
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; etc., until all layers are done. (12 bytes each rectangle. 10 bytes each triangle)</span></p>
262
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room vertices[VerticesSize]</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // data for the room vertices. Structured as vertices for the first layer, then</span></p>
263
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vertices for the second layer, etc., until all layers are done. (28 bytes each</span></p>
264
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vertex.</span></p>
265
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
266
-</p>
267
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room</span></p>
268
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
269
-</p>
270
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room layer</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure (56 bytes)</span></p>
271
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
272
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">0&nbsp;&nbsp; bitu32 NumLayerVertices; // number of vertices in this layer (4 bytes)</span></p>
273
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">4&nbsp;&nbsp; bitu16 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownL1</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown (2 bytes)</span></p>
274
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">6&nbsp;&nbsp; bitu16 NumLayerRectangles; // number of rectangles in this layer (2 bytes)</span></p>
275
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">8&nbsp;&nbsp; bitu16 NumLayerTriangles; // number of triangles in this layer (2 bytes)</span></p>
276
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">10 bitu16 UnknownL2; // appears to be the number of 2 sided textures in this layer, however is sometimes 1 off (2 bytes)</span></p>
277
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">12 bitu16 Filler; // always 0 (2 bytes)</span></p>
278
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">14 bitu16 Filler2; // always 0 (2 bytes)</span></p>
279
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
280
-</p>
281
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">///////&nbsp; The following 6 floats (4 bytes each) define the bounding box for the layer //////////</span></p>
282
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">16 float LayerBoundingBoxX1; </span></p>
283
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">20 float LayerBoundingBoxY1;</span></p>
284
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">24 float LayerBoundingBoxZ1;</span></p>
285
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">28 float LayerBoundingBoxX2;</span></p>
286
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">32 float LayerBoundingBoxY2;</span></p>
287
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">36 float LayerBoundingBoxZ2;</span></p>
288
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
289
-</p>
290
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">40 bitu32 Filler3; // always 0 (4 bytes)</span></p>
291
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">44 bitu32 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownL6</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown (4 bytes)</span></p>
292
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">48 bitu32 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownL7</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown (4 bytes)</span></p>
293
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">52 bitu32 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownL8</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown. Always the same throughout the level. (4 bytes)</span></p>
294
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room layer</span></p>
295
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
296
-</p>
297
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 face4</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure (12 bytes)</span></p>
298
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
299
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Vertices[4]; // the values are the indices into the appropriate layer vertice list. (2 bytes each)</span></p>
300
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Texture; // the texture number for this face. Needs to be masked with 0xFFF as the high 4 bits are flags.(2 bytes)</span></p>
301
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownF4</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown (2 bytes)</span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span></p>
302
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room rectangle</span></p>
303
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
304
-</p>
305
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 face3 </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">structure (10 bytes)</span></p>
306
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
307
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Vertices[3]; // the values are the indices into the appropriate layer vertice list (2 bytes each)</span></p>
308
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Texture; // the texture number for this face. Needs to be masked with 0xFFF as the high 4 bits are flags (2 bytes)</span></p>
309
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bitu16 </span><span style="text-decoration: underline; text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">UnknownF3</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // unknown (2 bytes)</span></p>
310
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 room triangle</span></p>
311
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
312
-</p>
313
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 vertex</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure (28 bytes)</span></p>
314
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
315
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float x; // x of vertex (4 bytes)</span></p>
316
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float y; // y of vertex (4 bytes)</span></p>
317
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float z; // z of vertex (4 bytes)</span></p>
318
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float nx; // x of vertex normal (4 bytes)</span></p>
319
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float ny; // y of vertex normal (4 bytes)</span></p>
320
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float nz; // z of vertex normal (4 bytes)</span></p>
321
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 vColor; // vertex color ARGB format (4 bytes)</span></p>
322
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 vertex</span></p>
323
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
324
-</p>
325
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
326
-</p>
327
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 light </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">structure (88 bytes)</span></p>
328
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
329
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
330
-</p>
331
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// The following is preliminary info. Appears to be correct, however I'm having strange findings</span></p>
332
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// on some early testing. Proceed at your own risk on this one.</span></p>
333
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
334
-</p>
335
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// The first three floats specify the position of the light in world coordinates</span></p>
336
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// The sun type light should not use these but seems to have a large x value (9 million, give or take)</span></p>
337
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// a zero y value, and a small z value (4 - 20) in the original TR5 levels</span></p>
338
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
339
-</p>
340
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float x; // x position of light (4 bytes)</span></p>
341
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float y; // y position of light (4 bytes)</span></p>
342
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float z; // z position of light (4 bytes)</span></p>
343
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
344
-</p>
345
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// The next three specify the color of the light</span></p>
346
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
347
-</p>
348
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float Red; // color of red spectrum (4 bytes)</span></p>
349
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float Green; // color of green spectrum (4 bytes)</span></p>
350
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float Blue; // color of blue spectrum (4 bytes)</span></p>
351
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
352
-</p>
353
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// Another 'filler'</span></p>
354
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
355
-</p>
356
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 Seperator; // not used 0xCDCDCDCD (4 bytes)</span></p>
357
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
358
-</p>
359
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// At this point the following info diverges dependant on which type of light being used:</span></p>
360
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">// 0 = sun,&nbsp; 1 = light,&nbsp; 2 = spot,&nbsp; 3 = shadow</span></p>
361
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
362
-</p>
363
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp;&nbsp; The sun type doesn't use the next two.</span></p>
364
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp;&nbsp; For the spot type these are the hotspot and falloff angle cosines</span></p>
365
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp;&nbsp; For the light and shadow types these are the TR units for the hotspot/falloff (1024=1sector)</span></p>
366
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
367
-</p>
368
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float Input; // cosine of the IN value for light / size of IN value (4 bytes)</span></p>
369
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float Output; // cosine of the OUT value for light / size of OUT value (4 bytes)</span></p>
370
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
371
-</p>
372
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp; The next two are only used by the spot type light</span></p>
373
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
374
-</p>
375
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float RadInput; // (IN radians) * 2 (4 bytes)</span></p>
376
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float RadOutput; // (OUT radians) * 2 (4 bytes)</span></p>
377
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
378
-</p>
379
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp; The next is also only used by the spot type light</span></p>
380
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
381
-</p>
382
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float Range; // Range of light (4 bytes)</span></p>
383
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
384
-</p>
385
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">//	The final 3 floats are used only by the 'sun' and 'spot' type lights.</span></p>
386
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">//	They describe the directional vector of the light.</span></p>
387
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">//	This can be obtained by :</span></p>
388
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">//&nbsp;&nbsp;	if both x and y	LightDirectionVectorX = cosX * sinY </span></p>
389
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">//&nbsp;&nbsp;&nbsp;&nbsp;	LightDirectionVectorY = sinX</span></p>
390
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">//&nbsp;&nbsp;&nbsp;&nbsp;	LightDirectionVectorZ = cosX * cosY</span></p>
391
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//</span></p>
392
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
393
-</p>
394
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float DirectionVectorX; // light direction (4 bytes)</span></p>
395
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float DirectionVectorY; // light direction (4 bytes)</span></p>
396
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">float DirectionVectorZ; // light direction (4 bytes)</span></p>
397
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
398
-</p>
399
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp; The next six values repeat some of the previous information in long data types vice floats</span></p>
400
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
401
-</p>
402
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 x; // x position of light (4 bytes)</span></p>
403
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 y; // y position of light (4 bytes)</span></p>
404
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 z; // z position of light (4 bytes)</span></p>
405
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
406
-</p>
407
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp; 16384 = 1.0 for the rotations ( 1/16384 )</span></p>
408
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
409
-</p>
410
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 DirectionVectorX;&nbsp; // light direction (4 bytes)</span></p>
411
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 DirectionVectorY; // light direction (4 bytes)</span></p>
412
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 DirectionVectorZ; // light direction (4 bytes)</span></p>
413
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
414
-</p>
415
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp; The next char specifies the type of light as specified above</span></p>
416
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
417
-</p>
418
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu8 LightType; // type of light. (1 byte)</span></p>
419
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
420
-</p>
421
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">//&nbsp; Another filler</span></p>
422
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
423
-</p>
424
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">3*bitu8 Seperator; // 0xCDCDCD (3 bytes)</span></p>
425
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 light</span></p>
426
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
427
-</p>
428
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_object_texture</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">structure (40 bytes)</span></p>
429
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
430
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Attribute; //0, 1, or 2 (2 means 2 sided) (2 bytes)</span></p>
431
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 Tile; // need to mask with 0xFF as other bits are flags. ie bit15 seems to indicate triangle (4 bytes)</span></p>
432
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 object texture vert</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">; // Vertices[4] (16 bytes)</span></p>
433
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 UV1; // unknown how used (4 bytes)</span></p>
434
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 UV2; // unknown how used (4 bytes)</span></p>
435
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 Xsize; // unknown how used, x size (4 bytes)</span></p>
436
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 Ysize; // unknown how used, y size (4 bytes)</span></p>
437
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Seperator; // always 0x0000 (2 bytes)</span></p>
438
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_object_texture</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span></p>
439
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
440
-</p>
441
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 object texture vert</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure (4 bytes)</span></p>
442
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
443
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu8 Xcoordinate; // 0 if Xpixel is the low value, 255 if Xpixel is the high value in the object texture (1 byte)</span></p>
444
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu8 Xpixel; // (1 byte)</span></p>
445
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu8 Ycoordinate; // 0 if Ypixel is the low value, 255 if Ypixel is the high value in the object texture (1 byte)</span></p>
446
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu8 Ypixel; // (1 byte)</span></p>
447
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 object texture vert</span></p>
448
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
449
-</p>
450
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
451
-</p>
452
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 fly by camera</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure (40 bytes)</span></p>
453
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
454
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">bit32 CameraX; // x position of camera in world coordinates (4 bytes)</span></p>
455
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 CameraY; // y position of camera in world coordinates (4 bytes)</span></p>
456
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 CameraZ; // z&nbsp; position of camera in world coordinates (4 bytes)</span></p>
457
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
458
-</p>
459
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 TargetX; // x position of aiming point in world coordinates (4 bytes)</span></p>
460
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 TargetY; // y position of aiming point in world coordinates (4 bytes)</span></p>
461
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit32 TargetZ; // z&nbsp; position of aiming point in world coordinates (4 bytes)</span></p>
462
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
463
-</p>
464
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit8&nbsp; Sequence; // sequence # of camera (1 byte)</span></p>
465
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bit8&nbsp; CameraNumber; // camera # (1 byte)</span></p>
466
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
467
-</p>
468
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 FOV; // fov of camera ( .0054945 for each degree ) (2 bytes)</span></p>
469
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Roll; // roll of camera ( .0054945 for each degree ) (2 bytes)</span></p>
470
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
471
-</p>
472
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Timer; // timer number (2 bytes)</span></p>
473
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Speed; // ( .000015259 each ) (2 bytes)</span></p>
474
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu16 Flags; // ( see your handy TRLE manual for the specs ) (2 bytes)</span></p>
475
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">bitu32 Room; // room number (4 bytes)</span></p>
476
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 fly by camera</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span></p>
477
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
478
-</p>
479
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
480
-</p>
481
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 moveable</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure ( 20 bytes ) ( same as old structure but has bitu16 filler at the end )</span></p>
482
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
483
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu32 ObjectId; // object identifier ( matched in Items[] )</span></p>
484
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16 NumMeshes; // number of meshes in this object&nbsp;</span></p>
485
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16 StartingMesh; // starting mesh ( offset into MeshPointers[] )&nbsp;</span></p>
486
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu32 MeshTree; // offset into MeshTree[] )</span></p>
487
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu32 FrameOffset; // byte offset into Frames[] ( divide by 2 for Frames[i] )</span></p>
488
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16 Animation; // offset into Animations[]</span></p>
489
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16 Filler; // always equal to 65519 ( 0xFFEF )</span></p>
490
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 moveable</span></p>
491
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
492
-</p>
493
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 animation</span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> structure ( 40 bytes ) ( same as old structure but has 8 bytes before FrameStart )</span></p>
494
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">{</span></p>
495
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu32&nbsp; FrameOffset; // byte offset into Frames[] ( divide by 2 for Frames[i] )</span></p>
496
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu8&nbsp;&nbsp;&nbsp; FrameRate; // Engine ticks per frame</span></p>
497
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu8&nbsp;&nbsp;&nbsp; FrameSize; // number of bit16's in Frames[] used by this animation</span></p>
498
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; StateId; //&nbsp;</span></p>
499
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bit16&nbsp;&nbsp;&nbsp; Unknown;</span></p>
500
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bit16&nbsp;&nbsp;&nbsp; Speed; // Evengi Popov found this but I never seen what he said it was for</span></p>
501
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; AccelLo; // same as above</span></p>
502
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bit16&nbsp;&nbsp;&nbsp; AccelHi; // same as above</span></p>
503
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu8&nbsp;&nbsp;&nbsp; AUnknown[8]; // Unknown</span></p>
504
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; FrameStart; // first frame in this animation</span></p>
505
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; FrameEnd; // last frame in this animation ( numframes = ( End - Start) + 1 )</span></p>
506
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; NextAnimation;</span></p>
507
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; NextFrame;</span></p>
508
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; NumStateChanges;</span></p>
509
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; StateChangeOffset; // offset into StateChanges[]</span></p>
510
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; NumAnimCommands; // how many of them to use</span></p>
511
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">&nbsp;&nbsp;&nbsp; bitu16&nbsp; AnimCommand; // offset into AnimCommand[]</span></p>
512
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">}</span><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5 animation</span></p>
513
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
514
-</p>
515
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
516
-</p>
517
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
518
-</p>
519
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-position: ; color:#000000; font-family: 'Times New Roman'; font-size: 12.000000pt">/////////////////////////// The following structures have changed from the TR3 version //////////////////////</span></p>
520
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
521
-</p>
522
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><span style="text-decoration: underline; text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">tr5_cinematic_frame</span><span style="text-position: ; color:#ff0000; font-family: 'MS Sans Serif'; font-size: 10.000000pt"> </span><span style="text-position: ; color:#000000; font-family: 'MS Sans Serif'; font-size: 10.000000pt">now 24 bytes vice 16 bytes. Unknown how format was changed.</span></p>
523
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
524
-</p>
525
-<p class="Default" style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
526
-</p>
527
-<p style="text-align: left; margin-bottom: 0.0000in; margin-top: 0.0000in; margin-right: 0.0000in"><br>
528
-</p>
529
-</div>
530
-</body>
531
-</html>

+ 0
- 116
doc/TR5-Format.txt Прегледај датотеку

@@ -1,116 +0,0 @@
1
-
2
-TR4:
3
-* amount_cinematic_frames is bitu32, not bitu16
4
-* object_texture last 2 longs are xsize and ysize of texture
5
-* object_texture::
6
-I gess that in TR4 files the object textures Id used for the movables are the same used in the WAD file.
7
-The object texture is interpreted some different,
8
-
9
-
10
-First word in the texture ID:
11
-
12
-for rectangles in model:
13
-
14
-Bits 0-11 texture Id (signed) if negative the texture is fliped.
15
-Bits 12-15 unused, (0000 if Id is positive, 1111 if negative)
16
-
17
-for Triangles in model:
18
-
19
-Bits 0-11 texture Id (always positive)
20
-Bits 12-14 Triangle kind.
21
-Bits 15 normal/flip
22
-
23
-for secound word:
24
-
25
-0= texture opaque
26
-1=texture semi-transparent
27
-2=transparent.
28
-
29
-TR5:
30
-* object_textures are now 40 bytes
31
-* after "SPR" is an unknown byte
32
-* before "TEX" is an unknown byte
33
-* moveable after each is unknown int 
34
-* object_texture last 2 longs are xsize and ysize of texture
35
-
36
-
37
-/////////////////////////////////////
38
-//  TR5 Format
39
-/////////////////////////////////////
40
-
41
-
42
-unsigned long Version
43
-unsigned char Unknown[6]
44
-
45
-
46
-// 32 bits textures
47
-unsigned long UCompSize
48
-unsigned long CompSize
49
-unsigned char *CompData
50
-
51
-// 16 bits textures
52
-unsigned long UCompSize
53
-unsigned long CompSize
54
-unsigned char *CompData
55
-
56
-// Sprite textures
57
-unsigned long UCompSize
58
-unsigned long CompSize
59
-unsigned char *CompData
60
-
61
-unsigned char Unknown[44]
62
-unsigned int NumRooms
63
-
64
-
65
-// Rooms
66
-// All rooms start with the following header:
67
-
68
-unsigned int Unknown
69
-unsigned long RoomCode (0x0414C4558)
70
-unsigned char Unknowm[24]
71
-
72
-// After the header comes the following format:
73
-
74
-unsigned long RoomX
75
-unsigned long Unknown (Maybe RoomY?)
76
-unsigned long RoomZ
77
-unsigned long Unknown[2]
78
-unsigned int XSize
79
-unsigned int ZSize
80
-
81
-// The room color. It uses 4 bytes and it's in RGB format (I don't know what byte 4 is)
82
-TR_Color4 RoomColor
83
-
84
-// After here comes a unknown format that contains the number of static meshes, vertices,
85
-// rectangles and more. They uses 30 bytes, but 28 are unknown for me. There is maybe a
86
-// pointer to the 'real' structure, or maybe a special code like the RoomCode. (It looks
87
-// like TR5 uses come sort of chunks)
88
-
89
-
90
-// Static Meshes
91
-unsigned int Unknown
92
-unsigned int NumStaticMeshes
93
-unsigned char Unknown[26]
94
-
95
-// Vertices
96
-unsigned int Unknown
97
-unsigned int NumVertices
98
-unsigned char Unknown[26]
99
-
100
-// Unknown, but format looks the same. Sometimes 0 and sometimes very large (Maybe the
101
-// value is signed?).
102
-unsigned int Unknown
103
-unsigned int Unknown
104
-unsigned char Unknown[26]
105
-
106
-// Rectangles
107
-unsigned int Unknown
108
-unsigned int NumVertices
109
-unsigned char Unknown[26]
110
-
111
-
112
-// This is all I know! I can see the sectors, but there are many unknown before it. A way 
113
-// to search for the sectors is searching for a value of 129 (A wall). The sectors uses
114
-// 8 bytes for each sector. Use XSize and ZSize to read it and remember that the four
115
-// corners must be a wall (129, 5th byte). If you search for the 4 corners with a value of
116
-// 129 (byte 7 is 129 too), the change that you find it is very large.

+ 0
- 344
doc/TR5-Notes.txt Прегледај датотеку

@@ -1,344 +0,0 @@
1
-// Mongoose, Terms in this file related to what we use:
2
-//  Int   :  unsigned short  : bitu16
3
-//  Dword :  unsigned int    : bitu32
4
-//
5
-// Also, I'm appending TP's findings to the format
6
-
7
-*******************************************************
8
-      TR4 Possible File Format
9
-rgbold March '01
10
-
11
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
12
-
13
-Dword "TR4",0
14
-Int   number of RoomTextures?
15
-Int   number of OtherTextures?
16
-Int   number of BumpMapTextures?
17
-Dword UncompressedSize1
18
-Dword CompressedSize1
19
-TextureBlock1
20
-Dword UncompressedSize2
21
-Dword CompressedSize2
22
-TextureBlock2
23
-Dword UncompressedSize3
24
-Dword CompressedSize3
25
-TextureBlock3
26
-
27
-/// Other data follows after textures structures are same as TR3 except
28
-    where noted
29
-
30
-NOTES:
31
-Texture needs to be masked with 0xfff (high 4 bits are flags)
32
-
33
-
34
-Room Lights now 46 bytes:
35
-
36
-TR4_RoomLight //
37
-  //Follows a D3D light structure, I think, could be wrong
38
-
39
-  Dword Xposition  // world coords
40
-  Dword Yposition  // world coords
41
-  Dword Zposition  // world coords
42
-  TR2_Color        // three bytes rgb values
43
-  bitu8 LightType  // same as D3D (i.e. 2 is for spotlight)
44
-  bitu8 unknown    // always 0xff?
45
-  byte  Intensity
46
-  float In
47
-  float Out
48
-  float Length
49
-  float Cutoff
50
-  floats X,Y,Z    //direction??
51
-
52
-
53
-Before SoundSources is a new field for Flyby_Camera data
54
-bitu32 Number_of_FBCameras
55
-followed by data for each camera. Data field is 40 bytes.
56
-[Andy had previously stated NumXYZ as a new field incorrectly.
57
-His NumXYZ field was the SoundSources in normal structure format]
58
-
59
-
60
-Cinematic Frames now 24 bytes
61
-
62
-There are no colored rectangles or triangles in mesh data.
63
-Mesh Rectangles and Triangles now
64
-  MeshRects: v0,v1,v2,v3,texture,int unknown
65
-  MeshTris:  v0,v1,v2,texture,int unknown
66
-Texture Objects now preceeded by TEX/0 (4bytes)
67
-Object Textures now 38 bytes vice 20
68
-Tile is now a bitu32 vice bitu16 seems need to mask with 0xff as other
69
-       bits are flags. Seems bit15 set means triangle.
70
-In the texture coords now 0 is used for low value vice 1
71
-The extra 16 bytes are at the end of ObjectTexture structure
72
-
73
-Attributes using 1 or 2 for transparent. 2 used for 2 sided textures
74
-               (water surface,etc)
75
-
76
-
77
-Animation now 40 vice 32 bytes. extra 8 seem to be zero right before
78
-/after the old 8 unknowns
79
-
80
-"SPR"  3 byte ascii before sprite textures
81
-
82
-There are no 8bit or 16 bit palettes (no colored rects or tris)
83
-No lightmap
84
-No 8bit textures
85
-Following level data are Riff Wave Formats.
86
-
87
-Lara 2 meshes , skin and joints.
88
-
89
-
90
-
91
-#############################################################################
92
-#
93
-#        TR5 Possible File Format
94
-#        rgbold March '01
95
-#
96
-#############################################################################
97
-
98
-
99
-// Header ///////////////////
100
-Dword "TR4",0
101
-
102
-// Textures /////////////////
103
-Int   number of RoomTextures?
104
-Int   number of OtherTextures?
105
-Int   number of BumpMapTextures?
106
-Dword UncompressedSize1
107
-Dword CompressedSize1
108
-TextureBlock1
109
-Dword UncompressedSize2
110
-Dword CompressedSize2
111
-TextureBlock2
112
-Dword UncompressedSize3
113
-Dword CompressedSize3
114
-TextureBlock3
115
-
116
-/// Follows after textures
117
-
118
-
119
-32 bytes unknown //mostly zero
120
-Dword SizeData    // size of file to Riffs
121
-Dword SizeData    // repeat of above
122
-Dword Unknown     // seems always zero
123
-Dword NumberRooms // number of rooms this level
124
-
125
-{ Following Repeats for each Room in level
126
-
127
-Dword "XELA" (someone named Alex or "dirX Enhanced Level Archive"
128
-Dword size //size to next XELA block
129
-Dword CDCDCDCD
130
-
131
-Block1 60 bytes
132
-{
133
-
134
-Dword ublock1 //mostly: start of "XELA" +216 + ublock1 = FD end,
135
-                but have seen 0xffffffff. Better using next data
136
-                and compute FD size the old way of X*Z*8
137
-Dword ublock2 //  start of "XELA" + 216 + ublock2 = FD start
138
-Dword ublock3 // unknown
139
-Dword ublock4 // possibly start of "XELA" + 216 + ublock4 = end portals
140
-
141
-Dword Room X      // room's x position in world coords
142
-Dword unknown1    // always seems to be 0000
143
-Dword Room Z      // room's z position in world coords
144
-Dword Ybottom     // room's y bottom positon in world coords
145
-Dword Ytop        // room's y top positon in world coords
146
-
147
-Int  NumZSectors // number of z sectors
148
-Int  NumXSectors // number of x sectors
149
-
150
-tr2_color4        // 4 bytes color info rgba
151
-
152
-Int  NumLights
153
-Int  NumStaticMeshes
154
-
155
-Dword Unknown2    // seems always 0x0001
156
-Dword Unknown3    // seems always 0x7fff
157
-Dword Unknown4    // seems always 0x7fff
158
-
159
-}close 60 byte block
160
-
161
-Dword CDCDCDCD
162
-Dword CDCDCDCD
163
-
164
-20 byte block
165
-{
166
-6 bytes 0xff
167
-Int Room_Flag    //room attributes (rain,etc)
168
-Int unknown5
169
-10 bytes 0x00
170
-} close 20 byte block
171
-
172
-Dword CDCDCDCD
173
-
174
-16 byte block
175
-{
176
-unknown 16 bytes
177
-}close 16 byte block
178
-
179
-Dword CDCDCDCD
180
-Dword CDCDCDCD
181
-Dword CDCDCDCD
182
-Dword CDCDCDCD
183
-
184
-Dword Unknown6
185
-
186
-Dword CDCDCDCD
187
-
188
-56 byte block
189
-{
190
-Dword NumberTriangles
191
-Dword NumberRectangles
192
-Dword Unknown7 // always 0x0000 ??
193
-Dword LightSize // number lights times 88 bytes
194
-Dword NumberLights
195
-Dword NumUnknown_36_byte_struct
196
-Dword Unknown9
197
-Dword Unknown10
198
-Dword NumberLayers //TR5 'layers' room pieces
199
-Dword Unknown11    // start of "XELA" + 216 + Unknown11 = start of 
200
-layer 
201
-info
202
-Dword Unknown12    // start of "XELA" + 216 + Unknown12 = start of 
203
-vertices
204
-Dword Unknown13    // start of "XELA" + 216 + Unknown13 = start of 
205
-rect/tri
206
-Dword Unknown14    // same as Unknown13???
207
-Dword Unknown15    // start of vertices + Unknown15 = start of next 
208
-"XELA"
209
-}close 56 byte block
210
-
211
-Dword CDCDCDCD
212
-Dword CDCDCDCD
213
-Dword CDCDCDCD
214
-Dword CDCDCDCD
215
-
216
-// Lights //////////////////////////
217
-if lights then 85 bytes light data followed by CDCDCD for each light
218
-
219
-// Unknown /////////////////////////
220
-if NumUnknown_36_byte_struct then read them too
221
-
222
-// Sectors /////////////////////////
223
-Sector Data (sectors times 8 bytes) normal sector data structure
224
-
225
-// Portals /////////////////////////
226
-Int NumberDoors
227
-
228
-NumberDoors times 32 bytes (normal portal structure)
229
-
230
-Int CDCD
231
-
232
-// Static meshes //////////////////
233
-if StaticMeshes than numberofstatics times 20 bytes each (normal 
234
-structure)
235
-
236
-
237
-// Layers ////////////////////////
238
-Layer Data blocks. 56 bytes each.
239
-{
240
-   Dword NumberVertices
241
-   Int  Unknown16
242
-   Int  NumberRectangles
243
-   Int  NumberTriangles
244
-
245
-   unknown 46 bytes // was 48 in older docs
246
-
247
-}close Layer Data block
248
-
249
-following the Layer Data block are:
250
-  rectangles for Layer1 // see format under NOTES
251
-  triangles  for Layer1 // see format under NOTES
252
-  rectangles for Layer2
253
-  triangles  for Layer2
254
-
255
-  ...and so on untill all layers are done
256
-
257
-after the rectangle and triangle information are the room vertices
258
-which are described under NOTES
259
-
260
-
261
-}Close Rooms Loop
262
-
263
-
264
-NOTES:
265
-
266
-Room Vertices are 28 bytes each
267
-3 floats representing the x,y,z values of vertex
268
-3 floats probably the vertex normals
269
-1 DWORD  probably diffuse color for the vertex
270
-
271
-Rectangles are same old format of V0,V1,V2,V3,Texture, followed by
272
-Int unknown, usually zero.
273
-Texture needs to be masked with 0xfff (high 4 bits are flags)
274
-
275
-Triangles are same old format of V0,V1,V2,Texture, followed by
276
-Int unknown, usually zero.
277
-Texture needs to be masked with 0xfff (high 4 bits are flags)
278
-
279
-TR5 uses D3D extensively. The light format is a prime example. The last
280
-byte in the light field before the CDCDCD is the light type which in
281
-D3d is 1,2, or 3 for point, spot, or directional lights respectively.
282
-Also somewhere in the unknowns must be the fog values.
283
-
284
-Sound Map is now 900 bytes
285
-
286
-Before SoundSources is a new field for Flyby_Camera data
287
-bitu32 Number_of_FBCameras
288
-followed by data for each camera. Data field is 40 bytes.
289
-[Andy had previously stated NumXYZ as a new field incorrectly.
290
-His NumXYZ field was the SoundSources in normal structure format]
291
-
292
-
293
-Cinematic Frames now 24 bytes
294
-
295
-There are no colored rectangles or triangles in mesh data.
296
-Mesh Rectangles and Triangles now same format as room rects and tris,
297
-MeshRects: v0,v1,v2,v3,texture,int unknown
298
-MeshTris:  v0,v1,v2,texture,int unknown
299
-Texture Objects now preceeded by TEX/0 (4bytes)
300
-Object Textures now 38 bytes vice 20
301
-Tile is now a bitu32 vice bitu16 seems need to mask with 0xff as other
302
-       bits are flags. Seems bit15 set means triangle.
303
-In the texture coords now 0 is used for low value vice 1
304
-The extra 16 bytes at the end of ObjectTexture structure are 4 Dword
305
-       coords, UV?.
306
-Attributes using 1 or 2 for transparent. 2 used for 2 sided textures
307
-               (water surface,etc)
308
-
309
-
310
-Animation now 40 vice 32 bytes. extra 8 seem to be zero right before
311
-/after the old 8 unknowns
312
-
313
-"SPR"  3 byte ascii before sprite textures
314
-
315
-As TR4 there are no 8bit or 16 bit palettes (no colored rects or tris)
316
-No lightmap
317
-No 8bit textures
318
-3 blocks of zlib compressed textures (32bit,16bit,sprite/misc)before
319
-level data.
320
-Level data not compressed.
321
-
322
-Following level data are Riff Wave Formats.
323
-
324
-Lara 2 meshes as TR4, skin and joints.
325
-
326
-also , I was just reading thru the rectanges and triangles and
327
-thought the vertices always followed right after but appears
328
-that sometimes there is a 'pad' int of 0xCDCD.
329
-
330
-
331
-  Also as Michiel has just posted the Object Textures for TR5 are
332
-40bytes, sorry about that.
333
-
334
-
335
-
336
-
337
-
338
-
339
-************************************************************
340
-
341
-          Good Luck,
342
-                       Roy...
343
-
344
-

+ 0
- 263
doc/TR5.spec Прегледај датотеку

@@ -1,263 +0,0 @@
1
-/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
2
-#############################################################################
3
-#
4
-#  TR5 File Format?
5
-#  rgbold, Turbo Pascal, and Mongoose spec merge
6
-#
7
-#  NOTES: 
8
-#  I use ISO style types to be more clear, not word sizes
9
-#       
10
-#     Int   :  unsigned short  : bitu16
11
-#     Dword :  unsigned int    : bitu32
12
-#
13
-#  Some other markers?  I think these may be:
14
-#  
15
-#  58 50 50 FF    "XPP."   |  "PPX"
16
-#  58 50 48 FF    "XPH."   |  "HPX"
17
-#  50 50 48 FF    "PPH."   |  "PPH"
18
-#
19
-#  They appear in a patern like:
20
-#  ALEX
21
-#     XPP XPP ...
22
-#  ALEX
23
-#  
24
-#
25
-#  - Mongoose
26
-#
27
-# Room Vertices are 28 bytes each
28
-# 3 floats representing the x,y,z values of vertex
29
-# 3 floats probably the vertex normals
30
-# 1 DWORD  probably diffuse color for the vertex
31
-# 
32
-# Rectangles are same old format of V0,V1,V2,V3,Texture, followed by
33
-# Int unknown, usually zero.
34
-# Texture needs to be masked with 0xfff (high 4 bits are flags)
35
-# 
36
-# Triangles are same old format of V0,V1,V2,Texture, followed by
37
-# Int unknown, usually zero.
38
-# Texture needs to be masked with 0xfff (high 4 bits are flags)
39
-# 
40
-# TR5 uses D3D extensively. The light format is a prime example. The last
41
-# byte in the light field before the CDCDCD is the light type which in
42
-# D3d is 1,2, or 3 for point, spot, or directional lights respectively.
43
-# Also somewhere in the unknowns must be the fog values.
44
-# 
45
-# Sound Map is now 900 bytes
46
-# 
47
-# Before SoundSources is a new field for Flyby_Camera data
48
-# bitu32 Number_of_FBCameras
49
-# followed by data for each camera. Data field is 40 bytes.
50
-# [Andy had previously stated NumXYZ as a new field incorrectly.
51
-# His NumXYZ field was the SoundSources in normal structure format]
52
-# 
53
-# 
54
-# Cinematic Frames now 24 bytes
55
-# 
56
-# There are no colored rectangles or triangles in mesh data.
57
-# Mesh Rectangles and Triangles now same format as room rects and tris,
58
-# MeshRects: v0,v1,v2,v3,texture,int unknown
59
-# MeshTris:  v0,v1,v2,texture,int unknown
60
-# Texture Objects now preceeded by TEX/0 (4bytes)
61
-# Object Textures now 38 bytes vice 20
62
-# Tile is now a bitu32 vice bitu16 seems need to mask with 0xff as other
63
-#        bits are flags. Seems bit15 set means triangle.
64
-# In the texture coords now 0 is used for low value vice 1
65
-# The extra 16 bytes at the end of ObjectTexture structure are 4 Dword
66
-#        coords, UV?.
67
-# Attributes using 1 or 2 for transparent. 2 used for 2 sided textures
68
-#                (water surface,etc)
69
-# 
70
-# 
71
-# Animation now 40 vice 32 bytes. extra 8 seem to be zero right before
72
-# /after the old 8 unknowns
73
-# 
74
-# "SPR"  3 byte ascii before sprite textures
75
-# 
76
-# As TR4 there are no 8bit or 16 bit palettes (no colored rects or tris)
77
-# No lightmap
78
-# No 8bit textures
79
-# 3 blocks of zlib compressed textures (32bit,16bit,sprite/misc)before
80
-# level data.
81
-# Level data not compressed.
82
-# 
83
-# Following level data are Riff Wave Formats.
84
-# 
85
-# Lara 2 meshes as TR4, skin and joints.
86
-# 
87
-# also , I was just reading thru the rectanges and triangles and
88
-# thought the vertices always followed right after but appears
89
-# that sometimes there is a 'pad' int of 0xCDCD.
90
-# 
91
-# 
92
-# Also as Michiel has just posted the Object Textures for TR5 are
93
-# 40bytes, sorry about that.
94
-#  - Roy
95
-#
96
-#############################################################################
97
-
98
-
99
-uint32 version;                   //  Will be "TR4\0" for valid header
100
-
101
-// Textures /////////////////
102
-bitu16 num_room_textures
103
-bitu16 number of num_other_textures
104
-bitu16 number of num_bump_map_textures
105
-bitu32 UncompressedSize1
106
-bitu32 CompressedSize1
107
-TextureBlock1
108
-bitu32 UncompressedSize2
109
-bitu32 CompressedSize2
110
-TextureBlock2
111
-bitu32 UncompressedSize3
112
-bitu32 CompressedSize3
113
-TextureBlock3
114
-
115
-/// Follows after textures
116
-
117
-
118
-32 bytes unknown //mostly zero
119
-bitu32 SizeData    // size of file to Riffs
120
-bitu32 SizeData    // repeat of above
121
-bitu32 Unknown     // seems always zero
122
-bitu32 NumberRooms // number of rooms this level
123
-
124
-{ Following Repeats for each Room in level
125
-
126
-bitu32 "XELA" (someone named Alex or "dirX Enhanced Level Archive"
127
-bitu32 size //size to next XELA block
128
-bitu32 CDCDCDCD
129
-
130
-Block1 60 bytes
131
-{
132
-
133
-bitu32 ublock1 //mostly: start of "XELA" +216 + ublock1 = FD end,
134
-                but have seen 0xffffffff. Better using next data
135
-                and compute FD size the old way of X*Z*8
136
-bitu32 ublock2 //  start of "XELA" + 216 + ublock2 = FD start
137
-bitu32 ublock3 // unknown
138
-bitu32 ublock4 // possibly start of "XELA" + 216 + ublock4 = end portals
139
-
140
-bitu32 Room X      // room's x position in world coords
141
-bitu32 unknown1    // always seems to be 0000
142
-bitu32 Room Z      // room's z position in world coords
143
-bitu32 Ybottom     // room's y bottom positon in world coords
144
-bitu32 Ytop        // room's y top positon in world coords
145
-
146
-Int  NumZSectors // number of z sectors
147
-Int  NumXSectors // number of x sectors
148
-
149
-tr2_color4        // 4 bytes color info rgba
150
-
151
-Int  NumLights
152
-Int  NumStaticMeshes
153
-
154
-bitu32 Unknown2    // seems always 0x0001
155
-bitu32 Unknown3    // seems always 0x7fff
156
-bitu32 Unknown4    // seems always 0x7fff
157
-
158
-}close 60 byte block
159
-
160
-bitu32 CDCDCDCD
161
-bitu32 CDCDCDCD
162
-
163
-20 byte block
164
-{
165
-6 bytes 0xff
166
-Int Room_Flag    //room attributes (rain,etc)
167
-Int unknown5
168
-10 bytes 0x00
169
-} close 20 byte block
170
-
171
-bitu32 CDCDCDCD
172
-
173
-16 byte block
174
-{
175
-unknown 16 bytes
176
-}close 16 byte block
177
-
178
-bitu32 CDCDCDCD
179
-bitu32 CDCDCDCD
180
-bitu32 CDCDCDCD
181
-bitu32 CDCDCDCD
182
-
183
-bitu32 Unknown6
184
-
185
-bitu32 CDCDCDCD
186
-
187
-56 byte block
188
-{
189
-bitu32 NumberTriangles
190
-bitu32 NumberRectangles
191
-bitu32 Unknown7 // always 0x0000 ??
192
-bitu32 LightSize // number lights times 88 bytes
193
-bitu32 NumberLights
194
-bitu32 NumUnknown_36_byte_struct
195
-bitu32 Unknown9
196
-bitu32 Unknown10
197
-bitu32 NumberLayers //TR5 'layers' room pieces
198
-bitu32 Unknown11    // start of "XELA" + 216 + Unknown11 = start of 
199
-layer 
200
-info
201
-bitu32 Unknown12    // start of "XELA" + 216 + Unknown12 = start of 
202
-vertices
203
-bitu32 Unknown13    // start of "XELA" + 216 + Unknown13 = start of 
204
-rect/tri
205
-bitu32 Unknown14    // same as Unknown13???
206
-bitu32 Unknown15    // start of vertices + Unknown15 = start of next 
207
-"XELA"
208
-}close 56 byte block
209
-
210
-bitu32 CDCDCDCD
211
-bitu32 CDCDCDCD
212
-bitu32 CDCDCDCD
213
-bitu32 CDCDCDCD
214
-
215
-// Lights //////////////////////////
216
-if lights then 85 bytes light data followed by CDCDCD for each light
217
-
218
-// Unknown /////////////////////////
219
-if NumUnknown_36_byte_struct then read them too
220
-
221
-// Sectors /////////////////////////
222
-Sector Data (sectors times 8 bytes) normal sector data structure
223
-
224
-// Portals /////////////////////////
225
-Int NumberDoors
226
-
227
-NumberDoors times 32 bytes (normal portal structure)
228
-
229
-Int CDCD
230
-
231
-// Static meshes //////////////////
232
-if StaticMeshes than numberofstatics times 20 bytes each (normal 
233
-structure)
234
-
235
-
236
-// Layers ////////////////////////
237
-Layer Data blocks. 56 bytes each.
238
-{
239
-   bitu32 NumberVertices
240
-   Int  Unknown16
241
-   Int  NumberRectangles
242
-   Int  NumberTriangles
243
-
244
-   unknown 46 bytes // was 48 in older docs
245
-
246
-}close Layer Data block
247
-
248
-following the Layer Data block are:
249
-  rectangles for Layer1 // see format under NOTES
250
-  triangles  for Layer1 // see format under NOTES
251
-  rectangles for Layer2
252
-  triangles  for Layer2
253
-
254
-  ...and so on untill all layers are done
255
-
256
-after the rectangle and triangle information are the room vertices
257
-which are described under NOTES
258
-
259
-
260
-}Close Rooms Loop
261
-
262
-
263
-

+ 0
- 7012
doc/TRosettaStone.html
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 0
- 82
doc/ankrace.notes Прегледај датотеку

@@ -1,82 +0,0 @@
1
-Mesh list from ang_race.tr4  ( heads may be for lip syncing )
2
-
3
-I examined the meshes in my Freyja modeler and asmebled them
4
-to identify them.  -- Mongoose
5
-
6
-00 - lara small torso w/ pack
7
-..
8
-29 - "    "     "  "   ( error? )
9
-30 - lara hips w/ belt
10
-31 - lara thigh ( left? )
11
-32 - lara lower leg ( left? )
12
-33 - lara shoe ( left? )
13
-34 - lara thigh ( right? )
14
-35 - lara lower leg ( right? )
15
-36 - lara shoe ( right? )
16
-37 - lara torso w/o pack
17
-38 - lara upper arm ( right )
18
-39 - lara lower arm ( right )
19
-40 - lara hand ( right )
20
-41 - lara upper arm ( left )
21
-42 - lara lower arm ( left )
22
-43 - lara hand ( left )
23
-44 - lara head
24
-45 - lara 'plate of skin thingy'
25
-46 - lara part of pants ring ( left? )
26
-47 - lara knee ( left? )
27
-48 - lara small boot ring ( left? )
28
-49 - lara part of pants ring ( right? )
29
-50 - lara knee ( right? )
30
-51 - lara small boot ring ( right? )
31
-52 - lara midriff
32
-53 - lara shoulder ( left? )      -- was right
33
-54 - lara elbow ( left? )      -- was right
34
-55 - lara wrist ( left? )      -- was right
35
-56 - lara shoulder ( right? )
36
-57 - lara elbow ( right? )
37
-58 - lara wrist ( right? )
38
-59 - lara neck
39
-60 - lara torso ( seems to be sized for game model )
40
-61 - lara another small torso ( error? )
41
-..
42
-73 - " " " " ( error? )
43
-74 - lara head ( gnashing teeth )
44
-75 - lara another small torso ( error? )
45
-..
46
-88 - " " " " ( error? )
47
-89 - lara head ( puzzled look? )
48
-90 - lara another small torso ( error? )
49
-..
50
-103 - " " " " ( error? )
51
-104 - lara head ( happy look? )
52
-105 - lara another small torso ( error? )
53
-..
54
-118 - " " " " ( error? )
55
-119 - lara head ( 'sshha' look? )
56
-120 - lara another small torso ( error? )
57
-..
58
-133 - " " " " ( error? )
59
-134 - lara head ( mouth closed )
60
-135 - lara another small torso ( error? )
61
-..
62
-155 - " " " " ( error? )
63
-156 - von croy head ( mouth closed )
64
-157 - lara another small torso ( error? )
65
-..
66
-180 - " " " " ( error? )
67
-181 - von croy head ( mouth open )
68
-182 - lara another small torso ( error? )
69
-..
70
-184 - " " " " ( error? )
71
-185 - lara ponytail ( 1, Added to head )
72
-186 - lara ponytail ( 2 )
73
-187 - lara ponytail ( 3 )
74
-188 - lara ponytail ( 4 )
75
-189 - lara ponytail ( 5, ends with band )
76
-190 - lara ponytail ( 6, end of ponytail )
77
-191 - von croy hat brim?
78
-192 - von croy upper leg ( left? )
79
-193 - von croy lower leg ( left? )
80
-194 - von croy foot ( left? )
81
-
82
-Stopped here - goes to 526

+ 2
- 2
mac_dist/Info.plist Прегледај датотеку

@@ -11,7 +11,7 @@
11 11
         <key>CFBundleIconFile</key>
12 12
         <string>openraider.icns</string>
13 13
         <key>CFBundleIdentifier</key>
14
-        <string>org.xythobuz.openraider</string>
14
+        <string>de.xythobuz.openraider</string>
15 15
         <key>CFBundleInfoDictionaryVersion</key>
16 16
         <string>6.0</string>
17 17
         <key>CFBundleLongVersionString</key>
@@ -29,6 +29,6 @@
29 29
         <key>CSResourcesFileMapped</key>
30 30
         <true/>
31 31
         <key>NSHumanReadableCopyright</key>
32
-        <string>Copyright 2013</string>
32
+        <string>Copyright 2001 - 2013</string>
33 33
 </dict>
34 34
 </plist>

mac_dist/OpenRaider → mac_dist/OpenRaider.sh Прегледај датотеку

@@ -14,5 +14,6 @@ if [ ! -d "~/.OpenRaider" ]; then
14 14
     cp ../Resources/defaults/*.ttf ~/.OpenRaider/data
15 15
     cp ../Resources/defaults/*.tr2 ~/.OpenRaider/paks/custom
16 16
     echo "DONE"
17
+    osascript -e 'tell app "System Events" to display alert "Initial Configuration stored in ~/.OpenRaider\n\nView and edit OpenRaider.init to your needs..."'
17 18
 fi
18 19
 ./OpenRaider-bin

+ 1
- 1
mac_dist/bundle.sh Прегледај датотеку

@@ -8,6 +8,6 @@ mkdir -p bin/OpenRaider.app/Contents/Frameworks
8 8
 echo Moving bundle data in place
9 9
 cp mac_dist/Info.plist bin/OpenRaider.app/Contents/Info.plist
10 10
 cp mac_dist/openraider.icns bin/OpenRaider.app/Contents/Resources/openraider.icns
11
-cp mac_dist/OpenRaider bin/OpenRaider.app/Contents/MacOS/OpenRaider
11
+cp mac_dist/OpenRaider.sh bin/OpenRaider.app/Contents/MacOS/OpenRaider
12 12
 cp bin/release/OpenRaider bin/OpenRaider.app/Contents/MacOS/OpenRaider-bin
13 13
 cp data/* bin/OpenRaider.app/Contents/Resources/defaults/

+ 1
- 1
src/OpenRaider.cpp Прегледај датотеку

@@ -93,7 +93,7 @@ void killOpenRaiderSingleton()
93 93
 	// Requires public deconstructor
94 94
     // Causes pointer-being-freed-not-allocated error!
95 95
 	//delete OpenRaider::Instance();
96
-#warning "We can't delete our Game Instance without a not-allocated-free error. Somethings fishy here."
96
+#warning "Can't delete OpenRaider::Instance() without a not-allocated-free error. Something is fishy here..."
97 97
 
98 98
 #ifdef DEBUG_MEMEORY
99 99
 	printf("\n[Mongoose MEMEORY_DEBUG]\nMemory leak table:\n");

+ 0
- 2
src/Render.cpp Прегледај датотеку

@@ -596,8 +596,6 @@ void Render::Init(int width, int height, bool fast_card)
596 596
 	glPolygonMode(GL_FRONT, GL_FILL);
597 597
 
598 598
 	glMatrixMode(GL_MODELVIEW);
599
-
600
-    printf("\nm O.o m\n");
601 599
 }
602 600
 
603 601
 

+ 1
- 1
src/SDLSystem.cpp Прегледај датотеку

@@ -250,7 +250,7 @@ void SDLSystem::initVideo(unsigned int width, unsigned int height,
250 250
 	if (fullscreen)
251 251
 	{
252 252
 		flags |= SDL_FULLSCREEN;
253
-		SDL_ShowCursor(SDL_DISABLE);
253
+        SDL_ShowCursor(SDL_DISABLE);
254 254
 	}
255 255
 
256 256
 	SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);

+ 3
- 0
src/hel/CollisionObject.cpp Прегледај датотеку

@@ -22,6 +22,8 @@
22 22
 
23 23
 #include "CollisionObject.h"
24 24
 
25
+#warning CollisionObject is not yet implemented!
26
+#include <stdio.h>
25 27
 
26 28
 ////////////////////////////////////////////////////////////
27 29
 // Constructors
@@ -42,6 +44,7 @@ CollisionObject::~CollisionObject()
42 44
 ////////////////////////////////////////////////////////////
43 45
 
44 46
 bool CollisionObject::intersectPoint(Vector3d p) {
47
+    printf("Unimplemented CollisionObject::intersectPoint() called!\n");
45 48
     return 0;
46 49
 }
47 50
 

Loading…
Откажи
Сачувај