]> icculus.org git repositories - btb/d2x.git/blob - ChangeLog-old
move old per-file change logs into new file ChangeLog-old
[btb/d2x.git] / ChangeLog-old
1 This file contains the per-file change logs written before CVS was used
2
3 ------------------------------------------------------------------------
4 2d/2dsline.c:
5
6  * Old Log:
7  * Revision 1.6  1995/09/14  14:24:03  allender
8  * fixed MW compile error
9  *
10  * Revision 1.5  1995/09/14  13:45:17  allender
11 - * quick optimization for scanline
12 - *
13 - * Revision 1.4  1995/04/27  07:36:05  allender
14 - * remove some memsets since all old is here now
15 - *
16 - * Revision 1.3  1995/04/19  14:35:33  allender
17 - * *** empty log message ***
18 - *
19 - * Revision 1.2  1995/04/18  12:03:40  allender
20 - * *** empty log message ***
21 - *
22 - * Revision 1.1  1995/03/09  09:24:06  allender
23 - * Initial revision
24 - *
25 - *
26 - * --- PC RCS information ---
27 - * Revision 1.7  1994/11/18  22:50:48  john
28 - * Changed a bunch of shorts to ints in calls.
29 - *
30 - * Revision 1.6  1994/09/02  11:40:32  john
31 - * fixed bug with urect scanline drakening still
32 - * only using 16 levels of fade.
33 - *
34 - * Revision 1.5  1994/04/08  16:59:12  john
35 - * Add fading poly's; Made palette fade 32 instead of 16.
36 - *
37 - * Revision 1.4  1994/03/22  18:36:27  john
38 - * Added darkening scanlines
39 - *
40 - * Revision 1.3  1993/10/15  16:22:52  john
41 - * y
42 - *
43 - * Revision 1.2  1993/09/08  11:56:29  john
44 - * neatened
45 - *
46 - * Revision 1.1  1993/09/08  11:44:27  john
47 - * Initial revision
48 - *
49
50 ------------------------------------------------------------------------
51 2d/bitblt.c:
52
53 - * Old Log:
54 - * Revision 1.29  1995/03/14  12:14:28  john
55 - * Added code to double horz/vert bitblts.
56 - *
57 - * Revision 1.28  1995/03/13  09:01:48  john
58 - * Fixed bug with VFX1 screen not tall enough.
59 - *
60 - * Revision 1.27  1995/03/01  15:38:10  john
61 - * Better ModeX support.
62 - *
63 - * Revision 1.26  1994/12/15  12:19:00  john
64 - * Added gr_bm_bitblt (clipped!) function.
65 - *
66 - * Revision 1.25  1994/12/09  18:58:42  matt
67 - * Took out include of 3d.h
68 - *
69 - * Revision 1.24  1994/11/28  17:08:32  john
70 - * Took out some unused functions in linear.asm, moved
71 - * gr_linear_movsd from linear.asm to bitblt.c, made sure that
72 - * the code in ibiblt.c sets the direction flags before rep movsing.
73 - *
74 - * Revision 1.22  1994/11/23  16:04:00  john
75 - * Fixed generic rle'ing to use new bit method.
76 - *
77 - * Revision 1.21  1994/11/18  22:51:03  john
78 - * Changed a bunch of shorts to ints in calls.
79 - *
80 - * Revision 1.20  1994/11/10  15:59:48  john
81 - * Fixed bugs with canvas's being created with bogus bm_flags.
82 - *
83 - * Revision 1.19  1994/11/09  21:03:35  john
84 - * Added RLE for svga gr_ubitmap.
85 - *
86 - * Revision 1.18  1994/11/09  17:41:29  john
87 - * Made a slow version of rle bitblt to svga, modex.
88 - *
89 - * Revision 1.17  1994/11/09  16:35:15  john
90 - * First version with working RLE bitmaps.
91 - *
92 - * Revision 1.16  1994/11/04  10:06:58  john
93 - * Added fade table for fading fonts. Made font that partially clips
94 - * not print a warning message.
95 - *
96 - * Revision 1.15  1994/09/22  16:08:38  john
97 - * Fixed some palette stuff.
98 - *
99 - * Revision 1.14  1994/09/19  11:44:27  john
100 - * Changed call to allocate selector to the dpmi module.
101 - *
102 - * Revision 1.13  1994/08/08  13:03:00  john
103 - * Fixed bug in gr_bitmap in modex
104 - *
105 - * Revision 1.12  1994/07/13  19:47:23  john
106 - * Fixed bug with modex bitblt to page 2 not working.
107 - *
108 - * Revision 1.11  1994/05/31  11:10:52  john
109 - * *** empty log message ***
110 - *
111 - * Revision 1.10  1994/03/18  15:24:34  matt
112 - * Removed interlace stuff
113 - *
114 - * Revision 1.9  1994/02/18  15:32:20  john
115 - * *** empty log message ***
116 - *
117 - * Revision 1.8  1994/02/01  13:22:54  john
118 - * *** empty log message ***
119 - *
120 - * Revision 1.7  1994/01/13  08:28:25  mike
121 - * Modify rect copy to copy alternate scanlines when in interlaced mode.
122 - *
123 - * Revision 1.6  1993/12/28  12:09:46  john
124 - * added lbitblt.asm
125 - *
126 - * Revision 1.5  1993/10/26  13:18:09  john
127 - * *** empty log message ***
128 - *
129 - * Revision 1.4  1993/10/15  16:23:30  john
130 - * y
131 - *
132 - * Revision 1.3  1993/09/13  17:52:58  john
133 - * Fixed bug in BitBlt linear to SVGA
134 - *
135 - * Revision 1.2  1993/09/08  14:47:00  john
136 - * Made bitmap00 add rowsize instead of bitmap width.
137 - * Other routines might have this problem too.
138 - *
139 - * Revision 1.1  1993/09/08  11:43:01  john
140 - * Initial revision
141
142 ------------------------------------------------------------------------
143 2d/bitmap.c:
144
145 - * Old Log:
146 - * Revision 1.11  1995/08/23  18:46:06  allender
147 - * fixed compiler warning
148 - *
149 - * Revision 1.10  1995/08/14  14:25:45  allender
150 - * changed transparency color to 0
151 - *
152 - * Revision 1.9  1995/07/05  16:04:51  allender
153 - * transparency/game kitchen changes
154 - *
155 - * Revision 1.8  1995/06/15  09:50:48  allender
156 - * new malloc to align bitmap on 8 byte bountry
157 - *
158 - * Revision 1.7  1995/05/12  11:52:19  allender
159 - * changed memory stuff again
160 - *
161 - * Revision 1.6  1995/05/11  12:48:34  allender
162 - * nge transparency color
163 - *
164 - * Revision 1.5  1995/05/04  19:59:21  allender
165 - * use NewPtr instead of malloc
166 - *
167 - * Revision 1.4  1995/04/27  07:33:04  allender
168 - * rearrange functions
169 - *
170 - * Revision 1.3  1995/04/19  14:37:17  allender
171 - * removed dead asm code
172 - *
173 - * Revision 1.2  1995/04/18  12:04:51  allender
174 - * *** empty log message ***
175 - *
176 - * Revision 1.1  1995/03/09  08:48:06  allender
177 - * Initial revision
178 - *
179 - *
180 - * -------  PC version RCS information
181 - * Revision 1.17  1994/11/18  22:50:25  john
182 - * Changed shorts to ints in parameters.
183 - *
184 - * Revision 1.16  1994/11/10  15:59:46  john
185 - * Fixed bugs with canvas's being created with bogus bm_flags.
186 - *
187 - * Revision 1.15  1994/10/26  23:55:53  john
188 - * Took out roller; Took out inverse table.
189 - *
190 - * Revision 1.14  1994/09/19  14:40:21  john
191 - * Changed dpmi stuff.
192 - *
193 - * Revision 1.13  1994/09/19  11:44:04  john
194 - * Changed call to allocate selector to the dpmi module.
195 - *
196 - * Revision 1.12  1994/06/09  13:14:57  john
197 - * Made selectors zero our
198 - * out, I meant.
199 - *
200 - * Revision 1.11  1994/05/06  12:50:07  john
201 - * Added supertransparency; neatend things up; took out warnings.
202 - *
203 - * Revision 1.10  1994/04/08  16:59:39  john
204 - * Add fading poly's; Made palette fade 32 instead of 16.
205 - *
206 - * Revision 1.9  1994/03/16  17:21:09  john
207 - * Added slow palette searching options.
208 - *
209 - * Revision 1.8  1994/03/14  17:59:35  john
210 - * Added function to check bitmap's transparency.
211 - *
212 - * Revision 1.7  1994/03/14  17:16:21  john
213 - * fixed bug with counting freq of pixels.
214 - *
215 - * Revision 1.6  1994/03/14  16:55:47  john
216 - * Changed grs_bitmap structure to include bm_flags.
217 - *
218 - * Revision 1.5  1994/02/18  15:32:22  john
219 - * *** empty log message ***
220 - *
221 - * Revision 1.4  1993/10/15  16:22:49  john
222 - * *** empty log message ***
223 - *
224 - * Revision 1.3  1993/09/08  17:37:11  john
225 - * Checking for errors with Yuan...
226 - *
227 - * Revision 1.2  1993/09/08  14:46:27  john
228 - * looking for possible bugs...
229 - *
230 - * Revision 1.1  1993/09/08  11:43:05  john
231 - * Initial revision
232 - *
233
234 ------------------------------------------------------------------------
235 2d/clip.h:
236
237 - * Old Log:
238 - *
239 - * Revision 1.3  1993/10/15  16:22:28  john
240 - * *** empty log message ***
241 - *
242 - * Revision 1.2  1993/09/29  16:14:31  john
243 - * made work with fix point
244 - *
245 - * Revision 1.1  1993/09/08  11:40:53  john
246 - * Initial revision
247 - *
248 - *
249
250 ------------------------------------------------------------------------
251 2d/ibitblt.c:
252
253 - * Old Log:
254 - * Revision 1.3  1995/09/13  11:43:22  allender
255 - * start on optimizing cockpit copy code
256 - *
257 - * Revision 1.2  1995/09/07  10:16:57  allender
258 - * fixed up cockpit and rearview hole blitting
259 - *
260 - * Revision 1.1  1995/08/18  15:50:48  allender
261 - * Initial revision
262 - *
263 - * Revision 1.6  1994/11/28  17:07:29  john
264 - * Took out some unused functions in linear.asm, moved
265 - * gr_linear_movsd from linear.asm to bitblt.c, made sure that
266 - * the code in ibiblt.c sets the direction flags before rep movsing.
267 - *
268 - * Revision 1.5  1994/11/18  22:50:22  john
269 - * Changed shorts to ints in parameters.
270 - *
271 - * Revision 1.4  1994/11/09  16:35:16  john
272 - * First version with working RLE bitmaps.
273 - *
274 - * Revision 1.3  1994/10/03  17:18:05  john
275 - * Fixed bug with edi not getting intialized to zero
276 - * in create_mask.
277 - *
278 - * Revision 1.2  1994/05/31  11:10:55  john
279 - * *** empty log message ***
280 - *
281 - * Revision 1.1  1994/05/30  16:08:27  john
282 - * Initial revision
283 - *
284
285 ------------------------------------------------------------------------
286 2d/palette.c:
287
288 ; Revision 1.20  1994/11/28  17:08:30  john
289 ; Took out some unused functions in linear.asm, moved
290 ; gr_linear_movsd from linear.asm to bitblt.c, made sure that
291 ; the code in ibiblt.c sets the direction flags before rep movsing.
292
293 ; Revision 1.19  1994/11/27  22:57:56  john
294 ; Took out some code that was never called.
295
296 ; Revision 1.18  1994/09/12  14:40:16  john
297 ; Neatend.
298
299 ; Revision 1.17  1994/07/27  18:30:30  john
300 ; Took away the blending table.
301
302 ; Revision 1.16  1994/04/08  16:59:28  john
303 ; Add fading poly's; Made palette fade 32 instead of 16.
304
305 ; Revision 1.15  1993/12/21  20:10:03  john
306 ; *** empty log message ***
307
308 ; Revision 1.14  1993/12/21  19:58:31  john
309 ; added selector stuff
310
311 ; Revision 1.13  1993/12/21  11:40:51  john
312 ; *** empty log message ***
313
314 ; Revision 1.12  1993/12/09  15:01:52  john
315 ; Changed palette stuff majorly
316
317 ; Revision 1.11  1993/12/08  16:41:02  john
318 ; *** empty log message ***
319
320 ; Revision 1.10  1993/12/08  11:50:17  john
321 ; Fixed bug with gr_init
322
323 ; Revision 1.9  1993/12/07  12:32:12  john
324 ; moved bmd_palette to gr_palette
325
326 ; Revision 1.8  1993/12/03  12:11:25  john
327 ; *** empty log message ***
328
329 ; Revision 1.7  1993/11/16  11:29:08  john
330 ; *** empty log message ***
331
332 ; Revision 1.6  1993/10/15  16:22:13  john
333 ; *** empty log message ***
334
335 ; Revision 1.5  1993/09/29  16:15:28  john
336 ; added assembler linear_line
337
338 ; Revision 1.4  1993/09/26  18:59:27  john
339 ; fade stuff
340
341 ; Revision 1.3  1993/09/21  14:00:59  john
342 ; added code to save 43/50 line text modes.
343
344 ; Revision 1.2  1993/09/16  17:28:06  john
345 ; added code to save/restore video mode
346
347 ; Revision 1.1  1993/09/08  11:41:30  john
348 ; Initial revision
349
350 ------------------------------------------------------------------------
351 2d/palette.c:
352
353 - * Revision 1.41  1995/02/02  14:26:31  john
354 - * Made palette fades work better with gamma thingy..
355 - *
356 - * Revision 1.40  1994/12/08  19:03:46  john
357 - * Made functions use cfile.
358 - *
359 - * Revision 1.39  1994/12/01  11:23:27  john
360 - * Limited Gamma from 0-8.
361 - *
362 - * Revision 1.38  1994/11/28  01:31:08  mike
363 - * optimize color lookup function, caching recently used colors.
364 - *
365 - * Revision 1.37  1994/11/18  22:50:18  john
366 - * Changed shorts to ints in parameters.
367 - *
368 - * Revision 1.36  1994/11/15  17:54:59  john
369 - * Made text palette fade in when game over.
370 - *
371 - * Revision 1.35  1994/11/10  19:53:14  matt
372 - * Fixed error handling is gr_use_palette_table()
373 - *
374 - * Revision 1.34  1994/11/07  13:53:48  john
375 - * Added better gamma stufff.
376 - *
377 - * Revision 1.33  1994/11/07  13:37:56  john
378 - * Added gamma correction stuff.
379 - *
380 - * Revision 1.32  1994/11/05  13:20:14  john
381 - * Fixed bug with find_closest_color_current not working.
382 - *
383 - * Revision 1.31  1994/11/05  13:08:09  john
384 - * MAde it return 0 when palette already faded out.
385 - *
386 - * Revision 1.30  1994/11/05  13:05:34  john
387 - * Added back in code to allow keys during fade.
388 - *
389 - * Revision 1.29  1994/11/05  12:49:50  john
390 - * Fixed bug with previous comment..
391 - *
392 - * Revision 1.28  1994/11/05  12:48:46  john
393 - * Made palette only fade in / out when its supposed to.
394 - *
395 - * Revision 1.27  1994/11/05  12:46:43  john
396 - * Changed palette stuff a bit.
397 - *
398 - * Revision 1.26  1994/11/01  12:59:35  john
399 - * Reduced palette.256 size.
400 - *
401 - * Revision 1.25  1994/10/26  23:55:35  john
402 - * Took out roller; Took out inverse table.
403 - *
404 - * Revision 1.24  1994/10/04  22:03:05  matt
405 - * Fixed bug: palette wasn't fading all the way out or in
406 - *
407 - * Revision 1.23  1994/09/22  16:08:40  john
408 - * Fixed some palette stuff.
409 - *
410 - * Revision 1.22  1994/09/19  11:44:31  john
411 - * Changed call to allocate selector to the dpmi module.
412 - *
413 - * Revision 1.21  1994/09/12  19:28:09  john
414 - * Fixed bug with unclipped fonts clipping.
415 - *
416 - * Revision 1.20  1994/09/12  18:18:39  john
417 - * Set 254 and 255 to fade to themselves in fadetable
418 - *
419 - * Revision 1.19  1994/09/12  14:40:10  john
420 - * Neatend.
421 - *
422 - * Revision 1.18  1994/09/09  09:31:55  john
423 - * Made find_closest_color not look at superx spot of 254
424 - *
425 - * Revision 1.17  1994/08/09  11:27:08  john
426 - * Add cthru stuff.
427 - *
428 - * Revision 1.16  1994/08/01  11:03:51  john
429 - * MAde it read in old/new palette.256
430 - *
431 - * Revision 1.15  1994/07/27  18:30:27  john
432 - * Took away the blending table.
433 - *
434 - * Revision 1.14  1994/06/09  10:39:52  john
435 - * In fade out.in functions, returned 1 if key was pressed...
436 - *
437 - * Revision 1.13  1994/05/31  19:04:16  john
438 - * Added key to stop fade if desired.
439 - *
440 - * Revision 1.12  1994/05/06  12:50:20  john
441 - * Added supertransparency; neatend things up; took out warnings.
442 - *
443 - * Revision 1.11  1994/05/03  19:39:02  john
444 - * *** empty log message ***
445 - *
446 - * Revision 1.10  1994/04/22  11:16:07  john
447 - * *** empty log message ***
448 - *
449 - * Revision 1.9  1994/04/08  16:59:40  john
450 - * Add fading poly's; Made palette fade 32 instead of 16.
451 - *
452 - * Revision 1.8  1994/03/16  17:21:17  john
453 - * Added slow palette searching options.
454 - *
455 - * Revision 1.7  1994/01/07  11:47:33  john
456 - * made use cflib
457 - *
458 - * Revision 1.6  1993/12/21  11:41:04  john
459 - * *** empty log message ***
460 - *
461 - * Revision 1.5  1993/12/09  15:02:47  john
462 - * Changed palette stuff majorly
463 - *
464 - * Revision 1.4  1993/12/07  12:31:41  john
465 - * moved bmd_palette to gr_palette
466 - *
467 - * Revision 1.3  1993/10/15  16:22:23  john
468 - * *** empty log message ***
469 - *
470 - * Revision 1.2  1993/09/26  18:59:46  john
471 - * fade stuff
472 - *
473 - * Revision 1.1  1993/09/08  11:44:03  john
474 - * Initial revision
475 - *
476
477 ------------------------------------------------------------------------
478 2d/pcx.c:
479
480 - * Revision 1.6  1995/03/01  15:38:12  john
481 - * Better ModeX support.
482 - *
483 - * Revision 1.5  1995/01/21  17:54:17  john
484 - * Added pcx reader for modes other than modex.
485 - *
486 - * Revision 1.4  1994/12/08  19:03:56  john
487 - * Made functions use cfile.
488 - *
489 - * Revision 1.3  1994/11/29  02:53:24  john
490 - * Added error messages; made call be more similiar to iff.
491 - *
492 - * Revision 1.2  1994/11/28  20:03:50  john
493 - * Added PCX functions.
494 - *
495 - * Revision 1.1  1994/11/28  19:57:56  john
496 - * Initial revision
497 - *
498
499 ------------------------------------------------------------------------
500 2d/rle.c:
501
502 - * Changed shorts to ints in parameters.
503 - *
504 - *
505 - * Old Log:
506 - * Revision 1.10  1995/08/14  14:26:34  allender
507 - * changed transparency color to 0
508 - *
509 - * Revision 1.9  1995/07/05  16:07:49  allender
510 - * transparency/kitchen chagnes
511 - *
512 - * Revision 1.8  1995/05/12  11:54:03  allender
513 - * changed memory stuff again
514 - *
515 - * Revision 1.7  1995/05/11  12:49:19  allender
516 - * change transparency color
517 - *
518 - * Revision 1.6  1995/05/04  20:00:30  allender
519 - * use NewPtr instead of malloc.  Fix gr_rle_scanline (which caused me
520 - * *many* hours of frustration!!!!)
521 - *
522 - * Revision 1.5  1995/05/01  08:40:32  allender
523 - * trying to find memory bug....this stuff works -- it's johns code
524 - *
525 - * Revision 1.4  1995/04/27  07:38:24  allender
526 - * new rle code ala John
527 - *
528 - * Revision 1.3  1995/04/19  14:36:06  allender
529 - * *** empty log message ***
530 - *
531 - * Revision 1.2  1995/04/18  12:08:30  allender
532 - * *** empty log message ***
533 - *
534 - * Revision 1.1  1995/03/09  09:23:04  allender
535 - * Initial revision
536 - *
537 - *
538 - * --- PC RCS information ---
539 - * Revision 1.19  1995/01/14  19:18:31  john
540 - * Added assert to check for paged out bitmap.
541 - *
542 - * Revision 1.18  1995/01/14  11:32:07  john
543 - * Added rle_cache_flush function.
544 - *
545 - * Revision 1.17  1994/12/13  10:58:27  john
546 - * Fixed bug with 2 consecutive calls to get_expanded_Texture
547 - * with 2 different bitmaps, returning the same rle texture,
548 - * causing doors to disapper.
549 - *
550 - * Revision 1.16  1994/11/30  00:55:03  mike
551 - * optimization
552 - *
553 - * Revision 1.15  1994/11/24  13:24:44  john
554 - * Made sure that some rep movs had the cld set first.
555 - * Took some unused functions out.
556 - *
557 - * Revision 1.14  1994/11/23  16:03:46  john
558 - * Fixed generic rle'ing to use new bit method.
559 - *
560 - * Revision 1.13  1994/11/23  15:45:51  john
561 - * Changed to a 3 bit rle scheme.
562 - *
563 - * Revision 1.12  1994/11/18  22:50:24  john
564 - * Changed shorts to ints in parameters.
565 - *
566 - * Revision 1.11  1994/11/14  17:06:13  john
567 - * Took out Key_f12.
568 - *
569 - * Revision 1.10  1994/11/14  15:54:09  john
570 - * Put code in for maybe checking bogus rle data.
571 - *
572 - * Revision 1.9  1994/11/14  15:51:58  john
573 - * Added rle_disable_caching variable to prove the stability of my rle
574 - * caching code to any non-believers.
575 - *
576 - * Revision 1.8  1994/11/10  10:31:20  john
577 - * Reduce cache buffers to 16.
578 - *
579 - * Revision 1.7  1994/11/09  19:53:43  john
580 - * Added texture rle caching.
581 - *
582 - * Revision 1.6  1994/11/09  17:41:44  john
583 - * Made a slow version of rle bitblt to svga, modex.
584 - *
585 - * Revision 1.5  1994/11/09  17:07:50  john
586 - * Fixed bug with bitmap that gets bigger with rle.
587 - *
588 - * Revision 1.4  1994/11/09  16:35:17  john
589 - * First version with working RLE bitmaps.
590 - *
591 - * Revision 1.3  1994/10/26  12:54:47  john
592 - * Fixed bug with decode that used rep movsd instead of
593 - * rep stosd.
594 - *
595 - * Revision 1.2  1994/10/06  17:05:25  john
596 - * First version of rle stuff.
597 - *
598 - * Revision 1.1  1994/10/06  16:53:34  john
599 - * Initial revision
600
601 ------------------------------------------------------------------------
602 2d/scale.c:
603
604 - * Revision 1.12  1995/03/14  15:14:11  john
605 - * Increased max scanline length to 640.
606 - * ..
607 - * 
608 - * Revision 1.11  1994/11/27  12:56:39  matt
609 - * Took out unneeded include of 3d.h
610 - * 
611 - * Revision 1.10  1994/11/18  22:50:25  john
612 - * Changed shorts to ints in parameters.
613 - * 
614 - * Revision 1.9  1994/11/09  16:35:02  john
615 - * First version with working RLE bitmaps.
616 - * 
617 - * Revision 1.8  1994/06/09  13:15:17  john
618 - * *** empty log message ***
619 - * 
620 - * Revision 1.7  1994/06/07  11:47:02  john
621 - * Added back in the fast code for scaling up bitmaps.
622 - * 
623 - * Revision 1.6  1994/02/18  15:32:36  john
624 - * *** empty log message ***
625 - * 
626 - * Revision 1.5  1994/01/22  14:35:01  john
627 - * Added transparency as color index 255.
628 - * 
629 - * Revision 1.4  1994/01/17  16:59:12  john
630 - * once again...
631 - * 
632 - * Revision 1.3  1994/01/17  16:51:17  john
633 - * Added check so we don't draw outsibe
634 - * the source bitmap's v coordinate... kind
635 - * of a hack, but works.
636 - * 
637 - * Revision 1.2  1994/01/12  18:03:26  john
638 - * The first iteration of fast scaler..
639 - * 
640 - * Revision 1.1  1994/01/11  14:48:42  john
641 - * Initial revision
642
643 ------------------------------------------------------------------------
644 2d/scalea.asm:
645
646 ; Revision 1.2  1994/01/12  18:02:52  john
647 ; Asm code for the scaler... first iteration here
648 ; has compiled code that works!!
649
650 ; Revision 1.1  1994/01/12  12:20:11  john
651 ; Initial revision
652
653 ------------------------------------------------------------------------
654 3d/clipper.h:
655
656 - * Revision 1.1  1995/05/05  08:50:13  allender
657 - * Initial revision
658 - *
659 - * Revision 1.1  1995/04/17  19:56:58  matt
660 - * Initial revision
661 - * 
662 - * 
663
664 ------------------------------------------------------------------------
665 3d/globvars.c:
666
667 - * Revision 1.2  1995/09/13  11:30:47  allender
668 - * added fCanv_w2 and vCanv_h2 for PPC implementation
669 - *
670 - * Revision 1.1  1995/05/05  08:50:48  allender
671 - * Initial revision
672 - *
673 - * Revision 1.1  1995/04/17  04:24:57  matt
674 - * Initial revision
675
676 ------------------------------------------------------------------------
677 3d/globvars.h:
678
679 - * Revision 1.2  1995/09/13  11:31:19  allender
680 - * added fCanv_w2 and vCanv_h2 for PPC implementation
681 - *
682 - * Revision 1.1  1995/05/05  08:51:02  allender
683 - * Initial revision
684 - *
685 - * Revision 1.1  1995/04/17  04:07:58  matt
686 - * Initial revision
687
688 ------------------------------------------------------------------------
689 3d/instance.c:
690
691 - * Revision 1.2  1995/06/12  12:36:57  allender
692 - * fixed bug where g3_start_instance_angles recursively called itself
693 - *
694 - * Revision 1.1  1995/05/05  08:51:27  allender
695 - * Initial revision
696 - *
697 - * Revision 1.1  1995/04/17  06:43:29  matt
698 - * Initial revision
699
700 ------------------------------------------------------------------------
701 3d/interp.c:
702
703 - * Revision 1.4  1995/10/10  22:20:09  allender
704 - * new morphing code from Matt
705 - *
706 - * Revision 1.3  1995/08/31  15:40:24  allender
707 - * swap color data correctly
708 - *
709 - * Revision 1.2  1995/05/11  13:06:38  allender
710 - * fix int --> short problem
711 - *
712 - * Revision 1.1  1995/05/05  08:51:41  allender
713 - * Initial revision
714 - *
715 - * Revision 1.1  1995/04/17  06:44:33  matt
716 - * Initial revision
717
718 ------------------------------------------------------------------------
719 3d/matrix.c:
720
721 - * Revision 1.1  1995/05/05  08:52:11  allender
722 - * Initial revision
723 - *
724 - * Revision 1.1  1995/04/17  04:14:34  matt
725 - * Initial revision
726
727 ------------------------------------------------------------------------
728 3d/points.c:
729
730 - * Revision 1.3  1995/09/21  17:29:40  allender
731 - * changed project_point to overflow if z <= 0
732 - *
733 - * Revision 1.2  1995/09/13  11:31:28  allender
734 - * removed checkmuldiv from g3_project_point
735 - *
736 - * Revision 1.1  1995/05/05  08:52:35  allender
737 - * Initial revision
738 - *
739 - * Revision 1.1  1995/04/17  04:32:25  matt
740 - * Initial revision
741
742 ------------------------------------------------------------------------
743 3d/rod.c:
744
745 - * Revision 1.2  1995/09/13  11:31:46  allender
746 - * removed checkmuldiv in PPC implemenation
747 - *
748 - * Revision 1.1  1995/05/05  08:52:45  allender
749 - * Initial revision
750 - *
751 - * Revision 1.1  1995/04/17  06:42:08  matt
752 - * Initial revision
753
754 ------------------------------------------------------------------------
755 3d/setup.c:
756
757 - * Revision 1.4  1995/10/11  00:27:04  allender
758 - * bash free_num_points to 0
759 - *
760 - * Revision 1.3  1995/09/13  11:31:58  allender
761 - * calc for fCanv_w2 and fCanv_h2
762 - *
763 - * Revision 1.2  1995/06/25  21:57:57  allender
764 - * *** empty log message ***
765 - *
766 - * Revision 1.1  1995/05/05  08:52:54  allender
767 - * Initial revision
768 - *
769 - * Revision 1.1  1995/04/17  03:59:01  matt
770 - * Initial revision
771
772 ------------------------------------------------------------------------
773 arch/dos/bak/ipx.c:
774
775 - * Revision 2.10  1995/03/29  17:27:55  john
776 - * Added code to not duplicate broadcasts.
777 - *
778 - * Revision 2.9  1995/03/29  15:32:07  john
779 - * NEatened.
780 - *
781 - * Revision 2.8  1995/03/29  15:07:31  john
782 - * Added network support.
783 - *
784 - * Revision 2.7  1995/03/29  11:22:27  john
785 - * Added broadcasting over a net.
786 - *
787 - * Revision 2.6  1995/03/28  20:05:03  john
788 - * Took away alternate server stuff.
789 - *
790 - * Revision 2.5  1995/03/23  19:14:29  john
791 - * Added better MAX_USERS message.
792 - *
793 - * Revision 2.4  1995/03/23  19:00:02  john
794 - * Added user list capabitly.
795 - *
796 - * Revision 2.3  1995/03/23  12:27:05  john
797 - * Move IPX into bios lib.
798 - *
799 - * Revision 2.2  1995/03/22  19:08:15  john
800 - * Added code to fix sending packets over router... now
801 - * we just need to make broadcasts go over router!!
802 - *
803 - * Revision 2.1  1995/03/21  08:40:16  john
804 - * Ifdef'd out the NETWORK code.
805 - *
806 - * Revision 2.0  1995/02/27  11:30:45  john
807 - * New version 2.0, which has no anonymous unions, builds with
808 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
809 - *
810 - * Revision 1.31  1995/02/16  17:35:03  john
811 - * Added code to allow dynamic socket changing.
812 - *
813 - * Revision 1.30  1995/02/01  21:03:45  john
814 - * Lintified.
815 - *
816 - * Revision 1.29  1995/01/22  14:31:05  john
817 - * Added key.h
818 - *
819 - * Revision 1.28  1995/01/22  14:29:26  john
820 - * Added code to bypass broadcast messages.
821 - *
822 - * Revision 1.27  1995/01/03  13:46:16  john
823 - * Added code that should make ipx work over different servers,
824 - * but ifdef'd it out with SHAREWARE in ipx.c.  I haven't tested
825 - * this, and I hope it doesn't introduce net bugs.
826 - *
827 - * Revision 1.26  1994/12/14  11:54:37  rob
828 - * Reduce # of ipx packets.
829 - *
830 - * Revision 1.25  1994/12/11  00:43:28  john
831 - * Locked down DOS ipx buffers... probably not necessary, tho.
832 - *
833 - * Revision 1.24  1994/12/08  15:49:58  rob
834 - * Bumped up the # of ipx packets.
835 - *
836 - * Revision 1.23  1994/12/04  15:23:54  rob
837 - * Reduced packet # constants.
838 - *
839 - * Revision 1.22  1994/11/27  23:12:39  matt
840 - * Made changes for new mprintf calling convention
841 - *
842 - * Revision 1.21  1994/11/19  15:15:19  mike
843 - * remove unused code and data
844 - *
845 - * Revision 1.20  1994/11/10  11:06:07  rob
846 - * Raised number of ipx packets to 64 and buffers to 128 (for 8-way games)
847 - * Removed (commented out) all the spx support stuff.
848 - *
849 - * Revision 1.19  1994/11/07  17:50:12  rob
850 - * Bumped up max_packets and ipx_num_packets to double their previous
851 - * values.
852 - *
853 - * Revision 1.18  1994/11/07  15:39:01  rob
854 - * Removed temporary hacked ipx_send_object function.
855 - * Replaced with a more general thing.
856 - *
857 - * Revision 1.17  1994/11/05  16:08:40  rob
858 - * Made a change necessary for object syncing on rejoin.
859 - *
860 - * Revision 1.16  1994/11/01  15:57:12  rob
861 - * Added support for SPX sockets for critical messages.
862 - *
863 - * Revision 1.15  1994/10/31  19:21:01  rob
864 - * Added a routine for sending objects via ipx.  Its a hack and shoukld
865 - * be replaced by something more general time permitting.
866 - *
867 - * Revision 1.14  1994/10/20  14:57:42  john
868 - * Some test stuff.
869 - *
870 - * Revision 1.13  1994/10/20  11:22:45  john
871 - * Tweaked the number of waiting packets. Added code to print
872 - * total packets missed, and to limit the packet send rate to
873 - * 10 packets per second unless firing.
874 - *
875 - * Revision 1.12  1994/10/03  20:50:11  john
876 - * Started adding sound pause functions.
877 - *
878 - * Revision 1.11  1994/09/15  08:54:24  mike
879 - * comment out a mprintf.
880 - *
881 - * Revision 1.10  1994/09/12  19:38:20  john
882 - * Made some stuff that prints to the DOS screen go to the
883 - * mono instead, since it really is debugging info.
884 - *
885 - * Revision 1.9  1994/09/07  13:32:03  john
886 - * Made ipx_close explicitly close the socket we were using,
887 - * because it seems that VLM's don't automatically close them
888 - * like the older NETX stuff did (Going from Novell 3.11 driver
889 - * to 3.12 anyway).
890 - *
891 - * Revision 1.8  1994/09/06  19:29:20  john
892 - * Added trial version of rejoin function.
893 - *
894 - * Revision 1.7  1994/08/09  19:31:50  john
895 - * Networking changes.
896 - *
897 - * Revision 1.6  1994/08/05  16:11:41  john
898 - * Psuedo working version of networking.
899 - *
900 - * Revision 1.5  1994/08/04  19:17:21  john
901 - * Inbetween version of network stuff.
902 - *
903 - * Revision 1.4  1994/07/29  16:08:57  john
904 - * *** empty log message ***
905 - *
906 - * Revision 1.3  1994/07/25  12:33:31  john
907 - * Network "pinging" in.
908 - *
909 - * Revision 1.2  1994/07/20  15:58:28  john
910 - * First installment of ipx stuff.
911 - *
912 - * Revision 1.1  1994/07/19  15:42:00  john
913 - * Initial revision
914
915 ------------------------------------------------------------------------
916 arch/dos/ipx.c:
917
918 - * Revision 2.10  1995/03/29  17:27:55  john
919 - * Added code to not duplicate broadcasts.
920 - *
921 - * Revision 2.9  1995/03/29  15:32:07  john
922 - * NEatened.
923 - *
924 - * Revision 2.8  1995/03/29  15:07:31  john
925 - * Added network support.
926 - *
927 - * Revision 2.7  1995/03/29  11:22:27  john
928 - * Added broadcasting over a net.
929 - *
930 - * Revision 2.6  1995/03/28  20:05:03  john
931 - * Took away alternate server stuff.
932 - *
933 - * Revision 2.5  1995/03/23  19:14:29  john
934 - * Added better MAX_USERS message.
935 - *
936 - * Revision 2.4  1995/03/23  19:00:02  john
937 - * Added user list capabitly.
938 - *
939 - * Revision 2.3  1995/03/23  12:27:05  john
940 - * Move IPX into bios lib.
941 - *
942 - * Revision 2.2  1995/03/22  19:08:15  john
943 - * Added code to fix sending packets over router... now
944 - * we just need to make broadcasts go over router!!
945 - *
946 - * Revision 2.1  1995/03/21  08:40:16  john
947 - * Ifdef'd out the NETWORK code.
948 - *
949 - * Revision 2.0  1995/02/27  11:30:45  john
950 - * New version 2.0, which has no anonymous unions, builds with
951 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
952 - *
953 - * Revision 1.31  1995/02/16  17:35:03  john
954 - * Added code to allow dynamic socket changing.
955 - *
956 - * Revision 1.30  1995/02/01  21:03:45  john
957 - * Lintified.
958 - *
959 - * Revision 1.29  1995/01/22  14:31:05  john
960 - * Added key.h
961 - *
962 - * Revision 1.28  1995/01/22  14:29:26  john
963 - * Added code to bypass broadcast messages.
964 - *
965 - * Revision 1.27  1995/01/03  13:46:16  john
966 - * Added code that should make ipx work over different servers,
967 - * but ifdef'd it out with SHAREWARE in ipx.c.  I haven't tested
968 - * this, and I hope it doesn't introduce net bugs.
969 - *
970 - * Revision 1.26  1994/12/14  11:54:37  rob
971 - * Reduce # of ipx packets.
972 - *
973 - * Revision 1.25  1994/12/11  00:43:28  john
974 - * Locked down DOS ipx buffers... probably not necessary, tho.
975 - *
976 - * Revision 1.24  1994/12/08  15:49:58  rob
977 - * Bumped up the # of ipx packets.
978 - *
979 - * Revision 1.23  1994/12/04  15:23:54  rob
980 - * Reduced packet # constants.
981 - *
982 - * Revision 1.22  1994/11/27  23:12:39  matt
983 - * Made changes for new mprintf calling convention
984 - *
985 - * Revision 1.21  1994/11/19  15:15:19  mike
986 - * remove unused code and data
987 - *
988 - * Revision 1.20  1994/11/10  11:06:07  rob
989 - * Raised number of ipx packets to 64 and buffers to 128 (for 8-way games)
990 - * Removed (commented out) all the spx support stuff.
991 - *
992 - * Revision 1.19  1994/11/07  17:50:12  rob
993 - * Bumped up max_packets and ipx_num_packets to double their previous
994 - * values.
995 - *
996 - * Revision 1.18  1994/11/07  15:39:01  rob
997 - * Removed temporary hacked ipx_send_object function.
998 - * Replaced with a more general thing.
999 - *
1000 - * Revision 1.17  1994/11/05  16:08:40  rob
1001 - * Made a change necessary for object syncing on rejoin.
1002 - *
1003 - * Revision 1.16  1994/11/01  15:57:12  rob
1004 - * Added support for SPX sockets for critical messages.
1005 - *
1006 - * Revision 1.15  1994/10/31  19:21:01  rob
1007 - * Added a routine for sending objects via ipx.  Its a hack and shoukld
1008 - * be replaced by something more general time permitting.
1009 - *
1010 - * Revision 1.14  1994/10/20  14:57:42  john
1011 - * Some test stuff.
1012 - *
1013 - * Revision 1.13  1994/10/20  11:22:45  john
1014 - * Tweaked the number of waiting packets. Added code to print
1015 - * total packets missed, and to limit the packet send rate to
1016 - * 10 packets per second unless firing.
1017 - *
1018 - * Revision 1.12  1994/10/03  20:50:11  john
1019 - * Started adding sound pause functions.
1020 - *
1021 - * Revision 1.11  1994/09/15  08:54:24  mike
1022 - * comment out a mprintf.
1023 - *
1024 - * Revision 1.10  1994/09/12  19:38:20  john
1025 - * Made some stuff that prints to the DOS screen go to the
1026 - * mono instead, since it really is debugging info.
1027 - *
1028 - * Revision 1.9  1994/09/07  13:32:03  john
1029 - * Made ipx_close explicitly close the socket we were using,
1030 - * because it seems that VLM's don't automatically close them
1031 - * like the older NETX stuff did (Going from Novell 3.11 driver
1032 - * to 3.12 anyway).
1033 - *
1034 - * Revision 1.8  1994/09/06  19:29:20  john
1035 - * Added trial version of rejoin function.
1036 - *
1037 - * Revision 1.7  1994/08/09  19:31:50  john
1038 - * Networking changes.
1039 - *
1040 - * Revision 1.6  1994/08/05  16:11:41  john
1041 - * Psuedo working version of networking.
1042 - *
1043 - * Revision 1.5  1994/08/04  19:17:21  john
1044 - * Inbetween version of network stuff.
1045 - *
1046 - * Revision 1.4  1994/07/29  16:08:57  john
1047 - * *** empty log message ***
1048 - *
1049 - * Revision 1.3  1994/07/25  12:33:31  john
1050 - * Network "pinging" in.
1051 - *
1052 - * Revision 1.2  1994/07/20  15:58:28  john
1053 - * First installment of ipx stuff.
1054 - *
1055 - * Revision 1.1  1994/07/19  15:42:00  john
1056 - * Initial revision
1057
1058 ------------------------------------------------------------------------
1059 arch/dos/ipx.h:
1060
1061 - * $Log: not supported by cvs2svn $
1062 - * Revision 1.1.1.1  2001/01/19 03:30:15  bradleyb
1063 - * Import of d2x-0.0.8
1064 - *
1065 - * Revision 1.1.1.1  1999/06/14 21:58:39  donut
1066 - * Import of d1x 1.37 source.
1067 - *
1068 - * Revision 2.6  1995/03/29  11:19:32  john
1069 - * Added broadcasting over a net.
1070 - * 
1071 - * Revision 2.5  1995/03/28  20:04:43  john
1072 - * Took away alternate server stuff.
1073 - * 
1074 - * Revision 2.4  1995/03/23  19:00:10  john
1075 - * Added user list capabitly.
1076 - * 
1077 - * Revision 2.3  1995/03/23  12:26:57  john
1078 - * Move IPX into bios lib.
1079 - * 
1080 - * Revision 2.2  1995/03/22  19:08:14  john
1081 - * Added code to fix sending packets over router... now
1082 - * we just need to make broadcasts go over router!!
1083 - * 
1084 - * Revision 2.1  1995/03/21  08:39:56  john
1085 - * Ifdef'd out the NETWORK code.
1086 - * 
1087 - * Revision 2.0  1995/02/27  11:30:16  john
1088 - * New version 2.0, which has no anonymous unions, builds with
1089 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
1090 - * 
1091 - * Revision 1.16  1995/02/16  17:34:52  john
1092 - * Added code to allow dynamic socket changing.
1093 - * 
1094 - * Revision 1.15  1995/01/04  21:43:27  rob
1095 - * Remove SPX size definition.
1096 - * 
1097 - * Revision 1.14  1995/01/03  13:46:18  john
1098 - * Added code that should make ipx work over different servers,
1099 - * but ifdef'd it out with SHAREWARE in ipx.c.  I haven't tested
1100 - * this, and I hope it doesn't introduce net bugs.
1101 - * 
1102 - * Revision 1.13  1994/11/02  11:37:16  rob
1103 - * Changed default socket number to a higher regions.
1104 - * 
1105 - * Revision 1.12  1994/11/01  15:56:51  rob
1106 - * Added defines for SPX socketsx.
1107 - * 
1108 - * Revision 1.11  1994/10/31  19:23:31  rob
1109 - * Added a prototype for the new object send function.
1110 - * 
1111 - * Revision 1.10  1994/09/07  13:37:25  john
1112 - * Changed default socket to 0x4000, because 
1113 - * the ipx/spx book says that we can only use
1114 - * sockets 0x4000 - 0x7fff.
1115 - * 
1116 - * Revision 1.9  1994/08/25  18:14:45  matt
1117 - * Changed socket because of packet change
1118 - * 
1119 - * Revision 1.8  1994/08/12  22:42:24  john
1120 - * Took away Player_stats; added Players array.
1121 - * 
1122 - * Revision 1.7  1994/08/09  19:31:47  john
1123 - * Networking changes.
1124 - * 
1125 - * Revision 1.6  1994/08/05  16:11:46  john
1126 - * Psuedo working version of networking.
1127 - * 
1128 - * Revision 1.5  1994/08/04  19:17:20  john
1129 - * Inbetween version of network stuff.
1130 - * 
1131 - * Revision 1.4  1994/07/29  16:08:59  john
1132 - * *** empty log message ***
1133 - * 
1134 - * Revision 1.3  1994/07/25  12:33:22  john
1135 - * Network "pinging" in.
1136 - * 
1137 - * Revision 1.2  1994/07/20  15:58:29  john
1138 - * First installment of ipx stuff.
1139 - * 
1140 - * Revision 1.1  1994/07/19  15:43:05  john
1141 - * Initial revision
1142
1143 ------------------------------------------------------------------------
1144 arch/dos/joy.c:
1145
1146 - * $Log: not supported by cvs2svn $
1147 - * Revision 1.5  2004/05/22 01:40:12  btb
1148 - * use JOY_NUM_AXES instead of 4 in joy_(get|set)_cal_vals (d1x r1.3, r1.4)
1149 - *
1150 - * Revision 1.4  2001/10/24 09:25:05  bradleyb
1151 - * Moved input stuff to arch subdirs, as in d1x.
1152 - *
1153 - * Revision 1.3  2001/01/29 14:03:56  bradleyb
1154 - * Fixed build, minor fixes
1155 - *
1156 - * Revision 1.2  2001/01/24 04:29:45  bradleyb
1157 - * changed args_find to FindArg
1158 - *
1159 - * Revision 1.1.1.2  2001/01/19 03:33:52  bradleyb
1160 - * Import of d2x-0.0.9-pre1
1161 - *
1162 - * Revision 1.1.1.1  1999/06/14 21:58:26  donut
1163 - * Import of d1x 1.37 source.
1164 - *
1165 - * Revision 1.37  1995/10/07  13:22:31  john
1166 - * Added new method of reading joystick that allows higher-priority
1167 - * interrupts to go off.
1168 - * 
1169 - * Revision 1.36  1995/03/30  11:03:40  john
1170 - * Made -JoyBios read buttons using BIOS.
1171 - * 
1172 - * Revision 1.35  1995/02/14  11:39:25  john
1173 - * Added polled/bios joystick readers..
1174 - * 
1175 - * Revision 1.34  1995/02/10  17:06:12  john
1176 - * Fixed bug with plugging in a joystick not getting detected.
1177 - * 
1178 - * Revision 1.33  1995/01/27  16:39:42  john
1179 - * Made so that if no joystick detected, it wont't
1180 - * read buttons.
1181 - * 
1182 - * Revision 1.32  1995/01/12  13:16:40  john
1183 - * Made it so that joystick can't lose an axis
1184 - * by 1 weird reading. Reading has to occurr during
1185 - * calibration for this to happen.
1186 - * 
1187 - * Revision 1.31  1994/12/28  15:56:03  john
1188 - * Fixed bug that refused to read joysticks whose 
1189 - * min,cen,max were less than 100 apart.
1190 - * 
1191 - * Revision 1.30  1994/12/28  15:31:53  john
1192 - * Added code to read joystick axis not all at one time.
1193 - * 
1194 - * Revision 1.29  1994/12/27  15:44:36  john
1195 - * Made the joystick timeout be at 1/100th of a second, 
1196 - * regardless of CPU speed.
1197 - * 
1198 - * Revision 1.28  1994/12/04  11:54:54  john
1199 - * Made stick read at whatever rate the clock is at, not
1200 - * at 18.2 times/second.
1201 - * 
1202 - * Revision 1.27  1994/11/29  02:25:40  john
1203 - * Made it so that the scaled reading returns 0 
1204 - * if the calibration factors look funny..
1205 - * 
1206 - * Revision 1.26  1994/11/22  11:08:07  john
1207 - * Commented out the ARCADE joystick.
1208 - * 
1209 - * Revision 1.25  1994/11/14  19:40:26  john
1210 - * Fixed bug with no joystick being detected.
1211 - * 
1212 - * Revision 1.24  1994/11/14  19:36:40  john
1213 - * Took out initial cheapy calibration.
1214 - * 
1215 - * Revision 1.23  1994/11/14  19:13:27  john
1216 - * Took out the calibration in joy_init
1217 - * 
1218 - * Revision 1.22  1994/10/17  10:09:57  john
1219 - * Made the state look at last_State, so that a joy_flush
1220 - * doesn't cause a new down state to be added next reading.
1221 - * 
1222 - * Revision 1.21  1994/10/13  11:36:23  john
1223 - * Made joy_down_time be kept track of in fixed seconds,
1224 - * not ticks.
1225 - * 
1226 - * Revision 1.20  1994/10/12  16:58:50  john
1227 - * Fixed bug w/ previous comment.
1228 - * 
1229 - * Revision 1.19  1994/10/12  16:57:44  john
1230 - * Added function to set a joystick button's state.
1231 - * 
1232 - * Revision 1.18  1994/10/11  10:20:13  john
1233 - * Fixed Flightstick Pro/
1234 - * ..
1235 - * 
1236 - * Revision 1.17  1994/09/29  18:29:20  john
1237 - * *** empty log message ***
1238 - * 
1239 - * Revision 1.16  1994/09/27  19:17:23  john
1240 - * Added code so that is joy_init is never called, joystick is not
1241 - * used at all.
1242 - * 
1243 - * Revision 1.15  1994/09/22  16:09:23  john
1244 - * Fixed some virtual memory lockdown problems with timer and
1245 - * joystick.
1246 - * 
1247 - * Revision 1.14  1994/09/16  11:44:42  john
1248 - * Fixed bug with slow joystick.
1249 - * 
1250 - * Revision 1.13  1994/09/16  11:36:15  john
1251 - * Fixed bug with reading non-present channels.
1252 - * 
1253 - * Revision 1.12  1994/09/15  20:52:48  john
1254 - * rme john
1255 - * Added support for the Arcade style joystick.
1256 - * 
1257 - * Revision 1.11  1994/09/13  20:04:49  john
1258 - * Fixed bug with joystick button down_time.
1259 - * 
1260 - * Revision 1.10  1994/09/10  13:48:07  john
1261 - * Made all 20 buttons read.
1262 - * 
1263 - * Revision 1.9  1994/08/31  09:55:02  john
1264 - * *** empty log message ***
1265 - * 
1266 - * Revision 1.8  1994/08/29  21:02:14  john
1267 - * Added joy_set_cal_values...
1268 - * 
1269 - * Revision 1.7  1994/08/29  20:52:17  john
1270 - * Added better cyberman support; also, joystick calibration
1271 - * value return funcctiionn,
1272 - * 
1273 - * Revision 1.6  1994/08/24  18:53:12  john
1274 - * Made Cyberman read like normal mouse; added dpmi module; moved
1275 - * mouse from assembly to c. Made mouse buttons return time_down.
1276 - * 
1277 - * Revision 1.5  1994/07/14  22:12:23  john
1278 - * Used intrinsic forms of outp to fix vmm error.
1279 - * 
1280 - * Revision 1.4  1994/07/07  19:52:59  matt
1281 - * Made joy_init() return success/fail flag
1282 - * Made joy_init() properly detect a stick if one is plugged in after joy_init()
1283 - * was called the first time.
1284 - * 
1285 - * Revision 1.3  1994/07/01  10:55:55  john
1286 - * Fixed some bugs... added support for 4 axis.
1287 - * 
1288 - * Revision 1.2  1994/06/30  20:36:55  john
1289 - * Revamped joystick code.
1290 - * 
1291 - * Revision 1.1  1994/06/30  15:42:15  john
1292 - * Initial revision
1293
1294 ------------------------------------------------------------------------
1295 arch/dos/joydefs.c:
1296
1297 - * $Log: not supported by cvs2svn $
1298 - * Revision 1.3  2001/10/24 09:25:05  bradleyb
1299 - * Moved input stuff to arch subdirs, as in d1x.
1300 - *
1301 - * Revision 1.2  2001/01/29 14:03:57  bradleyb
1302 - * Fixed build, minor fixes
1303 - *
1304 - * Revision 1.1.1.2  2001/01/19 03:33:52  bradleyb
1305 - * Import of d2x-0.0.9-pre1
1306 - *
1307 - * Revision 1.1.1.1  1999/06/14 21:58:29  donut
1308 - * Import of d1x 1.37 source.
1309 - *
1310 - * Revision 2.2  1995/06/30  12:30:22  john
1311 - * Added -Xname command line.
1312 - * 
1313 - * Revision 2.1  1995/04/06  12:13:20  john
1314 - * Made so you can calibrate Gravis Gamepad.
1315 - * 
1316 - * Revision 2.0  1995/02/27  11:30:27  john
1317 - * New version 2.0, which has no anonymous unions, builds with
1318 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
1319 - * 
1320 - * Revision 1.71  1995/02/12  02:06:10  john
1321 - * Fixed bug with joystick incorrectly asking for
1322 - * calibration.
1323 - * 
1324 - * Revision 1.70  1995/01/28  15:58:07  john
1325 - * Made joystick calibration be only when wrong detected in
1326 - * menu or joystick axis changed.
1327 - * 
1328 - * Revision 1.69  1995/01/25  14:37:55  john
1329 - * Made joystick only prompt for calibration once...
1330 - * 
1331 - * Revision 1.68  1995/01/24  16:34:29  john
1332 - * Made so that if you reconfigure joystick and
1333 - * add or subtract an axis, it asks for a recalibration
1334 - * upon leaving.
1335 - * 
1336 - * Revision 1.67  1994/12/29  11:08:51  john
1337 - * Fixed Thrustmaster and Logitech Wingman extreme
1338 - * Hat by reading the y2 axis during the center stage
1339 - * of the calibration, and using 75, 50, 27, and 3 %
1340 - * as values for the 4 positions.
1341 - * 
1342 - * Revision 1.66  1994/12/15  18:17:39  john
1343 - * Fixed warning with previous.
1344 - * 
1345 - * Revision 1.65  1994/12/15  18:15:48  john
1346 - * Made the joy cal only write the .cfg file, not
1347 - * the player file.
1348 - * 
1349 - * Revision 1.64  1994/12/13  14:43:35  john
1350 - * Took out the code in kconfig to build direction array.
1351 - * Called kc_set_controls after selecting a new control type.
1352 - * 
1353 - * Revision 1.63  1994/12/10  12:08:47  john
1354 - * Changed some delays to use TICKER instead of timer_get_fixed_seconds.
1355 - * 
1356 - * Revision 1.62  1994/12/09  11:01:07  mike
1357 - * force calibration of joystick on joystick selection from Controls... menu.
1358 - * 
1359 - * Revision 1.61  1994/12/07  21:50:27  john
1360 - * Put stop/start time around joystick delay.
1361 - * 
1362 - * Revision 1.60  1994/12/07  19:34:39  john
1363 - * Added delay.
1364 - * 
1365 - * Revision 1.59  1994/12/07  18:12:14  john
1366 - * NEatened up joy cal.,
1367 - * 
1368 - * Revision 1.58  1994/12/07  17:07:51  john
1369 - * Fixed up joy cal.
1370 - * 
1371 - * Revision 1.57  1994/12/07  16:48:53  yuan
1372 - * localization
1373 - * 
1374 - * Revision 1.56  1994/12/07  16:05:55  john
1375 - * Changed the way joystick calibration works.
1376 - * 
1377 - * Revision 1.55  1994/12/06  20:15:22  john
1378 - * Took out code that unpauses songs that were never paused.
1379 - * 
1380 - * Revision 1.54  1994/12/06  15:14:09  yuan
1381 - * Localization
1382 - * 
1383 - * Revision 1.53  1994/12/05  16:29:16  john
1384 - * Took out music pause around the cheat menu.
1385 - * 
1386 - * Revision 1.52  1994/12/04  12:39:10  john
1387 - * MAde so that FCS calibration doesn't ask for axis #2.
1388 - * 
1389 - * Revision 1.51  1994/12/03  15:14:59  john
1390 - * Took out the delay mentioned previosuly cause it would
1391 - * cause bigger problems than it helps, especially with netgames.
1392 - * 
1393 - * Revision 1.50  1994/12/03  14:16:14  john
1394 - * Put a delay between screens in joy cal to keep Yuan from
1395 - * double hitting.
1396 - * 
1397 - * Revision 1.49  1994/12/03  11:04:06  john
1398 - * Changed newmenu code a bit to fix bug with bogus
1399 - * backgrounds occcasionally.
1400 - * 
1401 - * Revision 1.48  1994/12/02  11:03:44  yuan
1402 - * Localization.
1403 - * 
1404 - * Revision 1.47  1994/12/02  10:50:33  yuan
1405 - * Localization
1406 - * 
1407 - * Revision 1.46  1994/12/01  12:21:59  john
1408 - * Added code to calibrate 2 joysticks separately.
1409 - * 
1410 - * Revision 1.45  1994/12/01  11:52:31  john
1411 - * Added message when you select FCS to say that if
1412 - * you have WCS, see manuel.
1413 - * 
1414 - * Revision 1.44  1994/11/29  02:26:28  john
1415 - * Made the prompts for upper-left, lower right for joy
1416 - * calibration more obvious.
1417 - * 
1418 - * Revision 1.43  1994/11/26  13:13:59  matt
1419 - * Changed "none" option to "keyboard only"
1420 - * 
1421 - * Revision 1.42  1994/11/21  19:35:13  john
1422 - * Replaced calls to joy_init with if (joy_present)
1423 - * 
1424 - * Revision 1.41  1994/11/21  19:28:34  john
1425 - * Changed warning for no joystick to use nm_messagebox..
1426 - * 
1427 - * Revision 1.40  1994/11/21  19:06:25  john
1428 - * Made it so that it only stops sound when your in game mode. 
1429 - * 
1430 - * Revision 1.39  1994/11/21  11:47:18  john
1431 - * Made sound pause during joystick calibration.
1432 - * 
1433 - * Revision 1.38  1994/11/10  20:34:18  rob
1434 - * Removed menu-specific network mode support in favor in new stuff
1435 - * in newmenu.c
1436 - * 
1437 - * Revision 1.37  1994/11/08  21:21:38  john
1438 - * Made Esc exit joystick calibration.
1439 - * 
1440 - * Revision 1.36  1994/11/08  15:14:42  john
1441 - * Added more calls so net doesn't die in net game.
1442 - * 
1443 - * Revision 1.35  1994/11/08  14:59:12  john
1444 - * Added code to respond to network while in menus.
1445 - * 
1446 - * Revision 1.34  1994/10/24  19:56:32  john
1447 - * Made the new user setup prompt for config options.
1448 - * 
1449 - * Revision 1.33  1994/10/22  14:11:52  mike
1450 - * Suppress compiler warning message.
1451 - * 
1452 - * Revision 1.32  1994/10/19  12:44:24  john
1453 - * Added hours field to player structure.
1454 - * 
1455 - * Revision 1.31  1994/10/17  13:07:13  john
1456 - * Moved the descent.cfg info into the player config file.
1457 - * 
1458 - * Revision 1.30  1994/10/13  21:41:12  john
1459 - * MAde Esc exit out of joystick calibration.
1460 - * 
1461 - * Revision 1.29  1994/10/13  19:22:27  john
1462 - * Added separate config saves for different devices.
1463 - * Made all the devices work together better, such as mice won't
1464 - * get read when you're playing with the joystick.
1465 - * 
1466 - * Revision 1.28  1994/10/13  11:40:18  john
1467 - * Took out warnings.
1468 - * 
1469 - * Revision 1.27  1994/10/13  11:35:23  john
1470 - * Made Thrustmaster FCS Hat work.  Put a background behind the
1471 - * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
1472 - * menu to new menu. Made F6 be calibrate joystick.
1473 - * 
1474 - * Revision 1.26  1994/10/11  21:29:03  matt
1475 - * Made a bunch of menus have good initial selected values
1476 - * 
1477 - * Revision 1.25  1994/10/11  17:08:39  john
1478 - * Added sliders for volume controls.
1479 - * 
1480 - * Revision 1.24  1994/10/10  17:59:21  john
1481 - * Neatend previous.
1482 - * 
1483 - * Revision 1.23  1994/10/10  17:57:59  john
1484 - * Neatend previous.
1485 - * 
1486 - * Revision 1.22  1994/10/10  17:56:11  john
1487 - * Added messagebox that tells that config has been saved.
1488 - * 
1489 - * Revision 1.21  1994/09/30  12:37:26  john
1490 - * Added midi,digi volume to configuration.
1491 - * 
1492 - * Revision 1.20  1994/09/22  16:14:14  john
1493 - * Redid intro sequecing.
1494 - * 
1495 - * Revision 1.19  1994/09/19  18:50:15  john
1496 - * Added switch to disable joystick.
1497 - * 
1498 - * Revision 1.18  1994/09/12  11:47:36  john
1499 - * Made stupid cruise work better.  Make kconfig values get
1500 - * read/written to disk.
1501 - * 
1502 - * Revision 1.17  1994/09/10  15:46:47  john
1503 - * First version of new keyboard configuration.
1504 - * 
1505 - * Revision 1.16  1994/09/06  19:35:44  john
1506 - * Fixed bug that didn';t load new size .cal file.
1507 - * 
1508 - * Revision 1.15  1994/09/06  14:51:58  john
1509 - * Added sensitivity adjustment, fixed bug with joystick button not
1510 - * staying down.
1511 - * 
1512 - * Revision 1.14  1994/09/02  16:13:47  john
1513 - * Made keys fill in position.
1514 - * 
1515 - * Revision 1.13  1994/08/31  17:58:50  john
1516 - * Made a bit simpler.
1517 - * 
1518 - * Revision 1.12  1994/08/31  14:17:54  john
1519 - * *** empty log message ***
1520 - * 
1521 - * Revision 1.11  1994/08/31  14:10:56  john
1522 - * Made keys not work when KEY_DELETE pressed.
1523 - * 
1524 - * Revision 1.10  1994/08/31  13:40:47  mike
1525 - * Change constant
1526 - * 
1527 - * Revision 1.9  1994/08/31  12:56:27  john
1528 - * *** empty log message ***
1529 - * 
1530 - * Revision 1.8  1994/08/30  20:38:29  john
1531 - * Add more config stuff..
1532 - * 
1533 - * Revision 1.7  1994/08/30  16:37:25  john
1534 - * Added menu options to set controls.
1535 - * 
1536 - * Revision 1.6  1994/08/30  09:27:18  john
1537 - * *** empty log message ***
1538 - * 
1539 - * Revision 1.5  1994/08/30  09:12:01  john
1540 - * *** empty log message ***
1541 - * 
1542 - * Revision 1.4  1994/08/29  21:18:32  john
1543 - * First version of new keyboard/oystick remapping stuff.
1544 - * 
1545 - * Revision 1.3  1994/08/24  19:00:29  john
1546 - * Changed key_down_time to return fixed seconds instead of
1547 - * milliseconds.
1548 - * 
1549 - * Revision 1.2  1994/08/17  16:50:37  john
1550 - * Added damaging fireballs, missiles.
1551 - * 
1552 - * Revision 1.1  1994/08/17  10:07:12  john
1553 - * Initial revision
1554
1555 ------------------------------------------------------------------------
1556 arch/dos/key.c:
1557
1558 - * $Log: not supported by cvs2svn $
1559 - * Revision 1.3  2001/10/24 09:25:05  bradleyb
1560 - * Moved input stuff to arch subdirs, as in d1x.
1561 - *
1562 - * Revision 1.3  2001/01/31 14:04:44  bradleyb
1563 - * Fix compiler warnings
1564 - *
1565 - * Revision 1.2  2001/01/29 14:03:57  bradleyb
1566 - * Fixed build, minor fixes
1567 - *
1568 - * Revision 1.1.1.2  2001/01/19 03:33:52  bradleyb
1569 - * Import of d2x-0.0.9-pre1
1570 - *
1571 - * Revision 1.1.1.1  1999/06/14 21:58:32  donut
1572 - * Import of d1x 1.37 source.
1573 - *
1574 - * Revision 1.35  1995/01/25  20:13:30  john
1575 - * Took out not passing keys to debugger if w10.
1576 - * 
1577 - * Revision 1.34  1995/01/14  19:19:31  john
1578 - * Made so when you press Shift+Baskspace, it release keys autmatically.
1579 - * 
1580 - * Revision 1.33  1994/12/13  09:21:48  john
1581 - * Took out keyd_editor_mode, and KEY_DEBUGGED stuff for NDEBUG versions.
1582 - * 
1583 - * Revision 1.32  1994/11/12  13:52:01  john
1584 - * Fixed bug with code that cleared bios buffer.
1585 - * 
1586 - * Revision 1.31  1994/10/24  15:16:16  john
1587 - * Added code to detect KEY_PAUSE.
1588 - * 
1589 - * Revision 1.30  1994/10/24  13:57:53  john
1590 - * Hacked in support for pause key onto code 0x61.
1591 - * 
1592 - * Revision 1.29  1994/10/21  15:18:13  john
1593 - * *** empty log message ***
1594 - * 
1595 - * Revision 1.28  1994/10/21  15:17:24  john
1596 - * Made LSHIFT+BACKSPACE do what PrtScr used to.
1597 - * 
1598 - * Revision 1.27  1994/09/22  16:09:18  john
1599 - * Fixed some virtual memory lockdown problems with timer and
1600 - * joystick.
1601 - * 
1602 - * Revision 1.26  1994/09/15  21:32:47  john
1603 - * Added bounds checking for down_count scancode
1604 - * parameter.
1605 - * 
1606 - * Revision 1.25  1994/08/31  12:22:20  john
1607 - * Added KEY_DEBUGGED
1608 - * 
1609 - * Revision 1.24  1994/08/24  18:53:48  john
1610 - * Made Cyberman read like normal mouse; added dpmi module; moved
1611 - * mouse from assembly to c. Made mouse buttons return time_down.
1612 - * 
1613 - * Revision 1.23  1994/08/18  15:17:51  john
1614 - * *** empty log message ***
1615 - * 
1616 - * Revision 1.22  1994/08/18  15:16:38  john
1617 - * fixed some bugs with clear_key_times and then
1618 - * removed it because i fixed key_flush to do the
1619 - * same.
1620 - * 
1621 - * Revision 1.21  1994/08/17  19:01:25  john
1622 - * Attempted to fix a bug with a key being held down
1623 - * key_flush called, then the key released having too 
1624 - * long of a time.
1625 - * 
1626 - * Revision 1.20  1994/08/08  10:43:48  john
1627 - * Recorded when a key was pressed for key_inkey_time.
1628 - * 
1629 - * Revision 1.19  1994/06/22  15:00:03  john
1630 - * Made keyboard close automatically on exit.
1631 - * 
1632 - * Revision 1.18  1994/06/21  09:16:29  john
1633 - * *** empty log message ***
1634 - * 
1635 - * Revision 1.17  1994/06/21  09:08:23  john
1636 - * *** empty log message ***
1637 - * 
1638 - * Revision 1.16  1994/06/21  09:05:01  john
1639 - * *** empty log message ***
1640 - * 
1641 - * Revision 1.15  1994/06/21  09:04:24  john
1642 - * Made PrtScreen do an int5
1643 - * 
1644 - * Revision 1.14  1994/06/17  17:17:06  john
1645 - * Added keyd_time_last_key_was_pressed or something like that.
1646 - * 
1647 - * Revision 1.13  1994/05/14  13:55:16  matt
1648 - * Added #define to control key passing to bios
1649 - * 
1650 - * Revision 1.12  1994/05/05  18:09:39  john
1651 - * Took out BIOS to prevent stuck keys.
1652 - * 
1653 - * Revision 1.11  1994/05/03  17:39:12  john
1654 - * *** empty log message ***
1655 - * 
1656 - * Revision 1.10  1994/04/29  12:14:20  john
1657 - * Locked all memory used during interrupts so that program
1658 - * won't hang when using virtual memory.
1659 - * 
1660 - * Revision 1.9  1994/04/28  23:49:41  john
1661 - * Made key_flush flush more keys and also did something else but i forget what.
1662 - * 
1663 - * Revision 1.8  1994/04/22  12:52:12  john
1664 - * *** empty log message ***
1665 - * 
1666 - * Revision 1.7  1994/04/01  10:44:59  mike
1667 - * Change key_getch() to call getch() if our interrupt hasn't been installed.
1668 - * 
1669 - * Revision 1.6  1994/03/09  10:45:48  john
1670 - * Neatend code a bit.
1671 - * 
1672 - * Revision 1.5  1994/02/17  17:24:16  john
1673 - * Neatened up a bit.
1674 - * 
1675 - * Revision 1.4  1994/02/17  16:30:29  john
1676 - * Put in code to pass keys when in debugger.
1677 - * 
1678 - * Revision 1.3  1994/02/17  15:57:59  john
1679 - * Made handler not chain to BIOS handler.
1680 - * 
1681 - * Revision 1.2  1994/02/17  15:56:06  john
1682 - * Initial version.
1683 - * 
1684 - * Revision 1.1  1994/02/17  15:54:07  john
1685 - * Initial revision
1686
1687 ------------------------------------------------------------------------
1688 arch/dos/mono.c:
1689
1690 - * $Log: not supported by cvs2svn $
1691 - * Revision 1.1.1.1  2001/01/19 03:30:15  bradleyb
1692 - * Import of d2x-0.0.8
1693 - *
1694 - * Revision 1.1.1.1  1999/06/14 21:58:35  donut
1695 - * Import of d1x 1.37 source.
1696 - *
1697 - * Revision 1.12  1995/02/23  11:59:57  john
1698 - * Made the windows smaller so they don't overwrite the debug file menus.
1699 - * 
1700 - * Revision 1.11  1994/11/27  23:07:50  matt
1701 - * Made changes needed to be able to compile out monochrome debugging code
1702 - * 
1703 - * Revision 1.10  1994/10/26  22:23:43  john
1704 - * Limited windows to 2.  Took away saving what was under
1705 - * a window.
1706 - * 
1707 - * Revision 1.9  1994/07/14  23:25:44  matt
1708 - * Allow window 0 to be opened; don't allow mono to be initialized twice
1709 - * 
1710 - * Revision 1.8  1994/03/09  10:45:38  john
1711 - * Sped up scroll.
1712 - * 
1713 - * Revision 1.7  1994/01/26  08:56:55  mike
1714 - * Comment out int3 in mputc.
1715 - * 
1716 - * Revision 1.6  1994/01/12  15:56:34  john
1717 - * made backspace do an int3 during mono stuff.
1718 - * .,
1719 - * 
1720 - * Revision 1.5  1993/12/07  12:33:23  john
1721 - * *** empty log message ***
1722 - * 
1723 - * Revision 1.4  1993/10/15  10:10:25  john
1724 - * *** empty log message ***
1725 - * 
1726 - * Revision 1.3  1993/09/14  20:55:13  matt
1727 - * Made minit() and mopen() check for presence of mono card in machine.
1728 - * 
1729 - * Revision 1.2  1993/07/22  13:10:21  john
1730 - * *** empty log message ***
1731 - * 
1732 - * Revision 1.1  1993/07/10  13:10:38  matt
1733 - * Initial revision
1734
1735 ------------------------------------------------------------------------
1736 arch/dos/mono.h:
1737
1738 - * Revision 1.6  1994/12/03  17:07:37  matt
1739 - * Made mono code turn off with either NDEBUG or NMONO
1740 - * 
1741 - * Revision 1.5  1994/11/27  23:07:28  matt
1742 - * Made changes needed to be able to compile out monochrome debugging code
1743 - * 
1744 - * Revision 1.4  1993/12/07  12:33:28  john
1745 - * *** empty log message ***
1746 - * 
1747 - * Revision 1.3  1993/09/14  20:54:50  matt
1748 - * Made minit() check for mono card, return -1 if present, 0 if not
1749 - * 
1750 - * Revision 1.2  1993/07/22  13:05:40  john
1751 - * added macros to print variables
1752 - * 
1753 - * Revision 1.1  1993/07/10  13:10:40  matt
1754 - * Initial revision
1755
1756 ------------------------------------------------------------------------
1757 arch/dos/mouse.c:
1758
1759 - * Revision 1.11  1995/02/10  18:52:17  john
1760 - * Fixed bug with mouse not getting closed.
1761 - *
1762 - * Revision 1.10  1995/02/02  11:10:33  john
1763 - * Changed a bunch of mouse stuff around to maybe get
1764 - * around PS/2 mouse hang.
1765 - *
1766 - * Revision 1.9  1995/01/14  19:19:52  john
1767 - * Fixed signed short error cmp with -1 that caused mouse
1768 - * to break under Watcom 10.0
1769 - *
1770 - * Revision 1.8  1994/12/27  12:38:23  john
1771 - * Made mouse use temporary dos buffer instead of
1772 - *
1773 - * allocating its own.
1774 - *
1775 - *
1776 - * Revision 1.7  1994/12/05  23:54:53  john
1777 - * Fixed bug with mouse_get_delta only returning positive numbers..
1778 - *
1779 - * Revision 1.6  1994/11/18  23:18:18  john
1780 - * Changed some shorts to ints.
1781 - *
1782 - * Revision 1.5  1994/09/13  12:34:02  john
1783 - * Added functions to get down count and state.
1784 - *
1785 - * Revision 1.4  1994/08/29  20:52:19  john
1786 - * Added better cyberman support; also, joystick calibration
1787 - * value return funcctiionn,
1788 - *
1789 - * Revision 1.3  1994/08/24  18:54:32  john
1790 - * *** empty log message ***
1791 - *
1792 - * Revision 1.2  1994/08/24  18:53:46  john
1793 - * Made Cyberman read like normal mouse; added dpmi module; moved
1794 - * mouse from assembly to c. Made mouse buttons return time_down.
1795 - *
1796 - * Revision 1.1  1994/08/24  13:56:37  john
1797 - * Initial revision
1798
1799 ------------------------------------------------------------------------
1800 arch/include/joy.h:
1801
1802 - * Revision 1.17  1995/10/07  13:22:30  john
1803 - * Added new method of reading joystick that allows higher-priority
1804 - * interrupts to go off.
1805 - *
1806 - * Revision 1.16  1995/02/14  11:17:13  john
1807 - * Added BIOS readings for stick.
1808 - *
1809 - * Revision 1.15  1995/02/14  10:09:58  john
1810 - * Added OS2 switch.
1811 - *
1812 - * Revision 1.14  1994/12/28  13:49:20  john
1813 - * Added function to set joystick for slow reading
1814 - *
1815 - * Revision 1.13  1994/10/13  11:36:06  john
1816 - * Made joy_down_time be kept track of in fixed seconds,
1817 - * not ticks.
1818 - *
1819 - * Revision 1.12  1994/10/12  17:03:16  john
1820 - * Added prototype for joy_get_scaled_reading.
1821 - *
1822 - * Revision 1.11  1994/10/12  16:57:55  john
1823 - * Added function to set a joystick button's state.
1824 - *
1825 - * Revision 1.10  1994/09/22  16:09:00  john
1826 - * Fixed some virtual memory lockdown problems with timer and
1827 - * joystick.
1828 - *
1829 - * Revision 1.9  1994/08/31  09:54:57  john
1830 - * *** empty log message ***
1831 - *
1832 - * Revision 1.8  1994/08/29  21:02:24  john
1833 - * Added joy_set_cal_values...
1834 - *
1835 - * Revision 1.7  1994/08/29  20:51:52  john
1836 - * Added better cyberman support; also, joystick calibration
1837 - * value return funcctiionn,
1838 - *
1839 - * Revision 1.6  1994/07/01  10:55:44  john
1840 - * Fixed some bugs... added support for 4 axis.
1841 - *
1842 - * Revision 1.5  1994/06/30  20:36:51  john
1843 - * Revamped joystick code.
1844 - *
1845 - * Revision 1.4  1994/04/22  12:52:10  john
1846 - * *** empty log message ***
1847 - *
1848 - * Revision 1.3  1994/01/18  13:53:39  john
1849 - * Made all joystick functions return int's instead of
1850 - * shorts.  Also made the stick reading be CPU speed
1851 - * independant by using the timer_get_Stamp_64
1852 - * function.
1853 - *
1854 - * Revision 1.2  1994/01/18  10:58:42  john
1855 - * *** empty log message ***
1856 - *
1857 - * Revision 1.1  1993/07/10  13:10:39  matt
1858 - * Initial revision
1859
1860 ------------------------------------------------------------------------
1861 arch/win32/include/key.h:
1862
1863 - * Revision 1.19  1994/10/24  13:58:12  john
1864 - * Hacked in support for pause key onto code 0x61.
1865 - * 
1866 - * Revision 1.18  1994/10/21  15:17:10  john
1867 - * Added KEY_PRINT_SCREEN
1868 - * 
1869 - * Revision 1.17  1994/08/31  12:22:13  john
1870 - * Added KEY_DEBUGGED
1871 - * 
1872 - * Revision 1.16  1994/08/24  18:53:50  john
1873 - * Made Cyberman read like normal mouse; added dpmi module; moved
1874 - * mouse from assembly to c. Made mouse buttons return time_down.
1875 - * 
1876 - * Revision 1.15  1994/08/18  14:56:16  john
1877 - * *** empty log message ***
1878 - * 
1879 - * Revision 1.14  1994/08/08  10:43:24  john
1880 - * Recorded when a key was pressed for key_inkey_time.
1881 - * 
1882 - * Revision 1.13  1994/06/17  17:17:28  john
1883 - * Added keyd_time_last_key_was_pressed or something like that.
1884 - * 
1885 - * Revision 1.12  1994/04/29  12:14:19  john
1886 - * Locked all memory used during interrupts so that program
1887 - * won't hang when using virtual memory.
1888 - * 
1889 - * Revision 1.11  1994/02/17  15:57:14  john
1890 - * Changed key libary to C.
1891 - * 
1892 - * Revision 1.10  1994/01/31  08:34:09  john
1893 - * Fixed reversed lshift/rshift keys.
1894 - * 
1895 - * Revision 1.9  1994/01/18  10:58:17  john
1896 - * *** empty log message ***
1897 - * 
1898 - * Revision 1.8  1993/10/16  19:24:43  matt
1899 - * Added new function key_clear_times() & key_clear_counts()
1900 - * 
1901 - * Revision 1.7  1993/10/15  10:17:09  john
1902 - * added keyd_last_key_pressed and released for use with recorder.
1903 - * 
1904 - * Revision 1.6  1993/10/06  16:20:37  john
1905 - * fixed down arrow bug
1906 - * 
1907 - * Revision 1.5  1993/10/04  13:26:42  john
1908 - * changed the #defines for scan codes.
1909 - * 
1910 - * Revision 1.4  1993/09/28  11:35:20  john
1911 - * added key_peekkey
1912 - * 
1913 - * Revision 1.3  1993/09/20  18:36:43  john
1914 - * *** empty log message ***
1915 - * 
1916 - * Revision 1.1  1993/07/10  13:10:39  matt
1917 - * Initial revision
1918
1919 ------------------------------------------------------------------------
1920 arch/win32/include/mouse.h:
1921
1922 - * Revision 1.10  1995/02/02  10:22:29  john
1923 - * Added cyberman init parameter.
1924 - * 
1925 - * Revision 1.9  1994/11/18  23:18:09  john
1926 - * Changed some shorts to ints.
1927 - * 
1928 - * Revision 1.8  1994/09/13  12:33:49  john
1929 - * Added functions to get down count and state.
1930 - * 
1931 - * Revision 1.7  1994/08/29  20:52:20  john
1932 - * Added better cyberman support; also, joystick calibration
1933 - * value return funcctiionn,
1934 - * 
1935 - * Revision 1.6  1994/08/24  17:54:35  john
1936 - * *** empty log message ***
1937 - * 
1938 - * Revision 1.5  1994/08/24  17:51:43  john
1939 - * Added transparent cyberman support
1940 - * 
1941 - * Revision 1.4  1993/07/27  09:32:22  john
1942 - * *** empty log message ***
1943 - * 
1944 - * Revision 1.3  1993/07/26  10:46:44  john
1945 - * added definition for mouse_set_pos
1946 - * 
1947 - * Revision 1.2  1993/07/22  13:07:59  john
1948 - * added header for mousesetlimts
1949 - * 
1950 - * Revision 1.1  1993/07/10  13:10:40  matt
1951 - * Initial revision
1952
1953 ------------------------------------------------------------------------
1954 arch/win32/mouse.c:
1955
1956 - * Old Log:
1957 - * Revision 1.8  1996/02/21  13:57:36  allender
1958 - * cursor device manager stuff added here so as not to
1959 - * rely on InterfaceLib anymore
1960 - *
1961 - * Revision 1.7  1995/10/17  15:42:21  allender
1962 - * new mouse function to determine single button press
1963 - *
1964 - * Revision 1.6  1995/10/03  11:27:31  allender
1965 - * fixed up hotspot problems with the mouse on multiple monitors
1966 - *
1967 - * Revision 1.5  1995/07/13  11:27:08  allender
1968 - * trap button checks at MAX_MOUSE_BUTTONS
1969 - *
1970 - * Revision 1.4  1995/06/25  21:56:53  allender
1971 - * added events include
1972 - *
1973 - * Revision 1.3  1995/05/11  17:06:38  allender
1974 - * fixed up mouse routines
1975 - *
1976 - * Revision 1.2  1995/05/11  13:05:53  allender
1977 - * of mouse handler code
1978 - *
1979 - * Revision 1.1  1995/05/05  09:54:45  allender
1980 - * Initial revision
1981 - *
1982 - * Revision 1.9  1995/01/14  19:19:52  john
1983 - * Fixed signed short error cmp with -1 that caused mouse
1984 - * to break under Watcom 10.0
1985 - *
1986 - * Revision 1.8  1994/12/27  12:38:23  john
1987 - * Made mouse use temporary dos buffer instead of
1988 - *
1989 - * allocating its own.
1990 - *
1991 - * Revision 1.7  1994/12/05  23:54:53  john
1992 - * Fixed bug with mouse_get_delta only returning positive numbers..
1993 - *
1994 - * Revision 1.6  1994/11/18  23:18:18  john
1995 - * Changed some shorts to ints.
1996 - *
1997 - * Revision 1.5  1994/09/13  12:34:02  john
1998 - * Added functions to get down count and state.
1999 - *
2000 - * Revision 1.4  1994/08/29  20:52:19  john
2001 - * Added better cyberman support; also, joystick calibration
2002 - * value return funcctiionn,
2003 - *
2004 - * Revision 1.3  1994/08/24  18:54:32  john
2005 - * *** empty log message ***
2006 - *
2007 - * Revision 1.2  1994/08/24  18:53:46  john
2008 - * Made Cyberman read like normal mouse; added dpmi module; moved
2009 - * mouse from assembly to c. Made mouse buttons return time_down.
2010 - *
2011 - * Revision 1.1  1994/08/24  13:56:37  john
2012 - * Initial revision
2013
2014 ------------------------------------------------------------------------
2015 cfile/cfile.c:
2016
2017 - * Revision 1.7  1995/10/27  15:18:20  allender
2018 - * get back to descent directory before trying to read a hog file
2019 - *
2020 - * Revision 1.6  1995/10/21  23:48:24  allender
2021 - * hogfile(s) are now in :Data: folder
2022 - *
2023 - * Revision 1.5  1995/08/14  09:27:31  allender
2024 - * added byteswap header
2025 - *
2026 - * Revision 1.4  1995/05/12  11:54:33  allender
2027 - * changed memory stuff again
2028 - *
2029 - * Revision 1.3  1995/05/04  20:03:38  allender
2030 - * added code that was missing...use NewPtr instead of malloc
2031 - *
2032 - * Revision 1.2  1995/04/03  09:59:49  allender
2033 - * *** empty log message ***
2034 - *
2035 - * Revision 1.1  1995/03/30  10:25:02  allender
2036 - * Initial revision
2037 - *
2038 - *
2039 - * --- PC RCS Information ---
2040 - * Revision 1.24  1995/03/15  14:20:27  john
2041 - * Added critical error checker.
2042 - *
2043 - * Revision 1.23  1995/03/13  15:16:53  john
2044 - * Added alternate directory stuff.
2045 - *
2046 - * Revision 1.22  1995/02/09  23:08:47  matt
2047 - * Increased the max number of files in hogfile to 250
2048 - *
2049 - * Revision 1.21  1995/02/01  20:56:47  john
2050 - * Added cfexist function
2051 - *
2052 - * Revision 1.20  1995/01/21  17:53:48  john
2053 - * Added alternate pig file thing.
2054 - *
2055 - * Revision 1.19  1994/12/29  15:10:02  john
2056 - * Increased hogfile max files to 200.
2057 - *
2058 - * Revision 1.18  1994/12/12  13:20:57  john
2059 - * Made cfile work with fiellentth.
2060 - *
2061 - * Revision 1.17  1994/12/12  13:14:25  john
2062 - * Made cfiles prefer non-hog files.
2063 - *
2064 - * Revision 1.16  1994/12/09  18:53:26  john
2065 - * *** empty log message ***
2066 - *
2067 - * Revision 1.15  1994/12/09  18:52:56  john
2068 - * Took out mem, error checking.
2069 - *
2070 - * Revision 1.14  1994/12/09  18:10:31  john
2071 - * Speed up cfgets, which was slowing down the reading of
2072 - * bitmaps.tbl, which was making POF loading look slow.
2073 - *
2074 - * Revision 1.13  1994/12/09  17:53:51  john
2075 - * Added error checking to number of hogfiles..
2076 - *
2077 - * Revision 1.12  1994/12/08  19:02:55  john
2078 - * Added cfgets.
2079 - *
2080 - * Revision 1.11  1994/12/07  21:57:48  john
2081 - * Took out data dir.
2082 - *
2083 - * Revision 1.10  1994/12/07  21:38:02  john
2084 - * Made cfile not return error..
2085 - *
2086 - * Revision 1.9  1994/12/07  21:35:34  john
2087 - * Made it read from data directory.
2088 - *
2089 - * Revision 1.8  1994/12/07  21:33:55  john
2090 - * Stripped out compression stuff...
2091 - *
2092 - * Revision 1.7  1994/04/13  23:44:59  matt
2093 - * When file cannot be opened, free up the buffer for that file.
2094 - *
2095 - * Revision 1.6  1994/02/18  12:38:20  john
2096 - * Optimized a bit
2097 - *
2098 - * Revision 1.5  1994/02/15  18:13:20  john
2099 - * Fixed more bugs.
2100 - *
2101 - * Revision 1.4  1994/02/15  13:27:58  john
2102 - * Works ok...
2103 - *
2104 - * Revision 1.3  1994/02/15  12:51:57  john
2105 - * Crappy inbetween version
2106 - *
2107 - * Revision 1.2  1994/02/14  20:12:29  john
2108 - * First version working with new cfile stuff.
2109 - *
2110 - * Revision 1.1  1994/02/14  15:51:33  john
2111 - * Initial revision
2112 - *
2113 - * Revision 1.1  1994/02/10  15:45:12  john
2114 - * Initial revision
2115
2116 ------------------------------------------------------------------------
2117 iff/iff.c:
2118
2119 - * Revision 1.2  1995/05/12  11:54:43  allender
2120 - * changed memory stuff again
2121 - *
2122 - * Revision 1.1  1995/05/05  08:59:41  allender
2123 - * Initial revision
2124 - *
2125 - * Revision 1.43  1994/12/08  19:03:17  john
2126 - * Added code to use cfile.
2127 - *
2128 - * Revision 1.42  1994/12/08  17:45:32  john
2129 - * Put back in cfile stuff.
2130 - *
2131 - * Revision 1.41  1994/11/19  16:41:06  matt
2132 - * Took out unused code
2133 - *
2134 - * Revision 1.40  1994/11/07  21:26:39  matt
2135 - * Added new function iff_read_into_bitmap()
2136 - *
2137 - * Revision 1.39  1994/10/27  00:12:03  john
2138 - * Used nocfile
2139 - *
2140 - * Revision 1.38  1994/08/10  19:49:58  matt
2141 - * Fixed bitmaps in ILBM format with masking (stencil) on.
2142 - *
2143 - * Revision 1.37  1994/06/02  18:53:17  matt
2144 - * Clear flags & selector in new bitmap structure
2145 - *
2146 - * Revision 1.36  1994/05/17  14:00:33  matt
2147 - * Fixed bug with odd-width deltas & odd-length body chunks
2148 - *
2149 - * Revision 1.35  1994/05/16  20:38:55  matt
2150 - * Made anim brushes work when odd width
2151 - *
2152 - * Revision 1.34  1994/05/06  19:37:26  matt
2153 - * Improved error handling and checking
2154 - *
2155 - * Revision 1.33  1994/04/27  20:57:07  matt
2156 - * Fixed problem with RLE decompression and odd-width bitmap
2157 - * Added more error checking
2158 - *
2159 - * Revision 1.32  1994/04/16  21:44:19  matt
2160 - * Fixed bug introduced last version
2161 - *
2162 - * Revision 1.31  1994/04/16  20:12:40  matt
2163 - * Made masked (stenciled) bitmaps work
2164 - *
2165 - * Revision 1.30  1994/04/13  23:46:16  matt
2166 - * Added function, iff_errormsg(), which returns ptr to error message.
2167 - *
2168 - * Revision 1.29  1994/04/13  23:27:25  matt
2169 - * Put in support for anim brushes (.abm files)
2170 - *
2171 - * Revision 1.28  1994/04/13  16:33:31  matt
2172 - * Cleaned up file read code, adding fake_file structure (FFILE), which
2173 - * cleanly implements reading the entire file into a buffer and then reading
2174 - * out of that buffer.
2175 - *
2176 - * Revision 1.27  1994/04/06  23:07:43  matt
2177 - * Cleaned up code; added prototype (but no new code) for anim brush read
2178 - *
2179 - * Revision 1.26  1994/03/19  02:51:52  matt
2180 - * Really did what I said I did last revision.
2181 - *
2182 - * Revision 1.25  1994/03/19  02:16:07  matt
2183 - * Made work ILBMs which didn't have 8 planes
2184 - *
2185 - * Revision 1.24  1994/03/15  14:45:26  matt
2186 - * When error, only free memory if has been allocated
2187 - *
2188 - * Revision 1.23  1994/02/18  12:39:05  john
2189 - * Made code read from buffer.
2190 - *
2191 - * Revision 1.22  1994/02/15  18:15:26  john
2192 - * Took out cfile attempt (too slow)
2193 - *
2194 - * Revision 1.21  1994/02/15  13:17:48  john
2195 - * added assert to cfseek.
2196 - *
2197 - * Revision 1.20  1994/02/15  13:13:11  john
2198 - * Made iff code work normally.
2199 - *
2200 - * Revision 1.19  1994/02/15  12:51:07  john
2201 - * crappy inbetween version.
2202 - *
2203 - * Revision 1.18  1994/02/10  18:31:32  matt
2204 - * Changed 'if DEBUG_ON' to 'ifndef NDEBUG'
2205 - *
2206 - * Revision 1.17  1994/01/24  11:51:26  john
2207 - * Made write routine write transparency info.
2208 - *
2209 - * Revision 1.16  1994/01/22  14:41:11  john
2210 - * Fixed bug with declareations.
2211 - *
2212 - * Revision 1.15  1994/01/22  14:23:00  john
2213 - * Added global vars to check transparency
2214 - *
2215 - * Revision 1.14  1993/12/08  19:00:42  matt
2216 - * Changed while loop to memset
2217 - *
2218 - * Revision 1.13  1993/12/08  17:23:51  mike
2219 - * Speedup by converting while...getc to fread.
2220 - *
2221 - * Revision 1.12  1993/12/08  12:37:35  mike
2222 - * Optimize parse_body.
2223 - *
2224 - * Revision 1.11  1993/12/05  17:30:14  matt
2225 - * Made bitmaps with width <= 64 not compress
2226 - *
2227 - * Revision 1.10  1993/12/03  12:24:51  matt
2228 - * Fixed TINY chunk when bitmap was part of a larger bitmap
2229 - *
2230 - * Revision 1.9  1993/11/22  17:26:43  matt
2231 - * iff write now writes out a tiny chunk
2232 - *
2233 - * Revision 1.8  1993/11/21  22:04:13  matt
2234 - * Fixed error with non-compressed bitmaps
2235 - * Added Yuan's code to free raw data if we get an error parsing the body
2236 - *
2237 - * Revision 1.7  1993/11/11  12:12:12  yuan
2238 - * Changed mallocs to MALLOCs.
2239 - *
2240 - * Revision 1.6  1993/11/01  19:02:23  matt
2241 - * Fixed a couple bugs in rle compression
2242 - *
2243 - * Revision 1.5  1993/10/27  12:47:39  john
2244 - * *** empty log message ***
2245 - *
2246 - * Revision 1.4  1993/10/27  12:37:31  yuan
2247 - * Added mem.h
2248 - *
2249 - * Revision 1.3  1993/09/22  19:16:57  matt
2250 - * Added new error type, IFF_CORRUPT, for internally bad IFF files.
2251 - *
2252 - * Revision 1.2  1993/09/08  19:24:16  matt
2253 - * Fixed bug in RLE compression
2254 - * Changed a bunch of unimportant values like aspect and page size when writing
2255 - * Added new error condition, IFF_BAD_BM_TYPE
2256 - * Make sub-bitmaps work correctly
2257 - * Added compile flag to turn compression off (COMPRESS)
2258 - *
2259 - * Revision 1.1  1993/09/08  14:24:15  matt
2260 - * Initial revision
2261
2262 ------------------------------------------------------------------------
2263 include/3d.h:
2264
2265 - * Revision 1.2  1995/09/14  14:08:58  allender
2266 - * return value for g3_draw_sphere
2267 - *
2268 - * Revision 1.1  1995/05/05  08:48:41  allender
2269 - * Initial revision
2270 - *
2271 - * Revision 1.34  1994/11/11  19:22:14  matt
2272 - * Added new function, g3_calc_point_depth()
2273 - *
2274 - * Revision 1.33  1994/09/09  14:23:58  matt
2275 - * Added support for glowing textures, to add engine glow to Descent.
2276 - *
2277 - * Revision 1.32  1994/09/01  10:42:27  matt
2278 - * Blob routine, renamed g3_draw_bitmap(), now takes seperate 3d width & height.
2279 - *
2280 - * Revision 1.31  1994/07/29  18:16:14  matt
2281 - * Added instance by angles, and corrected parms for g3_init()
2282 - *
2283 - * Revision 1.30  1994/07/25  00:00:00  matt
2284 - * Made 3d no longer deal with point numbers, but only with pointers.
2285 - *
2286 - * Revision 1.29  1994/07/22  17:57:27  matt
2287 - * Changed the name of the rod functions, and took out some debugging code
2288 - *
2289 - * Revision 1.28  1994/06/07  16:49:12  matt
2290 - * Made interpreter take lighting value as parm, rather than in global var
2291 - *
2292 - * Revision 1.27  1994/05/31  18:35:28  matt
2293 - * Added light value to g3_draw_facing_bitmap()
2294 - *
2295 - * Revision 1.26  1994/05/30  22:48:04  matt
2296 - * Added support for morph effect
2297 - *
2298 - * Revision 1.25  1994/05/30  11:34:57  matt
2299 - * Added g3_set_special_render() to allow a user to specify functions to
2300 - * call for 2d draws.
2301 - *
2302 - * Revision 1.24  1994/05/19  21:46:31  matt
2303 - * Moved texture lighting out of 3d and into the game
2304 - *
2305 - * Revision 1.23  1994/05/14  15:26:48  matt
2306 - * Added extern for polyobj outline flag
2307 - *
2308 - * Revision 1.22  1994/04/19  18:26:33  matt
2309 - * Added g3_draw_sphere() function.
2310 - *
2311 - * Revision 1.21  1994/03/25  18:22:28  matt
2312 - * g3_draw_polygon_model() now takes ptr to list of angles
2313 - *
2314 - * Revision 1.20  1994/03/15  21:23:23  matt
2315 - * Added interpreter functions
2316 - *
2317 - * Revision 1.19  1994/02/15  17:37:34  matt
2318 - * New function, g3_draw_blob()
2319 - *
2320 - * Revision 1.18  1994/02/09  11:47:47  matt
2321 - * Added rod & delta point functions
2322 - *
2323 - * Revision 1.17  1994/01/26  12:38:11  matt
2324 - * Added function g3_compute_lighting_value()
2325 - *
2326 - * Revision 1.16  1994/01/25  18:00:02  yuan
2327 - * Fixed variable beam_brightness...
2328 - *
2329 - * Revision 1.15  1994/01/24  14:08:34  matt
2330 - * Added instancing functions
2331 - *
2332 - * Revision 1.14  1994/01/22  18:21:48  matt
2333 - * New lighting stuff now done in 3d; g3_draw_tmap() takes lighting parm
2334 - *
2335 - * Revision 1.13  1994/01/20  17:21:24  matt
2336 - * New function g3_compute_sky_polygon()
2337 - *
2338 - * Revision 1.12  1994/01/14  17:20:25  matt
2339 - * Added prototype for new function g3_draw_horizon()
2340 - *
2341 - * Revision 1.10  1993/12/20  20:21:52  matt
2342 - * Added g3_point_2_vec()
2343 - *
2344 - * Revision 1.9  1993/12/07  23:05:47  matt
2345 - * Fixed mistyped function name.
2346 - *
2347 - * Revision 1.8  1993/12/05  23:47:03  matt
2348 - * Added function g3_draw_line_ptrs()
2349 - *
2350 - * Revision 1.7  1993/12/05  23:13:22  matt
2351 - * Added prototypes for g3_rotate_point() and g3_project_point()
2352 - *
2353 - * Revision 1.6  1993/12/05  23:03:28  matt
2354 - * Changed uvl structs to g3s_uvl
2355 - *
2356 - * Revision 1.5  1993/11/22  10:51:09  matt
2357 - * Moved uvl structure here from segment.h, made texture map functions use it
2358 - *
2359 - * Revision 1.4  1993/11/21  20:08:31  matt
2360 - * Added function g3_draw_object()
2361 - *
2362 - * Revision 1.3  1993/11/04  18:49:19  matt
2363 - * Added system to only rotate points once per frame
2364 - *
2365 - * Revision 1.2  1993/11/04  08:16:06  mike
2366 - * Add light field (p3_l) to g3s_point.
2367 - *
2368 - * Revision 1.1  1993/10/29  22:20:56  matt
2369 - * Initial revision
2370
2371 ------------------------------------------------------------------------
2372 include/args.h:
2373
2374 - * Revision 1.1  1995/05/16  15:54:24  allender
2375 - * Initial revision
2376 - *
2377 - * Revision 2.0  1995/02/27  11:33:09  john
2378 - * New version 2.0, which has no anonymous unions, builds with
2379 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
2380 - *
2381 - * Revision 1.4  1994/07/11  16:27:28  matt
2382 - * Took out prototypes for netipx funcs
2383 - *
2384 - * Revision 1.3  1994/05/11  19:45:34  john
2385 - * *** empty log message ***
2386 - *
2387 - * Revision 1.2  1994/05/09  17:02:55  john
2388 - * Split command line parameters into arg.c and arg.h.
2389 - * Also added /dma, /port, /irq to digi.c
2390 - *
2391 - * Revision 1.1  1994/05/09  16:47:49  john
2392 - * Initial revision
2393
2394 ------------------------------------------------------------------------
2395 include/byteswap.h:
2396
2397 - * Revision 1.4  1995/08/23  21:28:15  allender
2398 - * fix mcc compiler warning
2399 - *
2400 - * Revision 1.3  1995/08/18  15:51:42  allender
2401 - * put back in old byteswapping code
2402 - *
2403 - * Revision 1.2  1995/05/04  20:10:18  allender
2404 - * proper prototypes
2405 - *
2406 - * Revision 1.1  1995/03/30  15:02:11  allender
2407 - * Initial revision
2408
2409 ------------------------------------------------------------------------
2410 include/cfile.h:
2411
2412 - * Revision 1.1  1995/03/30  10:25:08  allender
2413 - * Initial revision
2414 - *
2415 - *
2416 - * -- PC RCS Information ---
2417 - * Revision 1.10  1995/03/13  15:16:47  john
2418 - * Added alternate directory stuff.
2419 - *
2420 - * Revision 1.9  1995/02/01  20:56:40  john
2421 - * Added cfexist function
2422 - *
2423 - * Revision 1.8  1995/01/21  17:53:41  john
2424 - * Added alternate pig file thing.
2425 - *
2426 - * Revision 1.7  1994/12/12  13:19:47  john
2427 - * Made cfile work with fiellentth.
2428 - *
2429 - * Revision 1.6  1994/12/08  19:02:52  john
2430 - * Added cfgets.
2431 - *
2432 - * Revision 1.5  1994/12/07  21:34:07  john
2433 - * Stripped out compression stuff...
2434 - *
2435 - * Revision 1.4  1994/07/13  00:16:53  matt
2436 - * Added include
2437 - *
2438 - * Revision 1.3  1994/02/17  17:36:19  john
2439 - * Added CF_READ_MODE and CF_WRITE_MODE constants.
2440 - *
2441 - * Revision 1.2  1994/02/15  12:52:08  john
2442 - * Crappy inbetween version
2443 - *
2444 - * Revision 1.1  1994/02/15  10:54:23  john
2445 - * Initial revision
2446 - *
2447 - * Revision 1.1  1994/02/10  15:50:54  john
2448 - * Initial revision
2449
2450 ------------------------------------------------------------------------
2451 include/error.h:
2452
2453 - * Revision 1.12  1994/06/17  15:22:46  matt
2454 - * Added pragma for Error() for when NDEBUG
2455 - *
2456 - * Revision 1.11  1994/03/07  13:22:14  matt
2457 - * Since the Error() function has 'aborts' set in pragma, we do a jmp
2458 - * to the function rather than call.
2459 - *
2460 - * Revision 1.10  1994/02/17  12:37:15  matt
2461 - * Combined two pragma's for Error(), since second superseded the first
2462 - *
2463 - * Revision 1.9  1994/02/10  18:02:53  matt
2464 - * Changed 'if DEBUG_ON' to 'ifndef NDEBUG'
2465 - *
2466 - * Revision 1.8  1994/02/09  15:18:29  matt
2467 - * Added pragma saying that Error() never returns
2468 - *
2469 - * Revision 1.7  1993/10/19  12:57:53  matt
2470 - * If DEBUG_ON not defined, define it to be 1
2471 - *
2472 - * Revision 1.6  1993/10/15  21:40:39  matt
2473 - * Made error functions generate int3's if debugging on
2474 - *
2475 - * Revision 1.5  1993/10/14  15:29:22  matt
2476 - * Added new function clear_warn_func()
2477 - *
2478 - * Revision 1.4  1993/10/08  16:16:47  matt
2479 - * Made Assert() call function _Assert(), rather to do 'if...' inline.
2480 - *
2481 - * Revision 1.3  1993/09/29  11:39:07  matt
2482 - * Added Assert() macro, like the system one, but calls Error()
2483 - *
2484 - * Revision 1.2  1993/09/27  11:47:03  matt
2485 - * Added function set_warn_func()
2486 - *
2487 - * Revision 1.1  1993/09/23  20:17:46  matt
2488 - * Initial revision
2489
2490 ------------------------------------------------------------------------
2491 include/gr.h:
2492
2493 - * Revision 1.7  1995/09/13  08:39:44  allender
2494 - * added prototype for gr_bitblt_cockpit
2495 - *
2496 - * Revision 1.6  1995/08/23  18:47:01  allender
2497 - * fixed compiler warnings on mcc
2498 - *
2499 - * Revision 1.5  1995/08/14  15:51:01  allender
2500 - * added #define for transparency color
2501 - *
2502 - * Revision 1.4  1995/06/13  13:03:55  allender
2503 - * added graphics mode
2504 - *
2505 - * Revision 1.3  1995/04/18  09:50:16  allender
2506 - * *** empty log message ***
2507 - *
2508 - * Revision 1.2  1995/04/07  07:32:33  allender
2509 - * *** empty log message ***
2510 - *
2511 - * Revision 1.1  1995/03/09  09:04:16  allender
2512 - * Initial revision
2513 - *
2514 - *
2515 - * --- PC RCS information ---
2516 - * Revision 1.45  1994/11/18  22:50:21  john
2517 - * Changed shorts to ints in parameters.
2518 - *
2519 - * Revision 1.44  1994/11/13  13:04:07  john
2520 - * Added paged out bit in bitmap structure.  Commented out the
2521 - * poly code that is never used.
2522 - *
2523 - * Revision 1.43  1994/11/09  23:04:56  mike
2524 - * Add avg_color field.
2525 - *
2526 - * Revision 1.42  1994/10/27  00:53:35  john
2527 - * Added RLE Flag to bitmap structere.
2528 - *
2529 - * Revision 1.41  1994/10/26  23:55:52  john
2530 - * Took out roller; Took out inverse table.
2531 - *
2532 - * Revision 1.40  1994/08/11  17:59:12  mike
2533 - * Assembler merge functions written for 3 rotations of bitmaps.
2534 - *
2535 - * Revision 1.39  1994/08/10  12:24:56  matt
2536 - * Added support for colors fonts & kerned fonts
2537 - * Made our own font file format
2538 - *
2539 - * Revision 1.38  1994/07/27  18:30:18  john
2540 - * Took away the blending table.
2541 - *
2542 - * Revision 1.37  1994/06/16  15:25:06  mike
2543 - * Add flag BM_FLAG_NO_LIGHTING.
2544 - *
2545 - * Revision 1.36  1994/05/31  10:01:22  john
2546 - * *** empty log message ***
2547 - *
2548 - * Revision 1.35  1994/05/31  07:53:34  john
2549 - * *** empty log message ***
2550 - *
2551 - * Revision 1.34  1994/05/14  17:19:41  matt
2552 - * Added externs
2553 - *
2554 - * Revision 1.33  1994/05/12  17:33:09  john
2555 - * Added circle code.
2556 - *
2557 - * Revision 1.32  1994/05/06  12:50:16  john
2558 - * Added supertransparency; neatend things up; took out warnings.
2559 - *
2560 - * Revision 1.31  1994/05/04  10:06:06  john
2561 - * Added flag for bitmap super-transparency.
2562 - *
2563 - * Revision 1.30  1994/05/03  19:38:56  john
2564 - * *** empty log message ***
2565 - *
2566 - * Revision 1.29  1994/04/22  11:16:05  john
2567 - * *** empty log message ***
2568 - *
2569 - * Revision 1.28  1994/04/08  16:59:32  john
2570 - * Add fading poly's; Made palette fade 32 instead of 16.
2571 - *
2572 - * Revision 1.27  1994/03/16  17:29:52  john
2573 - * *** empty log message ***
2574 - *
2575 - * Revision 1.26  1994/03/16  17:20:51  john
2576 - * Added slow palette searching options.
2577 - *
2578 - * Revision 1.25  1994/03/14  17:59:20  john
2579 - * Added function to check bitmap's transparency.
2580 - *
2581 - * Revision 1.24  1994/03/14  16:56:26  john
2582 - * Changed grs_bitmap structure to include bm_flags.
2583 - *
2584 - * Revision 1.23  1994/02/18  15:32:30  john
2585 - * *** empty log message ***
2586 - *
2587 - * Revision 1.22  1994/01/25  11:40:48  john
2588 - * Added gr_check_mode function.
2589 - *
2590 - * Revision 1.21  1994/01/12  13:45:24  john
2591 - * Added scaler.
2592 - *
2593 - * Revision 1.20  1993/12/21  19:58:24  john
2594 - * added selector stuff
2595 - *
2596 - * Revision 1.19  1993/12/21  11:40:40  john
2597 - * *** empty log message ***
2598 - *
2599 - * Revision 1.18  1993/12/09  15:02:08  john
2600 - * Changed palette stuff majorly
2601 - *
2602 - * Revision 1.17  1993/12/07  12:32:05  john
2603 - * moved bmd_palette to gr_palette
2604 - *
2605 - * Revision 1.16  1993/11/28  12:08:06  mike
2606 - * Change prototype for rotate_bitmap.
2607 - *
2608 - * Revision 1.15  1993/11/18  14:22:51  mike
2609 - * Add prototype for rotate_bitmap.
2610 - *
2611 - * Revision 1.14  1993/11/17  19:00:59  mike
2612 - * Add prototype for test_rotate_bitmap
2613 - *
2614 - * Revision 1.13  1993/11/16  11:28:58  john
2615 - * *** empty log message ***
2616 - *
2617 - * Revision 1.12  1993/10/26  13:17:43  john
2618 - * *** empty log message ***
2619 - *
2620 - * Revision 1.11  1993/10/15  16:23:37  john
2621 - * y
2622 - *
2623 - * Revision 1.10  1993/09/28  15:32:33  john
2624 - * added def for save/restore vidmode
2625 - *
2626 - * Revision 1.9  1993/09/28  12:51:46  matt
2627 - * Added aspect ratio to grs_screen structure
2628 - *
2629 - * Revision 1.8  1993/09/26  22:45:12  matt
2630 - * Changed prototypes for line functions to take fixes, not ints.
2631 - *
2632 - * Revision 1.7  1993/09/26  18:58:16  john
2633 - * fadein/out stuff
2634 - *
2635 - * Revision 1.6  1993/09/14  16:26:44  matt
2636 - * Changed gr_change_mode() to be gr_set_mode()
2637 - *
2638 - * Revision 1.4  1993/09/14  13:08:45  john
2639 - * added gr_change_mode
2640 - *
2641 - * Revision 1.3  1993/09/08  13:56:03  matt
2642 - * Put 'if' block around body of file; added bitmap type BM_RGB15
2643 - *
2644 - * Revision 1.2  1993/09/08  13:02:14  john
2645 - * Changed structure definitions a bit.
2646 - *
2647 - * Revision 1.1  1993/09/08  11:25:15  john
2648 - * Initial revision
2649
2650 ------------------------------------------------------------------------
2651 include/grdef.h:
2652
2653 - * Revision 1.5  1995/09/14  15:36:33  allender
2654 - * added stuff for 68k version
2655 - *
2656 - * Revision 1.4  1995/07/05  16:10:57  allender
2657 - * gr_linear_movsd prototype changes
2658 - *
2659 - * Revision 1.3  1995/04/19  14:39:28  allender
2660 - * changed function prototype
2661 - *
2662 - * Revision 1.2  1995/04/18  09:49:53  allender
2663 - * *** empty log message ***
2664 - *
2665 - * Revision 1.1  1995/03/09  09:04:56  allender
2666 - * Initial revision
2667 - *
2668 - *
2669 - * --- PC RCS information ---
2670 - * Revision 1.8  1994/05/06  12:50:09  john
2671 - * Added supertransparency; neatend things up; took out warnings.
2672 - *
2673 - * Revision 1.7  1994/01/25  11:40:29  john
2674 - * Added gr_check_mode function.
2675 - *
2676 - * Revision 1.6  1993/10/15  16:22:53  john
2677 - * y
2678 - *
2679 - * Revision 1.5  1993/09/29  17:31:00  john
2680 - * added gr_vesa_pixel
2681 - *
2682 - * Revision 1.4  1993/09/29  16:14:43  john
2683 - * added global canvas descriptors.
2684 - *
2685 - * Revision 1.3  1993/09/08  17:38:02  john
2686 - * Looking for errors
2687 - *
2688 - * Revision 1.2  1993/09/08  15:54:29  john
2689 - * *** empty log message ***
2690 - *
2691 - * Revision 1.1  1993/09/08  11:37:57  john
2692 - * Initial revision
2693
2694 ------------------------------------------------------------------------
2695 include/ibitblt.h:
2696
2697 - * Revision 1.1  1995/08/18  15:50:57  allender
2698 - * Initial revision
2699 - *
2700 - * Revision 1.2  1994/05/31  11:10:56  john
2701 - * *** empty log message ***
2702 - *
2703 - * Revision 1.1  1994/05/30  16:08:46  john
2704 - * Initial revision
2705
2706 ------------------------------------------------------------------------
2707 include/iff.h:
2708
2709 - * Revision 1.2  1995/05/05  16:33:22  allender
2710 - * changed types.h to dtypes.h
2711 - *
2712 - * Revision 1.1  1995/05/05  08:59:45  allender
2713 - * Initial revision
2714 - *
2715 - * Revision 1.12  1994/11/07  21:26:53  matt
2716 - * Added new function iff_read_into_bitmap()
2717 - *
2718 - * Revision 1.11  1994/05/06  19:37:38  matt
2719 - * Improved error handling and checking
2720 - *
2721 - * Revision 1.10  1994/04/16  20:12:54  matt
2722 - * Made masked (stenciled) bitmaps work
2723 - *
2724 - * Revision 1.9  1994/04/13  23:46:00  matt
2725 - * Added function, iff_errormsg(), which returns ptr to error message.
2726 - *
2727 - * Revision 1.8  1994/04/13  23:27:10  matt
2728 - * Put in support for anim brushes (.abm files)
2729 - *
2730 - * Revision 1.7  1994/04/06  23:08:02  matt
2731 - * Cleaned up code; added prototype (but no new code) for anim brush read
2732 - *
2733 - * Revision 1.6  1994/01/22  14:40:59  john
2734 - * Fixed bug with declareations.
2735 - *
2736 - * Revision 1.5  1994/01/22  14:23:13  john
2737 - * Added global vars to check transparency
2738 - *
2739 - * Revision 1.4  1993/10/27  12:47:42  john
2740 - * Extended the comments
2741 - *
2742 - * Revision 1.3  1993/09/22  19:17:20  matt
2743 - * Fixed handling of pad byte in ILBM/PPB body - was writing pad byte to
2744 - * destination buffer.
2745 - *
2746 - * Revision 1.2  1993/09/08  19:23:25  matt
2747 - * Added additional return code, IFF_BAD_BM_TYPE
2748 - *
2749 - * Revision 1.1  1993/09/08  14:24:21  matt
2750 - * Initial revision
2751
2752 ------------------------------------------------------------------------
2753 include/ipx.h:
2754
2755 - * Revision 2.6  1995/03/29  11:19:32  john
2756 - * Added broadcasting over a net.
2757 - *
2758 - * Revision 2.5  1995/03/28  20:04:43  john
2759 - * Took away alternate server stuff.
2760 - *
2761 - * Revision 2.4  1995/03/23  19:00:10  john
2762 - * Added user list capabitly.
2763 - *
2764 - * Revision 2.3  1995/03/23  12:26:57  john
2765 - * Move IPX into bios lib.
2766 - *
2767 - * Revision 2.2  1995/03/22  19:08:14  john
2768 - * Added code to fix sending packets over router... now
2769 - * we just need to make broadcasts go over router!!
2770 - *
2771 - * Revision 2.1  1995/03/21  08:39:56  john
2772 - * Ifdef'd out the NETWORK code.
2773 - *
2774 - * Revision 2.0  1995/02/27  11:30:16  john
2775 - * New version 2.0, which has no anonymous unions, builds with
2776 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
2777 - *
2778 - * Revision 1.16  1995/02/16  17:34:52  john
2779 - * Added code to allow dynamic socket changing.
2780 - *
2781 - * Revision 1.15  1995/01/04  21:43:27  rob
2782 - * Remove SPX size definition.
2783 - *
2784 - * Revision 1.14  1995/01/03  13:46:18  john
2785 - * Added code that should make ipx work over different servers,
2786 - * but ifdef'd it out with SHAREWARE in ipx.c.  I haven't tested
2787 - * this, and I hope it doesn't introduce net bugs.
2788 - *
2789 - * Revision 1.13  1994/11/02  11:37:16  rob
2790 - * Changed default socket number to a higher regions.
2791 - *
2792 - * Revision 1.12  1994/11/01  15:56:51  rob
2793 - * Added defines for SPX socketsx.
2794 - *
2795 - * Revision 1.11  1994/10/31  19:23:31  rob
2796 - * Added a prototype for the new object send function.
2797 - *
2798 - * Revision 1.10  1994/09/07  13:37:25  john
2799 - * Changed default socket to 0x4000, because
2800 - * the ipx/spx book says that we can only use
2801 - * sockets 0x4000 - 0x7fff.
2802 - *
2803 - * Revision 1.9  1994/08/25  18:14:45  matt
2804 - * Changed socket because of packet change
2805 - *
2806 - * Revision 1.8  1994/08/12  22:42:24  john
2807 - * Took away Player_stats; added Players array.
2808 - *
2809 - * Revision 1.7  1994/08/09  19:31:47  john
2810 - * Networking changes.
2811 - *
2812 - * Revision 1.6  1994/08/05  16:11:46  john
2813 - * Psuedo working version of networking.
2814 - *
2815 - * Revision 1.5  1994/08/04  19:17:20  john
2816 - * Inbetween version of network stuff.
2817 - *
2818 - * Revision 1.4  1994/07/29  16:08:59  john
2819 - * *** empty log message ***
2820 - *
2821 - * Revision 1.3  1994/07/25  12:33:22  john
2822 - * Network "pinging" in.
2823 - *
2824 - * Revision 1.2  1994/07/20  15:58:29  john
2825 - * First installment of ipx stuff.
2826 - *
2827 - * Revision 1.1  1994/07/19  15:43:05  john
2828 - * Initial revision
2829
2830 ------------------------------------------------------------------------
2831 include/palette.h:
2832
2833 - * Revision 1.11  1994/11/15  17:55:10  john
2834 - * Made text palette fade in when game over.
2835 - *
2836 - * Revision 1.10  1994/11/07  13:53:42  john
2837 - * Added better gamma stufff.
2838 - *
2839 - * Revision 1.9  1994/11/07  13:38:03  john
2840 - * Added gamma correction stuff.
2841 - *
2842 - * Revision 1.8  1994/11/05  13:05:59  john
2843 - * Added back in code to allow keys during fade.
2844 - *
2845 - * Revision 1.7  1994/11/05  12:46:37  john
2846 - * Changed palette stuff a bit.
2847 - *
2848 - * Revision 1.6  1994/09/22  16:08:37  john
2849 - * Fixed some palette stuff.
2850 - *
2851 - * Revision 1.5  1994/08/09  11:27:04  john
2852 - * Add cthru stuff.
2853 - *
2854 - * Revision 1.4  1994/06/09  10:39:33  john
2855 - * In fade out.in functions, returned 1 if key was pressed...
2856 - *
2857 - * Revision 1.3  1994/05/31  19:04:24  john
2858 - * Added key to stop fade if desired.
2859 - *
2860 - * Revision 1.2  1994/05/06  12:50:42  john
2861 - * Added supertransparency; neatend things up; took out warnings.
2862 - *
2863 - * Revision 1.1  1994/05/04  14:59:57  john
2864 - * Initial revision
2865
2866 ------------------------------------------------------------------------
2867 include/pcx.h:
2868
2869 - * Revision 1.4  1995/01/21  17:07:34  john
2870 - * Added out of memory error.
2871 - *
2872 - * Revision 1.3  1994/11/29  02:53:10  john
2873 - * Added error messages; made call be more similiar to iff.
2874 - *
2875 - * Revision 1.2  1994/11/28  20:03:48  john
2876 - * Added PCX functions.
2877 - *
2878 - * Revision 1.1  1994/11/28  19:57:45  john
2879 - * Initial revision
2880
2881 ------------------------------------------------------------------------
2882 include/pstypes.h:
2883
2884 - * Revision 1.2  1993/09/14  12:12:30  matt
2885 - * Added #define for NULL
2886 - *
2887 - * Revision 1.1  1993/08/24  12:50:40  matt
2888 - * Initial revision
2889
2890 ------------------------------------------------------------------------
2891 include/rle.h:
2892
2893 - * Revision 1.5  1995/01/14  11:32:20  john
2894 - * Added rle_cache_flush function.
2895 - *
2896 - * Revision 1.4  1994/11/10  13:16:01  matt
2897 - * Added includes
2898 - *
2899 - * Revision 1.3  1994/11/09  19:53:51  john
2900 - * Added texture rle caching.
2901 - *
2902 - * Revision 1.2  1994/11/09  16:35:18  john
2903 - * First version with working RLE bitmaps.
2904 - *
2905 - * Revision 1.1  1994/11/09  12:40:17  john
2906 - * Initial revision
2907
2908 ------------------------------------------------------------------------
2909 include/texmap.h:
2910
2911 - * $Log: not supported by cvs2svn $
2912 - * Revision 1.2  2003/03/19 19:21:34  btb
2913 - * header/extern declaration housekeeping
2914 - *
2915 - * Revision 1.1.1.1  2001/01/19 03:30:16  bradleyb
2916 - * Import of d2x-0.0.8
2917 - *
2918 - * Revision 1.2  1999/07/07 21:21:56  donut
2919 - * increased recip table size to better accommodate 640 res
2920 - *
2921 - * Revision 1.1.1.1  1999/06/14 22:02:20  donut
2922 - * Import of d1x 1.37 source.
2923 - *
2924 - * Revision 1.2  1995/09/04  14:22:10  allender
2925 - * #defines for fixed point limits on render buffer
2926 - *
2927 - * Revision 1.1  1995/05/04  20:14:50  allender
2928 - * Initial revision
2929 - *
2930 - * Revision 1.17  1994/11/10  11:09:16  mike
2931 - * detail level stuff.
2932 - * 
2933 - * Revision 1.16  1994/11/09  22:55:32  matt
2934 - * Added variable Current_seg_depth for detail level optimization
2935 - * 
2936 - * Revision 1.15  1994/06/09  16:10:04  mike
2937 - * Add prototype for SC2000
2938 - * 
2939 - * Revision 1.14  1994/05/25  18:46:16  matt
2940 - * Added gr_upoly_tmap_ylr(), which generates ylr's for a polygon
2941 - * 
2942 - * Revision 1.13  1994/05/25  09:47:12  mike
2943 - * Added interface support for linear texture mapper (Mike change, Matt commnet)
2944 - * 
2945 - * Revision 1.12  1994/05/24  17:30:43  mike
2946 - * Prototype a bunch of linear, vertical scanning functions.
2947 - * 
2948 - * Revision 1.11  1994/05/19  23:26:14  mike
2949 - * Add constants NUM_LIGHTING_VALUES, MAX_LIGHTING_VALUE, MIN_LIGHTING_VALUE,
2950 - * all part of new lighting_values_in_0_to_1 system.
2951 - * 
2952 - * Revision 1.10  1994/05/14  17:19:21  matt
2953 - * Added externs
2954 - * 
2955 - * Revision 1.9  1994/04/13  23:55:44  matt
2956 - * Increased max_tmap_verts from 16 to 25
2957 - * 
2958 - * Revision 1.8  1994/03/31  08:35:43  mike
2959 - * Prototype for gr_upoly_tmap.
2960 - * 
2961 - * Revision 1.7  1994/02/08  15:17:54  mike
2962 - * define label for MAX_TMAP_VERTS
2963 - * 
2964 - * Revision 1.6  1994/01/31  15:41:51  mike
2965 - * Add texture_map_lin_lin_sky_v
2966 - * 
2967 - * Revision 1.5  1994/01/18  10:49:40  mike
2968 - * prototype for texture_map_lin_lin_sky
2969 - * 
2970 - * Revision 1.4  1993/11/30  17:09:46  mike
2971 - * prototype for compute_lighting_value.
2972 - * 
2973 - * Revision 1.3  1993/11/22  10:50:38  matt
2974 - * Add ifndef around body of file
2975 - * 
2976 - * Revision 1.2  1993/10/06  12:41:25  mike
2977 - * Change prototype for draw_tmap.
2978 - * 
2979 - * Revision 1.1  1993/09/08  17:29:11  mike
2980 - * Initial revision
2981
2982 ------------------------------------------------------------------------
2983 include/timer.h:
2984
2985 - * Revision 1.8  1994/12/10  12:27:23  john
2986 - * Added timer_get_approx_seconds.
2987 - *
2988 - * Revision 1.7  1994/12/10  12:10:25  john
2989 - * Added types.h.
2990 - *
2991 - * Revision 1.6  1994/12/10  12:07:06  john
2992 - * Added tick counter variable.
2993 - *
2994 - * Revision 1.5  1994/11/15  12:04:15  john
2995 - * Cleaned up timer code a bit... took out unused functions
2996 - * like timer_get_milliseconds, etc.
2997 - *
2998 - * Revision 1.4  1994/04/28  23:50:08  john
2999 - * Changed calling for init_timer.  Made the function that the
3000 - * timer calls be a far function. All of this was done to make
3001 - * our timer system compatible with the HMI sound stuff.
3002 - *
3003 - * Revision 1.3  1994/02/17  15:57:12  john
3004 - * Changed key libary to C.
3005 - *
3006 - * Revision 1.2  1994/01/18  10:58:34  john
3007 - * Added timer_get_fixed_seconds
3008 - *
3009 - * Revision 1.1  1993/07/10  13:10:41  matt
3010 - * Initial revision
3011
3012 ------------------------------------------------------------------------
3013 include/u_dpmi.h:
3014
3015 - * Revision 1.9  1995/01/14  19:20:14  john
3016 - * Added function to set a selector's base address.
3017 - *
3018 - * Revision 1.8  1994/11/28  20:22:03  john
3019 - * Added some variables that return the amount of available
3020 - * memory.
3021 - *
3022 - * Revision 1.7  1994/11/15  18:26:38  john
3023 - * Added verbose flag.
3024 - *
3025 - * Revision 1.6  1994/11/07  11:35:05  john
3026 - * Added prototype for real_free
3027 - *
3028 - * Revision 1.5  1994/10/27  19:54:48  john
3029 - * Added unlock region function,.
3030 - *
3031 - * Revision 1.4  1994/09/27  18:27:56  john
3032 - * Added pragma to make inp,outp,enable,disable intrinsic
3033 - *
3034 - * Revision 1.3  1994/09/27  11:54:45  john
3035 - * Added DPMI init function.
3036 - *
3037 - * Revision 1.2  1994/08/24  18:53:51  john
3038 - * Made Cyberman read like normal mouse; added dpmi module; moved
3039 - * mouse from assembly to c. Made mouse buttons return time_down.
3040 - *
3041 - * Revision 1.1  1994/08/24  10:22:48  john
3042 - * Initial revision
3043
3044 ------------------------------------------------------------------------
3045 include/vecmat.h:
3046
3047 - * Revision 1.1  1995/04/17  16:18:05  allender
3048 - * Initial revision
3049 - *
3050 - *
3051 - * --- PC RCS Information ---
3052 - * Revision 1.37  1995/02/22  13:23:22  john
3053 - * Added the vms_vector_array structure, to access a vms_vector
3054 - * with an array.
3055 - *
3056 - * Revision 1.36  1995/02/22  12:34:33  john
3057 - * Took out anonymous unions.
3058 - *
3059 - * Revision 1.35  1994/12/13  14:44:20  matt
3060 - * Added vm_vector_2_matrix_norm()
3061 - *
3062 - * Revision 1.34  1994/09/11  19:22:55  matt
3063 - * Added vm_vec_normalized_dir_quick()
3064 - *
3065 - * Revision 1.33  1994/08/04  19:45:38  matt
3066 - * Added option to make a bunch of functions (add, sub, dotprod) inline
3067 - *
3068 - * Revision 1.32  1994/07/19  18:52:36  matt
3069 - * Added vm_vec_normalize_quick() and vm_vec_copy_normalize_quick()
3070 - *
3071 - * Revision 1.31  1994/06/16  18:24:30  matt
3072 - * Added vm_vec_mag_quick()
3073 - *
3074 - * Revision 1.30  1994/06/10  23:19:00  matt
3075 - * New register usage for vm_vec_ang_2_matrix()
3076 - *
3077 - * Revision 1.29  1994/06/01  17:32:06  matt
3078 - * Fixed modify list for vm_vec_normalized_dir()
3079 - *
3080 - * Revision 1.28  1994/05/19  12:07:20  matt
3081 - * Fixed globals and macros and added a constant
3082 - *
3083 - * Revision 1.27  1994/05/19  09:19:15  matt
3084 - * Made vm_vec_normalized_dir() return mag of vector
3085 - *
3086 - * Revision 1.26  1994/05/18  22:28:57  matt
3087 - * Added function vm_vec_normalized_dir()
3088 - * Added C macros IS_ZERO_VEC(), vm_vec_zero(), and vm_set_identity()
3089 - * Added C global static vars vmd_zero_vector & vmd_identity_matrix
3090 - *
3091 - * Revision 1.25  1994/05/18  21:45:06  matt
3092 - * Added functions:
3093 - *   vm_extract_angles_vector()
3094 - *   vm_extract_angles_vector_normalized()
3095 - *   vm_vec_copy_normalize()
3096 - *
3097 - * Revision 1.24  1994/05/13  12:42:16  matt
3098 - * Added new function, vm_vec_dist_quick(), which does an approximation.
3099 - *
3100 - * Revision 1.23  1994/03/30  13:37:34  matt
3101 - * Added prototype for vm_vec_scale_add(), and fixed typos
3102 - *
3103 - * Revision 1.22  1994/03/30  13:29:42  matt
3104 - * Header for vm_vec_scale_add2()
3105 - *
3106 - * Revision 1.21  1994/01/31  19:45:13  matt
3107 - * Added function vm_extract_angles_matrix()
3108 - *
3109 - * Revision 1.20  1993/12/21  19:46:14  matt
3110 - * Added function vm_dist_to_plane()
3111 - *
3112 - * Revision 1.19  1993/12/13  17:26:41  matt
3113 - * Added vm_vec_dist()
3114 - *
3115 - * Revision 1.18  1993/12/02  12:45:11  matt
3116 - * New functions: vm_vec_copy_scale(), vm_vec_scale2()
3117 - * Aliases: vm_transpose(), vm_vec_dot(), vm_vec_cross(), vm_copy_transpose()
3118 - *
3119 - * Revision 1.17  1993/10/29  22:38:36  matt
3120 - * Changed matrix order, making direction vectors the rows
3121 - *
3122 - * Revision 1.16  1993/10/25  11:49:57  matt
3123 - * Made vm_vec_delta_ang() take optional forward vector to return signed delta
3124 - *
3125 - * Revision 1.15  1993/10/20  01:10:05  matt
3126 - * Added vm_vec_delta_ang(), vm_vec_delta_ang_norm(), and vm_vec_ang_2_matrix()
3127 - *
3128 - * Revision 1.14  1993/10/17  17:02:52  matt
3129 - * vm_vector_2_matrix() now takes optional right vector
3130 - *
3131 - * Revision 1.13  1993/10/12  19:31:39  matt
3132 - * Added IDENTITY_MATRIX constant
3133 - *
3134 - * Revision 1.12  1993/10/08  18:10:16  matt
3135 - * Changed vm_vec_make() and vm_angvec_make() to be inline assembly
3136 - * functions, to get rid of compiler warnings.  Did not change vm_mat_make(),
3137 - * which could still get warnings if the return value is unused.
3138 - *
3139 - * Revision 1.11  1993/09/29  12:10:07  matt
3140 - * Changed modified regs in pragmas to include return register
3141 - *
3142 - * Revision 1.10  1993/09/28  12:15:41  matt
3143 - * Added func vm_vector_2_matrix()
3144 - *
3145 - * Revision 1.9  1993/09/24  21:18:38  matt
3146 - * Added vm_vec_avg(), vm_vec_avg4(), and vm_angvec_make().
3147 - * Documented which functions could have dest==source
3148 - *
3149 - * Revision 1.8  1993/09/20  14:56:11  matt
3150 - * Added new function, vm_vec_perp()
3151 - *
3152 - * Revision 1.7  1993/09/20  14:27:42  mike
3153 - * unfix last fix which introduced a bug
3154 - *
3155 - * Revision 1.6  1993/09/20  10:11:53  mike
3156 - * no changes
3157 - *
3158 - * Revision 1.5  1993/09/20  09:58:58  mike
3159 - * Re-fix vm_vec_make
3160 - *
3161 - * Revision 1.4  1993/09/20  09:41:21  mike
3162 - * Correct vm_vec_make and vm_mat_make macros to return the destination
3163 - * as the value of the macro.
3164 - *
3165 - * Revision 1.3  1993/09/17  11:23:47  matt
3166 - * Added row access (via xrow,yrow,zrow) to vms_matrix
3167 - * Added macro vm_mat_make(), like vm_vec_make()
3168 - *
3169 - * Revision 1.2  1993/09/17  11:10:32  matt
3170 - * Added vm_vec_add2() and vm_vec_sub2(), which take 2 args (dest==src0)
3171 - *
3172 - * Revision 1.1  1993/09/16  20:10:01  matt
3173 - * Initial revision
3174
3175 ------------------------------------------------------------------------
3176 main/ai.c:
3177
3178 - * Revision 1.1  1995/12/05  14:15:37  allender
3179 - * Initial revision
3180 - *
3181 - * Revision 1.10  1995/11/09  09:36:12  allender
3182 - * cheats not active during demo playback
3183 - *
3184 - * Revision 1.9  1995/11/03  12:51:55  allender
3185 - * shareware changes
3186 - *
3187 - * Revision 1.8  1995/10/31  10:25:07  allender
3188 - * shareware stuff
3189 - *
3190 - * Revision 1.7  1995/10/26  14:01:38  allender
3191 - * optimization for doing robot stuff only if anim angles done last frame
3192 - *
3193 - * Revision 1.6  1995/10/25  09:35:43  allender
3194 - * prototype some functions causing mcc problems
3195 - *
3196 - * Revision 1.5  1995/10/17  13:11:40  allender
3197 - * fix in ai code that makes bots only look for you every so often
3198 - *
3199 - * Revision 1.4  1995/10/10  11:48:10  allender
3200 - * PC ai code
3201 - *
3202 - * Revision 2.11  1995/07/09  11:15:48  john
3203 - * Put in Mike's code to fix bug where bosses don't gate in bots after
3204 - * 32767 seconds of playing.
3205 - *
3206 - * Revision 2.10  1995/06/15  12:31:08  john
3207 - * Fixed bug with cheats getting enabled when you type
3208 - * the whole alphabet.
3209 - *
3210 - * Revision 2.9  1995/05/26  16:16:18  john
3211 - * Split SATURN into define's for requiring cd, using cd, etc.
3212 - * Also started adding all the Rockwell stuff.
3213 - *
3214 - * Revision 2.8  1995/04/06  15:12:27  john
3215 - * Fixed bug with insane not working.
3216 - *
3217 - * Revision 2.7  1995/03/30  16:36:44  mike
3218 - * text localization.
3219 - *
3220 - * Revision 2.6  1995/03/28  11:22:24  john
3221 - * Added cheats to save file. Changed lunacy text.
3222 - *
3223 - * Revision 2.5  1995/03/27  16:45:07  john
3224 - * Fixed some cheat bugs.  Added astral cheat.
3225 - *
3226 - * Revision 2.4  1995/03/24  15:29:17  mike
3227 - * add new cheats.
3228 - *
3229 - * Revision 2.3  1995/03/21  14:39:45  john
3230 - * Ifdef'd out the NETWORK code.
3231 - *
3232 - * Revision 2.2  1995/03/14  18:24:39  john
3233 - * Force Destination Saturn to use CD-ROM drive.
3234 - *
3235 - * Revision 2.1  1995/03/06  16:47:14  mike
3236 - * destination saturn
3237 - *
3238 - * Revision 2.0  1995/02/27  11:30:01  john
3239 - * New version 2.0, which has no anonymous unions, builds with
3240 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
3241 - *
3242 - * Revision 1.295  1995/02/22  13:23:04  allender
3243 - * remove anonymous unions from object structure
3244 - *
3245 - * Revision 1.294  1995/02/13  11:00:43  rob
3246 - * Make brain guys high enough to get an open slot.
3247 - *
3248 - * Revision 1.293  1995/02/13  10:31:55  mike
3249 - * Make brains understand they can't open locked doors.
3250 - *
3251 - * Revision 1.292  1995/02/13  10:18:01  rob
3252 - * Reduced brain guy's level of awareness to keep him from hogging slots.
3253 - *
3254 - * Revision 1.291  1995/02/11  12:27:12  mike
3255 - * fix path-to-exit cheat.
3256 - *
3257 - * Revision 1.290  1995/02/11  01:56:30  mike
3258 - * robots don't fire cheat.
3259 - *
3260 - * Revision 1.289  1995/02/10  17:15:09  rob
3261 - * Fixed some stuff with 64 awareness stuff.
3262 - *
3263 - * Revision 1.288  1995/02/10  16:31:32  mike
3264 - * oops.
3265 - *
3266 - * Revision 1.287  1995/02/10  16:24:45  mike
3267 - * fix the network follow path fix.
3268 - *
3269 - * Revision 1.286  1995/02/10  16:11:40  mike
3270 - * in serial or modem games, follow path guys don't move if far away and
3271 - * can't see player.
3272 - *
3273 - * Revision 1.285  1995/02/09  13:11:35  mike
3274 - * comment out a bunch of mprintfs.
3275 - * add toaster (drops prox bombs, runs away) to boss gate list.
3276 - *
3277 - * Revision 1.284  1995/02/08  22:44:53  rob
3278 - * Lowerd anger level for follow path of any sort.
3279 - *
3280 - * Revision 1.283  1995/02/08  22:30:43  mike
3281 - * lower awareness on station guys if they are returning home (multiplayer).
3282 - *
3283 - * Revision 1.282  1995/02/08  17:01:06  rob
3284 - * Fixed problem with toasters dropping of proximity bombs.
3285 - *
3286 - * Revision 1.281  1995/02/08  11:49:35  rob
3287 - * Reduce Green-guy attack awareness level so we don't let him attack us too.
3288 - *
3289 - * Revision 1.280  1995/02/08  11:37:52  mike
3290 - * Check for failures in call to obj_create.
3291 - *
3292 - * Revision 1.279  1995/02/07  20:38:46  mike
3293 - * fix toasters in multiplayer
3294 - *
3295 - *
3296 - * Revision 1.278  1995/02/07  16:51:07  mike
3297 - * fix sound time play bug.
3298 - *
3299 - * Revision 1.277  1995/02/06  22:33:04  mike
3300 - * make robots follow path better in cooperative/roboarchy.
3301 - *
3302 - * Revision 1.276  1995/02/06  18:15:42  rob
3303 - * Added forced sends for evasion movemnet.
3304 - *
3305 - * Revision 1.275  1995/02/06  16:41:22  rob
3306 - * Change some positioning calls.
3307 - *
3308 - * Revision 1.274  1995/02/06  11:40:33  mike
3309 - * replace some lint-related hacks with clean, proper code.
3310 - *
3311 - * Revision 1.273  1995/02/04  17:28:19  mike
3312 - * make station guys return better.
3313 - *
3314 - * Revision 1.272  1995/02/03  17:40:55  mike
3315 - * fix problem with robots falling asleep if you sit in game overnight, not in pause...bah.
3316 - *
3317 - * Revision 1.271  1995/02/02  21:11:25  rob
3318 - * Tweaking stuff for multiplayer ai.
3319 - *
3320 - * Revision 1.270  1995/02/02  17:32:06  john
3321 - * Added Hack for Assert that Mike put in after using Lint to find
3322 - * uninitialized variables.
3323 - *
3324 - * Revision 1.269  1995/02/02  16:46:31  mike
3325 - * fix boss gating.
3326 - *
3327 - * Revision 1.268  1995/02/02  16:27:29  mike
3328 - * make boss not put out infinite robots.
3329 - *
3330 - * Revision 1.267  1995/02/01  21:10:02  mike
3331 - * lint found bug! player_visibility not initialized!
3332 - *
3333 - * Revision 1.266  1995/02/01  20:51:27  john
3334 - * Lintized
3335 - *
3336 - * Revision 1.265  1995/02/01  17:14:05  mike
3337 - * fix robot sounds.
3338 - *
3339 - * Revision 1.264  1995/01/31  16:16:40  mike
3340 - * Comment out "Darn you, John" Int3().
3341 - *
3342 - * Revision 1.263  1995/01/30  20:55:04  mike
3343 - * fix nonsense in robot firing when a player is cloaked.
3344 - *
3345 - * Revision 1.262  1995/01/30  17:15:10  rob
3346 - * Fixed problems with bigboss eclip messages.
3347 - * Tweaked robot position sending for modem purposes.
3348 - *
3349 - * Revision 1.261  1995/01/30  15:30:31  rob
3350 - * Prevent non-master players from gating in robots.
3351 - *
3352 - * Revision 1.260  1995/01/30  13:30:55  mike
3353 - * new cases for firing at other players were bogus, could send position
3354 - * without permission.
3355 - *
3356 - * Revision 1.259  1995/01/30  13:01:17  mike
3357 - * Make robots fire at player other than one they are controlled by sometimes.
3358 - *
3359 - * Revision 1.258  1995/01/29  16:09:17  rob
3360 - * Trying to get robots to shoot at non-controlling players.
3361 - *
3362 - * Revision 1.257  1995/01/29  13:47:05  mike
3363 - * Make boss have more fireballs on death, have until end (though silent at end).
3364 - * Fix bug which was preventing him from teleporting until hit, so he'd always
3365 - * be in the same place when the player enters the room.
3366 - *
3367 - * Revision 1.256  1995/01/28  17:40:18  mike
3368 - * make boss teleport & gate before you see him.
3369 - *
3370 - * Revision 1.255  1995/01/27  17:02:08  mike
3371 - * move code around, was sending one frame (or worse!) old robot information.
3372 - *
3373 - * Revision 1.254  1995/01/26  17:02:43  mike
3374 - * make fusion cannon have more chrome, make fusion, mega rock you!
3375 - *
3376 - * Revision 1.253  1995/01/26  15:11:17  rob
3377 - * Shutup!  I fixed it!
3378 - *
3379 - * Revision 1.252  1995/01/26  15:08:55  rob
3380 - * Changed robot gating to accomodate multiplayer.
3381 - *
3382 - * Revision 1.251  1995/01/26  14:49:04  rob
3383 - * Increase awareness level for firing to 94.
3384 - *
3385 - * Revision 1.250  1995/01/26  12:41:20  mike
3386 - * fix bogus multiplayer code, would send permission without getting permission.
3387 - *
3388 - * Revision 1.249  1995/01/26  12:23:23  rob
3389 - * Removed defines that were moved to ai.h
3390 - *
3391 - * Revision 1.248  1995/01/25  23:38:48  mike
3392 - * modify list of robots gated in by super boss.
3393 - *
3394 - * Revision 1.247  1995/01/25  21:21:13  rob
3395 - * Trying to let robots fire at a player even if they're not in control.
3396 - *
3397 - * Revision 1.246  1995/01/25  13:50:37  mike
3398 - * Robots make angry sounds.
3399 - *
3400 - * Revision 1.245  1995/01/25  10:53:47  mike
3401 - * better handling of robots which poke out of mine and try to recover.
3402 - *
3403 - * Revision 1.244  1995/01/24  22:03:02  mike
3404 - * Tricky code to move a robot to a legal position if he is poking out of
3405 - * the mine, even if it means moving him to another segment.
3406 - *
3407 - * Revision 1.243  1995/01/24  20:12:06  rob
3408 - * Changed robot fire awareness level from 74 to 94.
3409 - *
3410 - * Revision 1.242  1995/01/24  13:22:32  mike
3411 - * make robots accelerate faster, and Difficulty_level dependent.
3412 - *
3413 - * Revision 1.241  1995/01/24  12:09:39  mike
3414 - * make robots animate in multiplayer.
3415 - *
3416 - * Revision 1.240  1995/01/21  21:21:10  mike
3417 - * Make boss only gate robots into specified segments.
3418 - *
3419 - * Revision 1.239  1995/01/20  20:21:26  mike
3420 - * prevent unnecessary boss cloaking.
3421
3422 ------------------------------------------------------------------------
3423 main/ai.h:
3424
3425 - * Revision 1.3  1995/10/15  16:28:07  allender
3426 - * added flag to player_is_visible function
3427 - *
3428 - * Revision 1.2  1995/10/10  11:48:32  allender
3429 - * PC ai header
3430 - *
3431 - * Revision 1.1  1995/05/16  15:54:00  allender
3432 - * Initial revision
3433 - *
3434 - * Revision 2.0  1995/02/27  11:33:07  john
3435 - * New version 2.0, which has no anonymous unions, builds with
3436 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
3437 - *
3438 - * Revision 1.57  1995/02/04  17:28:31  mike
3439 - * make station guys return better.
3440 - *
3441 - * Revision 1.56  1995/02/04  10:03:23  mike
3442 - * Fly to exit cheat.
3443 - *
3444 - * Revision 1.55  1995/02/01  19:23:52  rob
3445 - * Externed a boss var.
3446 - *
3447 - * Revision 1.54  1995/01/30  13:00:58  mike
3448 - * Make robots fire at player other than one they are controlled by sometimes.
3449 - *
3450 - * Revision 1.53  1995/01/26  15:09:16  rob
3451 - * Changed robot gating to accomodate multiplayer.
3452 - *
3453 - * Revision 1.52  1995/01/26  12:23:12  rob
3454 - * Added new externs needed for multiplayer.
3455 - *
3456 - * Revision 1.51  1995/01/21  21:22:14  mike
3457 - * Kill prototype of init_boss_segments, which didn't need to be public
3458 - * and had changed.
3459 - *
3460 - * Revision 1.50  1995/01/16  19:24:29  mike
3461 - * Publicize BOSS_GATE_MATCEN_NUM and Boss_been_hit.
3462 - *
3463 - * Revision 1.49  1995/01/02  16:17:35  mike
3464 - * prototype some super boss function for gameseq.
3465 - *
3466 - * Revision 1.48  1994/12/19  17:08:06  mike
3467 - * deal with new ai_multiplayer_awareness which returns a value saying whether this object can be moved by this player.
3468 - *
3469 - * Revision 1.47  1994/12/12  17:18:04  mike
3470 - * make boss cloak/teleport when get hit, make quad laser 3/4 as powerful.
3471 - *
3472 - * Revision 1.46  1994/12/08  15:46:16  mike
3473 - * better robot behavior.
3474 - *
3475 - * Revision 1.45  1994/11/27  23:16:08  matt
3476 - * Made debug code go away when debugging turned off
3477 - *
3478 - * Revision 1.44  1994/11/16  23:38:41  mike
3479 - * new improved boss teleportation behavior.
3480 - *
3481 - * Revision 1.43  1994/11/10  17:45:11  mike
3482 - * debugging.
3483 - *
3484 - * Revision 1.42  1994/11/07  10:37:42  mike
3485 - * hooks for rob's network code.
3486 - *
3487 - * Revision 1.41  1994/11/06  15:10:50  mike
3488 - * prototype a debug function for dumping ai info.
3489 - *
3490 - * Revision 1.40  1994/11/02  17:57:30  rob
3491 - * Added extern of Believe_player_pos needed to get control centers
3492 - * locating people.
3493 - *
3494 - * Revision 1.39  1994/10/28  19:43:39  mike
3495 - * Prototype Boss_cloak_start_time, Boss_cloak_end_time.
3496 - *
3497 - * Revision 1.38  1994/10/22  14:14:42  mike
3498 - * Prototype ai_reset_all_paths.
3499 - *
3500 - * Revision 1.37  1994/10/21  20:42:01  mike
3501 - * Define MAX_PATH_LENGTH: maximum allowed length of a path.
3502 - *
3503 - * Revision 1.36  1994/10/20  09:49:18  mike
3504 - * Prototype something.
3505 - *
3506 - *
3507 - * Revision 1.35  1994/10/18  15:37:52  mike
3508 - * Define ROBOT_BOSS1.
3509 - *
3510 - * Revision 1.34  1994/10/13  11:12:25  mike
3511 - * Prototype some door functions.
3512 - *
3513 - * Revision 1.33  1994/10/12  21:28:51  mike
3514 - * Prototype create_n_segment_path_to_door
3515 - * Prototype ai_open_doors_in_segment
3516 - * Prototype ai_door_is_openable.
3517 - *
3518 - * Revision 1.32  1994/10/11  15:59:41  mike
3519 - * Prototype Robot_firing_enabled.
3520 - *
3521 - * Revision 1.31  1994/10/09  22:02:48  mike
3522 - * Adapt create_path_points and create_n_segment_path prototypes to use avoid_seg for player evasion.
3523 - *
3524 - * Revision 1.30  1994/09/18  18:07:44  mike
3525 - * Update prototypes for create_path_points and create_path_to_player.
3526 - *
3527 - * Revision 1.29  1994/09/15  16:34:08  mike
3528 - * Prototype do_ai_robot_hit_attack.
3529 - *
3530 - * Revision 1.28  1994/09/12  19:12:35  mike
3531 - * Prototype attempt_to_resume_path.
3532 - *
3533 - * Revision 1.27  1994/08/25  21:55:32  mike
3534 - * Add some prototypes.
3535 - *
3536 - * Revision 1.26  1994/08/10  19:53:24  mike
3537 - * Prototype create_path_to_player and init_robots_for_level.
3538 - *
3539 - * Revision 1.25  1994/08/04  16:32:58  mike
3540 - * prototype create_path_to_player.
3541 - *
3542 - * Revision 1.24  1994/08/03  15:17:20  mike
3543 - * Prototype make_random_vector.
3544 - *
3545 - * Revision 1.23  1994/07/31  18:10:34  mike
3546 - * Update prototype for create_path_points.
3547 - *
3548 - * Revision 1.22  1994/07/28  12:36:14  matt
3549 - * Cleaned up object bumping code
3550
3551 ------------------------------------------------------------------------
3552 main/ai2.c:
3553
3554 - * Revision 1.1  1995/05/25  12:00:31  mike
3555 - * Initial revision
3556
3557 ------------------------------------------------------------------------
3558 main/aipath.c:
3559
3560  * Revision 1.5  1995/10/26  14:12:03  allender
3561  * prototype functions for mcc compiler
3562  *
3563  * Revision 1.4  1995/10/25  09:38:22  allender
3564  * prototype some functions causing mcc grief
3565  *
3566  * Revision 1.3  1995/10/10  11:48:43  allender
3567  * PC ai code
3568  *
3569  * Revision 2.0  1995/02/27  11:30:48  john
3570  * New version 2.0, which has no anonymous unions, builds with
3571  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
3572  *
3573  * Revision 1.101  1995/02/22  13:42:44  allender
3574  * remove anonymous unions for object structure
3575  *
3576  * Revision 1.100  1995/02/10  16:20:04  mike
3577  * fix bogosity in create_path_points, assumed all objects were robots.
3578  *
3579  * Revision 1.99  1995/02/07  21:09:30  mike
3580  * make run_from guys have diff level based speed.
3581  *
3582  * Revision 1.98  1995/02/04  17:28:29  mike
3583  * make station guys return better.
3584  *
3585  * Revision 1.97  1995/02/04  10:28:39  mike
3586  * fix compile error!
3587  *
3588  * Revision 1.96  1995/02/04  10:03:37  mike
3589  * Fly to exit cheat.
3590  *
3591  * Revision 1.95  1995/02/01  21:10:36  mike
3592  * Array name was dereferenced.  Not a bug, but unclean.
3593  *
3594  * Revision 1.94  1995/02/01  17:14:12  mike
3595  * comment out some common mprintfs which didn't matter.
3596  *
3597  * Revision 1.93  1995/01/30  13:01:23  mike
3598  * Make robots fire at player other than one they are controlled by sometimes.
3599  *
3600  * Revision 1.92  1995/01/29  22:29:32  mike
3601  * add more debug info for guys that get lost.
3602  *
3603  * Revision 1.91  1995/01/20  16:56:05  mike
3604  * station stuff.
3605  *
3606  * Revision 1.90  1995/01/18  10:59:45  mike
3607  * comment out some mprintfs.
3608  *
3609  * Revision 1.89  1995/01/17  16:58:34  mike
3610  * make path following work for multiplayer.
3611  *
3612  * Revision 1.88  1995/01/17  14:21:44  mike
3613  * make run_from guys run better.
3614  *
3615  * Revision 1.87  1995/01/14  17:09:04  mike
3616  * playing with crazy josh, he's kinda slow and dumb now.
3617  *
3618  * Revision 1.86  1995/01/13  18:52:28  mike
3619  * comment out int3.
3620  *
3621  * Revision 1.85  1995/01/05  09:42:11  mike
3622  * compile out code based on SHAREWARE.
3623  *
3624  * Revision 1.84  1995/01/02  12:38:32  mike
3625  * make crazy josh turn faster, therefore evade player better.
3626  *
3627  * Revision 1.83  1994/12/27  15:59:40  mike
3628  * tweak ai_multiplayer_awareness constants.
3629  *
3630  * Revision 1.82  1994/12/19  17:07:10  mike
3631  * deal with new ai_multiplayer_awareness which returns a value saying whether this object can be moved by this player.
3632  *
3633  * Revision 1.81  1994/12/15  13:04:30  mike
3634  * Replace Players[Player_num].time_total references with GameTime.
3635  *
3636  * Revision 1.80  1994/12/09  16:13:23  mike
3637  * remove debug code.
3638  *
3639  * Revision 1.79  1994/12/07  00:36:54  mike
3640  * make robots get out of matcens better and be aware of player.
3641  *
3642  * Revision 1.78  1994/11/30  00:59:05  mike
3643  * optimizations.
3644  *
3645  * Revision 1.77  1994/11/27  23:13:39  matt
3646  * Made changes for new mprintf calling convention
3647  *
3648  * Revision 1.76  1994/11/23  21:59:34  mike
3649  * comment out some mprintfs.
3650  *
3651  * Revision 1.75  1994/11/21  16:07:14  mike
3652  * flip PARALLAX flag, prevent annoying debug information.
3653  *
3654  * Revision 1.74  1994/11/19  15:13:28  mike
3655  * remove unused code and data.
3656  *
3657  * Revision 1.73  1994/11/17  14:53:15  mike
3658  * segment validation functions moved from editor to main.
3659  *
3660  * Revision 1.72  1994/11/16  23:38:42  mike
3661  * new improved boss teleportation behavior.
3662  *
3663  * Revision 1.71  1994/11/13  17:18:30  mike
3664  * debug code, then comment it out.
3665  *
3666  * Revision 1.70  1994/11/11  16:41:43  mike
3667  * flip the PARALLAX flag.
3668  *
3669  * Revision 1.69  1994/11/11  16:33:45  mike
3670  * twiddle the PARALLAX flag.
3671  *
3672  *
3673  * Revision 1.68  1994/11/10  21:32:29  mike
3674  * debug code.
3675  *
3676  * Revision 1.67  1994/11/10  20:15:07  mike
3677  * fix stupid bug: uninitialized pointer.
3678  *
3679  * Revision 1.66  1994/11/10  17:45:15  mike
3680  * debugging.
3681  *
3682  * Revision 1.65  1994/11/10  17:28:10  mike
3683  * debugging.
3684
3685 ------------------------------------------------------------------------
3686 main/aistruct.h:
3687
3688 - * Revision 1.2  1995/10/10  11:49:04  allender
3689 - * PC ai code
3690 - *
3691 - * Revision 1.1  1995/05/16  15:54:08  allender
3692 - * Initial revision
3693 - *
3694 - * Revision 2.0  1995/02/27  11:30:19  john
3695 - * New version 2.0, which has no anonymous unions, builds with
3696 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
3697 - *
3698 - * Revision 1.34  1995/01/25  13:50:46  mike
3699 - * Robots make angry sounds.
3700 - *
3701 - * Revision 1.33  1994/12/29  12:44:56  rob
3702 - * Added new coop robot flag.
3703 - *
3704 - * Revision 1.32  1994/12/20  20:41:54  rob
3705 - * Added new ai flag for multiplayer robots.
3706 - *
3707 - * Revision 1.31  1994/12/19  16:37:39  rob
3708 - * Added a new flag for remote controlled objects.
3709 - *
3710 - * Revision 1.30  1994/12/07  00:36:07  mike
3711 - * fix phys_apply_rot for robots -- ai was bashing effect in next frame.
3712 - *
3713 - * Revision 1.29  1994/12/02  22:06:28  mike
3714 - * add fields to allow robots to make awareness sounds every so often, not every damn blasted frame
3715 - *
3716 - * Revision 1.28  1994/11/04  17:18:35  yuan
3717 - * Increased MAX_SEG_POINTS to 2500.
3718 - *
3719 - * Revision 1.27  1994/10/17  21:19:22  mike
3720 - * robot cloaking.
3721 - *
3722 - * Revision 1.26  1994/10/12  21:28:38  mike
3723 - * Add new ai mode: AIM_OPEN_DOOR.
3724 - * Add GOALSIDE to aip.
3725 - *
3726 - * Revision 1.25  1994/09/25  23:41:08  matt
3727 - * Changed the object load & save code to read/write the structure fields one
3728 - * at a time (rather than the whole structure at once).  This mean that the
3729 - * object structure can be changed without breaking the load/save functions.
3730 - * As a result of this change, the local_object data can be and has been
3731 - * incorporated into the object array.  Also, timeleft is now a property
3732 - * of all objects, and the object structure has been otherwise cleaned up.
3733 - *
3734 - * Revision 1.24  1994/09/21  12:28:11  mike
3735 - * Change AI behavior for when player cloaked
3736 - *
3737 - * Revision 1.23  1994/09/19  21:43:00  mike
3738 - * Add follow_path_start_seg and follow_path_end_seg to aistruct.h.
3739 - *
3740 - * Revision 1.22  1994/09/18  18:06:14  mike
3741 - * Add Last_uncloaked_time and Last_uncloaked_position variables.
3742 - *
3743 - * Revision 1.21  1994/09/15  16:31:38  mike
3744 - * Define GREEN_GUY
3745 - * Add previous_visibility to ai_local struct.
3746 - *
3747 - * Revision 1.20  1994/09/12  19:12:45  mike
3748 - * Change some bytes to ints in ai_local so I could set watchpoints.
3749 - *
3750 - * Revision 1.19  1994/08/25  21:53:31  mike
3751 - * Add behavior, taking place of what used to be mode.
3752 - *
3753 - * Revision 1.18  1994/08/23  16:38:09  mike
3754 - * rapidfire_count in ai_local.
3755 - *
3756 - * Revision 1.17  1994/08/19  17:38:23  mike
3757 - * *** empty log message ***
3758 - *
3759 - * Revision 1.16  1994/08/17  22:18:58  mike
3760 - * add time_since_processed to ai_local.
3761 - *
3762 - * Revision 1.15  1994/08/10  19:52:25  mike
3763 - * Add Overall_agitation.
3764 - *
3765 - * Revision 1.14  1994/08/04  16:32:32  mike
3766 - * Add time_player_seen.
3767 - *
3768 - * Revision 1.13  1994/07/28  16:58:11  mike
3769 - * Move constants from ai.c
3770 - *
3771 - * Revision 1.12  1994/07/19  15:26:24  mike
3772 - * New ai_static and ai_local structures.
3773 - *
3774 - * Revision 1.11  1994/07/15  15:17:19  matt
3775 - * Changes MAX_AI_FLAGS for better alignment
3776
3777 ------------------------------------------------------------------------
3778 main/automap.c:
3779
3780 - * Revision 1.8  1995/10/31  10:24:54  allender
3781 - * shareware stuff
3782 - *
3783 - * Revision 1.7  1995/10/21  16:18:20  allender
3784 - * blit pcx background directly to Page canvas instead of creating
3785 - * seperate bitmap for it -- hope to solve VM bug on some macs
3786 - *
3787 - * Revision 1.6  1995/10/20  00:49:16  allender
3788 - * added redbook check during automap
3789 - *
3790 - * Revision 1.5  1995/09/13  08:44:07  allender
3791 - * Dave Denhart's changes to speed up the automap
3792 - *
3793 - * Revision 1.4  1995/08/18  15:46:00  allender
3794 - * put text all on upper bar -- and fixed background since
3795 - * changing xparency color
3796 - *
3797 - * Revision 1.3  1995/08/03  15:15:18  allender
3798 - * fixed edge hashing problem causing automap to crash
3799 - *
3800 - * Revision 1.2  1995/07/12  12:49:27  allender
3801 - * works in 640x480 mode
3802 - *
3803 - * Revision 1.1  1995/05/16  15:22:59  allender
3804 - * Initial revision
3805 - *
3806 - * Revision 2.2  1995/03/21  14:41:26  john
3807 - * Ifdef'd out the NETWORK code.
3808 - *
3809 - * Revision 2.1  1995/03/20  18:16:06  john
3810 - * Added code to not store the normals in the segment structure.
3811 - *
3812 - * Revision 2.0  1995/02/27  11:32:55  john
3813 - * New version 2.0, which has no anonymous unions, builds with
3814 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
3815 - *
3816 - * Revision 1.117  1995/02/22  14:11:31  allender
3817 - * remove anonymous unions from object structure
3818 - *
3819 - * Revision 1.116  1995/02/22  13:24:39  john
3820 - * Removed the vecmat anonymous unions.
3821 - *
3822 - * Revision 1.115  1995/02/09  14:57:02  john
3823 - * Reduced mem usage. Made automap slide farther.
3824 - *
3825 - * Revision 1.114  1995/02/07  20:40:44  rob
3826 - * Allow for anarchy automap of player pos by option.
3827 - *
3828 - * Revision 1.113  1995/02/07  15:45:33  john
3829 - * Made automap memory be static.
3830 - *
3831 - * Revision 1.112  1995/02/02  12:24:00  adam
3832 - * played with automap labels
3833 - *
3834 - * Revision 1.111  1995/02/02  01:52:52  john
3835 - * Made the automap use small font.
3836 - *
3837 - * Revision 1.110  1995/02/02  01:34:34  john
3838 - * Made Reset in automap not change segmentlimit.
3839 - *
3840 - * Revision 1.109  1995/02/02  01:23:11  john
3841 - * Finalized the new automap partial viewer.
3842 - *
3843 - * Revision 1.108  1995/02/02  00:49:45  mike
3844 - * new automap segment-depth functionality.
3845 - *
3846 - * Revision 1.107  1995/02/02  00:23:04  john
3847 - * Half of the code for new connected distance stuff in automap.
3848 - *
3849 - * Revision 1.106  1995/02/01  22:54:00  john
3850 - * Made colored doors not fade in automap. Made default
3851 - * viewing area be maxxed.
3852 - *
3853 - * Revision 1.105  1995/02/01  13:16:13  john
3854 - * Added great grates.
3855 - *
3856 - * Revision 1.104  1995/01/31  12:47:06  john
3857 - * Made Alt+F only work with cheats enabled.
3858 - *
3859 - * Revision 1.103  1995/01/31  12:41:23  john
3860 - * Working with new controls.
3861 - *
3862 - * Revision 1.102  1995/01/31  12:04:19  john
3863 - * Version 2 of new key control.
3864 - *
3865 - * Revision 1.101  1995/01/31  11:32:00  john
3866 - * First version of new automap system.
3867 - *
3868 - * Revision 1.100  1995/01/28  16:55:48  john
3869 - * Made keys draw in automap in the segments that you have
3870 - * visited.
3871 - *
3872 - * Revision 1.99  1995/01/28  14:44:51  john
3873 - * Made hostage doors show up on automap.
3874 - *
3875 - * Revision 1.98  1995/01/22  17:03:49  rob
3876 - * Fixed problem drawing playerships in automap coop/team mode
3877 - *
3878 - * Revision 1.97  1995/01/21  17:23:11  john
3879 - * Limited S movement in map. Made map bitmap load from disk
3880 - * and then freed it.
3881 - *
3882 - * Revision 1.96  1995/01/19  18:55:38  john
3883 - * Don't draw players in automap if not obj_player.
3884 - *
3885 - * Revision 1.95  1995/01/19  18:48:13  john
3886 - * Made player colors better in automap.
3887 - *
3888 - * Revision 1.94  1995/01/19  17:34:52  rob
3889 - * Added team colorizations in automap.
3890 - *
3891 - * Revision 1.93  1995/01/19  17:15:36  rob
3892 - * Trying to add player ships into map for coop and team mode.
3893 - *
3894 - * Revision 1.92  1995/01/19  17:11:09  john
3895 - * Added code for Rob to draw Multiplayer ships in automap.
3896 - *
3897 - * Revision 1.91  1995/01/12  13:35:20  john
3898 - * Fixed bug with Segment 0 not getting displayed
3899 - * in automap if you have EDITOR compiled in.
3900 - *
3901 - * Revision 1.90  1995/01/08  16:17:14  john
3902 - * Added code to draw player's up vector while in automap.
3903 - *
3904 - * Revision 1.89  1995/01/08  16:09:41  john
3905 - * Fixed problems with grate.
3906 - *
3907 - * Revision 1.88  1994/12/14  22:54:17  john
3908 - * Fixed bug that didn't show hostages in automap.
3909 - *
3910 - * Revision 1.87  1994/12/09  00:41:03  mike
3911 - * fix hang in automap print screen
3912 - *
3913 - * Revision 1.86  1994/12/05  23:37:15  matt
3914 - * Took out calls to warning() function
3915 - *
3916 - * Revision 1.85  1994/12/03  22:35:28  yuan
3917 - * Localization 412
3918 - *
3919 - * Revision 1.84  1994/12/02  15:05:45  matt
3920 - * Added new "official" cheats
3921 - *
3922 - * Revision 1.83  1994/11/30  12:10:49  adam
3923 - * added support for PCX titles/brief screens
3924 - *
3925 - * Revision 1.82  1994/11/27  23:15:12  matt
3926 - * Made changes for new mprintf calling convention
3927 - *
3928 - * Revision 1.81  1994/11/27  15:35:52  matt
3929 - * Enable screen shots even when debugging is turned off
3930 - *
3931 - * Revision 1.80  1994/11/26  22:51:43  matt
3932 - * Removed editor-only fields from segment structure when editor is compiled
3933 - * out, and padded segment structure to even multiple of 4 bytes.
3934 - *
3935 - * Revision 1.79  1994/11/26  16:22:48  matt
3936 - * Reduced leave_time
3937 - *
3938 - * Revision 1.78  1994/11/23  22:00:10  mike
3939 - * show level number.
3940 - *
3941 - * Revision 1.77  1994/11/21  11:40:33  rob
3942 - * Tweaked the game-loop for automap in multiplayer games.
3943 - *
3944 - * Revision 1.76  1994/11/18  16:42:06  adam
3945 - * removed a font
3946 - *
3947 - * Revision 1.75  1994/11/17  13:06:48  adam
3948 - * changed font
3949 - *
3950 - * Revision 1.74  1994/11/14  20:47:17  john
3951 - * Attempted to strip out all the code in the game
3952 - * directory that uses any ui code.
3953
3954 ------------------------------------------------------------------------
3955 main/automap.h:
3956
3957 - * Revision 1.2  1995/07/12  12:48:33  allender
3958 - * moved edge_list structure into here for mallocing in mglobal
3959 - *
3960 - * Revision 1.1  1995/05/16  15:54:31  allender
3961 - * Initial revision
3962 - *
3963 - * Revision 2.0  1995/02/27  11:29:35  john
3964 - * New version 2.0, which has no anonymous unions, builds with
3965 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
3966 - *
3967 - * Revision 1.5  1994/12/09  00:41:21  mike
3968 - * fix hang in automap print screen
3969 - *
3970 - * Revision 1.4  1994/07/14  11:25:29  john
3971 - * Made control centers destroy better; made automap use Tab key.
3972 - *
3973 - * Revision 1.3  1994/07/12  15:45:51  john
3974 - * Made paritial map.
3975 - *
3976 - * Revision 1.2  1994/07/07  18:35:05  john
3977 - * First version of automap
3978 - *
3979 - * Revision 1.1  1994/07/07  15:12:13  john
3980 - * Initial revision
3981
3982 ------------------------------------------------------------------------
3983 main/bm.c:
3984
3985 - * Revision 1.1  1995/05/16  15:23:08  allender
3986 - * Initial revision
3987 - *
3988 - * Revision 2.3  1995/03/14  16:22:04  john
3989 - * Added cdrom alternate directory stuff.
3990 - *
3991 - * Revision 2.2  1995/03/07  16:51:48  john
3992 - * Fixed robots not moving without edtiro bug.
3993 - *
3994 - * Revision 2.1  1995/03/06  15:23:06  john
3995 - * New screen techniques.
3996 - *
3997 - * Revision 2.0  1995/02/27  11:27:05  john
3998 - * New version 2.0, which has no anonymous unions, builds with
3999 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4000
4001 ------------------------------------------------------------------------
4002 main/bm.h:
4003
4004 - * Revision 1.1  1995/05/16  15:54:39  allender
4005 - * Initial revision
4006 - *
4007 - * Revision 2.0  1995/02/27  11:32:59  john
4008 - * New version 2.0, which has no anonymous unions, builds with
4009 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4010 - *
4011 - * Revision 1.60  1994/12/06  13:24:58  matt
4012 - * Made exit model come out of bitmaps.tbl
4013 - *
4014 - * Revision 1.59  1994/11/10  14:02:48  matt
4015 - * Hacked in support for player ships with different textures
4016 - *
4017 - * Revision 1.58  1994/10/27  13:32:17  john
4018 - * Made TmapList only be in if editor
4019 - *
4020 - * Revision 1.57  1994/10/11  12:25:20  matt
4021 - * Added "hot rocks" that create badass explosion when hit by weapons
4022 - *
4023 - * Revision 1.56  1994/09/29  12:38:13  matt
4024 - * Took out include of digi.h, saving hours of unneeded compiles
4025 - *
4026 - * Revision 1.55  1994/09/25  00:39:51  matt
4027 - * Added the ability to make eclips (monitors, fans) which can be blown up
4028 - *
4029 - * Revision 1.54  1994/09/17  01:40:59  matt
4030 - * Added status bar/sizable window mode, and in the process revamped the
4031 - * whole cockpit mode system.
4032 - *
4033 - * Revision 1.53  1994/09/08  16:20:48  matt
4034 - * Gave textures the ability to cause damage when scraped
4035 - *
4036 - * Revision 1.52  1994/08/30  22:23:43  matt
4037 - * Added cabability for player ship to have alternate model to use to
4038 - * create debris.
4039 - *
4040 - * Revision 1.51  1994/08/26  15:35:57  matt
4041 - * Made eclips usable on more than one object at a time
4042 - *
4043 - * Revision 1.50  1994/08/23  16:59:51  john
4044 - * Added 3 cockpuits
4045 - *
4046 - * Revision 1.49  1994/08/19  20:09:43  matt
4047 - * Added end-of-level cut scene with external scene
4048 - *
4049 - * Revision 1.48  1994/08/12  22:20:45  matt
4050 - * Generalized polygon objects (such as control center)
4051 - *
4052 - * Revision 1.47  1994/08/09  16:04:21  john
4053 - * Added network players to editor.
4054 - *
4055 - * Revision 1.46  1994/08/09  09:01:31  john
4056 - * Increase MAX_TEXTURES
4057 - *
4058 - * Revision 1.45  1994/07/13  00:14:57  matt
4059 - * Moved all (or nearly all) of the values that affect player movement to
4060 - * bitmaps.tbl
4061 - *
4062 - * Revision 1.44  1994/06/20  21:33:15  matt
4063 - * Made bm.h not include sounds.h, to reduce dependencies
4064 - *
4065 - * Revision 1.43  1994/06/15  11:55:58  matt
4066 - * Added 3d model for player
4067 - *
4068 - * Revision 1.42  1994/06/13  16:09:11  adam
4069 - * increased max textures to 600
4070 - *
4071 - * Revision 1.41  1994/06/06  15:38:58  john
4072 - * Made fullscreen view be just another cockpit, but the "hole"
4073 - * in the cockpit is just bigger.
4074 - *
4075 - * Revision 1.40  1994/05/26  21:08:59  matt
4076 - * Moved robot stuff out of polygon model and into robot_info struct
4077 - * Made new file, robot.c, to deal with robots
4078 - *
4079 - * Revision 1.39  1994/05/18  11:00:05  mike
4080 - * Add robot_info stuff.
4081 - *
4082 - * Revision 1.38  1994/05/17  14:44:56  mike
4083 - * Get object type and id from ObjType and ObjId.
4084 - *
4085 - * Revision 1.37  1994/05/17  12:04:45  mike
4086 - * Deal with little known fact that polygon object != robot.
4087 - *
4088 - * Revision 1.36  1994/05/16  16:17:35  john
4089 - * Bunch of stuff on my Inferno Task list May16-23
4090 - *
4091 - * Revision 1.35  1994/04/27  11:43:42  john
4092 - * First version of sound! Yay!
4093 - *
4094 - * Revision 1.34  1994/04/22  10:53:48  john
4095 - * Increased MAX_TEXTURES to 500.
4096 - *
4097 - * Revision 1.33  1994/04/01  11:15:05  yuan
4098 - * Added multiple bitmap functionality to all objects...
4099 - * (hostages, powerups, lasers, etc.)
4100 - * Hostages and powerups are implemented in the object system,
4101 - * just need to finish function call to "affect" player.
4102 - *
4103 - * Revision 1.32  1994/03/25  17:30:37  yuan
4104 - * Checking in hostage stuff.
4105 - *
4106 - * Revision 1.31  1994/03/17  18:07:28  yuan
4107 - * Removed switch code... Now we just have Walls, Triggers, and Links...
4108 - *
4109 - * Revision 1.30  1994/03/15  17:03:51  yuan
4110 - * Added Robot/object bitmap capability
4111 - *
4112 - * Revision 1.29  1994/03/15  16:32:58  yuan
4113 - * Cleaned up bm-loading code.
4114 - * (Fixed structures too)
4115 - *
4116 - * Revision 1.28  1994/03/04  17:09:13  yuan
4117 - * New door stuff.
4118 - *
4119 - * Revision 1.27  1994/01/31  14:50:09  yuan
4120 - * Added Robotex
4121 - *
4122 - * Revision 1.26  1994/01/31  12:27:14  yuan
4123 - * Added demo stuff (menu, etc.)
4124 - *
4125 - * Revision 1.25  1994/01/25  17:11:43  john
4126 - * New texmaped lasers.
4127 - *
4128 - * Revision 1.24  1994/01/24  11:48:06  yuan
4129 - * Lighting stuff
4130 - *
4131 - * Revision 1.23  1994/01/22  13:40:15  yuan
4132 - * Modified the bmd_bitmap structure a bit.
4133 - * (Saves some memory, and added reflection)
4134 - *
4135 - * Revision 1.22  1994/01/11  10:58:38  yuan
4136 - * Added effects system
4137 - *
4138 - * Revision 1.21  1994/01/06  17:13:12  john
4139 - * Added Video clip functionality
4140 - *
4141 - * Revision 1.20  1993/12/21  20:00:15  john
4142 - * moved selector stuff to grs_bitmap
4143 - *
4144 - * Revision 1.19  1993/12/21  19:33:58  john
4145 - * Added selector to bmd_bitmap.
4146 - *
4147 - * Revision 1.18  1993/12/07  12:28:48  john
4148 - * moved bmd_palette to gr_palette
4149 - *
4150 - * Revision 1.17  1993/12/06  18:40:37  matt
4151 - * Changed object loading & handling
4152 - *
4153 - * Revision 1.16  1993/12/05  23:05:03  matt
4154 - * Added include of gr.h
4155 - *
4156 - * Revision 1.15  1993/12/03  17:38:04  yuan
4157 - * Ooops. meant to say:
4158 - * Moved MAX variables to bm.c, Arrays left open.
4159 - *
4160 - * Revision 1.14  1993/12/03  17:37:26  yuan
4161 - * Added Asserts.
4162 - *
4163 - * Revision 1.13  1993/12/02  17:22:54  yuan
4164 - * New global var. Num_object_types
4165 - *
4166 - * Revision 1.12  1993/12/02  16:34:39  yuan
4167 - * Added fireball hack stuff.
4168 - *
4169 - * Revision 1.11  1993/12/02  15:45:14  yuan
4170 - * Added a buncha constants, variables, and function prototypes
4171 - * for the new bitmaps.tbl format.
4172 - *
4173 - * Revision 1.10  1993/12/01  11:25:11  yuan
4174 - * Changed MALLOC'd buffers for filename and type in
4175 - * the bmd_bitmap structure into arrays... Saves time
4176 - * at load up.
4177 - *
4178 - * Revision 1.9  1993/12/01  00:28:09  yuan
4179 - * New bitmap system structure.
4180 - *
4181 - * Revision 1.8  1993/11/03  11:34:08  john
4182 - * made it use bitmaps.tbl
4183 - *
4184 - * Revision 1.7  1993/10/26  18:11:03  john
4185 - * made all palette data be statically allocated
4186 - *
4187 - * Revision 1.6  1993/10/19  12:17:51  john
4188 - * *** empty log message ***
4189 - *
4190 - * Revision 1.5  1993/10/16  20:02:41  matt
4191 - * Changed name of backdrop bitmap file
4192 - *
4193 - * Revision 1.4  1993/10/12  15:08:52  matt
4194 - * Added a bunch of new textures
4195 - *
4196 - * Revision 1.3  1993/10/12  12:30:41  john
4197 - * *** empty log message ***
4198 - *
4199 - * Revision 1.2  1993/10/12  11:27:58  john
4200 - * added more bitmaps
4201 - *
4202 - * Revision 1.1  1993/09/23  13:09:10  john
4203 - * Initial revision
4204
4205 ------------------------------------------------------------------------
4206 main/bmread.c:
4207
4208 - * Revision 2.4  1995/03/28  18:05:29  john
4209 - * Fixed it so you don't have to delete pig after changing bitmaps.tbl
4210 - *
4211 - * Revision 2.3  1995/03/07  16:52:03  john
4212 - * Fixed robots not moving without edtiro bug.
4213 - *
4214 - * Revision 2.2  1995/03/06  16:10:20  mike
4215 - * Fix compile errors if building without editor.
4216 - *
4217 - * Revision 2.1  1995/03/02  14:55:40  john
4218 - * Fixed bug with EDITOR never defined.
4219 - *
4220 - * Revision 2.0  1995/02/27  11:33:10  john
4221 - * New version 2.0, which has no anonymous unions, builds with
4222 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4223 - *
4224 - * Revision 1.1  1995/02/25  14:02:36  john
4225 - * Initial revision
4226
4227 ------------------------------------------------------------------------
4228 main/ctrlcen.c:
4229
4230 - * Revision 1.2  1995/10/17  13:12:13  allender
4231 - * added param to ai call
4232 - *
4233 - * Revision 1.1  1995/05/16  15:23:27  allender
4234 - * Initial revision
4235 - *
4236 - * Revision 2.1  1995/03/21  14:40:25  john
4237 - * Ifdef'd out the NETWORK code.
4238 - *
4239 - * Revision 2.0  1995/02/27  11:31:25  john
4240 - * New version 2.0, which has no anonymous unions, builds with
4241 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4242 - *
4243 - * Revision 1.22  1995/02/11  01:56:14  mike
4244 - * robots don't fire cheat.
4245 - *
4246 - * Revision 1.21  1995/02/05  13:39:39  mike
4247 - * fix stupid bug in control center firing timing.
4248 - *
4249 - * Revision 1.20  1995/02/03  17:41:21  mike
4250 - * fix control cen next fire time in multiplayer.
4251 - *
4252 - * Revision 1.19  1995/01/29  13:46:41  mike
4253 - * adapt to new create_small_fireball_on_object prototype.
4254 - *
4255 - * Revision 1.18  1995/01/18  16:12:13  mike
4256 - * Make control center aware of a cloaked playerr when he fires.
4257 - *
4258 - * Revision 1.17  1995/01/12  12:53:44  rob
4259 - * Trying to fix a bug with having cntrlcen in robotarchy games.
4260 - *
4261 - * Revision 1.16  1994/12/11  12:37:22  mike
4262 - * make control center smarter about firing at cloaked player, don't fire through self, though
4263 - * it still looks that way due to prioritization problems.
4264 - *
4265 - * Revision 1.15  1994/12/01  11:34:33  mike
4266 - * fix control center shield strength in multiplayer team games.
4267 - *
4268 - * Revision 1.14  1994/11/30  15:44:29  mike
4269 - * make cntrlcen harder at higher levels.
4270 - *
4271 - * Revision 1.13  1994/11/29  22:26:23  yuan
4272 - * Fixed boss bug.
4273 - *
4274 - * Revision 1.12  1994/11/27  23:12:31  matt
4275 - * Made changes for new mprintf calling convention
4276 - *
4277 - * Revision 1.11  1994/11/23  17:29:38  mike
4278 - * deal with peculiarities going between net and regular game on boss level.
4279 - *
4280 - * Revision 1.10  1994/11/18  18:27:15  rob
4281 - * Fixed some bugs with the last version.
4282 - *
4283 - * Revision 1.9  1994/11/18  17:13:59  mike
4284 - * special case handling for level 8.
4285 - *
4286 - * Revision 1.8  1994/11/15  12:45:28  mike
4287 - * don't let cntrlcen know where a cloaked player is.
4288 - *
4289 - * Revision 1.7  1994/11/08  12:18:37  mike
4290 - * small explosions on control center.
4291 - *
4292 - * Revision 1.6  1994/11/02  17:59:18  rob
4293 - * Changed control centers so they can find people in network games.
4294 - * Side effect of this is that control centers can find cloaked players.
4295 - * (see in-code comments for explanation).
4296 - * Also added network hooks so control center shots 'sync up'.
4297 - *
4298 - * Revision 1.5  1994/10/22  14:13:21  mike
4299 - * Make control center stop firing shortly after player dies.
4300 - * Fix bug: If play from editor and die, tries to initialize non-control center object.
4301 - *
4302 - * Revision 1.4  1994/10/20  15:17:30  mike
4303 - * Hack for control center inside boss robot.
4304 - *
4305 - * Revision 1.3  1994/10/20  09:47:46  mike
4306 - * lots stuff.
4307 - *
4308 - * Revision 1.2  1994/10/17  21:35:09  matt
4309 - * Added support for new Control Center/Main Reactor
4310 - *
4311 - * Revision 1.1  1994/10/17  20:24:01  matt
4312 - * Initial revision
4313
4314 ------------------------------------------------------------------------
4315 main/ctrlcen.h:
4316
4317 - * Revision 2.0  1995/02/27  11:30:40  john
4318 - * New version 2.0, which has no anonymous unions, builds with
4319 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4320 - *
4321 - * Revision 1.7  1995/02/01  16:34:14  john
4322 - * Linted.
4323 - *
4324 - * Revision 1.6  1995/01/03  20:19:14  john
4325 - * Pretty good working version of game save.
4326 - *
4327 - * Revision 1.5  1994/11/08  12:18:28  mike
4328 - * small explosions on control center.
4329 - *
4330 - * Revision 1.4  1994/11/02  18:00:12  rob
4331 - * Added extern for Gun_pos array for network hooks.
4332 - *
4333 - * Revision 1.3  1994/10/20  09:47:37  mike
4334 - * *** empty log message ***
4335 - *
4336 - * Revision 1.2  1994/10/17  21:35:10  matt
4337 - * Added support for new Control Center/Main Reactor
4338 - *
4339 - * Revision 1.1  1994/10/17  20:24:28  matt
4340 - * Initial revision
4341
4342 ------------------------------------------------------------------------
4343 main/collide.c:
4344
4345 - * Revision 1.3  1995/11/08  17:15:21  allender
4346 - * make collide_player_and_weapon play player_hit_sound if
4347 - * shareware and not my playernum
4348 - *
4349 - * Revision 1.2  1995/10/31  10:24:37  allender
4350 - * shareware stuff
4351 - *
4352 - * Revision 1.1  1995/05/16  15:23:34  allender
4353 - * Initial revision
4354 - *
4355 - * Revision 2.5  1995/07/26  12:07:46  john
4356 - * Made code that pages in weapon_info->robot_hit_vclip not
4357 - * page in unless it is a badass weapon.  Took out old functionallity
4358 - * of using this if no robot exp1_vclip, since all robots have these.
4359 - *
4360 - * Revision 2.4  1995/03/30  16:36:09  mike
4361 - * text localization.
4362 - *
4363 - * Revision 2.3  1995/03/24  15:11:13  john
4364 - * Added ugly robot cheat.
4365 - *
4366 - * Revision 2.2  1995/03/21  14:41:04  john
4367 - * Ifdef'd out the NETWORK code.
4368 - *
4369 - * Revision 2.1  1995/03/20  18:16:02  john
4370 - * Added code to not store the normals in the segment structure.
4371 - *
4372 - * Revision 2.0  1995/02/27  11:32:20  john
4373 - * New version 2.0, which has no anonymous unions, builds with
4374 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4375 - *
4376 - * Revision 1.289  1995/02/22  13:56:06  allender
4377 - * remove anonymous unions from object structure
4378 - *
4379 - * Revision 1.288  1995/02/11  15:52:45  rob
4380 - * Included text.h.
4381 - *
4382 - * Revision 1.287  1995/02/11  15:04:11  rob
4383 - * Localized a string.
4384 - *
4385 - * Revision 1.286  1995/02/11  14:25:41  rob
4386 - * Added invul. controlcen option.
4387 - *
4388 - * Revision 1.285  1995/02/06  15:53:00  mike
4389 - * create awareness event for player:wall collision.
4390 - *
4391 - * Revision 1.284  1995/02/05  23:18:17  matt
4392 - * Deal with objects (such as fusion blobs) that get created already
4393 - * poking through a wall
4394 - *
4395 - * Revision 1.283  1995/02/01  17:51:33  mike
4396 - * fusion bolt can now toast multiple proximity bombs.
4397 - *
4398 - * Revision 1.282  1995/02/01  17:29:20  john
4399 - * Lintized
4400 - *
4401 - * Revision 1.281  1995/02/01  15:04:00  rob
4402 - * Changed sound of weapons hitting invulnerable players.
4403 - *
4404 - * Revision 1.280  1995/01/31  16:16:35  mike
4405 - * Separate smart blobs for robot and player.
4406 - *
4407 - * Revision 1.279  1995/01/29  15:57:10  rob
4408 - * Fixed another bug with robot_request_change calls.
4409 - *
4410 - * Revision 1.278  1995/01/28  18:15:06  rob
4411 - * Fixed a bug in multi_request_robot_change.
4412 - *
4413 - * Revision 1.277  1995/01/27  15:15:44  rob
4414 - * Fixing problems with controlcen damage.
4415 - *
4416 - * Revision 1.276  1995/01/27  15:13:10  mike
4417 - * comment out mprintf.
4418 - *
4419 - * Revision 1.275  1995/01/26  22:11:51  mike
4420 - * Purple chromo-blaster (ie, fusion cannon) spruce up (chromification)
4421 - *
4422 - * Revision 1.274  1995/01/26  18:57:55  rob
4423 - * Changed two uses of digi_play_sample to digi_link_sound_to_pos which
4424 - * made more sense.
4425 - *
4426 - * Revision 1.273  1995/01/25  23:37:58  mike
4427 - * make persistent objects not hit player more than once.
4428 - * Also, make them hit player before degrading them, else they often did 0 damage.
4429 - *
4430 - * Revision 1.272  1995/01/25  18:23:54  rob
4431 - * Don't let players pick up powerups in exit tunnel.
4432 - *
4433 - * Revision 1.271  1995/01/25  13:43:18  rob
4434 - * Added robot transfer for player collisions.
4435 - * Removed mprintf from collide.c on Mike's request.
4436 - *
4437 - * Revision 1.270  1995/01/25  10:24:01  mike
4438 - * Make sizzle and rock happen in lava even if you're invulnerable.
4439 - *
4440 - * Revision 1.269  1995/01/22  17:05:33  mike
4441 - * Call multi_robot_request_change when a robot gets whacked by a player or
4442 - * player weapon, if player_num != Player_num
4443 - *
4444 - * Revision 1.268  1995/01/21  21:20:28  matt
4445 - * Fixed stupid bug
4446 - *
4447 - * Revision 1.267  1995/01/21  18:47:47  rob
4448 - * Fixed a really dumb bug with player keys.
4449 - *
4450 - * Revision 1.266  1995/01/21  17:39:30  matt
4451 - * Cleaned up laser/player hit wall confusions
4452 - *
4453 - * Revision 1.265  1995/01/19  17:44:42  mike
4454 - * damage_force removed, that information coming from strength field.
4455 - *
4456 - * Revision 1.264  1995/01/18  17:12:56  rob
4457 - * Fixed control stuff for multiplayer.
4458 - *
4459 - * Revision 1.263  1995/01/18  16:12:33  mike
4460 - * Make control center aware of a cloaked playerr when he fires.
4461 - *
4462 - * Revision 1.262  1995/01/17  17:48:42  rob
4463 - * Added key syncing for coop players.
4464 - *
4465 - * Revision 1.261  1995/01/16  19:30:28  rob
4466 - * Fixed an assert error in fireball.c
4467 - *
4468 - * Revision 1.260  1995/01/16  19:23:51  mike
4469 - * Say Boss_been_hit if he been hit so he gates appropriately.
4470 - *
4471 - * Revision 1.259  1995/01/16  11:55:16  mike
4472 - * make enemies become aware of player if he damages control center.
4473 - *
4474 - * Revision 1.258  1995/01/15  16:42:00  rob
4475 - * Fixed problem with robot bumping damage.
4476 - *
4477 - * Revision 1.257  1995/01/14  19:16:36  john
4478 - * First version of new bitmap paging code.
4479 - *
4480 - * Revision 1.256  1995/01/03  17:58:37  rob
4481 - * Fixed scoring problems.
4482 - *
4483 - * Revision 1.255  1994/12/29  12:41:11  rob
4484 - * Tweaking robot exploding in coop.
4485 - *
4486 - * Revision 1.254  1994/12/28  10:37:59  rob
4487 - * Fixed ifdef of multibot stuff.
4488 - *
4489 - * Revision 1.253  1994/12/21  19:03:14  rob
4490 - * Fixing score accounting for multiplayer robots
4491 - *
4492 - * Revision 1.252  1994/12/21  17:36:31  rob
4493 - * Fix hostage pickup problem in network.
4494 - * tweaking robot powerup drops.
4495 - *
4496 - * Revision 1.251  1994/12/19  20:32:34  rob
4497 - * Remove awareness events from player collisions and lasers that are not the console player.
4498 - *
4499 - * Revision 1.250  1994/12/19  20:01:22  rob
4500 - * Added multibot.h include.
4501 - *
4502 - * Revision 1.249  1994/12/19  16:36:41  rob
4503 - * Patches damaging of multiplayer robots.
4504 - *
4505 - * Revision 1.248  1994/12/14  21:15:18  rob
4506 - * play lava hiss across network.
4507 - *
4508 - * Revision 1.247  1994/12/14  17:09:09  matt
4509 - * Fixed problem with no sound when lasers hit closed walls, like grates.
4510 - *
4511 - * Revision 1.246  1994/12/14  09:51:49  mike
4512 - * make any weapon cause proximity bomb detonation.
4513 - *
4514 - * Revision 1.245  1994/12/13  12:55:25  mike
4515 - * change number of proximity bomb powerups which get dropped.
4516 - *
4517 - * Revision 1.244  1994/12/12  17:17:53  mike
4518 - * make boss cloak/teleport when get hit, make quad laser 3/4 as powerful.
4519 - *
4520 - * Revision 1.243  1994/12/12  12:07:51  rob
4521 - * Don't take damage if we're in endlevel sequence.
4522 - *
4523 - * Revision 1.242  1994/12/11  23:44:52  mike
4524 - * less phys_apply_rot() at higher skill levels.
4525 - *
4526 - * Revision 1.241  1994/12/11  12:37:02  mike
4527 - * remove stupid robot spinning code.  it was really stupid.  (actually, call here, code in ai.c).
4528 - *
4529 - * Revision 1.240  1994/12/10  16:44:51  matt
4530 - * Added debugging code to track down door that turns into rock
4531 - *
4532 - * Revision 1.239  1994/12/09  14:59:19  matt
4533 - * Added system to attach a fireball to another object for rendering purposes,
4534 - * so the fireball always renders on top of (after) the object.
4535 - *
4536 - * Revision 1.238  1994/12/09  09:57:02  mike
4537 - * Don't allow robots or their weapons to pass through control center.
4538 - *
4539 - * Revision 1.237  1994/12/08  15:46:03  mike
4540 - * better robot behavior.
4541 - *
4542 - * Revision 1.236  1994/12/08  12:32:56  mike
4543 - * make boss dying more interesting.
4544 - *
4545 - * Revision 1.235  1994/12/07  22:49:15  mike
4546 - * tweak rotation due to collision.
4547 - *
4548 - * Revision 1.234  1994/12/07  16:44:50  mike
4549 - * make bump sound if supposed to, even if not taking damage.
4550 - *
4551 - * Revision 1.233  1994/12/07  12:55:08  mike
4552 - * tweak rotvel applied from collisions.
4553 - *
4554 - * Revision 1.232  1994/12/05  19:30:48  matt
4555 - * Fixed horrible segment over-dereferencing
4556 - *
4557 - * Revision 1.231  1994/12/05  00:32:15  mike
4558 - * do rotvel on badass and bump collisions.
4559 - *
4560 - * Revision 1.230  1994/12/03  12:49:22  mike
4561 - * don't play bonk sound when you collide with a volatile wall (like lava).
4562 - *
4563 - * Revision 1.229  1994/12/02  16:51:09  mike
4564 - * make lava sound only happen at 4 Hz.
4565 - *
4566 - * Revision 1.228  1994/11/30  23:55:27  rob
4567 - * Fixed a bug where a laser hitting a wall was making 2 sounds.
4568 - *
4569 - * Revision 1.227  1994/11/30  20:11:00  rob
4570 - * Fixed # of dropped laser powerups.
4571 - *
4572 - * Revision 1.226  1994/11/30  19:19:03  rob
4573 - * Transmit collission sounds for net games.
4574 - *
4575 - * Revision 1.225  1994/11/30  16:33:01  mike
4576 - * new boss behavior.
4577 - *
4578 - * Revision 1.224  1994/11/30  15:44:17  mike
4579 - * /2 on boss smart children damage.
4580 - *
4581 - * Revision 1.223  1994/11/30  14:03:03  mike
4582 - * hook for claw sounds
4583 - *
4584 - * Revision 1.222  1994/11/29  20:41:09  matt
4585 - * Deleted a bunch of commented-out lines
4586 - *
4587 - * Revision 1.221  1994/11/27  23:15:08  matt
4588 - * Made changes for new mprintf calling convention
4589 - *
4590 - * Revision 1.220  1994/11/19  16:11:28  rob
4591 - * Collision damage with walls or lava is counted as suicides in net games
4592 - *
4593 - * Revision 1.219  1994/11/19  15:20:41  mike
4594 - * rip out unused code and data
4595 - *
4596 - * Revision 1.218  1994/11/17  18:44:27  rob
4597 - * Added OBJ_GHOST to list of valid player types to create eggs.
4598 - *
4599 - * Revision 1.217  1994/11/17  14:57:59  mike
4600 - * moved segment validation functions from editor to main.
4601 - *
4602 - * Revision 1.216  1994/11/16  23:38:36  mike
4603 - * new improved boss teleportation behavior.
4604 - *
4605 - * Revision 1.215  1994/11/16  12:16:29  mike
4606 - * Enable collisions between robots.  A hack in fvi.c only does this for robots which lunge to attack (eg, green guy)
4607 - *
4608 - * Revision 1.214  1994/11/15  16:51:50  mike
4609 - * bump player when he hits a volatile wall.
4610 - *
4611 - * Revision 1.213  1994/11/12  16:38:44  mike
4612 - * allow flares to open doors.
4613 - *
4614 - * Revision 1.212  1994/11/10  13:09:19  matt
4615 - * Added support for new run-length-encoded bitmaps
4616 - *
4617 - * Revision 1.211  1994/11/09  17:05:43  matt
4618 - * Fixed problem with volatile walls
4619 - *
4620 - * Revision 1.210  1994/11/09  12:11:46  mike
4621 - * only award points if ConsoleObject killed robot.
4622 - *
4623 - * Revision 1.209  1994/11/09  11:11:03  yuan
4624 - * Made wall volatile if either tmap_num1 or tmap_num2 is a volatile wall.
4625 - *
4626 - * Revision 1.208  1994/11/08  12:20:15  mike
4627 - * moved do_controlcen_destroyed_stuff from here to cntrlcen.c
4628 - *
4629 - * Revision 1.207  1994/11/02  23:22:08  mike
4630 - * Make ` (backquote, KEY_LAPOSTRO) tell what wall was hit by laser.
4631 - *
4632 - * Revision 1.206  1994/11/02  18:03:00  rob
4633 - * Fix control_center_been_hit logic so it only cares about the local player.
4634 - * Other players take care of their own control center 'ai'.
4635 - *
4636 - * Revision 1.205  1994/11/01  19:37:33  rob
4637 - * Changed the max # of consussion missiles to 4.
4638 - * (cause they're lame and clutter things up)
4639 - *
4640 - * Revision 1.204  1994/11/01  18:06:35  john
4641 - * Tweaked wall banging sound constant.
4642 - *
4643 - * Revision 1.203  1994/11/01  18:01:40  john
4644 - * Made wall bang less obnoxious, but volume based.
4645 - *
4646 - * Revision 1.202  1994/11/01  17:11:05  rob
4647 - * Changed some stuff in drop_player_eggs.
4648 - *
4649 - * Revision 1.201  1994/11/01  12:18:23  john
4650 - * Added sound volume support. Made wall collisions be louder/softer.
4651 - *
4652 - * Revision 1.200  1994/10/31  13:48:44  rob
4653 - * Fixed bug in opening doors over network/modem.  Added a new message
4654 - * type to multi.c that communicates door openings across the net.
4655 - * Changed includes in multi.c and wall.c to accomplish this.
4656 - *
4657 - * Revision 1.199  1994/10/28  14:42:52  john
4658 - * Added sound volumes to all sound calls.
4659 - *
4660 - * Revision 1.198  1994/10/27  16:58:37  allender
4661 - * added demo recording of monitors blowing up
4662 - *
4663 - * Revision 1.197  1994/10/26  23:20:52  matt
4664 - * Tone down flash even more
4665 - *
4666 - * Revision 1.196  1994/10/26  23:01:50  matt
4667 - * Toned down red flash when damaged
4668 - *
4669 - * Revision 1.195  1994/10/26  15:56:29  yuan
4670 - * Tweaked some palette flashes.
4671 - *
4672 - * Revision 1.194  1994/10/25  11:32:26  matt
4673 - * Fixed bugs with vulcan powerups in mutliplayer
4674 - *
4675 - * Revision 1.193  1994/10/25  10:51:18  matt
4676 - * Vulcan cannon powerups now contain ammo count
4677 - *
4678 - * Revision 1.192  1994/10/24  14:14:05  matt
4679 - * Fixed bug in bump_two_objects()
4680 - *
4681 - * Revision 1.191  1994/10/23  19:17:04  matt
4682 - * Fixed bug with "no key" messages
4683 - *
4684 - * Revision 1.190  1994/10/22  00:08:46  matt
4685 - * Fixed up problems with bonus & game sequencing
4686 - * Player doesn't get credit for hostages unless he gets them out alive
4687 - *
4688 - * Revision 1.189  1994/10/21  20:42:34  mike
4689 - * Clear number of hostages on board between levels.
4690 - *
4691 - * Revision 1.188  1994/10/20  15:17:43  mike
4692 - * control center in boss handling.
4693 - *
4694 - * Revision 1.187  1994/10/20  10:09:47  mike
4695 - * Only ever drop 1 shield powerup in multiplayer (as an egg).
4696 - *
4697 - * Revision 1.186  1994/10/20  09:47:11  mike
4698 - * Fix bug in dropping vulcan ammo in multiplayer.
4699 - * Also control center stuff.
4700 - *
4701 - * Revision 1.185  1994/10/19  15:14:32  john
4702 - * Took % hits out of player structure, made %kills work properly.
4703 - *
4704 - * Revision 1.184  1994/10/19  11:33:16  john
4705 - * Fixed hostage rescued percent.
4706 - *
4707 - * Revision 1.183  1994/10/19  11:16:49  mike
4708 - * Don't allow crazy josh to open locked doors.
4709 - * Don't allow weapons to harm parent.
4710 - *
4711 - * Revision 1.182  1994/10/18  18:37:01  mike
4712 - * No more hostage killing.  Too much stuff to do to integrate into game.
4713 - *
4714 - * Revision 1.181  1994/10/18  16:37:35  mike
4715 - * Debug function for Yuan: Show seg:side when hit by puny laser if Show_seg_and_side != 0.
4716 - *
4717 - * Revision 1.180  1994/10/18  10:53:17  mike
4718 - * Support attack type as a property of a robot, not of being == GREEN_GUY.
4719 - *
4720 - * Revision 1.179  1994/10/17  21:18:36  mike
4721 - * diminish damage player does to robot due to collision, only took 2-3 hits to kill a josh.
4722 - *
4723 - * Revision 1.178  1994/10/17  20:30:40  john
4724 - * Made player_hostages_rescued or whatever count properly.
4725 - *
4726 - * Revision 1.177  1994/10/16  12:42:56  mike
4727 - * Trap bogus amount of vulcan ammo dropping.
4728 - *
4729 - * Revision 1.176  1994/10/15  19:06:51  mike
4730 - * Drop vulcan ammo if player has it, but no vulcan cannon (when he dies).
4731 - *
4732 - * Revision 1.175  1994/10/13  15:42:06  mike
4733 - * Remove afterburner.
4734 - *
4735 - * Revision 1.174  1994/10/13  11:12:57  mike
4736 - * Apply damage to robots.  I hosed it a couple weeks ago when I made the green guy special.
4737
4738 ------------------------------------------------------------------------
4739 main/collide.h:
4740
4741 - * Revision 1.1  1995/05/16  15:55:09  allender
4742 - * Initial revision
4743 - *
4744 - * Revision 2.0  1995/02/27  11:28:59  john
4745 - * New version 2.0, which has no anonymous unions, builds with
4746 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4747 - *
4748 - * Revision 1.23  1995/01/26  22:11:47  mike
4749 - * Purple chromo-blaster (ie, fusion cannon) spruce up (chromification)
4750 - *
4751 - * Revision 1.22  1994/12/21  19:03:24  rob
4752 - * Fixing score accounting for multiplayer robots
4753 - *
4754 - * Revision 1.21  1994/12/21  11:34:56  mike
4755 - * make control center take badass damage.
4756 - *
4757 - * Revision 1.20  1994/10/29  16:53:16  allender
4758 - * added check_effect_blowup for demo recording to record monitor explosions
4759 - *
4760 - * Revision 1.19  1994/10/09  13:46:48  mike
4761 - * Make public collide_player_and_powerup.
4762 - *
4763 - * Revision 1.18  1994/10/05  14:54:29  rob
4764 - * Added serial game support in control center sequence..
4765 - *
4766 - * Revision 1.17  1994/09/15  16:32:12  mike
4767 - * Prototype collide_player_and_nasty_robot.
4768 - *
4769 - * Revision 1.16  1994/09/11  15:49:04  mike
4770 - * Prototype for maybe_detonate_weapon.
4771 - *
4772 - * Revision 1.15  1994/09/09  14:20:07  matt
4773 - * Added prototype for scrape function
4774 - *
4775 - * Revision 1.14  1994/09/02  14:00:44  matt
4776 - * Simplified explode_object() & mutliple-stage explosions
4777 - *
4778 - * Revision 1.13  1994/08/18  10:47:35  john
4779 - * Cleaned up game sequencing and player death stuff
4780 - * in preparation for making the player explode into
4781 - * pieces when dead.
4782 - *
4783 - * Revision 1.12  1994/08/17  16:50:08  john
4784 - * Added damaging fireballs, missiles.
4785 - *
4786 - * Revision 1.11  1994/08/03  16:45:31  mike
4787 - * Prototype a function.
4788 - *
4789 - * Revision 1.10  1994/08/03  15:17:41  mike
4790 - * make matcen whack on you if it's ready to make a robot.
4791 - *
4792 - * Revision 1.9  1994/07/22  12:08:03  mike
4793 - * Make robot hit vclip and sound weapon-based until robot dies, then robot-based.
4794 - *
4795 - * Revision 1.8  1994/07/09  17:36:31  mike
4796 - * Prototype apply_damage_to_robot.
4797 - *
4798 - * Revision 1.7  1994/07/09  13:20:36  mike
4799 - * Prototype apply_damage_to_player.
4800 - *
4801 - * Revision 1.6  1994/06/20  23:35:52  john
4802 - * Bunch of stuff.
4803 - *
4804 - * Revision 1.5  1994/06/17  18:04:03  yuan
4805 - * Added Immaterialization...
4806 - * Fixed Invulnerability to allow being hit.
4807 - *
4808 - * Revision 1.4  1994/05/13  20:28:02  john
4809 - * Version II of John's new object code.
4810 - *
4811 - * Revision 1.3  1994/05/13  12:20:35  john
4812 - * Fixed some potential problems with code using global variables
4813 - * that are set in fvi.
4814 - *
4815 - * Revision 1.2  1994/05/12  23:20:32  john
4816 - * Moved all object collision handling into collide.c.
4817 - *
4818 - * Revision 1.1  1994/05/12  20:39:09  john
4819 - * Initial revision
4820
4821 ------------------------------------------------------------------------
4822 main/compbit.h:
4823
4824 - * Revision 1.1  1995/05/16  15:55:16  allender
4825 - * Initial revision
4826 - *
4827 - * Revision 2.0  1995/02/27  11:28:46  john
4828 - * New version 2.0, which has no anonymous unions, builds with
4829 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4830 - *
4831 - * Revision 1.3  1994/12/05  15:10:28  allender
4832 - * changed extern prototype definition
4833 - *
4834 - * Revision 1.2  1994/10/19  15:43:33  allender
4835 - * header file which contains the xor value which is used when encrypting
4836 - * bitmaps.tbl
4837 - *
4838 - * Revision 1.1  1994/10/19  13:22:19  allender
4839 - * Initial revision
4840
4841 ------------------------------------------------------------------------
4842 main/config.c:
4843
4844 - * Revision 1.8  1995/10/27  10:52:20  allender
4845 - * call digi_set_master_volume when prefs are read in to
4846 - * set the master volume of the mac
4847 - *
4848 - * Revision 1.7  1995/10/24  17:08:39  allender
4849 - * Config_master_volume added for saving sound manager volume
4850 - * across games
4851 - *
4852 - * Revision 1.6  1995/10/20  00:49:31  allender
4853 - * use default values when no prefs file
4854 - *
4855 - * Revision 1.5  1995/09/21  10:06:58  allender
4856 - * set digi and midi volume appropriately
4857 - *
4858 - * Revision 1.4  1995/09/13  08:49:38  allender
4859 - * prefs file stuff
4860 - *
4861 - * Revision 1.3  1995/09/05  08:47:37  allender
4862 - * prefs file working
4863 - *
4864 - * Revision 1.2  1995/05/26  06:54:14  allender
4865 - * removed midi and digi references from config file
4866 - *
4867 - * Revision 1.1  1995/05/16  15:23:45  allender
4868 - * Initial revision
4869 - *
4870 - * Revision 2.2  1995/03/27  09:42:59  john
4871 - * Added VR Settings in config file.
4872 - *
4873 - * Revision 2.1  1995/03/16  11:20:40  john
4874 - * Put in support for Crystal Lake soundcard.
4875 - *
4876 - * Revision 2.0  1995/02/27  11:30:13  john
4877 - * New version 2.0, which has no anonymous unions, builds with
4878 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4879 - *
4880 - * Revision 1.14  1995/02/11  16:19:36  john
4881 - * Added code to make the default mission be the one last played.
4882 - *
4883 - * Revision 1.13  1995/01/18  13:23:24  matt
4884 - * Made curtom detail level vars initialize properly at load
4885 - *
4886 - * Revision 1.12  1995/01/04  22:15:36  matt
4887 - * Fixed stupid bug using scanf() to read bytes
4888 - *
4889 - * Revision 1.11  1995/01/04  13:14:21  matt
4890 - * Made custom detail level settings save in config file
4891 - *
4892 - * Revision 1.10  1994/12/12  21:35:09  john
4893 - * *** empty log message ***
4894 - *
4895 - * Revision 1.9  1994/12/12  21:31:51  john
4896 - * Made volume work better by making sure volumes are valid
4897 - * and set correctly at program startup.
4898 - *
4899 - * Revision 1.8  1994/12/12  13:58:01  john
4900 - * MAde -nomusic work.
4901 - * Fixed GUS hang at exit by deinitializing digi before midi.
4902 - *
4903 - * Revision 1.7  1994/12/08  10:01:33  john
4904 - * Changed the way the player callsign stuff works.
4905 - *
4906 - * Revision 1.6  1994/12/01  11:24:07  john
4907 - * Made volume/gamma/joystick sliders all be the same length.  0-->8.
4908 - *
4909 - * Revision 1.5  1994/11/29  02:01:07  john
4910 - * Added code to look at -volume command line arg.
4911 - *
4912 - * Revision 1.4  1994/11/14  20:14:11  john
4913 - * Fixed some warnings.
4914 - *
4915 - * Revision 1.3  1994/11/14  19:51:01  john
4916 - * Added joystick cal values to descent.cfg.
4917 - *
4918 - * Revision 1.2  1994/11/14  17:53:09  allender
4919 - * read and write descent.cfg file
4920 - *
4921 - * Revision 1.1  1994/11/14  16:28:08  allender
4922 - * Initial revision
4923
4924 ------------------------------------------------------------------------
4925 main/config.h:
4926
4927 - * Revision 1.3  1995/09/08  17:12:26  allender
4928 - * added modem tool stuff for prefs file
4929 - *
4930 - * Revision 1.2  1995/09/05  08:47:48  allender
4931 - * prefs file working
4932 - *
4933 - * Revision 1.1  1995/05/16  15:55:23  allender
4934 - * Initial revision
4935 - *
4936 - * Revision 2.0  1995/02/27  11:32:48  john
4937 - * New version 2.0, which has no anonymous unions, builds with
4938 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4939 - *
4940 - * Revision 1.4  1995/02/11  16:20:06  john
4941 - * Added code to make the default mission be the one last played.
4942 - *
4943 - * Revision 1.3  1994/12/08  10:01:41  john
4944 - * Changed the way the player callsign stuff works.
4945 - *
4946 - * Revision 1.2  1994/11/14  17:53:17  allender
4947 - * extern definitions for ReadConfigFile and WriteConfigFile
4948 - *
4949 - * Revision 1.1  1994/11/14  16:56:17  allender
4950 - * Initial revision
4951
4952 ------------------------------------------------------------------------
4953 main/controls.c:
4954
4955 - * Revision 1.3  1995/11/20  17:17:27  allender
4956 - * call fix_fastsincos with tmp variable to prevent
4957 - * writing to NULL
4958 - *
4959 - * Revision 1.2  1995/08/11  16:00:04  allender
4960 - * fixed bug we think we never saw (overflow on max_rotthrust
4961 - *
4962 - * Revision 1.1  1995/05/16  15:23:53  allender
4963 - * Initial revision
4964 - *
4965 - * Revision 2.0  1995/02/27  11:27:11  john
4966 - * New version 2.0, which has no anonymous unions, builds with
4967 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
4968 - *
4969 - * Revision 1.50  1995/02/22  14:11:19  allender
4970 - * remove anonymous unions from object structure
4971 - *
4972 - * Revision 1.49  1994/12/15  13:04:10  mike
4973 - * Replace Players[Player_num].time_total references with GameTime.
4974 - *
4975 - * Revision 1.48  1994/11/27  23:12:13  matt
4976 - * Made changes for new mprintf calling convention
4977 - *
4978 - * Revision 1.47  1994/11/25  22:15:54  matt
4979 - * Added asserts to try to trap frametime < 0 bug
4980 - *
4981 - * Revision 1.46  1994/11/16  11:25:40  matt
4982 - * Took out int3's since I determined that the errors are caused by neg frametime
4983 - *
4984 - * Revision 1.45  1994/11/15  13:07:23  matt
4985 - * Added int3's to try to trap bug
4986 - *
4987 - * Revision 1.44  1994/10/14  16:18:12  john
4988 - * Made Assert that the object was player just nicely exit
4989 - * the function.
4990 - *
4991 - * Revision 1.43  1994/10/13  11:35:25  john
4992 - * Made Thrustmaster FCS Hat work.  Put a background behind the
4993 - * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
4994 - * menu to new menu. Made F6 be calibrate joystick.
4995 - *
4996 - * Revision 1.42  1994/09/29  11:22:02  mike
4997 - * Zero thrust when player dies.
4998 - *
4999 - * Revision 1.41  1994/09/16  13:10:30  mike
5000 - * Hook in afterburner stuff.
5001 - *
5002 - * Revision 1.40  1994/09/14  22:21:54  matt
5003 - * Avoid post-death assert
5004 - *
5005 - * Revision 1.39  1994/09/11  20:30:27  matt
5006 - * Cleaned up thrust vars, changing a few names
5007 - *
5008 - * Revision 1.38  1994/09/10  15:46:31  john
5009 - * First version of new keyboard configuration.
5010 - *
5011 - * Revision 1.37  1994/09/07  15:58:12  mike
5012 - * Check for player dead in controls so you can't fire or move after dead, logical, huh?
5013 - *
5014 - * Revision 1.36  1994/09/06  14:51:56  john
5015 - * Added sensitivity adjustment, fixed bug with joystick button not
5016 - * staying down.
5017 - *
5018 - * Revision 1.35  1994/09/01  15:43:26  john
5019 - * Put pitch bak like it was.
5020 - *
5021 - * Revision 1.34  1994/08/31  18:59:35  john
5022 - * Made rotthrust back like it was.
5023 - *
5024 - * Revision 1.33  1994/08/31  18:49:17  john
5025 - * Slowed Maxrothrust a bit,
5026 - * ..
5027 - *
5028 - * Revision 1.32  1994/08/31  18:32:05  john
5029 - * Lower max rotational thrust
5030 - *
5031 - * Revision 1.31  1994/08/29  21:18:27  john
5032 - * First version of new keyboard/oystick remapping stuff.
5033 - *
5034 - * Revision 1.30  1994/08/29  16:18:30  mike
5035 - * trap divide overflow.
5036 - *
5037 - * Revision 1.29  1994/08/26  14:40:45  john
5038 - * *** empty log message ***
5039 - *
5040 - * Revision 1.28  1994/08/26  12:23:50  john
5041 - * MAde joystick read up to 15 times per second max.
5042 - *
5043 - * Revision 1.27  1994/08/26  10:50:59  john
5044 - * Took out Controls_always_stopped.
5045 - *
5046 - * Revision 1.26  1994/08/26  10:47:27  john
5047 - * *** empty log message ***
5048 - *
5049 - * Revision 1.25  1994/08/26  10:46:50  john
5050 - * New version of controls.
5051 - *
5052 - * Revision 1.24  1994/08/25  19:41:44  john
5053 - * *** empty log message ***
5054 - *
5055 - * Revision 1.23  1994/08/25  18:44:55  john
5056 - * *** empty log message ***
5057 - *
5058 - * Revision 1.22  1994/08/25  18:43:46  john
5059 - * First revision of new control code.
5060 - *
5061 - * Revision 1.21  1994/08/24  20:02:46  john
5062 - * Added cyberman support; made keys work key_down_time
5063 - * returning seconds instead of milliseconds,.
5064 - *
5065 - *
5066 - * Revision 1.20  1994/08/24  19:00:27  john
5067 - * Changed key_down_time to return fixed seconds instead of
5068 - * milliseconds.
5069 - *
5070 - * Revision 1.19  1994/08/19  15:22:12  mike
5071 - * Fix divide overflow in sliding.
5072 - *
5073 - * Revision 1.18  1994/08/19  14:42:50  john
5074 - * Added joystick sensitivity.
5075 - *
5076 - * Revision 1.17  1994/08/17  16:50:01  john
5077 - * Added damaging fireballs, missiles.
5078 - *
5079 - * Revision 1.16  1994/08/12  22:41:54  john
5080 - * Took away Player_stats; added Players array.
5081 - *
5082 - * Revision 1.15  1994/08/09  16:03:56  john
5083 - * Added network players to editor.
5084 - *
5085 - * Revision 1.14  1994/07/28  12:33:31  matt
5086 - * Made sliding use thrust, rather than changing velocity directly
5087 - *
5088 - * Revision 1.13  1994/07/27  20:53:21  matt
5089 - * Added rotational drag & thrust, so turning now has momemtum like moving
5090 - *
5091 - * Revision 1.12  1994/07/25  10:24:06  john
5092 - * Victor stuff.
5093 - *
5094 - * Revision 1.11  1994/07/22  17:53:16  john
5095 - * Added better victormax support
5096 - *
5097 - * Revision 1.10  1994/07/21  21:31:29  john
5098 - * First cheapo version of VictorMaxx tracking.
5099 - *
5100 - * Revision 1.9  1994/07/15  15:16:18  john
5101 - * Fixed some joystick stuff.
5102 - *
5103 - * Revision 1.8  1994/07/15  09:32:09  john
5104 - * Changes player movement.
5105 - *
5106 - * Revision 1.7  1994/07/13  00:14:58  matt
5107 - * Moved all (or nearly all) of the values that affect player movement to
5108 - * bitmaps.tbl
5109 - *
5110 - * Revision 1.6  1994/07/12  12:40:14  matt
5111 - * Revamped physics system
5112 - *
5113 - * Revision 1.5  1994/07/02  13:50:39  matt
5114 - * Cleaned up includes
5115 - *
5116 - * Revision 1.4  1994/07/01  10:55:25  john
5117 - * Added analog joystick throttle
5118 - *
5119 - * Revision 1.3  1994/06/30  20:04:28  john
5120 - * Added -joydef support.
5121 - *
5122 - * Revision 1.2  1994/06/30  19:01:58  matt
5123 - * Moved flying controls code from physics.c to controls.c
5124 - *
5125 - * Revision 1.1  1994/06/30  18:41:25  matt
5126 - * Initial revision
5127
5128 ------------------------------------------------------------------------
5129 main/controls.h:
5130
5131 - * Revision 1.1  1995/05/16  15:55:31  allender
5132 - * Initial revision
5133 - *
5134 - * Revision 2.0  1995/02/27  11:27:17  john
5135 - * New version 2.0, which has no anonymous unions, builds with
5136 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5137 - *
5138 - * Revision 1.4  1994/07/21  18:15:33  matt
5139 - * Ripped out a bunch of unused stuff
5140 - *
5141 - * Revision 1.3  1994/07/15  09:32:08  john
5142 - * Changes player movement.
5143 - *
5144 - * Revision 1.2  1994/06/30  19:02:22  matt
5145 - * Moved flying controls code from physics.c to controls.c
5146 - *
5147 - * Revision 1.1  1994/06/30  18:41:36  matt
5148 - * Initial revision
5149
5150 ------------------------------------------------------------------------
5151 main/credits.c:
5152
5153 - * Revision 1.8  1995/11/07  13:54:56  allender
5154 - * loop shareware song since it is too short
5155 - *
5156 - * Revision 1.7  1995/10/31  10:24:25  allender
5157 - * shareware stuff
5158 - *
5159 - * Revision 1.6  1995/10/27  15:17:57  allender
5160 - * minor fix to get them to look right at top and bottom
5161 - * of screens
5162 - *
5163 - * Revision 1.5  1995/10/21  22:50:49  allender
5164 - * credits is way cool!!!!
5165 - *
5166 - * Revision 1.3  1995/08/08  13:45:26  allender
5167 - * added macsys header file
5168 - *
5169 - * Revision 1.2  1995/07/17  08:49:48  allender
5170 - * make work in 640x480 -- still needs major work!!
5171 - *
5172 - * Revision 1.1  1995/05/16  15:24:01  allender
5173 - * Initial revision
5174 - *
5175 - * Revision 2.2  1995/06/14  17:26:08  john
5176 - * Fixed bug with VFX palette not getting loaded for credits, titles.
5177 - *
5178 - * Revision 2.1  1995/03/06  15:23:30  john
5179 - * New screen techniques.
5180 - *
5181 - * Revision 2.0  1995/02/27  11:29:25  john
5182 - * New version 2.0, which has no anonymous unions, builds with
5183 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5184 - *
5185 - * Revision 1.33  1995/02/11  12:41:56  john
5186 - * Added new song method, with FM bank switching..
5187 - *
5188 - * Revision 1.32  1995/02/03  14:18:06  john
5189 - * Added columns.
5190 - *
5191 - * Revision 1.31  1994/12/28  10:43:00  john
5192 - * More VFX tweaking.
5193 - *
5194 - * Revision 1.30  1994/12/20  18:22:31  john
5195 - * Added code to support non-looping songs, and put
5196 - * it in for endlevel and credits.
5197 - *
5198 - * Revision 1.29  1994/12/15  14:23:00  adam
5199 - * fixed timing.
5200 - *
5201 - * Revision 1.28  1994/12/14  16:56:33  adam
5202 - * *** empty log message ***
5203 - *
5204 - * Revision 1.27  1994/12/14  12:18:11  adam
5205 - * messed w/timing
5206 - *
5207 - * Revision 1.26  1994/12/12  22:52:59  matt
5208 - * Fixed little bug
5209 - *
5210 - * Revision 1.25  1994/12/12  22:49:35  adam
5211 - * *** empty log message ***
5212 - *
5213 - * Revision 1.24  1994/12/09  23:16:50  john
5214 - * Make credits.txb load.
5215 - *
5216 - * Revision 1.23  1994/12/09  00:41:54  mike
5217 - * fix hang in automap print screen.
5218 - *
5219 - * Revision 1.22  1994/12/09  00:34:22  matt
5220 - * Added support for half-height lines
5221 - *
5222 - * Revision 1.21  1994/12/08  18:36:03  yuan
5223 - * More HOGfile support.
5224 - *
5225 - * Revision 1.20  1994/12/04  14:48:17  john
5226 - * Made credits restore playing descent.hmp.
5227 - *
5228 - * Revision 1.19  1994/12/04  14:30:20  john
5229 - * Added hooks for music..
5230 - *
5231 - * Revision 1.18  1994/12/04  12:06:46  matt
5232 - * Put in support for large font
5233 - *
5234 - * Revision 1.17  1994/12/01  10:47:27  john
5235 - * Took out code that allows keypresses to change scroll rate.
5236 - *
5237 - * Revision 1.16  1994/11/30  12:10:52  adam
5238 - * added support for PCX titles/brief screens
5239 - *
5240 - * Revision 1.15  1994/11/27  23:12:17  matt
5241 - * Made changes for new mprintf calling convention
5242 - *
5243 - * Revision 1.14  1994/11/27  19:51:46  matt
5244 - * Made screen shots work in a few more places
5245 - *
5246 - * Revision 1.13  1994/11/18  16:41:51  adam
5247 - * trimmed some more meat for shareware
5248 - *
5249 - * Revision 1.12  1994/11/10  20:38:29  john
5250 - * Made credits not loop.
5251 - *
5252 - * Revision 1.11  1994/11/05  15:04:06  john
5253 - * Added non-popup menu for the main menu, so that scores and credits don't have to save
5254 - * the background.
5255 - *
5256 - * Revision 1.10  1994/11/05  14:05:52  john
5257 - * Fixed fade transitions between all screens by making gr_palette_fade_in and out keep
5258 - * track of whether the palette is faded in or not.  Then, wherever the code needs to fade out,
5259 - * it just calls gr_palette_fade_out and it will fade out if it isn't already.  The same with fade_in.
5260 - * This eliminates the need for all the flags like Menu_fade_out, game_fade_in palette, etc.
5261 - *
5262 - * Revision 1.9  1994/11/04  12:02:32  john
5263 - * Fixed fading transitions a bit more.
5264 - *
5265 - * Revision 1.8  1994/11/04  11:30:44  john
5266 - * Fixed fade transitions between game/menu/credits.
5267 - *
5268 - * Revision 1.7  1994/11/04  11:06:32  john
5269 - * Added code to support credit fade table.
5270 - *
5271 - * Revision 1.6  1994/11/04  10:16:13  john
5272 - * Made the credits fade in/out smoothly on top of a bitmap background.
5273 - *
5274 - * Revision 1.5  1994/11/03  21:24:12  john
5275 - * Made credits exit the instant a key is pressed.
5276 - * Made it scroll a bit slower.
5277 - *
5278 - * Revision 1.4  1994/11/03  21:20:28  john
5279 - * Working.
5280 - *
5281 - * Revision 1.3  1994/11/03  21:01:24  john
5282 - * First version of credits that works.
5283 - *
5284 - * Revision 1.2  1994/11/03  20:17:39  john
5285 - * Added initial code for showing credits.
5286 - *
5287 - * Revision 1.1  1994/11/03  20:09:05  john
5288 - * Initial revision
5289
5290 ------------------------------------------------------------------------
5291 main/credits.h:
5292
5293 - * Revision 1.1  1995/05/16  15:55:39  allender
5294 - * Initial revision
5295 - *
5296 - * Revision 2.0  1995/02/27  11:32:30  john
5297 - * New version 2.0, which has no anonymous unions, builds with
5298 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5299 - *
5300 - * Revision 1.2  1994/11/03  20:17:40  john
5301 - * Added initial code for showing credits.
5302 - *
5303 - * Revision 1.1  1994/11/03  20:09:19  john
5304 - * Initial revision
5305
5306 ------------------------------------------------------------------------
5307 main/desc_id.h:
5308
5309 - * Revision 1.1  1995/05/16  15:55:53  allender
5310 - * Initial revision
5311 - *
5312 - * Revision 2.0  1995/02/27  11:29:38  john
5313 - * New version 2.0, which has no anonymous unions, builds with
5314 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5315 - *
5316 - * Revision 1.3  1994/10/19  09:52:57  allender
5317 - * Added variable for bogus error number return when game exits
5318 - *
5319 - * Revision 1.2  1994/10/18  16:43:52  allender
5320 - * Added constants for id and time stamping
5321 - *
5322 - * Revision 1.1  1994/10/17  09:56:47  allender
5323 - * Initial revision
5324 - * Header for checksum stuff - No idea what for.
5325
5326 ------------------------------------------------------------------------
5327 main/digi.h:
5328
5329 - * Revision 2.0  1995/02/27  11:28:40  john
5330 - * New version 2.0, which has no anonymous unions, builds with
5331 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5332 - *
5333 - * Revision 1.29  1995/02/11  12:42:00  john
5334 - * Added new song method, with FM bank switching..
5335 - *
5336 - * Revision 1.28  1995/02/03  17:08:26  john
5337 - * Changed sound stuff to allow low memory usage.
5338 - * Also, changed so that Sounds isn't an array of digi_sounds, it
5339 - * is a ubyte pointing into GameSounds, this way the digi.c code that
5340 - * locks sounds won't accidentally unlock a sound that is already playing, but
5341 - * since it's Sounds[soundno] is different, it would erroneously be unlocked.
5342 - *
5343 - * Revision 1.27  1995/02/01  22:20:31  john
5344 - * Added digi_is_sound_playing.
5345 - *
5346 - * Revision 1.26  1994/12/20  18:03:51  john
5347 - * Added loop midi flag.
5348 - *
5349 - * Revision 1.25  1994/12/13  00:46:14  john
5350 - * Split digi and midi volume into 2 seperate functions.
5351 - *
5352 - * Revision 1.24  1994/12/10  20:34:53  john
5353 - * Added digi_kill_sound_linked_to_object.
5354 - *
5355 - * Revision 1.23  1994/12/10  15:59:39  mike
5356 - * Fixed bug.
5357 - *
5358 - * Revision 1.22  1994/12/10  15:44:35  john
5359 - * Added max_distance passing for sound objects.
5360 - *
5361 - * Revision 1.21  1994/12/05  12:17:40  john
5362 - * Added code that locks/unlocks digital sounds on demand.
5363 - *
5364 - * Revision 1.20  1994/11/28  18:34:57  john
5365 - * Made the digi_max_channels cut of an old sound instead of
5366 - * not playing a new sound.
5367 - *
5368 - * Revision 1.19  1994/11/14  17:53:56  allender
5369 - * made some digi variables extern
5370 - *
5371 - * Revision 1.18  1994/10/28  14:42:58  john
5372 - * Added sound volumes to all sound calls.
5373 - *
5374 - * Revision 1.17  1994/10/11  15:25:37  john
5375 - * Added new function to play a sound once...
5376 - *
5377 - * Revision 1.16  1994/10/03  20:51:44  john
5378 - * Started added pause sound function; for the network I changed to
5379 - * packet structure a bit; never tested, though.
5380 - *
5381 - *
5382 - * Revision 1.15  1994/10/03  13:09:43  john
5383 - * Added Pause function, but never tested it yet.
5384 - *
5385 - * Revision 1.14  1994/09/30  10:09:24  john
5386 - * Changed sound stuff... made it so the reseting card doesn't hang,
5387 - * made volume change only if sound is installed.
5388 - *
5389 - * Revision 1.13  1994/09/29  21:13:43  john
5390 - * Added Master volumes for digi and midi. Also took out panning,
5391 - * because it doesn't work with MasterVolume stuff.
5392 - *
5393 - * Revision 1.12  1994/09/29  12:42:34  john
5394 - * Added sidenum to keep track of sound pos. Made sound functions
5395 - * not do anything if nosound. Made sounds_init delete currently
5396 - * playing sounds.
5397 - *
5398 - * Revision 1.11  1994/09/29  12:23:42  john
5399 - * Added digi_kill_sound_linked_to_segment function.
5400 - *
5401 - * Revision 1.10  1994/09/29  11:59:04  john
5402 - * Added digi_kill_sound
5403 - *
5404 - * Revision 1.9  1994/09/29  10:37:38  john
5405 - * Added sound objects that dynamicaly change volume,pan.
5406 - *
5407 - * Revision 1.8  1994/09/28  16:18:37  john
5408 - * Added capability to play midi song.
5409 - *
5410 - * Revision 1.7  1994/06/17  18:01:41  john
5411 - * A bunch of new stuff by John
5412 - *
5413 - * Revision 1.6  1994/06/15  19:00:58  john
5414 - * Added the capability to make 3d sounds play just once for the
5415 - * laser hit wall effects.
5416 - *
5417 - * Revision 1.5  1994/06/07  10:54:30  john
5418 - * Made key S reinit the sound system.
5419 - *
5420 - * Revision 1.4  1994/05/09  21:11:39  john
5421 - * Sound changes; pass index instead of pointer to digi routines.
5422 - * Made laser sound cut off the last laser sound.
5423 - *
5424 - * Revision 1.3  1994/04/27  11:44:25  john
5425 - * First version of sound! Yay!
5426 - *
5427 - * Revision 1.2  1994/04/20  21:58:50  john
5428 - * First version of sound stuff... hopefully everything
5429 - * is commented out because it hangs..
5430 - *
5431 - * Revision 1.1  1994/04/15  14:25:02  john
5432 - * Initial revision
5433
5434 ------------------------------------------------------------------------
5435 main/dumpmine.c:
5436
5437 - * Revision 1.1  1995/05/16  15:24:16  allender
5438 - * Initial revision
5439 - *
5440 - * Revision 2.1  1995/04/06  12:21:50  mike
5441 - * Add texture map information to txm files.
5442 - *
5443 - * Revision 2.0  1995/02/27  11:26:41  john
5444 - * New version 2.0, which has no anonymous unions, builds with
5445 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5446 - *
5447 - * Revision 1.24  1995/01/23  15:34:43  mike
5448 - * New diagnostic code, levels.all stuff.
5449 - *
5450 - * Revision 1.23  1994/12/20  17:56:36  yuan
5451 - * Multiplayer object capability.
5452 - *
5453 - * Revision 1.22  1994/11/27  23:12:19  matt
5454 - * Made changes for new mprintf calling convention
5455 - *
5456 - * Revision 1.21  1994/11/23  12:19:04  mike
5457 - * move out level names, stick in gamesave.
5458 - *
5459 - * Revision 1.20  1994/11/21  16:54:36  mike
5460 - * oops.
5461 - *
5462 - *
5463 - * Revision 1.19  1994/11/20  22:12:55  mike
5464 - * Lotsa new stuff in this fine debug file.
5465 - *
5466 - * Revision 1.18  1994/11/17  14:58:09  mike
5467 - * moved segment validation functions from editor to main.
5468 - *
5469 - * Revision 1.17  1994/11/15  21:43:02  mike
5470 - * texture usage system.
5471 - *
5472 - * Revision 1.16  1994/11/15  12:45:59  mike
5473 - * debug code for dumping texture info.
5474 - *
5475 - * Revision 1.15  1994/11/14  20:47:50  john
5476 - * Attempted to strip out all the code in the game
5477 - * directory that uses any ui code.
5478 - *
5479 - * Revision 1.14  1994/10/14  17:33:38  mike
5480 - * Fix error reporting for number of multiplayer objects in mine.
5481 - *
5482 - * Revision 1.13  1994/10/14  13:37:46  mike
5483 - * Forgot parameter in fprintf, was getting bogus number of excess keys.
5484 - *
5485 - * Revision 1.12  1994/10/12  08:05:33  mike
5486 - * Detect keys contained in objects for error checking (txm file).
5487 - *
5488 - * Revision 1.11  1994/10/10  17:02:08  mike
5489 - * fix fix.
5490 - *
5491 - * Revision 1.10  1994/10/10  17:00:37  mike
5492 - * Add checking for proper number of players.
5493 - *
5494 - * Revision 1.9  1994/10/03  23:37:19  mike
5495 - * Adapt to clear and rational understanding of matcens as related to fuelcens as related to something that might work.
5496 - *
5497 - * Revision 1.8  1994/09/30  17:15:29  mike
5498 - * Fix error message, was telling bogus filename.
5499 - *
5500 - * Revision 1.7  1994/09/30  11:50:55  mike
5501 - * More diagnostics.
5502 - *
5503 - * Revision 1.6  1994/09/28  17:31:19  mike
5504 - * More error checking.
5505 - *
5506 - * Revision 1.5  1994/09/28  11:14:05  mike
5507 - * Better checking on bogus walls.
5508 - *
5509 - * Revision 1.4  1994/09/28  09:23:50  mike
5510 - * Change some Error messages to Warnings.
5511 - *
5512 - * Revision 1.3  1994/09/27  17:08:31  mike
5513 - * More mine validation stuff.
5514 - *
5515 - * Revision 1.2  1994/09/27  15:43:22  mike
5516 - * The amazing code to tell you everything and more about our mines!
5517 - *
5518 - * Revision 1.1  1994/09/27  10:51:15  mike
5519 - * Initial revision
5520
5521 ------------------------------------------------------------------------
5522 main/editor/medwall.h:
5523
5524 - * Revision 2.0  1995/02/27  11:35:10  john
5525 - * Version 2.0! No anonymous unions, Watcom 10.0, with no need
5526 - * for bitmaps.tbl.
5527 - * 
5528 - * Revision 1.9  1994/09/28  17:31:51  mike
5529 - * Prototype copy_group_walls().
5530 - * 
5531 - * Revision 1.8  1994/08/05  21:18:16  matt
5532 - * Allow two doors to be linked together
5533 - * 
5534 - * Revision 1.7  1994/06/20  22:30:10  yuan
5535 - * Fixed crazy runaway trigger bug that Adam found
5536 - * 
5537 - * Revision 1.6  1994/05/30  20:22:58  yuan
5538 - * New triggers.
5539 - * 
5540 - * Revision 1.5  1994/05/25  18:08:37  yuan
5541 - * Revamping walls and triggers interface.
5542 - * Wall interface complete, but triggers are still in progress.
5543 - * 
5544 - * Revision 1.4  1994/05/18  18:22:04  yuan
5545 - * Fixed delete segment and walls bug.
5546 - * 
5547 - * Revision 1.3  1994/03/17  18:08:41  yuan
5548 - * New wall stuff... Cut out switches....
5549 - * 
5550 - * Revision 1.2  1994/03/15  16:34:10  yuan
5551 - * Fixed bm loader (might have some changes in walls and switches)
5552 - * 
5553 - * Revision 1.1  1994/02/10  17:52:01  matt
5554 - * Initial revision
5555
5556 ------------------------------------------------------------------------
5557 main/editor/seguvs.h:
5558
5559 - * Revision 2.0  1995/02/27  11:34:58  john
5560 - * Version 2.0! No anonymous unions, Watcom 10.0, with no need
5561 - * for bitmaps.tbl.
5562 - * 
5563 - * Revision 1.3  1994/08/03  10:32:28  mike
5564 - * Add stretch_uvs_from_curedge.
5565 - * 
5566 - * Revision 1.2  1994/05/14  18:00:58  matt
5567 - * Got rid of externs in source (non-header) files
5568 - * 
5569 - * Revision 1.1  1994/05/14  17:27:26  matt
5570 - * Initial revision
5571
5572 ------------------------------------------------------------------------
5573 main/effects.c:
5574
5575 - * Revision 1.1  1995/05/16  15:24:25  allender
5576 - * Initial revision
5577 - *
5578 - * Revision 2.0  1995/02/27  11:32:49  john
5579 - * New version 2.0, which has no anonymous unions, builds with
5580 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5581 - *
5582 - * Revision 1.21  1995/02/13  20:35:06  john
5583 - * Lintized
5584 - *
5585 - * Revision 1.20  1994/12/10  16:44:50  matt
5586 - * Added debugging code to track down door that turns into rock
5587 - *
5588 - * Revision 1.19  1994/12/06  16:27:14  matt
5589 - * Fixed horrible bug that was referencing segment -1
5590 - *
5591 - * Revision 1.18  1994/12/02  23:20:51  matt
5592 - * Reset bitmaps possibly changed by crit clips
5593 - *
5594 - * Revision 1.17  1994/11/14  14:00:19  matt
5595 - * Fixed stupid bug
5596 - *
5597 - * Revision 1.16  1994/11/14  12:42:43  matt
5598 - * Allow holes in effects list
5599 - *
5600 - * Revision 1.15  1994/11/08  21:11:52  matt
5601 - * Added functions to stop & start effects
5602 - *
5603 - * Revision 1.14  1994/10/04  18:59:08  matt
5604 - * Exploding eclips now play eclip while exploding, then switch to static bm
5605 - *
5606 - * Revision 1.13  1994/10/04  15:17:42  matt
5607 - * Took out references to unused constant
5608 - *
5609 - * Revision 1.12  1994/09/29  11:00:01  matt
5610 - * Made eclips (wall animations) not frame-rate dependent (for now)
5611 - *
5612 - * Revision 1.11  1994/09/25  00:40:24  matt
5613 - * Added the ability to make eclips (monitors, fans) which can be blown up
5614 - *
5615 - * Revision 1.10  1994/08/14  23:15:14  matt
5616 - * Added animating bitmap hostages, and cleaned up vclips a bit
5617 - *
5618 - * Revision 1.9  1994/08/05  15:56:04  matt
5619 - * Cleaned up effects system, and added alternate effects for after mine
5620 - * destruction.
5621 - *
5622 - * Revision 1.8  1994/08/01  23:17:21  matt
5623 - * Add support for animating textures on robots
5624 - *
5625 - * Revision 1.7  1994/05/23  15:10:46  yuan
5626 - * Make Eclips read directly...
5627 - * No more need for $EFFECTS list.
5628 - *
5629 - * Revision 1.6  1994/04/06  14:42:44  yuan
5630 - * Adding new powerups.
5631 - *
5632 - * Revision 1.5  1994/03/15  16:31:54  yuan
5633 - * Cleaned up bm-loading code.
5634 - * (And structures)
5635 - *
5636 - * Revision 1.4  1994/03/04  17:09:09  yuan
5637 - * New door stuff.
5638 - *
5639 - * Revision 1.3  1994/01/11  11:18:50  yuan
5640 - * Fixed frame_count
5641 - *
5642 - * Revision 1.2  1994/01/11  10:38:55  yuan
5643 - * Special effects new implementation
5644 - *
5645 - * Revision 1.1  1994/01/10  09:45:29  yuan
5646 - * Initial revision
5647
5648 ------------------------------------------------------------------------
5649 main/effects.h:
5650
5651 - * Revision 1.1  1995/05/16  15:56:08  allender
5652 - * Initial revision
5653 - *
5654 - * Revision 2.0  1995/02/27  11:27:34  john
5655 - * New version 2.0, which has no anonymous unions, builds with
5656 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5657 - *
5658 - * Revision 1.15  1994/11/08  21:12:07  matt
5659 - * Added functions to stop & start effects
5660 - *
5661 - * Revision 1.14  1994/10/13  17:14:11  adam
5662 - * MAX_EFFECTS to 60 (ugh)
5663 - *
5664 - * Revision 1.13  1994/10/05  10:14:34  adam
5665 - * MAX_EFFECTS to 50
5666 - *
5667 - * Revision 1.12  1994/10/04  18:59:09  matt
5668 - * Exploding eclips now play eclip while exploding, then switch to static bm
5669 - *
5670 - * Revision 1.11  1994/10/04  15:17:52  matt
5671 - * Took out references to unused constant
5672 - *
5673 - * Revision 1.10  1994/09/29  14:15:00  matt
5674 - * Added sounds for eclips (wall effects)
5675 - *
5676 - * Revision 1.9  1994/09/25  00:40:24  matt
5677 - * Added the ability to make eclips (monitors, fans) which can be blown up
5678 - *
5679 - * Revision 1.8  1994/08/05  15:55:25  matt
5680 - * Cleaned up effects system, and added alternate effects for after mine
5681 - * destruction.
5682 - *
5683 - * Revision 1.7  1994/08/01  23:17:20  matt
5684 - * Add support for animating textures on robots
5685 - *
5686 - * Revision 1.6  1994/05/19  18:13:18  yuan
5687 - * MAX_EFFECTS increased to 30
5688 - *
5689 - * Revision 1.5  1994/03/15  16:32:37  yuan
5690 - * Cleaned up bm-loading code.
5691 - * (Fixed structures too)
5692 - *
5693 - * Revision 1.4  1994/03/04  17:09:07  yuan
5694 - * New door stuff.
5695 - *
5696 - * Revision 1.3  1994/01/19  18:22:45  yuan
5697 - * Changed number of effects from 10-20
5698 - *
5699 - * Revision 1.2  1994/01/11  10:39:07  yuan
5700 - * Special effects new implementation
5701 - *
5702 - * Revision 1.1  1994/01/10  10:36:14  yuan
5703 - * Initial revision
5704
5705 ------------------------------------------------------------------------
5706 main/endlevel.c:
5707
5708 - * Revision 1.5  1995/10/31  10:24:09  allender
5709 - * shareware stuff
5710 - *
5711 - * Revision 1.4  1995/09/14  16:33:54  allender
5712 - * fixed function return values for those that didn't
5713 - * have them...thanks matt!
5714 - *
5715 - * Revision 1.3  1995/07/28  15:36:26  allender
5716 - * reverse inverse sqrt change
5717 - *
5718 - * Revision 1.2  1995/07/28  15:17:40  allender
5719 - * inverse magnitude fixup
5720 - *
5721 - * Revision 1.1  1995/05/16  15:24:32  allender
5722 - * Initial revision
5723 - *
5724 - * Revision 2.2  1995/03/21  14:40:14  john
5725 - * Ifdef'd out the NETWORK code.
5726 - *
5727 - * Revision 2.1  1995/03/20  18:15:50  john
5728 - * Added code to not store the normals in the segment structure.
5729 - *
5730 - * Revision 2.0  1995/02/27  11:30:42  john
5731 - * New version 2.0, which has no anonymous unions, builds with
5732 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5733 - *
5734 - * Revision 1.80  1995/02/22  13:24:45  john
5735 - * Removed the vecmat anonymous unions.
5736 - *
5737 - * Revision 1.79  1995/02/11  12:41:54  john
5738 - * Added new song method, with FM bank switching..
5739 - *
5740 - * Revision 1.78  1995/02/08  11:37:41  mike
5741 - * Check for failures in call to obj_create.
5742 - *
5743 - * Revision 1.77  1995/02/05  22:09:49  matt
5744 - * Switch out of rear view when starting endlevel sequence
5745 - *
5746 - * Revision 1.76  1995/01/30  18:08:28  rob
5747 - * Add palette fade out before ending level on special missions.
5748 - *
5749 - * Revision 1.75  1995/01/29  16:19:19  rob
5750 - * Fixed endlevel for custom missions.
5751 - *
5752 - * Revision 1.74  1995/01/26  12:18:10  rob
5753 - * Changed calling convention of network_do_frame.
5754 - *
5755 - * Revision 1.73  1995/01/21  16:50:03  matt
5756 - * Made endlevel work with new mission stuff
5757 - *
5758 - * Revision 1.72  1994/12/20  18:22:51  john
5759 - * Added code to support non-looping songs, and put
5760 - * it in for endlevel and credits.
5761 - *
5762 - * Revision 1.71  1994/12/15  12:23:58  matt
5763 - * Added check for failure to create camera object
5764 - *
5765 - * Revision 1.70  1994/12/15  03:05:28  matt
5766 - * Added error checking for NULL return from object_create_explosion()
5767 - *
5768 - * Revision 1.69  1994/12/12  21:41:38  matt
5769 - * Don't start endlevel if OF_SHOULD_BE_DEAD is set for player
5770 - *
5771 - * Revision 1.68  1994/12/12  15:44:54  rob
5772 - * Rolled back a change to endlevel_start that caused more bugs than
5773 - * it fixed.
5774 - *
5775 - * Revision 1.67  1994/12/12  12:08:33  rob
5776 - * IF a player is dead upon entering the tunnel, make them not dead.  Not perfect solution
5777 - * but avoids some last-minute weirdness we want to fix.  This should be revisited in new
5778 - * versions if possible!
5779 - *
5780 - * Revision 1.66  1994/12/11  22:02:13  allender
5781 - * made endlevel data loading work with .txb encoded format (made with
5782 - * compbit -i level0?.end -o level0?.txb)
5783 - *
5784 - * Revision 1.65  1994/12/11  20:32:47  matt
5785 - * Made camera transition happen 1/3 of the way through exit tunnel
5786 - *
5787 - * Revision 1.64  1994/12/08  20:56:27  john
5788 - * More cfile stuff.
5789 - *
5790 - * Revision 1.63  1994/12/07  17:00:52  rob
5791 - * Trying to fix homing tone warning when in exit tunnel.
5792 - *
5793 - * Revision 1.62  1994/12/06  13:24:47  matt
5794 - * Made exit model come out of bitmaps.tbl
5795 - *
5796 - * Revision 1.61  1994/12/06  12:06:22  matt
5797 - * Fixed/cleaned up satellite (planet/sun) code
5798 - *
5799 - * Revision 1.60  1994/12/05  13:37:12  adam
5800 - * removed slew-mode
5801 - *
5802 - * Revision 1.59  1994/12/05  12:49:37  matt
5803 - * Made satellite a rod (instead of a plane old non-rotating bitmap), and
5804 - * made the size settable in the .end file
5805 - *
5806 - * Revision 1.58  1994/12/04  21:40:00  matt
5807 - * Added explosion sounds
5808 - *
5809 - * Revision 1.57  1994/12/04  18:31:41  matt
5810 - * Wasn't coding planet position, causing it to disappear sometimes
5811 - *
5812 - * Revision 1.56  1994/12/04  14:30:26  john
5813 - * Added hooks for music..
5814 - *
5815 - * Revision 1.55  1994/12/04  13:53:52  matt
5816 - * Added code to make camera off-centered during lookback
5817 - *
5818 - * Revision 1.54  1994/12/04  12:30:18  matt
5819 - * Fixed slew for short sequence
5820 - *
5821 - * Revision 1.53  1994/12/03  19:28:10  matt
5822 - * Added alternate model for exit model after mine destruction
5823 - *
5824 - * Revision 1.52  1994/12/03  00:17:23  matt
5825 - * Made endlevel sequence cut off early
5826 - * Made exit model and bit explosion always plot last (after all terrain)
5827 - *
5828 - * Revision 1.51  1994/12/01  20:15:43  yuan
5829 - * Localization.
5830 - *
5831 - * Revision 1.50  1994/11/30  23:27:35  adam
5832 - * mucked around carelessly
5833 - *
5834 - * Revision 1.49  1994/11/28  21:50:37  mike
5835 - * optimizations.
5836 - *
5837 - * Revision 1.48  1994/11/28  00:12:05  allender
5838 - * took out demo code that was in at one time to record endlevel sequence.
5839 - * We are _not_ recording endlevel sequence
5840 - *
5841 - * Revision 1.47  1994/11/27  23:35:54  allender
5842 - * pause demo recording when starting endlevel sequence.  on demo playback,
5843 - * don't do endlevel at all.
5844 - *
5845 - * Revision 1.46  1994/11/27  23:13:59  matt
5846 - * Made changes for new mprintf calling convention
5847 - *
5848 - * Revision 1.45  1994/11/26  23:17:29  matt
5849 - * When camera leaves mine, bank it so it's level with the ground
5850 - *
5851 - * Revision 1.44  1994/11/23  16:52:13  rob
5852 - * Ended netgame endlevel sequence a bit earlier.
5853 - *
5854 - * Revision 1.43  1994/11/22  19:20:46  rob
5855 - * Modem support for secret levels.
5856 - *
5857 - * Revision 1.42  1994/11/22  12:11:03  rob
5858 - * Fixed bug - file handle left open in load_endlevel_data.
5859 - *
5860 - * Revision 1.41  1994/11/21  17:29:22  matt
5861 - * Cleaned up sequencing & game saving for secret levels
5862 - *
5863 - * Revision 1.40  1994/11/19  15:14:54  mike
5864 - * remove unused code and data
5865 - *
5866 - * Revision 1.39  1994/11/19  12:41:32  matt
5867 - * Added system to read endlevel data from file, and to make it work
5868 - * with any exit tunnel.
5869 - *
5870 - * Revision 1.38  1994/11/17  15:02:24  mike
5871 - * support new segment validation functions.
5872 - *
5873 - * Revision 1.37  1994/11/17  13:04:45  allender
5874 - * backout out newdemo changes
5875 - *
5876 - * Revision 1.35  1994/11/16  14:52:33  rob
5877 - * Commented out SLEW_ON on Matt's direction.
5878 - * Changed something to fix demo recording.
5879 - *
5880 - * Revision 1.34  1994/11/16  11:49:29  matt
5881 - * Added code to rotate terrain to match mine
5882 - *
5883 - * Revision 1.33  1994/11/14  17:54:54  allender
5884 - * on exit sequence during demo recording, force player exited from mine
5885 - * packet to all other network players
5886 - *
5887 - * Revision 1.32  1994/11/10  21:27:42  matt
5888 - * Took out printf's
5889 - *
5890 - * Revision 1.31  1994/11/10  14:02:24  matt
5891 - * Hacked in support for player ships with different textures
5892 - *
5893 - * Revision 1.30  1994/11/09  10:31:33  matt
5894 - * Don't create explosions if can't find seg to create them in
5895 - *
5896 - * Revision 1.29  1994/11/05  17:22:37  john
5897 - * Fixed lots of sequencing problems with newdemo stuff.
5898 - *
5899 - * Revision 1.28  1994/11/03  11:10:39  matt
5900 - * Fixed chase angles code
5901 - * Maybe other things, too.
5902 - *
5903 - * Revision 1.27  1994/10/30  20:09:21  matt
5904 - * For endlevel: added big explosion at tunnel exit; made lights in tunnel
5905 - * go out; made more explosions on walls.
5906 - *
5907 - * Revision 1.26  1994/10/28  16:37:50  allender
5908 - * stop demo recording when endlevel sequence activated
5909 - *
5910 - * Revision 1.25  1994/10/27  21:15:21  matt
5911 - * Added explosions in mine chasing player
5912 - *
5913 - * Revision 1.24  1994/10/27  01:03:57  matt
5914 - * Fixed several small bugs in flythrough
5915 - *
5916 - * Revision 1.23  1994/10/22  01:32:30  matt
5917 - * Don't start endlevel sequence if player dead
5918 - *
5919 - * Revision 1.22  1994/10/22  00:08:06  matt
5920 - * Fixed up problems with bonus & game sequencing
5921 - * Player doesn't get credit for hostages unless he gets them out alive
5922
5923 ------------------------------------------------------------------------
5924 main/endlevel.h:
5925
5926 - * Revision 1.2  1995/09/14  16:36:34  allender
5927 - * fixed function prototype for those functions that didn't
5928 - * have them...thanks matt
5929 - *
5930 - * Revision 1.1  1995/05/16  15:56:16  allender
5931 - * Initial revision
5932 - *
5933 - * Revision 2.0  1995/02/27  11:31:37  john
5934 - * New version 2.0, which has no anonymous unions, builds with
5935 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5936 - *
5937 - * Revision 1.5  1994/12/06  13:24:55  matt
5938 - * Made exit model come out of bitmaps.tbl
5939 - *
5940 - * Revision 1.4  1994/11/19  12:41:35  matt
5941 - * Added system to read endlevel data from file, and to make it work
5942 - * with any exit tunnel.
5943 - *
5944 - * Revision 1.3  1994/10/30  20:09:20  matt
5945 - * For endlevel: added big explosion at tunnel exit; made lights in tunnel
5946 - * go out; made more explosions on walls.
5947 - *
5948 - * Revision 1.2  1994/08/19  20:09:38  matt
5949 - * Added end-of-level cut scene with external scene
5950 - *
5951 - * Revision 1.1  1994/08/15  19:18:47  matt
5952 - * Initial revision
5953
5954 ------------------------------------------------------------------------
5955 main/escort.c:
5956
5957 - * Revision 1.1  1995/05/06  23:32:19  mike
5958 - * Initial revision
5959
5960 ------------------------------------------------------------------------
5961 main/fireball.c:
5962
5963 - * Revision 1.2  1995/10/31  10:23:56  allender
5964 - * shareware stuff
5965 - *
5966 - * Revision 1.1  1995/05/16  15:24:41  allender
5967 - * Initial revision
5968 - *
5969 - * Revision 2.2  1995/03/21  14:39:57  john
5970 - * Ifdef'd out the NETWORK code.
5971 - *
5972 - * Revision 2.1  1995/03/20  18:15:47  john
5973 - * Added code to not store the normals in the segment structure.
5974 - *
5975 - * Revision 2.0  1995/02/27  11:30:34  john
5976 - * New version 2.0, which has no anonymous unions, builds with
5977 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
5978 - *
5979 - * Revision 1.200  1995/02/22  13:18:41  allender
5980 - * remove anonymous unions from object structure
5981 - *
5982 - * Revision 1.199  1995/02/14  19:58:32  mike
5983 - * comment out "something bad has happened" int3.
5984 - *
5985 - * Revision 1.198  1995/02/09  13:11:01  mike
5986 - * remove an annoying mprintf and Int3().
5987 - *
5988 - * Revision 1.197  1995/02/08  17:10:14  mike
5989 - * don't drop cloaks if one nearby.
5990 - *
5991 - * Revision 1.196  1995/02/08  13:27:14  rob
5992 - * Give keys dropped by robots 0 velocity in coop game.
5993 - *
5994 - * Revision 1.195  1995/02/08  11:57:40  mike
5995 - * determine whether debris object failed to create because buffer was
5996 - * exhausted or because limit was hit.
5997 - *
5998 - * Revision 1.194  1995/02/08  11:37:58  mike
5999 - * Check for failures in call to obj_create.
6000 - *
6001 - * Revision 1.193  1995/02/07  21:09:41  mike
6002 - * only replace weapon with energy 1/2 time.
6003 - *
6004 - * Revision 1.192  1995/01/30  18:21:52  rob
6005 - * Replace extra life powerups in multiplayer to invul when
6006 - * dropped by robots.
6007 - *
6008 - * Revision 1.191  1995/01/28  17:40:59  mike
6009 - * fix stupidity in converting quad lasers to energy.
6010 - *
6011 - * Revision 1.190  1995/01/27  15:05:59  rob
6012 - * Trying to fix a bug with damaging robots with player badass explosions.
6013 - *
6014 - * Revision 1.189  1995/01/26  18:59:04  rob
6015 - * Powerups were flying too far in robot-cooperative games.
6016 - *
6017 - * Revision 1.188  1995/01/25  10:53:35  mike
6018 - * make badass damage go through grates.
6019 - *
6020 - * Revision 1.187  1995/01/25  09:37:23  mike
6021 - * fix objects containing robots, worked for powerups, bad {} placement.
6022 - *
6023 - * Revision 1.186  1995/01/23  22:51:20  mike
6024 - * drop energy instead of primary weapon if you already have primary weapon.
6025 - *
6026 - * Revision 1.185  1995/01/20  16:56:37  mike
6027 - * Cut damage done by badass weapons.
6028 - *
6029 - * Revision 1.184  1995/01/19  17:44:57  mike
6030 - * damage_force removed, that information coming from strength field.
6031 - *
6032 - * Revision 1.183  1995/01/16  21:06:54  mike
6033 - * Move function pick_random_point_in_segment from fireball.c to gameseg.c.
6034 - *
6035 - * Revision 1.182  1995/01/16  19:24:04  mike
6036 - * If a gated-in robot and going to drop energy powerup, don't!
6037 - *
6038 - * Revision 1.181  1995/01/15  20:48:03  mike
6039 - * drop energy in place of quad lasers if player already has quad lasers.
6040 - *
6041 - * Revision 1.180  1995/01/14  19:32:19  rob
6042 - * Fixed an error.
6043 - *
6044 - * Revision 1.179  1995/01/14  18:50:55  rob
6045 - * Make robot egg creation suitable for mutliplayer situations.
6046 - *
6047 - * Revision 1.178  1995/01/14  14:55:07  rob
6048 - * Make weapons/keys/etc never disappear in network mode.
6049
6050 ------------------------------------------------------------------------
6051 main/fireball.h:
6052
6053 - * Revision 1.1  1995/05/16  15:56:23  allender
6054 - * Initial revision
6055 - *
6056 - * Revision 2.0  1995/02/27  11:27:03  john
6057 - * New version 2.0, which has no anonymous unions, builds with
6058 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
6059 - *
6060 - * Revision 1.13  1995/01/17  12:14:38  john
6061 - * Made walls, object explosion vclips load at level start.
6062 - *
6063 - * Revision 1.12  1995/01/13  15:41:52  rob
6064 - * Added prototype for maybe_replace_powerup_with_energy
6065 - *
6066 - * Revision 1.11  1994/11/17  16:28:36  rob
6067 - * Changed maybe_drop_cloak_powerup to maybe_drop_net_powerup (more
6068 - * generic and useful)
6069 - *
6070 - * Revision 1.10  1994/10/12  08:03:42  mike
6071 - * Prototype maybe_drop_cloak_powerup.
6072 - *
6073 - * Revision 1.9  1994/10/11  12:24:39  matt
6074 - * Cleaned up/change badass explosion calls
6075 - *
6076 - * Revision 1.8  1994/09/07  16:00:34  mike
6077 - * Add object pointer to parameter list of object_create_badass_explosion.
6078 - *
6079 - * Revision 1.7  1994/09/02  14:00:39  matt
6080 - * Simplified explode_object() & mutliple-stage explosions
6081 - *
6082 - * Revision 1.6  1994/08/17  16:49:58  john
6083 - * Added damaging fireballs, missiles.
6084 - *
6085 - * Revision 1.5  1994/07/14  22:39:19  matt
6086 - * Added exploding doors
6087 - *
6088 - * Revision 1.4  1994/06/08  10:56:36  matt
6089 - * Improved debris: now get submodel size from new POF files; debris now has
6090 - * limited life; debris can now be blown up.
6091 - *
6092 - * Revision 1.3  1994/04/01  13:35:44  matt
6093 - * Added multiple-stage explosions
6094 - *
6095 - * Revision 1.2  1994/02/17  11:33:32  matt
6096 - * Changes in object system
6097 - *
6098 - * Revision 1.1  1994/02/16  22:41:15  matt
6099 - * Initial revision
6100
6101 ------------------------------------------------------------------------
6102 main/fuelcen.c:
6103
6104 - * Revision 1.2  1995/10/31  10:23:40  allender
6105 - * shareware stuff
6106 - *
6107 - * Revision 1.1  1995/05/16  15:24:50  allender
6108 - * Initial revision
6109 - *
6110 - * Revision 2.3  1995/03/21  14:38:40  john
6111 - * Ifdef'd out the NETWORK code.
6112 - *
6113 - * Revision 2.2  1995/03/06  15:23:09  john
6114 - * New screen techniques.
6115 - *
6116 - * Revision 2.1  1995/02/27  13:13:26  john
6117 - * Removed floating point.
6118 - *
6119 - * Revision 2.0  1995/02/27  11:27:20  john
6120 - * New version 2.0, which has no anonymous unions, builds with
6121 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
6122 - *
6123 - * Revision 1.159  1995/02/22  13:48:10  allender
6124 - * remove anonymous unions in object structure
6125 - *
6126 - * Revision 1.158  1995/02/08  11:37:48  mike
6127 - * Check for failures in call to obj_create.
6128 - *
6129 - * Revision 1.157  1995/02/07  20:39:39  mike
6130 - * fix toasters in multiplayer
6131 - *
6132 - *
6133 - * Revision 1.156  1995/02/02  18:40:10  john
6134 - * Fixed bug with full screen cockpit flashing non-white.
6135 - *
6136 - * Revision 1.155  1995/01/28  15:27:22  yuan
6137 - * Make sure fuelcen nums are valid.
6138 - *
6139 - * Revision 1.154  1995/01/03  14:26:23  rob
6140 - * Better ifdef for robot centers.
6141 - *
6142 - * Revision 1.153  1995/01/03  11:27:49  rob
6143 - * Added include of fuelcen.c
6144 - *
6145 - * Revision 1.152  1995/01/03  09:47:22  john
6146 - * Some ifdef SHAREWARE lines.
6147 - *
6148 - * Revision 1.151  1995/01/02  21:02:07  rob
6149 - * added matcen support for coop/multirobot.
6150 - *
6151 - * Revision 1.150  1994/12/15  18:31:22  mike
6152 - * fix confusing precedence problems.
6153 - *
6154 - * Revision 1.149  1994/12/15  13:04:22  mike
6155 - * Replace Players[Player_num].time_total references with GameTime.
6156 - *
6157 - * Revision 1.148  1994/12/15  03:05:18  matt
6158 - * Added error checking for NULL return from object_create_explosion()
6159 - *
6160 - * Revision 1.147  1994/12/13  19:49:12  rob
6161 - * Made the fuelcen noise quieter.
6162 - *
6163 - * Revision 1.146  1994/12/13  12:03:18  john
6164 - * Made the warning sirens not start until after "desccruction
6165 - * secquence activated voice".
6166 - *
6167 - * Revision 1.145  1994/12/12  17:18:30  mike
6168 - * make warning siren louder.
6169 - *
6170 - * Revision 1.144  1994/12/11  23:18:04  john
6171 - * Added -nomusic.
6172 - * Added RealFrameTime.
6173 - * Put in a pause when sound initialization error.
6174 - * Made controlcen countdown and framerate use RealFrameTime.
6175 - *
6176 - * Revision 1.143  1994/12/11  14:10:16  mike
6177 - * louder sounds.
6178 - *
6179 - * Revision 1.142  1994/12/06  11:33:19  yuan
6180 - * Fixed bug with fueling when above 100.
6181 - *
6182 - * Revision 1.141  1994/12/05  23:37:14  matt
6183 - * Took out calls to warning() function
6184 - *
6185 - * Revision 1.140  1994/12/05  23:19:18  yuan
6186 - * Fixed fuel center refuelers..
6187 - *
6188 - * Revision 1.139  1994/12/03  12:48:12  mike
6189 - * diminish rocking due to control center destruction.
6190 - *
6191 - * Revision 1.138  1994/12/02  23:30:32  mike
6192 - * fix bumpiness after toasting control center.
6193 - *
6194 - * Revision 1.137  1994/12/02  22:48:14  mike
6195 - * rock the ship after toasting the control center!
6196 - *
6197 - * Revision 1.136  1994/12/02  17:12:11  rob
6198 - * Fixed countdown sounds.
6199 - *
6200 - * Revision 1.135  1994/11/29  20:59:43  rob
6201 - * Don't run out of fuel in net games (don't want to sync it between machines)
6202 - *
6203 - * Revision 1.134  1994/11/29  19:10:57  john
6204 - * Took out debugging mprintf.
6205 - *
6206 - * Revision 1.133  1994/11/29  13:19:40  john
6207 - * Made voice for "destruction actived in t-"
6208 - * be at 12.75 secs.
6209 - *
6210 - * Revision 1.132  1994/11/29  12:19:46  john
6211 - * MAde the "Mine desctruction will commence"
6212 - * voice play at 12.5 secs.
6213 - *
6214 - * Revision 1.131  1994/11/29  12:12:54  adam
6215 - * *** empty log message ***
6216 - *
6217 - * Revision 1.130  1994/11/28  21:04:26  rob
6218 - * Added code to cast noise when player refuels.
6219 - *
6220 - * Revision 1.129  1994/11/27  23:15:04  matt
6221 - * Made changes for new mprintf calling convention
6222 - *
6223 - * Revision 1.128  1994/11/21  16:27:51  mike
6224 - * debug code for morphing.
6225 - *
6226 - * Revision 1.127  1994/11/21  12:33:50  matt
6227 - * For control center explosions, use small fireball, not pseudo-random vclip
6228 - *
6229 - * Revision 1.126  1994/11/20  22:12:15  mike
6230 - * Fix bug in initializing materialization centers.
6231 - *
6232 - * Revision 1.125  1994/11/19  15:18:22  mike
6233 - * rip out unused code and data.
6234 - *
6235 - * Revision 1.124  1994/11/08  12:18:59  mike
6236 - * Initialize Fuelcen_seconds_left.
6237 - *
6238 - * Revision 1.123  1994/10/30  14:12:33  mike
6239 - * rip out repair center stuff
6240 - *
6241 - * Revision 1.122  1994/10/28  14:42:45  john
6242 - * Added sound volumes to all sound calls.
6243 - *
6244 - * Revision 1.121  1994/10/16  12:44:02  mike
6245 - * Make time to exit mine after control center destruction diff level dependent.
6246 - *
6247 - * Revision 1.120  1994/10/09  22:03:26  mike
6248 - * Adapt to new create_n_segment_path parameters.
6249 - *
6250 - * Revision 1.119  1994/10/06  14:52:42  mike
6251 - * Remove last of ability to damage fuel centers.
6252 - *
6253 - * Revision 1.118  1994/10/06  14:08:45  matt
6254 - * Made morph flash effect get orientation from segment
6255 - *
6256 - * Revision 1.117  1994/10/05  16:09:03  mike
6257 - * Put debugging code into matcen/fuelcen synchronization problem.
6258 - *
6259 - * Revision 1.116  1994/10/04  15:32:41  john
6260 - * Took out the old PLAY_SOUND??? code and replaced it
6261 - * with direct calls into digi_link_??? so that all sounds
6262 - * can be made 3d.
6263 - *
6264 - * Revision 1.115  1994/10/03  23:37:57  mike
6265 - * Clean up this mess of confusion to the point where maybe matcens actually work.
6266 - *
6267 - * Revision 1.114  1994/10/03  13:34:40  matt
6268 - * Added new (and hopefully better) game sequencing functions
6269 - *
6270 - * Revision 1.113  1994/09/30  14:41:57  matt
6271 - * Fixed bug as per Mike's instructions
6272 - *
6273 - * Revision 1.112  1994/09/30  00:37:33  mike
6274 - * Balance materialization centers.
6275 - *
6276 - * Revision 1.111  1994/09/28  23:12:52  matt
6277 - * Macroized palette flash system
6278 - *
6279 - * Revision 1.110  1994/09/27  15:42:31  mike
6280 - * Add names of Specials.
6281 - *
6282 - * Revision 1.109  1994/09/27  00:02:23  mike
6283 - * Yet more materialization center stuff.
6284 - *
6285 - * Revision 1.108  1994/09/26  11:26:23  mike
6286 - * Balance materialization centers.
6287 - *
6288 - * Revision 1.107  1994/09/25  23:40:47  matt
6289 - * Changed the object load & save code to read/write the structure fields one
6290 - * at a time (rather than the whole structure at once).  This mean that the
6291 - * object structure can be changed without breaking the load/save functions.
6292 - * As a result of this change, the local_object data can be and has been
6293 - * incorporated into the object array.  Also, timeleft is now a property
6294 - * of all objects, and the object structure has been otherwise cleaned up.
6295 - *
6296 - * Revision 1.106  1994/09/25  15:55:58  mike
6297 - * Balance materialization centers, make them emit light, make them re-triggerable after awhile.
6298 - *
6299 - * Revision 1.105  1994/09/24  17:42:33  mike
6300 - * Making materialization centers be activated by triggers and balancing them.
6301 - *
6302 - * Revision 1.104  1994/09/24  14:16:06  mike
6303 - * Support new network constants.
6304 - *
6305 - * Revision 1.103  1994/09/20  19:14:40  john
6306 - * Massaged the sound system; used a better formula for determining
6307 - * which l/r balance, also, put in Mike's stuff that searches for a connection
6308 - * between the 2 sounds' segments, stopping for closed doors, etc.
6309 - *
6310 - * Revision 1.102  1994/09/17  01:40:51  matt
6311 - * Added status bar/sizable window mode, and in the process revamped the
6312 - * whole cockpit mode system.
6313 - *
6314 - * Revision 1.101  1994/08/31  20:57:25  matt
6315 - * Cleaned up endlevel/death code
6316 - *
6317 - * Revision 1.100  1994/08/30  17:54:20  mike
6318 - * Slow down rate of creation of objects by materialization centers.
6319 - *
6320 - * Revision 1.99  1994/08/29  11:47:01  john
6321 - * Added warning if no control centers in mine.
6322
6323 ------------------------------------------------------------------------
6324 main/fuelcen.h:
6325
6326 - * Revision 1.1  1995/05/16  15:56:31  allender
6327 - * Initial revision
6328 - *
6329 - * Revision 2.0  1995/02/27  11:28:43  john
6330 - * New version 2.0, which has no anonymous unions, builds with
6331 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
6332 - *
6333 - * Revision 1.26  1995/01/26  12:19:16  rob
6334 - * Added externs of things needed for multiplayer.
6335 - *
6336 - * Revision 1.25  1994/10/30  14:11:10  mike
6337 - * rip out repair center stuff.
6338 - *
6339 - * Revision 1.24  1994/10/03  23:36:36  mike
6340 - * Add segnum and fuelcen_num (renaming dest_seg and *path) in matcen_info struct.
6341 - *
6342 - * Revision 1.23  1994/09/30  00:37:44  mike
6343 - * Change FuelCenter struct.
6344 - *
6345 - * Revision 1.22  1994/09/27  15:42:49  mike
6346 - * Kill some obsolete matcen constants, Prototype Special_names.
6347 - *
6348 - * Revision 1.21  1994/09/27  00:04:30  mike
6349 - * Moved FuelCenter struct here from fuelcen.c
6350 - *
6351 - * Revision 1.20  1994/09/25  15:55:37  mike
6352 - * Prototype function disable_matcens.
6353 - *
6354 - * Revision 1.19  1994/09/24  17:41:34  mike
6355 - * Prototype trigger_matcen.
6356 - *
6357 - * Revision 1.18  1994/08/03  17:52:19  matt
6358 - * Tidied up repair centers a bit
6359 - *
6360 - * Revision 1.17  1994/08/02  12:16:01  mike
6361 - * *** empty log message ***
6362 - *
6363 - * Revision 1.16  1994/08/01  11:04:03  yuan
6364 - * New materialization centers.
6365 - *
6366 - * Revision 1.15  1994/07/21  19:02:15  mike
6367 - * break repair centers.
6368 - *
6369 - * Revision 1.14  1994/07/14  11:25:22  john
6370 - * Made control centers destroy better; made automap use Tab key.
6371 - *
6372 - * Revision 1.13  1994/07/13  10:45:33  john
6373 - * Made control center object switch when dead.
6374 - *
6375 - * Revision 1.12  1994/07/09  17:36:44  mike
6376 - * Add extern for find_connected_repair_seg.
6377 - *
6378 - * Revision 1.11  1994/06/15  19:00:32  john
6379 - * Show timer in on top of 3d with mine destroyed...
6380 - *
6381 - * Revision 1.10  1994/05/31  16:49:46  john
6382 - * Begin to add robot materialization centers.
6383 - *
6384 - * Revision 1.9  1994/05/30  20:22:03  yuan
6385 - * New triggers.
6386 - *
6387 - * Revision 1.8  1994/05/05  16:41:14  matt
6388 - * Cleaned up repair center code, and moved some from object.c to fuelcen.c
6389 - *
6390 - * Revision 1.7  1994/04/21  20:41:21  yuan
6391 - * Added extern.
6392 - *
6393 - * Revision 1.6  1994/04/21  20:28:32  john
6394 - * Added flag for Yuan to tell when a fuel center is destroyed.
6395 - *
6396 - * Revision 1.5  1994/04/14  17:00:59  john
6397 - * Made repair cen's work properly; added reset_all_fuelcens.
6398 - *
6399 - * Revision 1.4  1994/04/12  20:28:04  john
6400 - * Added control center.
6401 - *
6402 - * Revision 1.3  1994/04/08  15:37:10  john
6403 - * Added repair centers.
6404 - *
6405 - * Revision 1.2  1994/04/06  19:10:38  john
6406 - * NEw version.
6407 - *
6408 - *
6409 - * Revision 1.1  1994/04/06  12:39:02  john
6410 - * Initial revision
6411
6412 ------------------------------------------------------------------------
6413 main/fvi.c:
6414
6415 - * Revision 1.7  1995/10/21  23:52:18  allender
6416 - * #ifdef'ed out stack debug stuff
6417 - *
6418 - * Revision 1.6  1995/10/10  12:07:42  allender
6419 - * add forgotten ;
6420 - *
6421 - * Revision 1.5  1995/10/10  11:47:27  allender
6422 - * put in stack space check
6423 - *
6424 - * Revision 1.4  1995/08/23  21:34:08  allender
6425 - * fix mcc compiler warning
6426 - *
6427 - * Revision 1.3  1995/08/14  14:35:18  allender
6428 - * changed transparency to 0
6429 - *
6430 - * Revision 1.2  1995/07/05  16:50:51  allender
6431 - * transparency/kitchen change
6432 - *
6433 - * Revision 1.1  1995/05/16  15:24:59  allender
6434 - * Initial revision
6435 - *
6436 - * Revision 2.3  1995/03/24  14:49:04  john
6437 - * Added cheat for player to go thru walls.
6438 - *
6439 - * Revision 2.2  1995/03/21  17:58:32  john
6440 - * Fixed bug with normals..
6441 - *
6442 - *
6443 - * Revision 2.1  1995/03/20  18:15:37  john
6444 - * Added code to not store the normals in the segment structure.
6445 - *
6446 - * Revision 2.0  1995/02/27  11:27:41  john
6447 - * New version 2.0, which has no anonymous unions, builds with
6448 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
6449 - *
6450 - * Revision 1.49  1995/02/22  14:45:47  allender
6451 - * remove anonymous unions from object structure
6452 - *
6453 - * Revision 1.48  1995/02/22  13:24:50  john
6454 - * Removed the vecmat anonymous unions.
6455 - *
6456 - * Revision 1.47  1995/02/07  16:17:26  matt
6457 - * Disabled all robot-robot collisions except those involving two green
6458 - * guys.  Used to do collisions if either robot was green guy.
6459 - *
6460 - * Revision 1.46  1995/02/02  14:07:53  matt
6461 - * Fixed confusion about which segment you are touching when you're
6462 - * touching a wall.  This manifested itself in spurious lava burns.
6463 - *
6464 - * Revision 1.45  1995/02/02  13:45:53  matt
6465 - * Made a bunch of lint-inspired changes
6466 - *
6467 - * Revision 1.44  1995/01/24  12:10:17  matt
6468 - * Fudged collisions for player/player, and player weapon/other player in
6469 - * coop games.
6470 - *
6471 - * Revision 1.43  1995/01/14  19:16:45  john
6472 - * First version of new bitmap paging code.
6473 - *
6474 - * Revision 1.42  1994/12/15  12:22:40  matt
6475 - * Small change which may or may not help
6476 - *
6477 - * Revision 1.41  1994/12/14  11:45:51  matt
6478 - * Fixed (hopefully) little bug with invalid segnum
6479 - *
6480 - * Revision 1.40  1994/12/13  17:12:01  matt
6481 - * Increased edge tolerance a bunch more
6482 - *
6483 - * Revision 1.39  1994/12/13  14:37:59  matt
6484 - * Fixed another stupid little bug
6485 - *
6486 - * Revision 1.38  1994/12/13  13:25:44  matt
6487 - * Increased tolerance massively to avoid catching on corners
6488 - *
6489 - * Revision 1.37  1994/12/13  12:02:20  matt
6490 - * Fixed small bug
6491 - *
6492 - * Revision 1.36  1994/12/13  11:17:35  matt
6493 - * Lots of changes to hopefully fix objects leaving the mine.  Note that
6494 - * this code should be considered somewhat experimental - one problem I
6495 - * know about is that you can get stuck on edges more easily than before.
6496 - * There may be other problems I don't know about yet.
6497 - *
6498 - * Revision 1.35  1994/12/12  01:20:57  matt
6499 - * Added hack in object-object collisions that treats claw guys as
6500 - * if they have 3/4 of their actual radius.
6501 - *
6502 - * Revision 1.34  1994/12/04  22:48:39  matt
6503 - * Physics & FVI now only build seglist for player objects, and they
6504 - * responsilby deal with buffer full conditions
6505 - *
6506 - * Revision 1.33  1994/12/04  22:07:05  matt
6507 - * Added better handing of buffer full condition
6508 - *
6509 - * Revision 1.32  1994/12/01  21:06:33  matt
6510 - * Several important changes:
6511 - *  (1) Checking against triangulated sides has been standardized a bit
6512 - *  (2) Code has been added to de-triangulate some sides
6513 - *  (3) BIG ONE: the tolerance for checking a point against a plane has
6514 - *      been drastically relaxed
6515 - *
6516 - *
6517 - * Revision 1.31  1994/11/27  23:15:03  matt
6518 - * Made changes for new mprintf calling convention
6519 - *
6520 - * Revision 1.30  1994/11/19  15:20:30  mike
6521 - * rip out unused code and data
6522 - *
6523 - * Revision 1.29  1994/11/16  12:18:17  mike
6524 - * hack for green_guy:green_guy collision detection.
6525 - *
6526 - * Revision 1.28  1994/11/10  13:08:54  matt
6527 - * Added support for new run-length-encoded bitmaps
6528 - *
6529 - * Revision 1.27  1994/10/31  12:27:51  matt
6530 - * Added new function object_intersects_wall()
6531 - *
6532 - * Revision 1.26  1994/10/20  13:59:27  matt
6533 - * Added assert
6534 - *
6535 - * Revision 1.25  1994/10/09  23:51:09  matt
6536 - * Made find_hitpoint_uv() work with triangulated sides
6537 - *
6538 - * Revision 1.24  1994/09/25  00:39:29  matt
6539 - * Took out mprintf's
6540 - *
6541 - * Revision 1.23  1994/09/25  00:37:53  matt
6542 - * Made the 'find the point in the bitmap where something hit' system
6543 - * publicly accessible.
6544 - *
6545 - * Revision 1.22  1994/09/21  16:58:22  matt
6546 - * Fixed bug in trans wall check that was checking against verically
6547 - * flipped bitmap (i.e., the y coord was negative when checking).
6548 - *
6549 - * Revision 1.21  1994/09/02  11:31:40  matt
6550 - * Fixed object/object collisions, so you can't fly through robots anymore.
6551 - * Cleaned up object damage system.
6552 - *
6553 - * Revision 1.20  1994/08/26  09:42:03  matt
6554 - * Increased the size of a buffer
6555 - *
6556 - * Revision 1.19  1994/08/11  18:57:53  mike
6557 - * Convert shorts to ints for optimization.
6558 - *
6559 - * Revision 1.18  1994/08/08  21:38:24  matt
6560 - * Put in small optimization
6561 - *
6562 - * Revision 1.17  1994/08/08  12:21:52  yuan
6563 - * Fixed assert
6564 - *
6565 - * Revision 1.16  1994/08/08  11:47:04  matt
6566 - * Cleaned up fvi and physics a little
6567 - *
6568 - * Revision 1.15  1994/08/04  00:21:04  matt
6569 - * Cleaned up fvi & physics error handling; put in code to make sure objects
6570 - * are in correct segment; simplified segment finding for objects and points
6571 - *
6572 - * Revision 1.14  1994/08/02  19:04:26  matt
6573 - * Cleaned up vertex list functions
6574 - *
6575 - * Revision 1.13  1994/08/02  09:56:28  matt
6576 - * Put in check for bad value find_plane_line_intersection()
6577 - *
6578 - * Revision 1.12  1994/08/01  17:27:26  matt
6579 - * Added support for triangulated walls in trans point check
6580 - *
6581 - * Revision 1.11  1994/08/01  13:30:40  matt
6582 - * Made fvi() check holes in transparent walls, and changed fvi() calling
6583 - * parms to take all input data in query structure.
6584 - *
6585 - * Revision 1.10  1994/07/13  21:47:17  matt
6586 - * FVI() and physics now keep lists of segments passed through which the
6587 - * trigger code uses.
6588 - *
6589 - * Revision 1.9  1994/07/09  21:21:40  matt
6590 - * Fixed, hopefull, bugs in sphere-to-vector intersection code
6591 - *
6592 - * Revision 1.8  1994/07/08  14:26:42  matt
6593 - * Non-needed powerups don't get picked up now; this required changing FVI to
6594 - * take a list of ingore objects rather than just one ignore object.
6595 - *
6596 - * Revision 1.7  1994/07/06  20:02:37  matt
6597 - * Made change to match gameseg that uses lowest point number as reference
6598 - * point when checking against a plane
6599 - *
6600 - * Revision 1.6  1994/06/29  15:43:58  matt
6601 - * When computing intersection of vector and sphere, use the radii of both
6602 - * objects.
6603 - *
6604 - * Revision 1.5  1994/06/14  15:57:58  matt
6605 - * Took out asserts, and added other hacks, pending real bug fixes
6606 - *
6607 - * Revision 1.4  1994/06/13  23:10:08  matt
6608 - * Fixed problems with triangulated sides
6609 - *
6610 - * Revision 1.3  1994/06/09  12:11:14  matt
6611 - * Fixed confusing use of two variables, hit_objnum & fvi_hit_object, to
6612 - * keep the same information in different ways.
6613 - *
6614 - * Revision 1.2  1994/06/09  09:58:38  matt
6615 - * Moved find_vector_intersection() from physics.c to new file fvi.c
6616 - *
6617 - * Revision 1.1  1994/06/09  09:25:57  matt
6618 - * Initial revision
6619
6620 ------------------------------------------------------------------------
6621 main/fvi.h:
6622
6623 - * Revision 1.2  1995/08/23  21:34:29  allender
6624 - * fix mcc compiler warning
6625 - *
6626 - * Revision 1.1  1995/05/16  15:56:38  allender
6627 - * Initial revision
6628 - *
6629 - * Revision 2.1  1995/03/20  18:15:58  john
6630 - * Added code to not store the normals in the segment structure.
6631 - *
6632 - * Revision 2.0  1995/02/27  11:32:02  john
6633 - * New version 2.0, which has no anonymous unions, builds with
6634 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
6635 - *
6636 - * Revision 1.10  1995/02/02  14:07:58  matt
6637 - * Fixed confusion about which segment you are touching when you're
6638 - * touching a wall.  This manifested itself in spurious lava burns.
6639 - *
6640 - * Revision 1.9  1994/12/04  22:48:04  matt
6641 - * Physics & FVI now only build seglist for player objects, and they
6642 - * responsilby deal with buffer full conditions
6643 - *
6644 - * Revision 1.8  1994/10/31  12:28:01  matt
6645 - * Added new function object_intersects_wall()
6646 - *
6647 - * Revision 1.7  1994/10/10  13:10:00  matt
6648 - * Increased max_fvi_segs
6649 - *
6650 - * Revision 1.6  1994/09/25  00:38:29  matt
6651 - * Made the 'find the point in the bitmap where something hit' system
6652 - * publicly accessible.
6653 - *
6654 - * Revision 1.5  1994/08/01  13:30:35  matt
6655 - * Made fvi() check holes in transparent walls, and changed fvi() calling
6656 - * parms to take all input data in query structure.
6657 - *
6658 - * Revision 1.4  1994/07/13  21:47:59  matt
6659 - * FVI() and physics now keep lists of segments passed through which the
6660 - * trigger code uses.
6661 - *
6662 - * Revision 1.3  1994/07/08  14:27:26  matt
6663 - * Non-needed powerups don't get picked up now; this required changing FVI to
6664 - * take a list of ingore objects rather than just one ignore object.
6665 - *
6666 - * Revision 1.2  1994/06/09  09:58:39  matt
6667 - * Moved find_vector_intersection() from physics.c to new file fvi.c
6668 - *
6669 - * Revision 1.1  1994/06/09  09:26:14  matt
6670 - * Initial revision
6671
6672 ------------------------------------------------------------------------
6673 main/game.c:
6674
6675 - * Revision 1.1  1995/12/05  16:01:09  allender
6676 - * Initial revision
6677 - *
6678 - * Revision 1.38  1995/11/13  13:02:35  allender
6679 - * put up HUD message when player starts tournament
6680 - *
6681 - * Revision 1.37  1995/11/13  09:21:05  allender
6682 - * ved and shorted tournament mode messages
6683 - *
6684 - * Revision 1.36  1995/11/09  17:27:00  allender
6685 - * took out cheats during demo playback
6686 - *
6687 - * Revision 1.35  1995/11/07  17:05:41  allender
6688 - * move registered cheats
6689 - *
6690 - * Revision 1.34  1995/11/03  12:55:45  allender
6691 - * shareware changes
6692 - *
6693 - * Revision 1.33  1995/10/29  20:15:00  allender
6694 - * took out frame rate cheat.  Pause for at least a second because
6695 - * of cmd-P problem
6696 - *
6697 - * Revision 1.32  1995/10/26  14:11:26  allender
6698 - * fix up message box stuff to align correctly
6699 - *
6700 - * Revision 1.31  1995/10/24  18:09:41  allender
6701 - * ixed cockpit weirdness -- don't update cockpit when do_appl_quit
6702 - * is called -- screen saved in mevent.c
6703 - *
6704 - * Revision 1.30  1995/10/21  23:39:10  allender
6705 - * ruise marking indicator
6706 - *
6707 - * Revision 1.29  1995/10/21  22:52:27  allender
6708 - * bald guy cheat -- print screen stuff
6709 - *
6710 - * Revision 1.28  1995/10/20  00:54:28  allender
6711 - * new help menus and redbook checking in outer game loop
6712 - *
6713 - * Revision 1.27  1995/10/17  15:34:19  allender
6714 - * pixel double is now default mode
6715 - *
6716 - * Revision 1.26  1995/10/12  17:34:44  allender
6717 - * bigger message box -- command key equivs for function keys
6718 - *
6719 - * Revision 1.25  1995/10/11  12:17:14  allender
6720 - * removed event loop processing
6721 - *
6722 - * Revision 1.24  1995/10/11  00:58:47  allender
6723 - * removed debugging code
6724 - *
6725 - * Revision 1.23  1995/10/10  11:50:32  allender
6726 - * fixed boxed message to align on 8 byte boundry,
6727 - * and some debug code
6728 - *
6729 - * Revision 1.22  1995/09/24  10:51:26  allender
6730 - * cannot go to finder in network..added cmd-q for quit
6731 - *
6732 - * Revision 1.21  1995/09/22  15:05:18  allender
6733 - * *more* hud and font type stuff (messages)
6734 - *
6735 - * Revision 1.20  1995/09/22  14:39:57  allender
6736 - * ved framerate counter up
6737 - *
6738 - * Revision 1.19  1995/09/18  17:01:28  allender
6739 - * start of compatibility stuff
6740 - *
6741 - * Revision 1.18  1995/09/15  15:53:13  allender
6742 - * better handling of PICT screen shots
6743 - *
6744 - * Revision 1.17  1995/09/14  15:27:41  allender
6745 - * fixed function type on message_box routiens
6746 - *
6747 - * Revision 1.16  1995/09/13  11:37:47  allender
6748 - * put in call to dump PICT file instead of PCX
6749 - *
6750 - * Revision 1.15  1995/09/08  17:13:28  allender
6751 - * put back in ibitblt.h and start of PICT picture dump
6752 - *
6753 - * Revision 1.14  1995/09/07  10:20:58  allender
6754 - * make cockpit mode default
6755 - *
6756 - * Revision 1.13  1995/09/07  10:17:34  allender
6757 - * added command key equivalents for function keys
6758 - *
6759 - * Revision 1.12  1995/09/04  11:36:47  allender
6760 - * fixed pixel double mode to have correct number of rendered
6761 - * lines
6762 - *
6763 - * Revision 1.11  1995/09/01  15:47:07  allender
6764 - * cap frame rate at 60 fps
6765 - *
6766 - * Revision 1.10  1995/08/26  16:25:59  allender
6767 - * whole buncha' stuff!!!!
6768 - *
6769 - * Revision 1.9  1995/08/01  16:04:47  allender
6770 - * put in ctrl_esc sequence to go to menubar
6771 - *
6772 - * Revision 1.8  1995/07/28  14:15:11  allender
6773 - * added FRAME cheat to display frame rate
6774 - *
6775 - * Revision 1.7  1995/07/17  08:54:19  allender
6776 - * *** empty log message ***
6777 - *
6778 - * Revision 1.6  1995/07/12  12:54:06  allender
6779 - * removed some debug keys
6780 - *
6781 - * Revision 1.5  1995/07/05  16:44:35  allender
6782 - * changed some debug keys
6783 - *
6784 - * Revision 1.4  1995/06/23  10:24:57  allender
6785 - * added scanline doubling routine
6786 - *
6787 - * Revision 1.3  1995/06/13  13:08:26  allender
6788 - * added special debug key to move window into upper left corner.
6789 - * also added debug key to put game in 640x480 mode
6790 - *
6791 - * Revision 1.2  1995/06/12  11:10:31  allender
6792 - * added DEL_SHIFT_M to move window to corner of screen
6793 - *
6794 - * Revision 1.1  1995/05/16  15:25:08  allender
6795 - * Initial revision
6796 - *
6797 - * Revision 2.36  1996/01/05  16:52:05  john
6798 - * Improved 3d stuff.
6799 - *
6800 - * Revision 2.35  1995/10/09  22:17:10  john
6801 - * Took out the page flipping in set_screen_mode, which shouldn't
6802 - * be there.  This was hosing the modex stuff.
6803 - *
6804 - * Revision 2.34  1995/10/09  19:46:34  john
6805 - * Fixed bug with modex paging with lcdbios.
6806 - *
6807 - * Revision 2.33  1995/10/08  11:46:09  john
6808 - * Fixed bug with 2d offset in interlaced mode in low res.
6809 - * Made LCDBIOS with pageflipping using VESA set start
6810 - * Address function.  X=CRTC offset, Y=0.
6811 - *
6812 - * Revision 2.32  1995/10/07  13:20:51  john
6813 - * Added new modes for LCDBIOS, also added support for -JoyNice,
6814 - * and added Shift+F1-F4 to controls various stereoscopic params.
6815 - *
6816 - * Revision 2.31  1995/05/31  14:34:43  unknown
6817 - * fixed warnings.
6818 - *
6819 - * Revision 2.30  1995/05/08  11:23:45  john
6820 - * Made 3dmax work like Kasan wants it to.
6821 - *
6822 - * Revision 2.29  1995/04/06  13:47:39  yuan
6823 - * Restored rear view to original.
6824 - *
6825 - * Revision 2.28  1995/04/06  12:13:07  john
6826 - * Fixed some bugs with 3dmax.
6827 - *
6828 - * Revision 2.27  1995/04/05  13:18:18  mike
6829 - * decrease energy usage on fusion cannon
6830 - *
6831 - * Revision 2.26  1995/03/30  16:36:32  mike
6832 - * text localization.
6833 - *
6834 - * Revision 2.25  1995/03/27  16:45:26  john
6835 - * Fixed some cheat bugs.  Added astral cheat.
6836 - *
6837 - * Revision 2.24  1995/03/27  15:37:11  mike
6838 - * boost fusion cannon for non-multiplayer modes.
6839 - *
6840 - * Revision 2.23  1995/03/24  17:48:04  john
6841 - * Fixed bug with menus and 320x100.
6842 - *
6843 - * Revision 2.22  1995/03/24  15:34:02  mike
6844 - * cheats.
6845 - *
6846 - * Revision 2.21  1995/03/24  13:11:39  john
6847 - * Added save game during briefing screens.
6848 - *
6849 - * Revision 2.20  1995/03/21  14:40:50  john
6850 - * Ifdef'd out the NETWORK code.
6851 - *
6852 - * Revision 2.19  1995/03/16  22:07:16  john
6853 - * Made so only for screen can be used for anything other
6854 - * than mode 13.
6855 - *
6856 - * Revision 2.18  1995/03/16  21:45:35  john
6857 - * Made all paged modes have incompatible menus!
6858 - *
6859 - * Revision 2.17  1995/03/16  18:30:35  john
6860 - * Made wider than 320 screens not have
6861 - * a status bar mode.
6862 - *
6863 - * Revision 2.16  1995/03/16  10:53:34  john
6864 - * Move VFX center to Shift+Z instead of Enter because
6865 - * it conflicted with toggling HUD on/off.
6866 - *
6867 - * Revision 2.15  1995/03/16  10:18:33  john
6868 - * Fixed bug with VFX mode not working. also made warning
6869 - * when it can't set VESA mode.
6870 - *
6871 - * Revision 2.14  1995/03/14  16:22:39  john
6872 - * Added cdrom alternate directory stuff.
6873 - *
6874 - * Revision 2.13  1995/03/14  12:14:17  john
6875 - * Made VR helmets have 4 resolutions to choose from.
6876 - *
6877 - * Revision 2.12  1995/03/10  13:47:33  john
6878 - * Added head tracking sensitivity.
6879 - *
6880 - * Revision 2.11  1995/03/10  13:13:47  john
6881 - * Added code to show T-xx on iglasses.
6882 - *
6883 - * Revision 2.10  1995/03/09  18:07:29  john
6884 - * Fixed bug with iglasses tracking not "centering" right.
6885 - * Made VFX have bright headlight lighting.
6886 - *
6887 - * Revision 2.9  1995/03/09  11:48:02  john
6888 - * Added HUD for VR helmets.
6889 - *
6890 - * Revision 2.8  1995/03/07  15:12:53  john
6891 - * Fixed VFX,3dmax support.
6892 - *
6893 - * Revision 2.7  1995/03/07  11:35:03  john
6894 - * Fixed bug with cockpit in rear view.
6895 - *
6896 - * Revision 2.6  1995/03/06  18:40:17  john
6897 - * Added some ifdef EDITOR stuff.
6898 - *
6899 - * Revision 2.5  1995/03/06  18:31:21  john
6900 - * Fixed bug with nmenu popping up on editor screen.
6901 - *
6902 - * Revision 2.4  1995/03/06  17:28:33  john
6903 - * Fixed but with cockpit toggling wrong.
6904 - *
6905 - * Revision 2.3  1995/03/06  16:08:10  mike
6906 - * Fix compile errors if building without editor.
6907 - *
6908 - * Revision 2.2  1995/03/06  15:24:10  john
6909 - * New screen techniques.
6910 - *
6911 - * Revision 2.1  1995/02/27  13:41:03  john
6912 - * Removed floating point from frame rate calculations.
6913 - *
6914 - * Revision 2.0  1995/02/27  11:31:54  john
6915 - * New version 2.0, which has no anonymous unions, builds with
6916 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
6917 - *
6918 - * Revision 1.770  1995/02/22  12:45:15  allender
6919 - * remove anonymous unions from object structure
6920 - *
6921 - * Revision 1.769  1995/02/15  10:06:25  allender
6922 - * make pause pause game during demo playback
6923 - *
6924 - * Revision 1.768  1995/02/13  20:35:11  john
6925 - * Lintized
6926 - *
6927 - * Revision 1.767  1995/02/13  19:40:29  allender
6928 - * added place to demo record restoration from rear view in place that
6929 - * I forgot before
6930 - *
6931 - * Revision 1.766  1995/02/13  10:29:27  john
6932 - * Fixed bug with cheats not restoreing across save games.
6933 - *
6934 - * Revision 1.765  1995/02/11  22:54:33  john
6935 - * Made loading for pig not show up for demos.
6936 - *
6937 - * Revision 1.764  1995/02/11  17:30:08  allender
6938 - * ifndef NDEBUG around strip frame stuff
6939 - *
6940 - * Revision 1.763  1995/02/11  17:13:01  rob
6941 - * Took out modem.c code fille stuff.
6942 - *
6943 - * Revision 1.762  1995/02/11  16:36:47  allender
6944 - * debug key to strip frames from end of demo
6945 - *
6946 - * Revision 1.761  1995/02/11  14:29:16  john
6947 - * Turned off cheats when going into game.
6948 - *
6949 - * Revision 1.760  1995/02/11  13:46:54  mike
6950 - * fix cheats.
6951 - *
6952 - * Revision 1.759  1995/02/11  12:36:09  matt
6953 - * Cleaned up cheats
6954 - *
6955 - * Revision 1.758  1995/02/11  12:27:04  mike
6956 - * fix path-to-exit cheat.
6957 - *
6958 - * Revision 1.757  1995/02/11  01:56:24  mike
6959 - * robots don't fire cheat.
6960 - *
6961 - * Revision 1.756  1995/02/10  16:38:40  mike
6962 - * illuminate path to exit cheat.
6963 - *
6964 - * Revision 1.755  1995/02/10  16:19:40  mike
6965 - * new show-path-to-exit system, still buggy, compiled out.
6966 - *
6967 - * Revision 1.754  1995/02/10  15:54:46  matt
6968 - * Added new cheats
6969 - *
6970 - * Revision 1.753  1995/02/09  12:25:42  matt
6971 - * Made mem_fill() test routines not be called if RELEASE
6972 - *
6973 - * Revision 1.752  1995/02/09  08:49:32  mike
6974 - * change fill opcode value to 0xcc, int 3 value.
6975 - *
6976 - *
6977 - * Revision 1.751  1995/02/09  02:59:26  mike
6978 - * check code for 00066xxx bugs.
6979 - *
6980 - * Revision 1.750  1995/02/08  17:10:02  mike
6981 - * add, but don't call, debug code.
6982 - *
6983 - * Revision 1.749  1995/02/07  11:07:27  john
6984 - * Added hooks for confirm on game state restore.
6985 - *
6986 - * Revision 1.748  1995/02/06  15:52:45  mike
6987 - * add mini megawow powerup for giving reasonable weapons.
6988 - *
6989 - * Revision 1.747  1995/02/06  12:53:35  allender
6990 - * force endlevel_sequence to 0 to fix weird bug
6991 - *
6992 - * Revision 1.746  1995/02/04  10:03:30  mike
6993 - * Fly to exit cheat.
6994 - *
6995 - * Revision 1.745  1995/02/02  15:57:52  john
6996 - * Added turbo mode cheat.
6997 - *
6998 - * Revision 1.744  1995/02/02  14:43:39  john
6999 - * Uppped frametime limit to 150 Hz.
7000 - *
7001 - * Revision 1.743  1995/02/02  13:37:16  mike
7002 - * move T-?? message down in certain modes.
7003 - *
7004 - * Revision 1.742  1995/02/02  01:26:59  john
7005 - * Took out no key repeating.
7006 - *
7007 - * Revision 1.741  1995/01/29  21:36:44  mike
7008 - * make fusion cannon not make pitching slow.
7009 - *
7010 - * Revision 1.740  1995/01/28  15:57:57  john
7011 - * Made joystick calibration be only when wrong detected in
7012 - * menu or joystick axis changed.
7013 - *
7014 - * Revision 1.739  1995/01/28  15:21:03  yuan
7015 - * Added X-tra life cheat.
7016 - *
7017 - * Revision 1.738  1995/01/27  14:08:31  rob
7018 - * Fixed a bug.
7019 - *
7020 - * Revision 1.737  1995/01/27  14:04:59  rob
7021 - * Its not my fault, Mark told me to do it!
7022 - *
7023 - * Revision 1.736  1995/01/27  13:12:18  rob
7024 - * Added charging noises to play across net.
7025 - *
7026 - * Revision 1.735  1995/01/27  11:48:28  allender
7027 - * check for newdemo_state to be paused and stop recording.  We might be
7028 - * in between levels
7029 - *
7030 - * Revision 1.734  1995/01/26  22:11:41  mike
7031 - * Purple chromo-blaster (ie, fusion cannon) spruce up (chromification)
7032 - *
7033 - * Revision 1.733  1995/01/26  17:03:04  mike
7034 - * make fusion cannon have more chrome, make fusion, mega rock you!
7035 - *
7036 - * Revision 1.732  1995/01/25  14:37:25  john
7037 - * Made joystick only prompt for calibration once...
7038 - *
7039 - * Revision 1.731  1995/01/24  15:49:14  john
7040 - * Made typeing in long net messages wrap on
7041 - * small screen sizes.
7042 - *
7043 - * Revision 1.730  1995/01/24  15:23:42  mike
7044 - * network message tweaking.
7045 - *
7046 - * Revision 1.729  1995/01/24  12:00:47  john
7047 - * Fixed bug with defing macro passing keys to controls.
7048 - *
7049 - * Revision 1.728  1995/01/24  11:53:35  john
7050 - * Added better macro defining code.
7051 - *
7052 - * Revision 1.727  1995/01/23  22:17:15  john
7053 - * Fixed bug with not clearing key buffer when leaving f8.
7054 - *
7055 - * Revision 1.726  1995/01/23  22:07:09  john
7056 - * Added flush to game inputs during F8.
7057
7058 ------------------------------------------------------------------------
7059 main/game.h:
7060
7061 - * Revision 1.3  1995/09/14  13:44:34  allender
7062 - * fixed function prototypes to have void return value to satify
7063 - * moto compiler
7064 - *
7065 - * Revision 1.2  1995/08/17  09:25:05  allender
7066 - * externed Scanline_double variable
7067 - *
7068 - * Revision 1.1  1995/05/16  15:56:46  allender
7069 - * Initial revision
7070 - *
7071 - * Revision 2.1  1995/03/06  15:23:22  john
7072 - * New screen techniques.
7073 - *
7074 - * Revision 2.0  1995/02/27  11:28:21  john
7075 - * New version 2.0, which has no anonymous unions, builds with
7076 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7077 - *
7078 - * Revision 1.79  1995/02/13  10:37:17  john
7079 - * Saved Buggin' cheat mode to save file.
7080 - *
7081 - * Revision 1.78  1995/02/01  16:34:12  john
7082 - * Linted.
7083 - *
7084 - * Revision 1.77  1995/01/29  21:37:14  mike
7085 - * initialize variables on game load so you don't drain your energy when you fire.
7086 - *
7087 - * Revision 1.76  1995/01/26  22:11:36  mike
7088 - * Purple chromo-blaster (ie, fusion cannon) spruce up (chromification)
7089 - *
7090 - * Revision 1.75  1995/01/26  16:45:31  mike
7091 - * Add autofire fusion cannon stuff.
7092 - *
7093 - * Revision 1.74  1994/12/11  23:18:06  john
7094 - * Added -nomusic.
7095 - * Added RealFrameTime.
7096 - * Put in a pause when sound initialization error.
7097 - * Made controlcen countdown and framerate use RealFrameTime.
7098 - *
7099 - * Revision 1.73  1994/12/09  00:41:24  mike
7100 - * fix hang in automap print screen
7101 - *
7102 - * Revision 1.72  1994/12/04  13:47:00  mike
7103 - * enhance custom detail level support.
7104 - *
7105 - * Revision 1.71  1994/12/02  15:05:44  matt
7106 - * Added new "official" cheats
7107 - *
7108 - * Revision 1.70  1994/11/28  18:14:09  rob
7109 - * Added game_mode flag for team games.
7110 - *
7111 - * Revision 1.69  1994/11/15  16:51:13  matt
7112 - * Made rear view only switch to rear cockpit if cockpit on in front view
7113 - *
7114 - * Revision 1.68  1994/11/04  16:26:10  john
7115 - * Fixed bug with letterbox mode game after you finish a game.
7116 - *
7117 - * Revision 1.67  1994/11/02  11:59:48  john
7118 - * Moved menu out of game into inferno main loop.
7119 - *
7120 - * Revision 1.66  1994/10/26  23:02:19  matt
7121 - * Made palette flash saturate negative values
7122 - *
7123 - * Revision 1.65  1994/10/26  15:21:05  mike
7124 - * Detail level stuff.  Make Render_depth public.
7125 - *
7126 - * Revision 1.64  1994/10/19  00:13:01  matt
7127 - * Added prototypes
7128 - *
7129 - * Revision 1.63  1994/10/09  14:54:39  matt
7130 - * Made player cockpit state & window size save/restore with saved games & automap
7131 - *
7132 - * Revision 1.62  1994/10/08  19:56:32  matt
7133 - * Added prototype
7134 - *
7135 - * Revision 1.61  1994/10/07  22:19:32  mike
7136 - * Increase number of difficulty levels from 4 to 5.
7137 - *
7138 - * Revision 1.60  1994/10/06  14:14:11  matt
7139 - * Added new function to reset time (to prevent big FrameTime) at start of level
7140 - *
7141 - * Revision 1.59  1994/10/05  17:08:43  matt
7142 - * Changed order of cockpit bitmaps, since there's no longer a full-screen cockpit
7143 - *
7144 - * Revision 1.58  1994/10/03  23:44:13  matt
7145 - * Save & restore palette effect around menus & pause message
7146 - *
7147 - * Revision 1.57  1994/09/29  17:42:12  matt
7148 - * Cleaned up game_mode a little
7149 - *
7150 - * Revision 1.56  1994/09/28  23:12:01  matt
7151 - * Macroized palette flash system
7152 - *
7153 - * Revision 1.55  1994/09/24  16:56:13  rob
7154 - * Added new fields for the Game_mode bitvector for modem play.
7155 - *
7156 - * Revision 1.54  1994/09/24  14:16:20  mike
7157 - * Added new game mode constants.
7158 - *
7159 - * Revision 1.53  1994/09/22  19:00:57  mike
7160 - * Move NDL from robot.h to here.
7161 - *
7162 - * Revision 1.52  1994/09/22  10:46:51  mike
7163 - * Add difficulty levels.
7164 - *
7165 - * Revision 1.51  1994/09/17  01:39:52  matt
7166 - * Added status bar/sizable window mode, and in the process revamped the
7167 - * whole cockpit mode system.
7168 - *
7169 - * Revision 1.50  1994/09/15  21:23:10  matt
7170 - * Changed system to keep track of whether & what cockpit is up
7171 - *
7172 - * Revision 1.49  1994/09/15  16:11:33  john
7173 - * Added support for VFX1 head tracking. Fixed bug with memory over-
7174 - * write when using stereo mode.
7175 - *
7176 - * Revision 1.48  1994/09/13  16:40:10  mike
7177 - * Prototype Global_missile_firing_count.
7178 - *
7179 - * Revision 1.47  1994/09/13  11:19:05  mike
7180 - * Add Next_missile_fire_time.
7181 - *
7182 - * Revision 1.46  1994/09/12  09:52:50  john
7183 - * Made global flush function that flushes keyboard,mouse, and joystick.
7184 - *
7185 - * Revision 1.45  1994/09/03  15:24:14  mike
7186 - * Make global Global_laser_firing_count.
7187 - *
7188 - * Revision 1.44  1994/08/31  19:26:57  mike
7189 - * Prototypes for Next_laser_fire_time, Laser_delay_time.
7190 - *
7191 - * Revision 1.43  1994/08/18  10:47:22  john
7192 - * Cleaned up game sequencing and player death stuff
7193 - * in preparation for making the player explode into
7194 - * pieces when dead.
7195 - *
7196 - * Revision 1.42  1994/08/11  18:03:53  matt
7197 - * Added prototype
7198 - *
7199 - * Revision 1.41  1994/06/29  20:41:38  matt
7200 - * Added new pause mode; cleaned up countdown & game startup code
7201 - *
7202 - * Revision 1.40  1994/06/24  17:03:49  john
7203 - * Added VFX support. Also took all game sequencing stuff like
7204 - * EndGame out and put it into gameseq.c
7205 - *
7206 - * Revision 1.39  1994/06/20  15:01:08  yuan
7207 - * Added death when mine blows up...
7208 - * Continues onto next level.
7209 - *
7210 - * Revision 1.38  1994/06/17  18:07:20  matt
7211 - * Moved some vars out of ifdef
7212 - *
7213 - * Revision 1.37  1994/06/15  11:09:22  yuan
7214 - * Moved gauge_message to mono screen for now.
7215 - *
7216 - * Revision 1.36  1994/05/30  20:22:11  yuan
7217 - * New triggers.
7218 - *
7219 - * Revision 1.35  1994/05/27  10:32:48  yuan
7220 - * New dialog boxes (Walls and Triggers) added.
7221 - *
7222 - *
7223 - * Revision 1.34  1994/05/20  11:56:45  matt
7224 - * Cleaned up find_vector_intersection() interface
7225 - * Killed check_point_in_seg(), check_player_seg(), check_object_seg()
7226 - *
7227 - * Revision 1.33  1994/05/19  21:45:21  matt
7228 - * Removed unused prototypes
7229 - *
7230 - * Revision 1.32  1994/05/19  18:53:17  yuan
7231 - * Changing player structure...
7232 - *
7233 - * Revision 1.31  1994/05/16  16:38:35  yuan
7234 - * Fixed palette add so it doesn't show up in the menu.
7235 - *
7236 - * Revision 1.30  1994/05/16  09:28:17  matt
7237 - * Renamed init_player() to be init_player_stats(), added new funtion
7238 - * init_player_object()
7239 - *
7240 - * Revision 1.29  1994/05/14  17:14:57  matt
7241 - * Got rid of externs in source (non-header) files
7242
7243 ------------------------------------------------------------------------
7244 main/gamefont.c:
7245
7246 - * Revision 1.2  1995/08/18  10:23:25  allender
7247 - * remove refernce to big font -- add PC small font for pixel
7248 - * doubling display
7249 - *
7250 - * Revision 1.1  1995/05/16  15:25:22  allender
7251 - * Initial revision
7252 - *
7253 - * Revision 2.0  1995/02/27  11:30:14  john
7254 - * New version 2.0, which has no anonymous unions, builds with
7255 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7256 - *
7257 - * Revision 1.8  1994/11/18  16:41:39  adam
7258 - * trimmed some meat
7259 - *
7260 - * Revision 1.7  1994/11/17  13:07:11  adam
7261 - * removed unused font
7262 - *
7263 - * Revision 1.6  1994/11/03  21:36:12  john
7264 - * Added code for credit fonts.
7265 - *
7266 - * Revision 1.5  1994/08/17  20:20:02  matt
7267 - * Took out alternate-color versions of font3, since this is a mono font
7268 - *
7269 - * Revision 1.4  1994/08/12  12:03:44  adam
7270 - * tweaked fonts.
7271 - *
7272 - * Revision 1.3  1994/08/11  12:43:40  adam
7273 - * changed font filenames
7274 - *
7275 - * Revision 1.2  1994/08/10  19:57:15  john
7276 - * Changed font stuff; Took out old menu; messed up lots of
7277 - * other stuff like game sequencing messages, etc.
7278 - *
7279 - * Revision 1.1  1994/08/10  17:20:09  john
7280 - * Initial revision
7281
7282 ------------------------------------------------------------------------
7283 main/gamefont.h:
7284
7285 - * Revision 1.2  1995/08/18  10:23:54  allender
7286 - * removed large font -- added PC small font
7287 - *
7288 - * Revision 1.1  1995/05/16  15:56:55  allender
7289 - * Initial revision
7290 - *
7291 - * Revision 2.0  1995/02/27  11:31:09  john
7292 - * New version 2.0, which has no anonymous unions, builds with
7293 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7294 - *
7295 - * Revision 1.7  1994/11/18  16:41:28  adam
7296 - * trimmed meat
7297 - *
7298 - * Revision 1.6  1994/11/17  13:07:00  adam
7299 - * removed unused font
7300 - *
7301 - * Revision 1.5  1994/11/03  21:36:02  john
7302 - * Added code for credit fonts.
7303 - *
7304 - * Revision 1.4  1994/08/17  20:20:25  matt
7305 - * Took out alternate-color versions of font3, since this is a mono font
7306 - *
7307 - * Revision 1.3  1994/08/11  12:44:32  adam
7308 - * killed a #define
7309 - *
7310 - * Revision 1.2  1994/08/10  19:57:16  john
7311 - * Changed font stuff; Took out old menu; messed up lots of
7312 - * other stuff like game sequencing messages, etc.
7313 - *
7314 - * Revision 1.1  1994/08/10  17:20:22  john
7315 - * Initial revision
7316
7317 ------------------------------------------------------------------------
7318 main/gamemine.c:
7319
7320 - * Revision 1.2  1995/10/31  10:15:58  allender
7321 - * code for shareware levels
7322 - *
7323 - * Revision 1.1  1995/05/16  15:25:29  allender
7324 - * Initial revision
7325 - *
7326 - * Revision 2.2  1995/03/06  15:23:14  john
7327 - * New screen techniques.
7328 - *
7329 - * Revision 2.1  1995/02/27  13:13:37  john
7330 - * Removed floating point.
7331 - *
7332 - * Revision 2.0  1995/02/27  11:27:45  john
7333 - * New version 2.0, which has no anonymous unions, builds with
7334 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7335 - *
7336 - * Revision 1.70  1995/02/13  20:35:09  john
7337 - * Lintized
7338 - *
7339 - * Revision 1.69  1995/02/07  17:12:03  rob
7340 - * Added ifdef's for Editor.
7341 - *
7342 - * Revision 1.68  1995/02/07  16:51:48  mike
7343 - * fix gray rock josh problem.
7344 - *
7345 - * Revision 1.67  1995/02/01  15:46:26  yuan
7346 - * Fixed matcen_nums.
7347 - *
7348 - * Revision 1.66  1995/01/19  15:19:28  mike
7349 - * new super-compressed registered file format.
7350 - *
7351 - * Revision 1.65  1994/12/10  16:44:59  matt
7352 - * Added debugging code to track down door that turns into rock
7353 - *
7354 - * Revision 1.64  1994/12/10  14:58:24  yuan
7355 - * *** empty log message ***
7356 - *
7357 - * Revision 1.63  1994/12/08  17:19:10  yuan
7358 - * Cfiling stuff.
7359 - *
7360 - * Revision 1.62  1994/12/07  14:05:33  yuan
7361 - * Fixed wall assert problem... Bashed highest_segment
7362 - * _index before WALL_IS_DOORWAY check.
7363 - *
7364 - * Revision 1.61  1994/11/27  23:14:52  matt
7365 - * Made changes for new mprintf calling convention
7366 - *
7367 - * Revision 1.60  1994/11/27  18:05:20  matt
7368 - * Compile out LVL reader when editor compiled out
7369 - *
7370 - * Revision 1.59  1994/11/26  22:51:45  matt
7371 - * Removed editor-only fields from segment structure when editor is compiled
7372 - * out, and padded segment structure to even multiple of 4 bytes.
7373 - *
7374 - * Revision 1.58  1994/11/26  21:48:02  matt
7375 - * Fixed saturation in short light value
7376 - *
7377 - * Revision 1.57  1994/11/20  22:11:49  mike
7378 - * comment out an apparently unnecessary call to fuelcen_reset().
7379 - *
7380 - * Revision 1.56  1994/11/18  21:56:42  john
7381 - * Added a better, leaner pig format.
7382 - *
7383 - * Revision 1.55  1994/11/17  20:09:18  john
7384 - * Added new compiled level format.
7385 - *
7386 - * Revision 1.54  1994/11/17  15:40:17  mike
7387 - * Comment out mprintf which was causing important information to scroll away.
7388 - *
7389 - * Revision 1.53  1994/11/17  14:56:37  mike
7390 - * moved segment validation functions from editor to main.
7391 - *
7392 - * Revision 1.52  1994/11/17  11:39:35  matt
7393 - * Ripped out code to load old mines
7394 - *
7395 - * Revision 1.51  1994/11/14  20:47:53  john
7396 - * Attempted to strip out all the code in the game
7397 - * directory that uses any ui code.
7398 - *
7399 - * Revision 1.50  1994/11/14  16:05:38  matt
7400 - * Fixed, maybe, again, errors when can't find texture during remap
7401 - *
7402 - * Revision 1.49  1994/11/14  14:34:03  matt
7403 - * Fixed up handling when textures can't be found during remap
7404 - *
7405 - * Revision 1.48  1994/11/14  13:01:55  matt
7406 - * Added Int3() when can't find texture
7407 - *
7408 - * Revision 1.47  1994/10/30  14:12:21  mike
7409 - * rip out local segments stuff.
7410 - *
7411 - * Revision 1.46  1994/10/27  19:43:07  john
7412 - * Disable the piglet option.
7413 - *
7414 - * Revision 1.45  1994/10/27  18:51:42  john
7415 - * Added -piglet option that only loads needed textures for a
7416 - * mine.  Only saved ~1MB, and code still doesn't free textures
7417 - * before you load a new mine.
7418 - *
7419 - * Revision 1.44  1994/10/20  12:47:22  matt
7420 - * Replace old save files (MIN/SAV/HOT) with new LVL files
7421 - *
7422 - * Revision 1.43  1994/10/19  16:46:40  matt
7423 - * Made tmap overrides for robots remap texture numbers
7424 - *
7425 - * Revision 1.42  1994/10/03  23:37:01  mike
7426 - * Adapt to changed fuelcen_activate parameters.
7427 - *
7428 - * Revision 1.41  1994/09/23  22:14:49  matt
7429 - * Took out obsolete structure fields
7430 - *
7431 - * Revision 1.40  1994/08/01  11:04:11  yuan
7432 - * New materialization centers.
7433 - *
7434 - * Revision 1.39  1994/07/21  19:01:47  mike
7435 - * Call Lsegment stuff.
7436
7437 ------------------------------------------------------------------------
7438 main/gamemine.h:
7439
7440 - * Revision 1.1  1995/05/16  15:57:02  allender
7441 - * Initial revision
7442 - *
7443 - * Revision 2.0  1995/02/27  11:28:50  john
7444 - * New version 2.0, which has no anonymous unions, builds with
7445 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7446 - *
7447 - * Revision 1.15  1994/11/17  11:39:34  matt
7448 - * Ripped out code to load old mines
7449 - *
7450 - * Revision 1.14  1994/10/19  16:46:40  matt
7451 - * Made tmap overrides for robots remap texture numbers
7452 - *
7453 - * Revision 1.13  1994/09/23  22:14:37  matt
7454 - * Took out obsolete structure fields
7455 - *
7456 - * Revision 1.12  1994/07/22  12:36:32  matt
7457 - * Cleaned up editor/game interactions some more.
7458 - *
7459 - * Revision 1.11  1994/06/01  11:21:37  yuan
7460 - * Added controlcentertriggers to the gamesave.
7461 - *
7462 - * Revision 1.10  1994/05/10  12:14:26  yuan
7463 - * Game save/load... Demo levels 1-5 added...
7464 - * High scores fixed...
7465 - *
7466 - * Revision 1.9  1994/05/04  18:25:05  yuan
7467 - * Working on gamesave.
7468 - *
7469 - * Revision 1.8  1994/05/03  15:53:27  yuan
7470 - * Readded structure field groups for backward compatibility...
7471 - *
7472 - * Revision 1.7  1994/05/03  11:36:26  yuan
7473 - * Stabilizing gamesave stuff.
7474 - *
7475 - * Revision 1.6  1994/04/28  11:01:32  yuan
7476 - * Added objects in structure.
7477 - *
7478 - * Revision 1.5  1994/04/06  18:30:03  john
7479 - * Added Refueling segments.
7480 - *
7481 - * Revision 1.4  1994/03/17  18:06:53  yuan
7482 - * Removed switch code... Now we just have Walls, Triggers, and Links...
7483 - *
7484 - * Revision 1.3  1994/03/01  18:12:24  yuan
7485 - * Wallswitches, triggers, and more!
7486 - *
7487 - * Revision 1.2  1994/02/10  15:36:01  matt
7488 - * Various changes to make editor compile out.
7489 - *
7490 - * Revision 1.1  1994/02/09  17:11:45  matt
7491 - * Initial revision
7492
7493 ------------------------------------------------------------------------
7494 main/gamesave.c:
7495
7496 - * Revision 1.3  1996/02/21  13:59:17  allender
7497 - * check Data folder when can't open a level file from a hog
7498 - *
7499 - * Revision 1.2  1995/10/31  10:23:23  allender
7500 - * shareware stuff
7501 - *
7502 - * Revision 1.1  1995/05/16  15:25:37  allender
7503 - * Initial revision
7504 - *
7505 - * Revision 2.2  1995/04/23  14:53:12  john
7506 - * Made some mine structures read in with no structure packing problems.
7507 - *
7508 - * Revision 2.1  1995/03/20  18:15:43  john
7509 - * Added code to not store the normals in the segment structure.
7510 - *
7511 - * Revision 2.0  1995/02/27  11:29:50  john
7512 - * New version 2.0, which has no anonymous unions, builds with
7513 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7514 - *
7515 - * Revision 1.207  1995/02/23  10:17:36  allender
7516 - * fixed parameter mismatch with compute_segment_center
7517 - *
7518 - * Revision 1.206  1995/02/22  14:51:17  allender
7519 - * fixed some things that I missed
7520 - *
7521 - * Revision 1.205  1995/02/22  13:31:38  allender
7522 - * remove anonymous unions from object structure
7523 - *
7524 - * Revision 1.204  1995/02/01  20:58:08  john
7525 - * Made editor check hog.
7526 - *
7527 - * Revision 1.203  1995/01/28  17:40:34  mike
7528 - * correct level names (use rdl, sdl) for dumpmine stuff.
7529 - *
7530 - * Revision 1.202  1995/01/25  20:03:46  matt
7531 - * Moved matrix check to avoid orthogonalizing an uninitialize matrix
7532 - *
7533 - * Revision 1.201  1995/01/20  16:56:53  mike
7534 - * remove some mprintfs.
7535 - *
7536 - * Revision 1.200  1995/01/15  19:42:13  matt
7537 - * Ripped out hostage faces for registered version
7538 - *
7539 - * Revision 1.199  1995/01/05  16:59:09  yuan
7540 - * Make it so if editor is loaded, don't get error from typo
7541 - * in filename.
7542 - *
7543 - * Revision 1.198  1994/12/19  12:49:46  mike
7544 - * Change fgets to cfgets.  fgets was getting a pointer mismatch warning.
7545 - *
7546 - * Revision 1.197  1994/12/12  01:20:03  matt
7547 - * Took out object size hack for green claw guys
7548 - *
7549 - * Revision 1.196  1994/12/11  13:19:37  matt
7550 - * Restored calls to fix_object_segs() when debugging is turned off, since
7551 - * it's not a big routine, and could fix some possibly bad problems.
7552 - *
7553 - * Revision 1.195  1994/12/10  16:17:24  mike
7554 - * fix editor bug that was converting transparent walls into rock.
7555 - *
7556 - * Revision 1.194  1994/12/09  14:59:27  matt
7557 - * Added system to attach a fireball to another object for rendering purposes,
7558 - * so the fireball always renders on top of (after) the object.
7559 - *
7560 - * Revision 1.193  1994/12/08  17:19:02  yuan
7561 - * Cfiling stuff.
7562 - *
7563 - * Revision 1.192  1994/12/02  20:01:05  matt
7564 - * Always give vulcan cannon powerup same amount of ammo, regardless of
7565 - * how much it was saved with
7566 - *
7567 - * Revision 1.191  1994/11/30  17:45:57  yuan
7568 - * Saving files now creates RDL/SDLs instead of CDLs.
7569 - *
7570 - * Revision 1.190  1994/11/30  17:22:14  matt
7571 - * Ripped out hostage faces in shareware version
7572 - *
7573 - * Revision 1.189  1994/11/28  00:09:30  allender
7574 - * commented out call to newdemo_record_start_demo in load_level...what is
7575 - * this doing here anyway?????
7576 - *
7577 - * Revision 1.188  1994/11/27  23:13:48  matt
7578 - * Made changes for new mprintf calling convention
7579 - *
7580 - * Revision 1.187  1994/11/27  18:06:20  matt
7581 - * Cleaned up LVL/CDL file loading
7582 - *
7583 - * Revision 1.186  1994/11/25  22:46:29  matt
7584 - * Allow ESC out of compiled/normal menu (esc=compiled).
7585 - *
7586 - * Revision 1.185  1994/11/23  12:18:35  mike
7587 - * move level names here...a more logical place than dumpmine.
7588 - *
7589 - * Revision 1.184  1994/11/21  20:29:19  matt
7590 - * If hostage info is bad, fix it.
7591 - *
7592 - * Revision 1.183  1994/11/21  20:26:07  matt
7593 - * Fixed bug, I hope
7594 - *
7595 - * Revision 1.182  1994/11/21  20:20:37  matt
7596 - * Fixed stupid mistake
7597 - *
7598 - * Revision 1.181  1994/11/21  20:18:40  matt
7599 - * Fixed (hopefully) totally bogus writing of hostage data
7600 - *
7601 - * Revision 1.180  1994/11/20  14:11:56  matt
7602 - * Gracefully handle two hostages having same id
7603 - *
7604 - * Revision 1.179  1994/11/19  23:55:05  mike
7605 - * remove Assert, put in comment for Matt.
7606 - *
7607 - * Revision 1.178  1994/11/19  19:53:24  matt
7608 - * Added code to full support different hostage head clip & message for
7609 - * each hostage.
7610 - *
7611 - * Revision 1.177  1994/11/19  15:15:21  mike
7612 - * remove unused code and data
7613 - *
7614 - * Revision 1.176  1994/11/19  10:28:28  matt
7615 - * Took out write routines when editor compiled out
7616 - *
7617 - * Revision 1.175  1994/11/17  20:38:25  john
7618 - * Took out warning.
7619 - *
7620 - * Revision 1.174  1994/11/17  20:36:34  john
7621 - * Made it so that saving a mine will write the .cdl even
7622 - * if .lvl gets error.
7623 - *
7624 - * Revision 1.173  1994/11/17  20:26:19  john
7625 - * Made the game load whichever of .cdl or .lvl exists,
7626 - * and if they both exist, prompt the user for which one.
7627 - *
7628 - * Revision 1.172  1994/11/17  20:11:20  john
7629 - * Fixed warning.
7630 - *
7631 - * Revision 1.171  1994/11/17  20:09:26  john
7632 - * Added new compiled level format.
7633 - *
7634 - * Revision 1.170  1994/11/17  14:57:21  mike
7635 - * moved segment validation functions from editor to main.
7636 - *
7637 - * Revision 1.169  1994/11/17  11:39:21  matt
7638 - * Ripped out code to load old mines
7639 - *
7640 - * Revision 1.168  1994/11/16  11:24:53  matt
7641 - * Made attack-type robots have smaller radius, so they get closer to player
7642 - *
7643 - * Revision 1.167  1994/11/15  21:42:47  mike
7644 - * better error messages.
7645 - *
7646 - * Revision 1.166  1994/11/15  15:30:41  matt
7647 - * Save ptr to name of level being loaded
7648 - *
7649 - * Revision 1.165  1994/11/14  20:47:46  john
7650 - * Attempted to strip out all the code in the game
7651 - * directory that uses any ui code.
7652 - *
7653 - * Revision 1.164  1994/11/14  14:34:23  matt
7654 - * Fixed up handling when textures can't be found during remap
7655 - *
7656 - * Revision 1.163  1994/11/10  14:02:49  matt
7657 - * Hacked in support for player ships with different textures
7658 - *
7659 - * Revision 1.162  1994/11/06  14:38:17  mike
7660 - * Remove an apparently unnecessary mprintf.
7661 - *
7662 - * Revision 1.161  1994/10/30  14:11:28  mike
7663 - * ripout local segments stuff.
7664 - *
7665 - * Revision 1.160  1994/10/28  12:10:41  matt
7666 - * Check that was supposed to happen only when editor was in was happening
7667 - * only when editor was out.
7668 - *
7669 - * Revision 1.159  1994/10/27  11:25:32  matt
7670 - * Only do connectivity error check when editor in
7671 - *
7672 - * Revision 1.158  1994/10/27  10:54:00  matt
7673 - * Made connectivity error checking put up warning if errors found
7674 - *
7675 - * Revision 1.157  1994/10/25  10:50:54  matt
7676 - * Vulcan cannon powerups now contain ammo count
7677 - *
7678 - * Revision 1.156  1994/10/23  02:10:43  matt
7679 - * Got rid of obsolete hostage_info stuff
7680 - *
7681 - * Revision 1.155  1994/10/22  18:57:26  matt
7682 - * Added call to check_segment_connections()
7683 - *
7684 - * Revision 1.154  1994/10/21  12:19:23  matt
7685 - * Clear transient objects when saving (& loading) games
7686 - *
7687 - * Revision 1.153  1994/10/21  11:25:10  mike
7688 - * Use new constant IMMORTAL_TIME.
7689 - *
7690 - * Revision 1.152  1994/10/20  12:46:59  matt
7691 - * Replace old save files (MIN/SAV/HOT) with new LVL files
7692 - *
7693 - * Revision 1.151  1994/10/19  19:26:32  matt
7694 - * Fixed stupid bug
7695 - *
7696 - * Revision 1.150  1994/10/19  16:46:21  matt
7697 - * Made tmap overrides for robots remap texture numbers
7698 - *
7699 - * Revision 1.149  1994/10/18  08:50:27  yuan
7700 - * Fixed correct variable this time.
7701 - *
7702 - * Revision 1.148  1994/10/18  08:45:02  yuan
7703 - * Oops. forgot load function.
7704 - *
7705 - * Revision 1.147  1994/10/18  08:42:10  yuan
7706 - * Avoid the int3.
7707 - *
7708 - * Revision 1.146  1994/10/17  21:34:57  matt
7709 - * Added support for new Control Center/Main Reactor
7710 - *
7711 - * Revision 1.145  1994/10/15  19:06:34  mike
7712 - * Fix bug, maybe, having to do with something or other, ...
7713 - *
7714 - * Revision 1.144  1994/10/12  21:07:33  matt
7715 - * Killed unused field in object structure
7716 - *
7717 - * Revision 1.143  1994/10/06  14:52:55  mike
7718 - * Put check in to detect possibly bogus walls in last segment which leaked through an earlier check
7719 - * due to misuse of Highest_segment_index.
7720 - *
7721 - * Revision 1.142  1994/10/05  22:12:44  mike
7722 - * Put in cleanup for matcen/fuelcen links.
7723 - *
7724 - * Revision 1.141  1994/10/03  11:30:05  matt
7725 - * Make sure player in a valid segment before saving
7726 - *
7727 - * Revision 1.140  1994/09/28  11:14:41  mike
7728 - * Better error messaging on bogus mines: Only bring up dialog box if a "real" (level??.*) level.
7729 - *
7730 - * Revision 1.139  1994/09/28  09:22:58  mike
7731 - * Comment out a mprintf.
7732 - *
7733 - * Revision 1.138  1994/09/27  17:08:36  mike
7734 - * Message boxes when you load bogus mines.
7735 - *
7736 - * Revision 1.137  1994/09/27  15:43:45  mike
7737 - * Move the dump stuff to dumpmine.
7738 - *
7739 - * Revision 1.136  1994/09/27  00:02:31  mike
7740 - * Dump text files (".txm") when loading a mine, showing all kinds of useful mine info.
7741 - *
7742 - * Revision 1.135  1994/09/26  11:30:41  matt
7743 - * Took out code which loaded bogus player structure
7744 - *
7745 - * Revision 1.134  1994/09/26  11:18:44  john
7746 - * Fixed some conflicts with newseg.
7747 - *
7748 - * Revision 1.133  1994/09/26  10:56:58  matt
7749 - * Fixed inconsistancies in lifeleft for immortal objects
7750 - *
7751 - * Revision 1.132  1994/09/25  23:41:10  matt
7752 - * Changed the object load & save code to read/write the structure fields one
7753 - * at a time (rather than the whole structure at once).  This mean that the
7754 - * object structure can be changed without breaking the load/save functions.
7755 - * As a result of this change, the local_object data can be and has been
7756 - * incorporated into the object array.  Also, timeleft is now a property
7757 - * of all objects, and the object structure has been otherwise cleaned up.
7758
7759 ------------------------------------------------------------------------
7760 main/gamesave.h:
7761
7762 - * Revision 1.1  1995/05/16  15:57:10  allender
7763 - * Initial revision
7764 - *
7765 - * Revision 2.0  1995/02/27  11:30:25  john
7766 - * New version 2.0, which has no anonymous unions, builds with
7767 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7768 - *
7769 - * Revision 1.11  1994/11/23  12:19:32  mike
7770 - * detail level menu.
7771 - *
7772 - * Revision 1.10  1994/10/20  12:47:30  matt
7773 - * Replace old save files (MIN/SAV/HOT) with new LVL files
7774 - *
7775 - * Revision 1.9  1994/09/27  17:08:47  mike
7776 - * Message boxes when you load bogus mines.
7777 - *
7778 - * Revision 1.8  1994/09/27  15:43:05  mike
7779 - * Prototype write_game_text.
7780 - *
7781 - * Revision 1.7  1994/09/14  15:46:39  matt
7782 - * Added function load_mine_only()
7783 - *
7784 - * Revision 1.6  1994/07/22  12:36:28  matt
7785 - * Cleaned up editor/game interactions some more.
7786 - *
7787 - * Revision 1.5  1994/07/20  13:38:14  matt
7788 - * Added get_level_name() prototype
7789 - *
7790 - * Revision 1.4  1994/06/20  22:19:41  john
7791 - * Added Gamesave_num_org_robots.
7792 - *
7793 - * Revision 1.3  1994/06/14  11:32:49  john
7794 - * Made Newdemo record & restore the current mine.
7795 - *
7796 - * Revision 1.2  1994/05/14  17:16:25  matt
7797 - * Got rid of externs in source (non-header) files
7798 - *
7799 - * Revision 1.1  1994/05/14  16:01:26  matt
7800 - * Initial revision
7801
7802 ------------------------------------------------------------------------
7803 main/gameseg.c:
7804
7805 - * Revision 1.9  1995/11/08  16:26:04  allender
7806 - * minor bug fix in find_connected_distance
7807 - *
7808 - * Revision 1.8  1995/10/12  17:36:55  allender
7809 - * made trace_segs only recurse 100 times max
7810 - *
7811 - * Revision 1.7  1995/10/11  18:29:01  allender
7812 - * removed Int3 from trace_segs
7813 - *
7814 - * Revision 1.6  1995/10/11  14:13:54  allender
7815 - * put in stack check code into trace-segs
7816 - *
7817 - * Revision 1.5  1995/09/23  09:40:25  allender
7818 - * put in casts in extract_shortpos to try and solve shortpos problem
7819 - * with appletalk
7820 - *
7821 - * Revision 1.4  1995/09/20  14:26:50  allender
7822 - * added flag to swap bytes on extract shortpot
7823 - *
7824 - * Revision 1.3  1995/08/12  12:01:27  allender
7825 - * added flag to create_shortpos to swap bytes
7826 - *
7827 - * Revision 1.2  1995/06/06  10:42:07  allender
7828 - * made shortpos routines swap bytes when extracting and making shortpos structures
7829 - *
7830 - * Revision 1.1  1995/05/16  15:25:46  allender
7831 - * Initial revision
7832 - *
7833 - * Revision 2.2  1995/03/20  18:15:39  john
7834 - * Added code to not store the normals in the segment structure.
7835 - *
7836 - * Revision 2.1  1995/03/08  12:11:39  allender
7837 - * fix shortpos reading/writing
7838 - *
7839 - * Revision 2.0  1995/02/27  11:29:21  john
7840 - * New version 2.0, which has no anonymous unions, builds with
7841 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
7842 - *
7843 - * Revision 1.78  1995/02/22  13:52:22  allender
7844 - * remove anonymous unions from object structure
7845 - *
7846 - * Revision 1.77  1995/02/22  13:24:47  john
7847 - * Removed the vecmat anonymous unions.
7848 - *
7849 - * Revision 1.76  1995/02/13  20:35:01  john
7850 - * Lintized
7851 - *
7852 - * Revision 1.75  1995/02/09  13:10:51  mike
7853 - * remove an annoying mprintf.
7854 - *
7855 - * Revision 1.74  1995/02/05  17:49:28  rob
7856 - * Added assert to gameseg.c.
7857 - *
7858 - * Revision 1.73  1995/02/02  00:49:26  mike
7859 - * new automap segment-depth functionality.
7860 - *
7861 - * Revision 1.72  1995/01/16  21:06:51  mike
7862 - * Move function pick_random_point_in_segment from fireball.c to gameseg.c.
7863 - *
7864 - * Revision 1.71  1994/12/21  19:54:32  matt
7865 - * Added error checking
7866 - *
7867 - * Revision 1.70  1994/12/11  21:34:09  matt
7868 - * Changed assert() to int3()
7869 - *
7870 - * Revision 1.69  1994/12/01  21:04:37  matt
7871 - * Several important changes:
7872 - *  (1) Checking against triangulated sides has been standardized a bit
7873 - *  (2) Code has been added to de-triangulate some sides
7874 - *  (3) BIG ONE: the tolerance for checking a point against a plane has
7875 - *      been drastically relaxed
7876 - *
7877 - *
7878 - * Revision 1.67  1994/11/27  23:12:21  matt
7879 - * Made changes for new mprintf calling convention
7880 - *
7881 - * Revision 1.66  1994/11/26  22:51:40  matt
7882 - * Removed editor-only fields from segment structure when editor is compiled
7883 - * out, and padded segment structure to even multiple of 4 bytes.
7884 - *
7885 - * Revision 1.65  1994/11/22  16:55:38  mike
7886 - * use memset in place of loop to clear array.
7887 - *
7888 - * Revision 1.64  1994/11/19  15:20:37  mike
7889 - * rip out unused code and data
7890 - *
7891 - * Revision 1.63  1994/11/18  18:31:48  matt
7892 - * Fixed code again (and maybe for real)
7893 - *
7894 - * Revision 1.62  1994/11/18  16:54:24  matt
7895 - * Fixed extract_orient_from_segment()
7896 - *
7897 - * Revision 1.61  1994/11/17  14:56:50  mike
7898 - * moved segment validation functions from editor to main.
7899 - *
7900 - * Revision 1.60  1994/11/16  23:38:53  mike
7901 - * new improved boss teleportation behavior.
7902 - *
7903 - * Revision 1.59  1994/10/30  14:12:46  mike
7904 - * rip out local segments stuff.
7905 - *
7906 - * Revision 1.58  1994/10/27  10:53:39  matt
7907 - * Made connectivity error checking put up warning if errors found
7908 - *
7909 - * Revision 1.57  1994/10/25  21:19:26  mike
7910 - * debugging code.
7911 - *
7912 - * Revision 1.56  1994/10/25  11:26:09  mike
7913 - * *** empty log message ***
7914 - *
7915 - * Revision 1.55  1994/10/22  22:36:08  matt
7916 - * Improved error finding routine
7917 - *
7918 - * Revision 1.54  1994/10/22  18:56:51  matt
7919 - * Fixed obscure bug in segment trace code
7920 - * Added error find routine, check_segment_connections()
7921 - *
7922 - * Revision 1.53  1994/10/17  14:05:19  matt
7923 - * Don't give recursion assert if doing lighting
7924 - *
7925 - * Revision 1.52  1994/10/15  19:03:48  mike
7926 - * Don't do exhaustive search in smooth lighting.
7927 - *
7928 - * Revision 1.51  1994/10/12  09:46:44  mike
7929 - * Add debug code for trapping exhaustive searches.
7930 - *
7931 - * Revision 1.50  1994/10/11  20:50:41  matt
7932 - * Made find_point_seg() take -1 as segnum, meaning to search all segments
7933 - *
7934 - * Revision 1.49  1994/10/11  17:40:31  matt
7935 - * Fixed bug that caused segment trace to only go through sides you can fly through
7936 - *
7937 - * Revision 1.48  1994/10/10  14:48:16  matt
7938 - * Fixed mistake that caused odd pauses and occasional int3's
7939 - *
7940 - * Revision 1.47  1994/10/09  23:50:41  matt
7941 - * Made find_hitpoint_uv() work with triangulated sides
7942 - *
7943 - * Revision 1.46  1994/10/08  23:06:52  matt
7944 - * trace_segs() didn't know about external walls
7945 - *
7946 - * Revision 1.45  1994/10/07  22:18:57  mike
7947 - * Put in asserts to trap bad segnums.
7948 - *
7949 - * Revision 1.44  1994/10/06  14:08:07  matt
7950 - * Added new function, extract_orient_from_segment()
7951 - *
7952 - * Revision 1.43  1994/10/04  16:24:11  mike
7953 - * Set global Connected_segment_distance for debug reasons for aipath.c.
7954 - *
7955 - * Revision 1.42  1994/10/04  09:18:42  mike
7956 - * Comment out a variable definition, preventing a warning message.
7957 - *
7958 - * Revision 1.41  1994/10/03  23:43:42  mike
7959 - * Put in a warning for overrunning point_segs buffer.
7960 - *
7961 - * Revision 1.40  1994/10/03  20:55:43  rob
7962 - * Added velocity to shortpos.
7963 - *
7964 - * Revision 1.39  1994/09/27  11:46:06  rob
7965 - * re-fixed that same bug (ugh).
7966 - *
7967 - * Revision 1.38  1994/09/27  10:10:51  rob
7968 - * Fixed bug in extract_shortpos (obj_relink added).
7969 - *
7970 - * Revision 1.37  1994/09/25  23:41:02  matt
7971 - * Changed the object load & save code to read/write the structure fields one
7972 - * at a time (rather than the whole structure at once).  This mean that the
7973 - * object structure can be changed without breaking the load/save functions.
7974 - * As a result of this change, the local_object data can be and has been
7975 - * incorporated into the object array.  Also, timeleft is now a property
7976 - * of all objects, and the object structure has been otherwise cleaned up.
7977 - *
7978 - * Revision 1.36  1994/09/22  19:03:05  mike
7979 - * Add shortpos manipulation functions create_shortpos and extract_shortpos.
7980 - *
7981 - * Revision 1.35  1994/09/19  21:21:16  mike
7982 - * Minor optimization to find_connected_distance.
7983 - *
7984 - * Revision 1.34  1994/09/19  21:05:25  mike
7985 - * Write function find_connected_distance,
7986 - * returns distance between two points as travellable through the mine.
7987 - *
7988 - * Revision 1.33  1994/08/30  15:07:15  matt
7989 - * Changed find_point_seg() to deal with some infinite recursion problems.
7990 - *
7991 - * Revision 1.32  1994/08/11  18:58:32  mike
7992 - * Use ints in place of shorts for optimization.
7993 - *
7994 - * Revision 1.31  1994/08/04  00:20:09  matt
7995 - * Cleaned up fvi & physics error handling; put in code to make sure objects
7996 - * are in correct segment; simplified segment finding for objects and points
7997 - *
7998 - * Revision 1.30  1994/08/03  16:46:12  mike
7999 - * not much...
8000 - *
8001 - * Revision 1.29  1994/08/02  20:41:31  matt
8002 - * Fixed bug in get_side_verts()
8003 - *
8004 - * Revision 1.28  1994/08/02  19:04:25  matt
8005 - * Cleaned up vertex list functions
8006 - *
8007 - * Revision 1.27  1994/08/01  10:39:44  matt
8008 - * find_new_seg() now will look through any kind of wall but a totally solid one
8009 - *
8010 - * Revision 1.26  1994/07/28  19:15:59  matt
8011 - * Fixed yet another bug in get_seg_masks()
8012
8013 ------------------------------------------------------------------------
8014 main/gameseg.h:
8015
8016 - * Revision 1.1  1995/05/16  15:57:18  allender
8017 - * Initial revision
8018 - *
8019 - * Revision 2.0  1995/02/27  11:31:20  john
8020 - * New version 2.0, which has no anonymous unions, builds with
8021 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
8022 - *
8023 - * Revision 1.24  1995/02/01  16:34:03  john
8024 - * Linted.
8025 - *
8026 - * Revision 1.23  1995/01/16  21:06:36  mike
8027 - * Move function pick_random_point_in_segment from fireball.c to gameseg.c.
8028 - *
8029 - * Revision 1.22  1994/11/23  12:18:59  mike
8030 - * prototype for level names.
8031 - *
8032 - * Revision 1.21  1994/11/17  14:56:59  mike
8033 - * moved segment validation functions from editor to main.
8034 - *
8035 - * Revision 1.20  1994/11/16  23:38:46  mike
8036 - * new improved boss teleportation behavior.
8037 - *
8038 - * Revision 1.19  1994/10/30  14:12:14  mike
8039 - * rip out local segments stuff.
8040 - *
8041 - * Revision 1.18  1994/10/09  23:51:07  matt
8042 - * Made find_hitpoint_uv() work with triangulated sides
8043 - *
8044 - * Revision 1.17  1994/10/06  14:08:22  matt
8045 - * Added new function, extract_orient_from_segment()
8046 - *
8047 - * Revision 1.16  1994/09/19  21:05:52  mike
8048 - * Prototype for find_connected_distance.
8049 - *
8050 - * Revision 1.15  1994/08/11  18:58:45  mike
8051 - * Change shorts to ints.
8052 - *
8053 - * Revision 1.14  1994/08/04  00:21:09  matt
8054 - * Cleaned up fvi & physics error handling; put in code to make sure objects
8055 - * are in correct segment; simplified segment finding for objects and points
8056 - *
8057 - * Revision 1.13  1994/08/02  19:04:25  matt
8058 - * Cleaned up vertex list functions
8059 - *
8060 - * Revision 1.12  1994/07/21  19:01:53  mike
8061 - * lsegment stuff.
8062 - *
8063 - * Revision 1.11  1994/07/07  09:31:13  matt
8064 - * Added comments
8065 - *
8066 - * Revision 1.10  1994/06/14  12:21:20  matt
8067 - * Added new function, find_point_seg()
8068 - *
8069 - * Revision 1.9  1994/05/29  23:17:38  matt
8070 - * Move find_object_seg() from physics.c to gameseg.c
8071 - * Killed unused find_point_seg()
8072 - *
8073 - * Revision 1.8  1994/05/20  11:56:57  matt
8074 - * Cleaned up find_vector_intersection() interface
8075 - * Killed check_point_in_seg(), check_player_seg(), check_object_seg()
8076 - *
8077 - * Revision 1.7  1994/03/17  18:07:38  yuan
8078 - * Removed switch code... Now we just have Walls, Triggers, and Links...
8079 - *
8080 - * Revision 1.6  1994/02/22  18:14:44  yuan
8081 - * Added new wall system
8082 - *
8083 - * Revision 1.5  1994/02/17  11:33:22  matt
8084 - * Changes in object system
8085 - *
8086 - * Revision 1.4  1994/02/16  13:48:33  mike
8087 - * enable editor to compile out.
8088 - *
8089 - * Revision 1.3  1994/02/14  12:05:07  mike
8090 - * change segment data structure.
8091 - *
8092 - * Revision 1.2  1994/02/10  16:07:20  mike
8093 - * separate editor from game based on EDITOR flag.
8094 - *
8095 - * Revision 1.1  1994/02/09  15:45:38  mike
8096 - * Initial revision
8097
8098 ------------------------------------------------------------------------
8099 main/gameseq.c:
8100
8101 - * Revision 1.1  1995/12/05  16:02:05  allender
8102 - * Initial revision
8103 - *
8104 - * Revision 1.14  1995/11/03  12:55:30  allender
8105 - * shareware changes
8106 - *
8107 - * Revision 1.13  1995/10/31  10:23:07  allender
8108 - * shareware stuff
8109 - *
8110 - * Revision 1.12  1995/10/18  18:25:02  allender
8111 - * call auto_select_weapon after initing ammo since that may
8112 - * change the secondary weapon status
8113 - *
8114 - * Revision 1.11  1995/10/17  13:17:11  allender
8115 - * added closebox when entering pilot name
8116 - *
8117 - * Revision 1.10  1995/09/24  10:56:59  allender
8118 - * new players must be looked for in Players directory
8119 - *
8120 - * Revision 1.9  1995/09/18  08:08:08  allender
8121 - * remove netgame binding if at endgame
8122 - *
8123 - * Revision 1.8  1995/09/14  14:13:01  allender
8124 - * initplayerobject have void return
8125 - *
8126 - * Revision 1.7  1995/08/31  12:54:42  allender
8127 - * try and fix bug
8128 - *
8129 - * Revision 1.6  1995/08/26  16:25:40  allender
8130 - * put return values on needed functions
8131 - *
8132 - * Revision 1.5  1995/08/14  09:26:28  allender
8133 - * added byteswap header files
8134 - *
8135 - * Revision 1.4  1995/08/01  13:57:42  allender
8136 - * macified player file stuff -- players stored in seperate folder
8137 - *
8138 - * Revision 1.3  1995/06/08  12:54:37  allender
8139 - * new function for calculating a segment based checksum since the old way
8140 - * is byte order dependent
8141 - *
8142 - * Revision 1.2  1995/06/02  07:42:10  allender
8143 - * removed duplicate extern for network_endlevel_poll2
8144 - *
8145 - * Revision 1.1  1995/05/16  15:25:56  allender
8146 - * Initial revision
8147 - *
8148 - * Revision 2.10  1995/12/19  15:48:25  john
8149 - * Made screen reset when loading new level.
8150 - *
8151 - * Revision 2.9  1995/07/07  16:47:52  john
8152 - * Fixed bug with reactor time..
8153 - *
8154 - * Revision 2.8  1995/06/15  12:14:18  john
8155 - * Made end game, win game and title sequences all go
8156 - * on after 5 minutes automatically.
8157 - *
8158 - * Revision 2.7  1995/05/26  16:16:25  john
8159 - * Split SATURN into define's for requiring cd, using cd, etc.
8160 - * Also started adding all the Rockwell stuff.
8161 - *
8162 - * Revision 2.6  1995/03/24  13:11:20  john
8163 - * Added save game during briefing screens.
8164 - *
8165 - * Revision 2.5  1995/03/23  17:56:20  allender
8166 - * added code to record old laser level and weapons when player gets
8167 - * new ship
8168 - *
8169 - * Revision 2.4  1995/03/21  08:39:14  john
8170 - * Ifdef'd out the NETWORK code.
8171 - *
8172 - * Revision 2.3  1995/03/15  14:33:33  john
8173 - * Added code to force the Descent CD-rom in the drive.
8174 - *
8175 - * Revision 2.2  1995/03/06  16:47:26  mike
8176 - * destination saturn
8177 - *
8178 - * Revision 2.1  1995/03/06  15:23:23  john
8179 - * New screen techniques.
8180 - *
8181 - * Revision 2.0  1995/02/27  11:28:53  john
8182 - * New version 2.0, which has no anonymous unions, builds with
8183 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
8184 - *
8185 - * Revision 1.310  1995/02/14  10:48:09  mike
8186 - * zero bonus if you are a cheater.
8187 - *
8188 - * Revision 1.309  1995/02/11  19:17:08  rob
8189 - * Fixed bug in laser fire rate after demo playback.
8190 - *
8191 - * Revision 1.308  1995/02/11  14:34:08  rob
8192 - * Added include of netmisc.c
8193 - *
8194 - * Revision 1.307  1995/02/11  14:29:04  rob
8195 - * Fixes for invul. controlcen.
8196 - *
8197 - * Revision 1.306  1995/02/11  13:47:00  mike
8198 - * fix cheats.
8199 - *
8200 - * Revision 1.305  1995/02/11  13:10:52  rob
8201 - * Fixed end of anarchy mission problems.
8202 - *
8203 - * Revision 1.304  1995/02/11  12:46:12  mike
8204 - * initialize Robot_firing_enabled, part of AHIMSA cheat.
8205 - *
8206 - * Revision 1.303  1995/02/11  12:42:03  john
8207 - * Added new song method, with FM bank switching..
8208 - *
8209 - * Revision 1.302  1995/02/10  17:39:29  matt
8210 - * Changed secret exit message to be centered
8211 - *
8212 - * Revision 1.301  1995/02/10  16:17:33  mike
8213 - * init Last_level_path_shown.
8214 - *
8215 - * Revision 1.300  1995/02/09  22:18:22  john
8216 - * Took out between level saves.
8217 - *
8218 - * Revision 1.299  1995/02/09  12:11:42  rob
8219 - * Get rid of high scores thing for multiplayer games.
8220 - *
8221 - * Revision 1.298  1995/02/08  20:34:24  rob
8222 - * Took briefing screens back OUT of coop games (per Interplay request)
8223 - *
8224 - * Revision 1.297  1995/02/08  19:20:09  rob
8225 - * Moved checksum calc.
8226 - *
8227 - * Revision 1.296  1995/02/05  14:39:24  rob
8228 - * Changed object mapping to be more efficient.
8229 - *
8230 - * Revision 1.295  1995/02/02  19:05:38  john
8231 - * Made end level menu for 27 not overwrite descent title..
8232 - *
8233 - * Revision 1.294  1995/02/02  16:36:42  adam
8234 - * *** empty log message ***
8235 - *
8236 - * Revision 1.293  1995/02/02  15:58:02  john
8237 - * Added turbo mode cheat.
8238 - *
8239 - * Revision 1.292  1995/02/02  15:29:34  matt
8240 - * Changed & localized secret level text
8241 - *
8242 - * Revision 1.291  1995/02/02  10:50:03  adam
8243 - * messed with secret level message
8244 - *
8245 - * Revision 1.290  1995/02/02  01:20:28  adam
8246 - * changed endgame song temporarily.
8247 - *
8248 - * Revision 1.289  1995/02/01  23:19:43  rob
8249 - * Fixed up endlevel stuff for multiplayer.
8250 - * Put in palette fades around areas that didn't have them before.
8251 - *
8252 - * Revision 1.288  1995/02/01  17:12:34  mike
8253 - * Make score come after endgame screens.
8254 - *
8255 - * Revision 1.287  1995/01/30  18:34:30  rob
8256 - * Put briefing screens back into coop games.
8257 - *
8258 - * Revision 1.286  1995/01/27  13:07:59  rob
8259 - * Removed erroneous warning message.
8260 - *
8261 - * Revision 1.285  1995/01/27  11:47:43  rob
8262 - * Removed new secret level menu from multiplayer games.
8263 - *
8264 - * Revision 1.284  1995/01/26  22:11:11  mike
8265 - * Purple chromo-blaster (ie, fusion cannon) spruce up (chromification)
8266 - *
8267 - * Revision 1.283  1995/01/26  16:55:13  rob
8268 - * Removed ship bonus from cooperative endgame.
8269 - *
8270 - * Revision 1.282  1995/01/26  16:45:24  mike
8271 - * Add autofire fusion cannon stuff.
8272 - *
8273 - * Revision 1.281  1995/01/26  14:44:44  rob
8274 - * Removed unnecessary #ifdefs around mprintfs.
8275 - * Changed NumNetPlayerPositions to be independant of MaxNumNetPlayers to
8276 - * accomodate 4-player robo-archy games with 8 start positions.
8277 - *
8278 - * Revision 1.280  1995/01/26  12:19:01  rob
8279 - * Changed network_do_frame call.
8280 - *
8281 - * Revision 1.279  1995/01/26  00:35:03  matt
8282 - * Changed numbering convention for HMP files for levels
8283 - *
8284 - * Revision 1.278  1995/01/25  16:07:59  matt
8285 - * Added message (prototype) when going to secret level
8286 - *
8287 - * Revision 1.277  1995/01/22  18:57:23  matt
8288 - * Made player highest level work with missions
8289 - *
8290 - * Revision 1.276  1995/01/21  23:13:08  matt
8291 - * Made high scores with (not work, really) with loaded missions
8292 - * Don't give player high score when quit game
8293 - *
8294 - * Revision 1.275  1995/01/21  17:17:39  john
8295 - * *** empty log message ***
8296 - *
8297 - * Revision 1.274  1995/01/21  17:15:38  john
8298 - * Added include for state.h
8299 - *
8300 - * Revision 1.273  1995/01/21  16:21:14  matt
8301 - * Fixed bugs in secret level sequencing
8302 - *
8303 - * Revision 1.272  1995/01/20  22:47:29  matt
8304 - * Mission system implemented, though imcompletely
8305 - *
8306 - * Revision 1.271  1995/01/19  17:00:48  john
8307 - * Made save game work between levels.
8308 - *
8309 - * Revision 1.270  1995/01/17  17:49:10  rob
8310 - * Added key syncing for coop.
8311 - *
8312 - * Revision 1.269  1995/01/17  14:27:37  john
8313 - * y
8314 - *
8315 - * Revision 1.268  1995/01/17  13:36:33  john
8316 - * Moved pig loading into StartNewLevelSub.
8317 - *
8318 - * Revision 1.267  1995/01/16  16:53:55  john
8319 - * Added code to save cheat state during save game.
8320 - *
8321 - * Revision 1.266  1995/01/15  19:42:10  matt
8322 - * Ripped out hostage faces for registered version
8323 - *
8324 - * Revision 1.265  1995/01/15  16:55:06  john
8325 - * Improved mine texture parsing.
8326 - *
8327 - * Revision 1.264  1995/01/15  11:56:24  john
8328 - * Working version of paging.
8329 - *
8330 - * Revision 1.263  1995/01/14  19:16:40  john
8331 - * First version of new bitmap paging code.
8332 - *
8333 - * Revision 1.262  1995/01/13  17:38:58  yuan
8334 - * Removed Int3() for number players check.
8335 - *
8336 - * Revision 1.261  1995/01/12  12:09:52  yuan
8337 - * Added coop object capability.
8338 - *
8339 - * Revision 1.260  1995/01/05  17:16:08  yuan
8340 - * Removed Int3s.
8341 - *
8342 - * Revision 1.259  1995/01/05  11:34:29  john
8343 - * Took out endlevel save stuff for registered.
8344 - *
8345 - * Revision 1.258  1995/01/04  19:00:16  rob
8346 - * Added some debugging for two bugs.
8347 - *
8348 - * Revision 1.257  1995/01/04  13:18:18  john
8349 - * Added cool 6 game save.
8350 - *
8351 - * Revision 1.256  1995/01/04  08:46:18  rob
8352 - * JOHN CHECKED IN FOR ROB !!!
8353 - *
8354 - * Revision 1.255  1995/01/02  20:07:35  rob
8355 - * Added score syncing.
8356 - * Get rid of endlevel score for coop games (put it back in elsewhere)
8357 - *
8358 - * Revision 1.254  1995/01/02  16:17:43  mike
8359 - * init super boss.
8360 - *
8361 - * Revision 1.253  1994/12/21  21:08:47  rob
8362 - * fixed a bug in coop player ship positions.
8363 - *
8364 - * Revision 1.252  1994/12/21  12:57:08  rob
8365 - * Handle additional player ships in mines.
8366
8367 ------------------------------------------------------------------------
8368 main/gameseq.h:
8369
8370 - * Revision 1.4  1995/10/31  10:22:55  allender
8371 - * shareware stuff
8372 - *
8373 - * Revision 1.3  1995/09/14  14:13:14  allender
8374 - * initplayerobject have void return
8375 - *
8376 - * Revision 1.2  1995/08/24  15:36:17  allender
8377 - * fixed prototypes warnings
8378 - *
8379 - * Revision 1.1  1995/05/16  15:57:26  allender
8380 - * Initial revision
8381 - *
8382 - * Revision 2.0  1995/02/27  11:32:03  john
8383 - * New version 2.0, which has no anonymous unions, builds with
8384 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
8385 - *
8386 - * Revision 1.41  1995/02/07  10:51:54  rob
8387 - * fix typo.
8388 - *
8389 - * Revision 1.40  1995/02/06  20:10:16  rob
8390 - * Extern'ed DoEndLevelScoreGlitz.
8391 - *
8392 - * Revision 1.39  1995/02/01  16:34:13  john
8393 - * Linted.
8394 - *
8395 - * Revision 1.38  1995/01/27  11:15:03  rob
8396 - * Added extern for player position vars.
8397 - *
8398 - * Revision 1.37  1995/01/20  22:47:38  matt
8399 - * Mission system implemented, though imcompletely
8400 - *
8401 - * Revision 1.36  1995/01/17  13:36:08  john
8402 - * Moved pig loading into StartNewLevelSub.
8403 - *
8404 - * Revision 1.35  1995/01/04  12:21:28  john
8405 - * *** empty log message ***
8406 - *
8407 - * Revision 1.34  1995/01/04  12:20:47  john
8408 - * Declearations to work better with game state save.
8409 - *
8410 - *
8411 - * Revision 1.33  1994/12/08  09:46:35  matt
8412 - * Made level name len a multiple of 4 for alignment
8413 - *
8414 - * Revision 1.32  1994/11/29  16:33:29  rob
8415 - * Added new defines for last_secret_level based on shareware or not shareware.
8416 - *
8417 - * Revision 1.31  1994/11/26  15:30:20  matt
8418 - * Allow escape out of change pilot menu
8419 - *
8420 - * Revision 1.30  1994/11/21  17:29:38  matt
8421 - * Cleaned up sequencing & game saving for secret levels
8422 - *
8423 - * Revision 1.29  1994/11/21  15:55:03  matt
8424 - * Corrected LAST_LEVEL
8425 - *
8426 - * Revision 1.28  1994/11/20  22:12:43  mike
8427 - * set LAST_LEVEL based on SHAREWARE.
8428 - *
8429 - * Revision 1.27  1994/11/09  10:55:51  matt
8430 - * Cleaned up initialization for editor -> game transitions
8431 - *
8432 - * Revision 1.26  1994/11/08  17:50:48  rob
8433 - * ADded prototype for StartNewLEvel.
8434 - *
8435 - *
8436 - * Revision 1.25  1994/11/07  17:50:57  rob
8437 - * Added extern prototype for init_player_stats_level called for
8438 - * network games.
8439 - *
8440 - * Revision 1.24  1994/10/25  15:40:03  yuan
8441 - * *** empty log message ***
8442 - *
8443 - * Revision 1.23  1994/10/22  00:08:52  matt
8444 - * Fixed up problems with bonus & game sequencing
8445 - * Player doesn't get credit for hostages unless he gets them out alive
8446 - *
8447 - * Revision 1.22  1994/10/18  18:57:08  matt
8448 - * Added main menu option to enter new player name
8449 - *
8450 - * Revision 1.21  1994/10/07  23:37:32  matt
8451 - * Added prototype
8452 - *
8453 - * Revision 1.20  1994/10/07  16:02:53  matt
8454 - * Loading saved game no longer clears players weapons & other stats
8455 - *
8456 - * Revision 1.19  1994/10/06  14:12:46  matt
8457 - * Added flash effect when player appears
8458 - *
8459 - * Revision 1.18  1994/10/03  13:34:44  matt
8460 - * Added new (and hopefully better) game sequencing functions
8461 - *
8462 - * Revision 1.17  1994/09/30  15:19:53  matt
8463 - * Added new game sequencing functions, but left them disabled for now.
8464 - *
8465 - * Revision 1.16  1994/09/28  17:24:34  matt
8466 - * Added first draft of game save/load system
8467 - *
8468 - * Revision 1.15  1994/09/27  12:29:42  matt
8469 - * Changed level naming
8470 - *
8471 - * Revision 1.14  1994/09/02  11:53:55  mike
8472 - * Rename init_player_stats to init_player_stats_game.
8473 - *
8474 - * Revision 1.13  1994/08/31  20:57:34  matt
8475 - * Cleaned up endlevel/death code
8476 - *
8477 - * Revision 1.12  1994/08/23  18:45:06  yuan
8478 - * Added level 10 capability.. (LEDGES)
8479 - *
8480 - * Revision 1.11  1994/08/18  10:47:38  john
8481 - * Cleaned up game sequencing and player death stuff
8482 - * in preparation for making the player explode into
8483 - * pieces when dead.
8484 - *
8485 - * Revision 1.10  1994/08/15  15:24:45  john
8486 - * Made players know who killed them; Disabled cheat menu
8487 - * during net player; fixed bug with not being able to turn
8488 - * of invulnerability; Made going into edit/starting new leve
8489 - * l drop you out of a net game; made death dialog box.
8490 - *
8491 - * Revision 1.9  1994/08/13  12:20:56  john
8492 - * Made the networking uise the Players array.
8493 - *
8494 - * Revision 1.8  1994/07/22  12:36:24  matt
8495 - * Cleaned up editor/game interactions some more.
8496 - *
8497 - * Revision 1.7  1994/07/19  20:15:33  matt
8498 - * Name for each level now saved in the .SAV file & stored in Current_level_name
8499 - *
8500 - * Revision 1.6  1994/07/02  13:49:33  matt
8501 - * Cleaned up includes
8502 - *
8503 - * Revision 1.5  1994/07/02  13:09:52  matt
8504 - * Moved player stats struct from gameseq.h to player.h
8505 - *
8506 - * Revision 1.4  1994/07/01  16:35:35  yuan
8507 - * Added key system
8508 - *
8509 - * Revision 1.3  1994/06/26  14:07:35  matt
8510 - * Added prototypes
8511 - *
8512 - * Revision 1.2  1994/06/24  17:03:56  john
8513 - * Added VFX support. Also took all game sequencing stuff like
8514 - * EndGame out and put it into gameseq.c
8515 - *
8516 - * Revision 1.1  1994/06/24  14:13:53  john
8517 - * Initial revision
8518
8519 ------------------------------------------------------------------------
8520 main/gauges.c:
8521
8522 - * Revision 1.15  1995/10/31  10:22:37  allender
8523 - * shareware stuff
8524 - *
8525 - * Revision 1.14  1995/10/26  14:11:05  allender
8526 - * do copy of weapon boxes in cockpit correctly
8527 - *
8528 - * Revision 1.13  1995/10/21  22:54:56  allender
8529 - * fixed up player names on hud
8530 - *
8531 - * Revision 1.12  1995/10/12  17:39:27  allender
8532 - * fixed status bar lives display
8533 - *
8534 - * Revision 1.11  1995/09/22  15:21:46  allender
8535 - * fixed hud problems (reticle and kill lists) for
8536 - * non pixel doubled mode
8537 - *
8538 - * Revision 1.10  1995/09/13  11:38:47  allender
8539 - * show KB left in heap instead of piggy cache
8540 - *
8541 - * Revision 1.9  1995/09/04  15:52:28  allender
8542 - * fix vulcan ammo count to update without overwritting itself
8543 - *
8544 - * Revision 1.8  1995/08/31  14:11:20  allender
8545 - * worked on hud kill list for non pixel doubled mode
8546 - *
8547 - * Revision 1.7  1995/08/24  16:05:05  allender
8548 - * more gauge placement -- still not done!
8549 - *
8550 - * Revision 1.6  1995/08/18  15:44:56  allender
8551 - * put in PC gauges for keys, lives, and reticle when pixel doubling
8552 - *
8553 - * Revision 1.5  1995/08/18  10:24:47  allender
8554 - * added proper support for cockpit mode -- still needs
8555 - *
8556 - * Revision 1.4  1995/07/26  16:56:34  allender
8557 - * more gauge stuff for status bar.  still problem
8558 - * with ship
8559 - *
8560 - * Revision 1.3  1995/07/17  08:55:57  allender
8561 - * fix up for large status bar.  Still needs some work though
8562 - *
8563 - * Revision 1.2  1995/06/20  09:54:29  allender
8564 - * stopgap measure to get status bar "working" until real mac
8565 - * status bar gets added
8566 - *
8567 - * Revision 1.1  1995/05/16  15:26:05  allender
8568 - * Initial revision
8569 - *
8570 - * Revision 2.7  1995/12/19  16:18:33  john
8571 - * Made weapon info align with canvas width, not 315.
8572 - *
8573 - * Revision 2.6  1995/03/21  14:39:25  john
8574 - * Ifdef'd out the NETWORK code.
8575 - *
8576 - * Revision 2.5  1995/03/14  12:31:25  john
8577 - * Prevent negative shields from printing.
8578 - *
8579 - * Revision 2.4  1995/03/10  12:57:58  allender
8580 - * move rear view text up four pixels up when playing back demo
8581 - *
8582 - * Revision 2.3  1995/03/09  11:47:51  john
8583 - * Added HUD for VR helmets.
8584 - *
8585 - * Revision 2.2  1995/03/06  15:23:26  john
8586 - * New screen techniques.
8587 - *
8588 - * Revision 2.1  1995/02/27  13:13:45  john
8589 - * Removed floating point.
8590 - *
8591 - * Revision 2.0  1995/02/27  11:29:06  john
8592 - * New version 2.0, which has no anonymous unions, builds with
8593 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
8594 - *
8595 - * Revision 1.203  1995/02/11  01:56:45  mike
8596 - * move up weapons text on fullscreen hud, missiles was offscreen.
8597 - *
8598 - * Revision 1.202  1995/02/09  13:23:34  rob
8599 - * Added reticle names in demo playback.
8600 - *
8601 - * Revision 1.201  1995/02/08  19:20:46  rob
8602 - * Show cloaked teammates on H
8603 - * UD.  Get rid of show ID's in anarchy option.
8604 - *
8605 - * Revision 1.200  1995/02/07  21:09:00  mike
8606 - * add flashing to invulnerability and cloak on fullscreen.
8607 - *
8608 - * Revision 1.199  1995/02/02  21:55:57  matt
8609 - * Added new colored key icons for fullscreen
8610 - *
8611 - * Revision 1.198  1995/01/30  17:17:07  rob
8612 - * Fixed teammate names on hud.
8613 - *
8614 - * Revision 1.197  1995/01/28  17:40:49  mike
8615 - * fix gauge fontcolor.
8616 - *
8617 - * Revision 1.196  1995/01/27  17:03:14  mike
8618 - * fix placement of weapon info in multiplayer fullscreen, as per AP request.
8619 - *
8620 - * Revision 1.195  1995/01/27  11:51:23  rob
8621 - * Put deaths tally into cooperative mode
8622 - *
8623 - * Revision 1.194  1995/01/27  11:43:24  adam
8624 - * fiddled with key display
8625 - *
8626 - * Revision 1.193  1995/01/25  23:38:35  mike
8627 - * fix keys on fullscreen.
8628 - *
8629 - * Revision 1.192  1995/01/24  22:03:28  mike
8630 - * Lotsa hud stuff, put a lot of messages up.
8631 - *
8632 - * Revision 1.191  1995/01/23  16:47:21  rob
8633 - * Fixed problem with playing extra life noise in coop.
8634 - *
8635 - * Revision 1.190  1995/01/22  16:00:46  mike
8636 - * remove unneeded string.
8637 - *
8638 - * Revision 1.189  1995/01/22  15:58:22  mike
8639 - * localization
8640 - *
8641 - * Revision 1.188  1995/01/20  17:19:45  rob
8642 - * Fixing colors of hud kill list players.
8643 - *
8644 - * Revision 1.187  1995/01/20  09:19:18  allender
8645 - * record player flags when in CM_FULL_SCREEN
8646 - *
8647 - * Revision 1.186  1995/01/19  16:29:09  allender
8648 - * made demo recording of weapon change be in this file for shareware only
8649 - *
8650 - * Revision 1.185  1995/01/19  15:00:33  allender
8651 - * code to record shield, energy, and ammo in fullscreen
8652 - *
8653 - * Revision 1.184  1995/01/19  13:43:13  matt
8654 - * Fixed "cheater" message on HUD
8655 - *
8656 - * Revision 1.183  1995/01/18  16:11:58  mike
8657 - * Don't show added scores of 0.
8658 - *
8659 - * Revision 1.182  1995/01/17  17:42:39  allender
8660 - * do ammo counts in demo recording
8661 - *
8662 - * Revision 1.181  1995/01/16  17:26:25  rob
8663 - * Fixed problem with coloration of team kill list.
8664 - *
8665 - * Revision 1.180  1995/01/16  17:22:39  john
8666 - * Made so that KB and framerate don't collide.
8667 - *
8668 - * Revision 1.179  1995/01/16  14:58:31  matt
8669 - * Changed score_added display to print "Cheater!" when cheats enabled
8670 - *
8671 - * Revision 1.178  1995/01/15  19:42:07  matt
8672 - * Ripped out hostage faces for registered version
8673 - *
8674 - * Revision 1.177  1995/01/15  19:25:07  mike
8675 - * show vulcan ammo and secondary ammo in fullscreen view.
8676 - *
8677 - * Revision 1.176  1995/01/15  13:16:12  john
8678 - * Made so that paging always happens, lowmem just loads less.
8679 - * Also, make KB load print to hud.
8680 - *
8681 - * Revision 1.175  1995/01/14  19:17:32  john
8682 - * First version of piggy paging.
8683 - *
8684 - * Revision 1.174  1995/01/05  21:25:23  rob
8685 - * Re-did some changes lost due to RCS weirdness.
8686 - *
8687 - * Revision 1.173  1995/01/05  12:22:34  rob
8688 - * Don't show player names for cloaked players.
8689 - *
8690 - * Revision 1.172  1995/01/04  17:14:50  allender
8691 - * make init_gauges work properly on demo playback
8692 - *
8693 - * Revision 1.171  1995/01/04  15:04:42  allender
8694 - * new demo calls for registered version
8695 - *
8696 - * Revision 1.167  1995/01/03  13:03:57  allender
8697 - * pass score points instead of total points.   Added ifdef for
8698 - * multi_send_score
8699 - *
8700 - * Revision 1.166  1995/01/03  11:45:02  allender
8701 - * add hook to record player score
8702 - *
8703 - * Revision 1.165  1995/01/03  11:25:19  allender
8704 - * remove newdemo stuff around score display
8705 - *
8706 - * Revision 1.163  1995/01/02  21:03:53  rob
8707 - * Fixing up the hud-score-list for coop games.
8708 - *
8709 - * Revision 1.162  1994/12/31  20:54:40  rob
8710 - * Added coop mode HUD score list.
8711 - * Added more generic system for player names on HUD.
8712 - *
8713 - * Revision 1.161  1994/12/30  20:13:01  rob
8714 - * Ifdef reticle names on shareware.
8715 - * Added robot reticle naming.
8716 - *
8717 - * Revision 1.160  1994/12/29  17:53:51  mike
8718 - * move up energy/shield in fullscreen to get out of way of kill list.
8719 - *
8720 - * Revision 1.159  1994/12/29  16:44:05  mike
8721 - * add energy and shield showing.
8722 - *
8723 - * Revision 1.158  1994/12/28  16:34:29  mike
8724 - * make warning beep go away on Player_is_dead.
8725 - *
8726 - * Revision 1.157  1994/12/28  10:00:43  allender
8727 - * change in init_gauges to for multiplayer demo playbacks
8728 - *
8729 - * Revision 1.156  1994/12/27  11:06:46  allender
8730 - * removed some previous code to for demo playback stuff
8731 - *
8732 - * Revision 1.155  1994/12/23  14:23:06  john
8733 - * Added floating reticle for VR helments.
8734 - *
8735 - * Revision 1.154  1994/12/21  12:56:41  allender
8736 - * on multiplayer demo playback, show kills and deaths
8737 - *
8738 - * Revision 1.153  1994/12/19  20:28:42  rob
8739 - * Get rid of kill list in coop games.
8740 - *
8741 - * Revision 1.152  1994/12/14  18:06:44  matt
8742 - * Removed compile warnings
8743 - *
8744 - * Revision 1.151  1994/12/14  15:21:28  rob
8745 - * Made gauges align in status_bar net game.
8746 - *
8747 - * Revision 1.150  1994/12/12  17:20:33  matt
8748 - * Don't get bonus points when cheating
8749 - *
8750 - * Revision 1.149  1994/12/12  16:47:00  matt
8751 - * When cheating, get no score.  Change level cheat to prompt for and
8752 - * jump to new level.
8753 - *
8754 - * Revision 1.148  1994/12/12  12:05:45  rob
8755 - * Grey out players who are disconnected.
8756 - *
8757 - * Revision 1.147  1994/12/09  16:19:48  yuan
8758 - * kill matrix stuff.
8759 - *
8760 - * Revision 1.146  1994/12/09  16:12:34  rob
8761 - * Fixed up the status bar kills gauges for net play.
8762 - *
8763 - * Revision 1.145  1994/12/09  01:55:34  rob
8764 - * Added kills list to HUD/status bar.
8765 - * Added something for Mark.
8766 - *
8767 - * Revision 1.144  1994/12/08  21:03:30  allender
8768 - * pass old player flags to record_player_flags
8769 - *
8770 - * Revision 1.143  1994/12/07  22:49:33  mike
8771 - * no homing missile warning during endlevel sequence.
8772 - *
8773 - * Revision 1.142  1994/12/06  13:55:31  matt
8774 - * Use new rounding func, f2ir()
8775 - *
8776 - * Revision 1.141  1994/12/03  19:03:37  matt
8777 - * Fixed vulcan ammo HUD message
8778 - *
8779 - * Revision 1.140  1994/12/03  18:43:18  matt
8780 - * Fixed (hopefully) claok gauge
8781 - *
8782 - * Revision 1.139  1994/12/03  14:26:21  yuan
8783 - * Fixed dumb bug
8784 - *
8785 - * Revision 1.138  1994/12/03  14:17:30  yuan
8786 - * Localization 320
8787
8788 ------------------------------------------------------------------------
8789 main/gauges.h:
8790
8791 - * Revision 1.3  1995/08/23  21:37:13  allender
8792 - * fix mcc compiler warmings
8793 - *
8794 - * Revision 1.2  1995/08/18  15:45:24  allender
8795 - * upped max gauges
8796 - *
8797 - * Revision 1.1  1995/05/16  15:57:34  allender
8798 - * Initial revision
8799 - *
8800 - * Revision 2.0  1995/02/27  11:28:45  john
8801 - * New version 2.0, which has no anonymous unions, builds with
8802 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
8803 - *
8804 - * Revision 1.27  1994/12/14  18:06:39  matt
8805 - * Added prototype
8806 - *
8807 - * Revision 1.26  1994/12/09  16:19:52  yuan
8808 - * kill matrix stuff.
8809 - *
8810 - * Revision 1.25  1994/10/25  11:07:34  mike
8811 - * Prototype play_homing_warning.
8812 - *
8813 - * Revision 1.24  1994/10/24  16:34:39  mike
8814 - * Increase MAX_GAUGE_BMS from 56 to 80...
8815 - *
8816 - * Revision 1.23  1994/10/21  20:43:47  mike
8817 - * Prototype add_bonus_points_to_score.
8818 - *
8819 - * Revision 1.22  1994/10/14  15:56:33  mike
8820 - * Prototype update_laser_weapon_info.
8821 - *
8822 - * Revision 1.21  1994/10/13  15:17:26  mike
8823 - * Remove afterburner references.
8824 - *
8825 - * Revision 1.20  1994/10/05  17:09:46  matt
8826 - * Added functional reticle
8827 - *
8828 - * Revision 1.19  1994/10/04  21:41:29  matt
8829 - * Added cloaked player gauge effect, and different ship bitmap for each player
8830 - *
8831 - * Revision 1.18  1994/09/26  13:29:40  matt
8832 - * Added extra life each 100,000 points, and show icons on HUD for num lives
8833 - *
8834 - * Revision 1.17  1994/09/20  11:56:08  matt
8835 - * Added prototype
8836 - *
8837 - * Revision 1.16  1994/09/20  00:11:03  matt
8838 - * Finished gauges for Status Bar, including hostage video display.
8839 - *
8840 - * Revision 1.15  1994/09/17  23:57:18  matt
8841 - * Got some, but not all, off the status bar gauges working
8842 - *
8843 - * Revision 1.14  1994/09/16  13:08:46  mike
8844 - * Prototype say_afterburner_status.
8845 - *
8846 - * Revision 1.13  1994/09/14  16:27:03  mike
8847 - * Prototype player_dead_message();
8848 - *
8849 - *
8850 - * Revision 1.12  1994/07/20  17:34:43  yuan
8851 - * Some minor bug fixes and new key gauges...
8852 - *
8853 - * Revision 1.11  1994/07/14  14:46:02  yuan
8854 - * Added score effect.
8855 - *
8856 - * Revision 1.10  1994/07/12  16:22:00  yuan
8857 - * Increased number of maximum gauges.
8858 - *
8859 - * Revision 1.9  1994/07/11  20:10:36  yuan
8860 - * Numerical gauges.
8861 - *
8862 - * Revision 1.8  1994/07/10  18:01:28  yuan
8863 - * Added new gauges.
8864 - *
8865 - * Revision 1.7  1994/06/21  15:08:22  john
8866 - * Made demo record HUD message and cleaned up the HUD code.
8867 - *
8868 - * Revision 1.6  1994/06/21  12:40:46  yuan
8869 - * Fixing HUD message.
8870 - *
8871 - * Revision 1.5  1994/06/21  12:11:56  yuan
8872 - * Fixed up menus and added HUDisplay messages.
8873 - *
8874 - * Revision 1.4  1994/04/28  21:34:24  mike
8875 - * prototype check_erase_gauge
8876 - *
8877 - * Revision 1.3  1994/04/06  14:42:46  yuan
8878 - * Adding new powerups.
8879 - *
8880 - * Revision 1.2  1993/12/05  22:48:58  matt
8881 - * Reworked include files in an attempt to cut down on build times
8882 - *
8883 - * Revision 1.1  1993/12/05  21:07:55  matt
8884 - * Initial revision
8885
8886 ------------------------------------------------------------------------
8887 main/hostage.c:
8888
8889 - * Revision 1.1  1995/05/16  15:26:24  allender
8890 - * Initial revision
8891 - *
8892 - * Revision 2.0  1995/02/27  11:28:36  john
8893 - * New version 2.0, which has no anonymous unions, builds with
8894 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
8895 - *
8896 - * Revision 1.65  1995/02/22  13:45:54  allender
8897 - * remove anonymous unions from object structure
8898 - *
8899 - * Revision 1.64  1995/02/13  20:34:57  john
8900 - * Lintized
8901 - *
8902 - * Revision 1.63  1995/01/15  19:41:48  matt
8903 - * Ripped out hostage faces for registered version
8904 - *
8905 - * Revision 1.62  1995/01/14  19:16:53  john
8906 - * First version of new bitmap paging code.
8907 - *
8908 - * Revision 1.61  1994/12/19  16:35:09  john
8909 - * Made hoastage playback end when ship dies.
8910 - *
8911 - * Revision 1.60  1994/12/06  16:30:41  yuan
8912 - * Localization
8913 - *
8914 - * Revision 1.59  1994/11/30  17:32:46  matt
8915 - * Put hostage_face_clip array back in so editor would work
8916 - *
8917 - * Revision 1.58  1994/11/30  17:22:13  matt
8918 - * Ripped out hostage faces in shareware version
8919 - *
8920 - * Revision 1.57  1994/11/30  16:11:25  matt
8921 - * Use correct constant for hostage voice
8922 - *
8923 - * Revision 1.56  1994/11/27  23:15:19  matt
8924 - * Made changes for new mprintf calling convention
8925 - *
8926 - * Revision 1.55  1994/11/19  19:53:44  matt
8927 - * Added code to full support different hostage head clip & message for
8928 - * each hostage.
8929 - *
8930 - * Revision 1.54  1994/11/19  16:35:15  matt
8931 - * Got rid of unused code, & made an array smaller
8932 - *
8933 - * Revision 1.53  1994/11/14  12:42:03  matt
8934 - * Increased palette flash when hostage rescued
8935 - *
8936 - * Revision 1.52  1994/10/28  14:43:09  john
8937 - * Added sound volumes to all sound calls.
8938 - *
8939 - * Revision 1.51  1994/10/23  02:10:57  matt
8940 - * Got rid of obsolete hostage_info stuff
8941 - *
8942 - * Revision 1.50  1994/10/22  00:08:44  matt
8943 - * Fixed up problems with bonus & game sequencing
8944 - * Player doesn't get credit for hostages unless he gets them out alive
8945 - *
8946 - * Revision 1.49  1994/10/20  22:52:49  matt
8947 - * Fixed compiler warnings
8948 - *
8949 - * Revision 1.48  1994/10/20  21:25:44  matt
8950 - * Took out silly scale down/scale up code for hostage anim
8951 - *
8952 - * Revision 1.47  1994/10/20  12:47:28  matt
8953 - * Replace old save files (MIN/SAV/HOT) with new LVL files
8954 - *
8955 - * Revision 1.46  1994/10/04  15:33:33  john
8956 - * Took out the old PLAY_SOUND??? code and replaced it
8957 - * with direct calls into digi_link_??? so that all sounds
8958 - * can be made 3d.
8959 - *
8960 - * Revision 1.45  1994/09/28  23:10:46  matt
8961 - * Made hostage rescue do palette flash
8962 - *
8963 - * Revision 1.44  1994/09/20  00:11:00  matt
8964 - * Finished gauges for Status Bar, including hostage video display.
8965 - *
8966 - * Revision 1.43  1994/09/15  21:24:19  matt
8967 - * Changed system to keep track of whether & what cockpit is up
8968 - * Made hostage clip not queue when no cockpit
8969 - *
8970 - *
8971 - * Revision 1.42  1994/08/25  13:45:19  matt
8972 - * Made hostage vclips queue
8973 - *
8974 - * Revision 1.41  1994/08/14  23:15:06  matt
8975 - * Added animating bitmap hostages, and cleaned up vclips a bit
8976 - *
8977 - * Revision 1.40  1994/08/12  22:41:11  john
8978 - * Took away Player_stats; add Players array.
8979 - *
8980 - * Revision 1.39  1994/07/14  22:06:35  john
8981 - * Fix radar/hostage vclip conflict.
8982 - *
8983 - * Revision 1.38  1994/07/12  18:40:21  yuan
8984 - * Tweaked location of radar and hostage screen...
8985 - * Still needs work.
8986 - *
8987 - *
8988 - * Revision 1.37  1994/07/07  09:52:17  john
8989 - * Moved hostage screen.
8990 - *
8991 - * Revision 1.36  1994/07/06  15:23:52  john
8992 - * Revamped hostage sound.
8993 - *
8994 - * Revision 1.35  1994/07/06  15:14:54  john
8995 - * Added hostage sound effect picking.
8996 - *
8997 - * Revision 1.34  1994/07/06  13:25:33  john
8998 - * Added compress hostages functions.
8999 - *
9000 - * Revision 1.33  1994/07/06  12:52:59  john
9001 - * Fixed compiler warnings.
9002 - *
9003 - * Revision 1.32  1994/07/06  12:43:50  john
9004 - * Made generic messages for hostages.
9005 - *
9006 - * Revision 1.31  1994/07/06  10:55:07  john
9007 - * New structures for hostages.
9008 - *
9009 - * Revision 1.30  1994/07/05  12:49:09  john
9010 - * Put functionality of New Hostage spec into code.
9011 - *
9012 - * Revision 1.29  1994/07/02  13:08:47  matt
9013 - * Increment stats when hostage rescued
9014 - *
9015 - * Revision 1.28  1994/07/01  18:07:46  john
9016 - * y
9017 - *
9018 - * Revision 1.27  1994/07/01  18:07:03  john
9019 - * *** empty log message ***
9020 - *
9021 - * Revision 1.26  1994/07/01  17:55:26  john
9022 - * First version of not-working hostage system.
9023 - *
9024 - * Revision 1.25  1994/06/27  15:53:21  john
9025 - * #define'd out the newdemo stuff
9026 - *
9027 - *
9028 - * Revision 1.24  1994/06/20  16:08:52  john
9029 - * Added volume control; made doors 3d sounds.
9030 - *
9031 - * Revision 1.23  1994/06/16  10:15:32  yuan
9032 - * Fixed location of face.
9033 - *
9034 - * Revision 1.22  1994/06/15  15:05:33  john
9035 - * *** empty log message ***
9036 - *
9037 - * Revision 1.21  1994/06/14  21:15:20  matt
9038 - * Made rod objects draw lighted or not depending on a parameter, so the
9039 - * materialization effect no longer darkens.
9040 - *
9041 - * Revision 1.20  1994/06/08  18:16:26  john
9042 - * Bunch of new stuff that basically takes constants out of the code
9043 - * and puts them into bitmaps.tbl.
9044 - *
9045 - * Revision 1.19  1994/06/02  19:30:08  matt
9046 - * Moved texture-mapped rod drawing stuff (used for hostage & now for the
9047 - * materialization center) to object.c
9048
9049 ------------------------------------------------------------------------
9050 main/hostage.h:
9051
9052 - * Revision 1.1  1995/05/16  15:57:57  allender
9053 - * Initial revision
9054 - *
9055 - * Revision 2.0  1995/02/27  11:27:50  john
9056 - * New version 2.0, which has no anonymous unions, builds with
9057 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
9058 - *
9059 - * Revision 1.23  1995/01/15  19:42:06  matt
9060 - * Ripped out hostage faces for registered version
9061 - *
9062 - * Revision 1.22  1994/12/19  16:35:07  john
9063 - * Made hoastage playback end when ship dies.
9064 - *
9065 - * Revision 1.21  1994/11/30  17:22:12  matt
9066 - * Ripped out hostage faces in shareware version
9067 - *
9068 - * Revision 1.20  1994/11/19  19:53:43  matt
9069 - * Added code to full support different hostage head clip & message for
9070 - * each hostage.
9071 - *
9072 - * Revision 1.19  1994/11/19  16:35:28  matt
9073 - * Got rid of unused code, & made an array smaller
9074 - *
9075 - * Revision 1.18  1994/10/23  02:10:57  matt
9076 - * Got rid of obsolete hostage_info stuff
9077 - *
9078 - * Revision 1.17  1994/09/20  00:10:37  matt
9079 - * Finished gauges for Status Bar, including hostage video display.
9080 - *
9081 - * Revision 1.16  1994/09/01  10:41:24  matt
9082 - * Sizes for powerups now specified in bitmaps.tbl; blob bitmaps now plot
9083 - * correctly if width & height of bitmap are different.
9084 - *
9085 - * Revision 1.15  1994/08/14  23:15:14  matt
9086 - * Added animating bitmap hostages, and cleaned up vclips a bit
9087 - *
9088 - * Revision 1.14  1994/07/14  22:06:51  john
9089 - * Fix radar/hostage vclip conflict.
9090 - *
9091 - * Revision 1.13  1994/07/14  22:05:41  john
9092 - * Made radar display not conflict with hostage
9093 - * vclip talking.
9094 - *
9095 - * Revision 1.12  1994/07/06  13:41:46  matt
9096 - * Added support for bitmap hostages
9097 - *
9098 - * Revision 1.11  1994/07/06  12:43:36  john
9099 - * Made generic messages for hostages.
9100 - *
9101 - * Revision 1.10  1994/07/06  10:55:09  john
9102 - * New structures for hostages.
9103 - *
9104 - * Revision 1.9  1994/07/05  12:48:47  john
9105 - * Put functionality of New Hostage spec into code.
9106 - *
9107 - * Revision 1.8  1994/07/01  17:55:14  john
9108 - * First version of not-working hostage system.
9109 - *
9110 - * Revision 1.7  1994/06/15  14:57:10  john
9111 - * Added triggers to demo recording.
9112 - *
9113 - * Revision 1.6  1994/06/08  18:15:49  john
9114 - * Bunch of new stuff that basically takes constants out of the code
9115 - * and puts them into bitmaps.tbl.
9116 - *
9117 - * Revision 1.5  1994/05/02  12:43:06  yuan
9118 - * Fixed warnings.
9119 - *
9120 - * Revision 1.4  1994/04/06  14:42:46  yuan
9121 - * Adding new powerups.
9122 - *
9123 - * Revision 1.3  1994/04/01  11:15:14  yuan
9124 - * Added multiple bitmap functionality to all objects...
9125 - * (hostages, powerups, lasers, etc.)
9126 - * Hostages and powerups are implemented in the object system,
9127 - * just need to finish function call to "affect" player.
9128 - *
9129 - * Revision 1.2  1994/03/31  12:04:35  matt
9130 - * Added prototypes for 2 funcs
9131 - *
9132 - * Revision 1.1  1994/03/31  11:39:24  matt
9133 - * Initial revision
9134
9135 ------------------------------------------------------------------------
9136 main/hud.c:
9137
9138 - * Old Log:
9139 - * Revision 1.4  1995/08/24  16:03:09  allender
9140 - * fix up message placement
9141 - *
9142 - * Revision 1.3  1995/08/18  10:25:21  allender
9143 - * added support for pixel doubling using PC game font
9144 - *
9145 - * Revision 1.2  1995/08/12  11:33:22  allender
9146 - * removed #ifdef NEWDEMO -- always in
9147 - *
9148 - * Revision 1.1  1995/05/16  15:26:32  allender
9149 - * Initial revision
9150 - *
9151 - * Revision 2.2  1995/03/30  16:36:40  mike
9152 - * text localization.
9153 - *
9154 - * Revision 2.1  1995/03/06  15:23:50  john
9155 - * New screen techniques.
9156 - *
9157 - * Revision 2.0  1995/02/27  11:30:41  john
9158 - * New version 2.0, which has no anonymous unions, builds with
9159 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
9160 - *
9161 - * Revision 1.27  1995/01/23  16:51:30  mike
9162 - * Show hud messages on 3d if window in three largest sizes.
9163 - *
9164 - * Revision 1.26  1995/01/17  17:42:45  rob
9165 - * Made message timeout for HUD messages longer.
9166 - *
9167 - * Revision 1.25  1995/01/04  11:39:03  rob
9168 - * Made HUD text get out of the way of large HUD messages.
9169 - *
9170 - * Revision 1.24  1995/01/01  14:20:32  rob
9171 - * longer timer for hud messages.
9172 - *
9173 - *
9174 - * Revision 1.23  1994/12/15  13:04:34  mike
9175 - * Replace Players[Player_num].time_total references with GameTime.
9176 - *
9177 - * Revision 1.22  1994/12/13  12:55:12  mike
9178 - * move press any key to continue message when you are dead to bottom of window.
9179 - *
9180 - * Revision 1.21  1994/12/07  17:08:01  rob
9181 - * removed unnecessary debug info.
9182 - *
9183 - * Revision 1.20  1994/12/07  16:24:16  john
9184 - * Took out code that kept track of messages differently for different
9185 - * screen modes... I made it so they just draw differently depending on screen mode.
9186 - *
9187 - * Revision 1.19  1994/12/07  15:42:57  rob
9188 - * Added a bunch of debug stuff to look for HUD message problems in net games...
9189 - *
9190 - * Revision 1.18  1994/12/06  16:30:35  yuan
9191 - * Localization
9192 - *
9193 - * Revision 1.17  1994/12/05  00:32:36  mike
9194 - * fix randomness of color on status bar hud messages.
9195 - *
9196 - * Revision 1.16  1994/11/19  17:05:53  rob
9197 - * Moved dead_player_message down to avoid overwriting HUD messages.
9198 - *
9199 - * Revision 1.15  1994/11/18  23:37:56  john
9200 - * Changed some shorts to ints.
9201 - *
9202 - * Revision 1.14  1994/11/12  16:38:25  mike
9203 - * clear some annoying debug messages.
9204 - *
9205 - * Revision 1.13  1994/11/11  15:36:39  mike
9206 - * write hud messages on background if 3d window small enough
9207 - *
9208 - * Revision 1.12  1994/10/20  09:49:31  mike
9209 - * Reduce number of messages.
9210 - *
9211 - * Revision 1.11  1994/10/17  10:49:15  john
9212 - * Took out some warnings.
9213 - *
9214 - * Revision 1.10  1994/10/17  10:45:13  john
9215 - * Made the player able to abort death by pressing any button or key.
9216 - *
9217 - * Revision 1.9  1994/10/13  15:17:33  mike
9218 - * Remove afterburner references.
9219 - *
9220 - * Revision 1.8  1994/10/11  12:06:32  mike
9221 - * Only show message advertising death sequence abort after player exploded.
9222 - *
9223 - * Revision 1.7  1994/10/10  17:21:53  john
9224 - * Made so instead of saying too many messages, it scrolls off the
9225 - * oldest message.
9226 - *
9227 - * Revision 1.6  1994/10/07  23:05:39  john
9228 - * Fixed bug with HUD not drawing stuff sometimes...
9229 - * ( I had a circular buffer that I was stepping thru
9230 - * to draw text that went: for (i=first;i<last;i++)...
9231 - * duh!! last could be less than first.)
9232 - * /
9233 - *
9234 - * Revision 1.5  1994/09/16  13:08:20  mike
9235 - * Arcade stuff, afterburner stuff.
9236 - *
9237 - * Revision 1.4  1994/09/14  16:26:57  mike
9238 - * player_dead_message.
9239 - *
9240 - * Revision 1.3  1994/08/18  16:35:45  john
9241 - * Made gauges messages stay up a bit longer.
9242 - *
9243 - * Revision 1.2  1994/08/18  12:10:21  john
9244 - * Made HUD messages scroll.
9245 - *
9246 - * Revision 1.1  1994/08/18  11:22:09  john
9247 - * Initial revision
9248
9249 ------------------------------------------------------------------------
9250 main/inferno.c:
9251
9252 - * After main initializes everything, most of the time is spent in the loop
9253 - * while (Function_mode != FMODE_EXIT)
9254 - * In this loop, the main menu is brought up first.
9255 - *
9256 - * main() for Inferno
9257 - *
9258 - * Old Log:
9259 - * Revision 1.1  1995/12/05  15:57:49  allender
9260 - * Initial revision
9261 - *
9262 - * Revision 1.19  1995/11/07  17:03:12  allender
9263 - * added splash screen for descent contest
9264 - *
9265 - * Revision 1.18  1995/10/31  10:22:22  allender
9266 - * shareware stuff
9267 - *
9268 - * Revision 1.17  1995/10/18  01:53:07  allender
9269 - * mouse click to leave do not distribute screen
9270 - *
9271 - * Revision 1.16  1995/10/17  12:00:12  allender
9272 - * mouse click gets past endgame screen
9273 - *
9274 - * Revision 1.15  1995/10/12  17:40:12  allender
9275 - * read config file after digi initialized
9276 - *
9277 - * Revision 1.14  1995/10/05  10:38:22  allender
9278 - * changed key_getch at exit to be key_inkey and moved
9279 - * mouse init until after macintosh windowing init call
9280 - *
9281 - * Revision 1.13  1995/09/18  17:01:04  allender
9282 - * put gr_init call before render buffer stuff
9283 - *
9284 - * Revision 1.12  1995/08/31  15:50:53  allender
9285 - * call init for appletalk, and change name of intro screens
9286 - *
9287 - * Revision 1.11  1995/08/26  16:26:19  allender
9288 - * whole bunch 'o stuff!!
9289 - *
9290 - * Revision 1.10  1995/07/12  21:48:18  allender
9291 - * removed Int3 from beginning of program
9292 - *
9293 - * Revision 1.9  1995/07/05  16:45:48  allender
9294 - * removed hide_cursor call
9295 - *
9296 - * Revision 1.8  1995/06/20  16:44:57  allender
9297 - * game now renders in 640x480 at all times.  Changed code
9298 - * to call game_init_render_buffers with right params
9299 - *
9300 - * Revision 1.7  1995/06/13  13:07:55  allender
9301 - * change macintosh initialzation.  Mac windows now init'ed through gr_init.
9302 - *
9303 - * Revision 1.6  1995/06/08  16:36:53  allender
9304 - * "ifdef" profile include
9305 - *
9306 - * Revision 1.5  1995/06/07  08:08:18  allender
9307 - * dont' make memory info show at end of program
9308 - *
9309 - * Revision 1.4  1995/06/02  07:47:40  allender
9310 - * removed network initialzation for now
9311 - *
9312 - * Revision 1.3  1995/05/26  06:54:52  allender
9313 - * put digi_init after timer and key stuff since I was testing stuff
9314 - * that needed the keyboard handler installed
9315 - *
9316 - * Revision 1.2  1995/05/19  11:28:09  allender
9317 - * removed printf
9318 - *
9319 - * Revision 1.1  1995/05/16  15:26:39  allender
9320 - * Initial revision
9321 - *
9322 - * Revision 2.36  1996/01/05  16:52:16  john
9323 - * Improved 3d stuff.
9324 - *
9325 - * Revision 2.35  1995/10/07  13:20:06  john
9326 - * Added new modes for LCDBIOS, also added support for -JoyNice,
9327 - * and added Shift+F1-F4 to controls various stereoscopic params.
9328 - *
9329 - * Revision 2.34  1995/06/26  11:30:57  john
9330 - * Made registration/copyright screen go away after 5 minutes.
9331 - *
9332 - * Revision 2.33  1995/05/31  14:26:55  unknown
9333 - * Fixed ugly spacing.
9334 - *
9335 - * Revision 2.32  1995/05/26  16:15:28  john
9336 - * Split SATURN into define's for requiring cd, using cd, etc.
9337 - * Also started adding all the Rockwell stuff.
9338 - *
9339 - * Revision 2.31  1995/05/11  13:30:01  john
9340 - * Changed 3dbios detection to work like Didde Kim wanted it to.
9341 - *
9342 - * Revision 2.30  1995/05/08  13:53:50  john
9343 - * Added code to read vipport environemnt variable.
9344 - *
9345 - * Revision 2.29  1995/05/08  11:26:18  john
9346 - * Reversed eyes in 3dmax mode.
9347 - *
9348 - * Revision 2.28  1995/05/08  11:24:06  john
9349 - * Made 3dmax work like Kasan wants it to.
9350 - *
9351 - * Revision 2.27  1995/04/23  16:06:25  john
9352 - * Moved rinvul into modem/null modem menu.
9353 - *
9354 - * Revision 2.26  1995/04/12  13:39:26  john
9355 - * Fixed bug with -lowmem not working.
9356 - *
9357 - * Revision 2.25  1995/04/09  14:43:00  john
9358 - * Made Dynamic sockets not print Msockets for help.
9359 - *
9360 - * Revision 2.24  1995/04/07  16:11:33  john
9361 - * Fixed problem with VFX display when using setup.
9362 - *
9363 - * Revision 2.23  1995/04/06  15:40:51  john
9364 - * Synced VFX with setup #'s.
9365 - *
9366 - * Revision 2.22  1995/04/06  12:12:53  john
9367 - * Fixed some bugs with 3dmax.
9368 - *
9369 - * Revision 2.21  1995/03/30  16:36:51  mike
9370 - * text localization.
9371 - *
9372 - * Revision 2.20  1995/03/29  15:33:52  john
9373 - * Added code to parse descent.net file.
9374 - *
9375 - * Revision 2.19  1995/03/28  20:08:21  john
9376 - * Took away alternate server thing.
9377 - *
9378 - * Revision 2.18  1995/03/27  09:43:08  john
9379 - * Added VR Settings in config file.
9380 - *
9381 - * Revision 2.17  1995/03/23  19:02:21  john
9382 - * Added descent.net file use.
9383 - *
9384 - * Revision 2.16  1995/03/23  12:25:11  john
9385 - * Moved IPX stuff into BIOS lib.
9386 - *
9387 - * Revision 2.15  1995/03/21  16:52:34  john
9388 - * Added 320x100.
9389 - *
9390 - * Revision 2.14  1995/03/21  14:40:33  john
9391 - * Ifdef'd out the NETWORK code.
9392 - *
9393 - * Revision 2.13  1995/03/16  23:13:35  john
9394 - * Fixed bug with piggy paging in bitmap not checking for disk
9395 - * error, hence bogifying textures if you pull the CD out.
9396 - *
9397 - * Revision 2.12  1995/03/16  21:45:22  john
9398 - * Made all paged modes have incompatible menus!
9399 - *
9400 - * Revision 2.11  1995/03/15  15:19:34  john
9401 - * Took out code that changes to exe dir.
9402 - *
9403 - * Revision 2.10  1995/03/15  14:33:37  john
9404 - * Added code to force the Descent CD-rom in the drive.
9405 - *
9406 - * Revision 2.9  1995/03/15  11:41:27  john
9407 - * Better Saturn CD-ROM support.
9408 - *
9409 - * Revision 2.8  1995/03/14  18:24:46  john
9410 - * Force Destination Saturn to use CD-ROM drive.
9411 - *
9412 - * Revision 2.7  1995/03/14  16:22:35  john
9413 - * Added cdrom alternate directory stuff.
9414 - *
9415 - * Revision 2.6  1995/03/13  15:17:19  john
9416 - * Added alternate hogfile directory.
9417 - *
9418 - * Revision 2.5  1995/03/10  13:05:35  john
9419 - * Added code so that palette is correct for VFX1 helmets.
9420 - *
9421 - * Revision 2.4  1995/03/07  15:12:43  john
9422 - * Fixed VFX,3dmax support.
9423 - *
9424 - * Revision 2.3  1995/03/07  14:19:35  mike
9425 - * More destination saturn stuff.
9426 - *
9427 - * Revision 2.2  1995/03/06  16:47:34  mike
9428 - * destination saturn
9429 - *
9430 - * Revision 2.1  1995/03/06  15:24:06  john
9431 - * New screen techniques.
9432 - *
9433 - * Revision 2.0  1995/02/27  11:31:29  john
9434 - * New version 2.0, which has no anonymous unions, builds with
9435 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
9436 - *
9437 - * Revision 1.295  1995/02/23  12:02:14  john
9438 - * Made mono  windows smaller.
9439 - *
9440 - * Revision 1.294  1995/02/16  17:35:00  john
9441 - * Added code to allow dynamic socket changing.
9442 - *
9443 - * Revision 1.293  1995/02/14  19:29:29  john
9444 - * Locked down critical error handler.
9445 - *
9446 - * Revision 1.292  1995/02/14  15:29:20  john
9447 - * Added CR-LF to last line of menu help text.
9448 - *
9449 - * Revision 1.291  1995/02/14  11:39:01  john
9450 - * Added polled/bios joystick readers.
9451 - *
9452 - * Revision 1.290  1995/02/13  20:35:03  john
9453 - * Lintized
9454 - *
9455 - * Revision 1.289  1995/02/11  16:20:02  john
9456 - * Added code to make the default mission be the one last played.
9457 - *
9458 - * Revision 1.288  1995/02/11  15:54:13  rob
9459 - * changed cinvul to rinvul.
9460 - *
9461 - * Revision 1.287  1995/02/11  14:48:43  rob
9462 - * Added max of 314 seconds to control invul. times
9463 - *
9464 - * Revision 1.286  1995/02/11  12:42:01  john
9465 - * Added new song method, with FM bank switching..
9466 - *
9467 - * Revision 1.285  1995/02/11  11:36:11  rob
9468 - * Added cinvul option.
9469 - *
9470 - * Revision 1.284  1995/02/10  16:07:45  matt
9471 - * Took 'registered' out of printed info at startup
9472 - *
9473 - * Revision 1.283  1995/02/09  22:00:59  john
9474 - * Added i-glasses tracking.
9475 - *
9476 - * Revision 1.282  1995/02/02  11:11:27  john
9477 - * Added -nocyberman switch.
9478 - *
9479 - * Revision 1.281  1995/02/01  16:35:14  john
9480 - * Linted.
9481 - *
9482 - * Revision 1.280  1995/01/31  02:04:25  matt
9483 - * Fixed up cmdline help
9484 - *
9485 - * Revision 1.279  1995/01/30  16:25:55  john
9486 - * Put back in graphical screen at program end.
9487 - *
9488 - * Revision 1.278  1995/01/28  17:05:50  matt
9489 - * Changed imbedded copyright to use comma instead of hyphen
9490 - *
9491 - * Revision 1.277  1995/01/28  15:57:26  john
9492 - * Made joystick calibration be only when wrong detected in
9493 - * menu or joystick axis changed.
9494 - *
9495 - * Revision 1.276  1995/01/25  14:37:49  john
9496 - * Made joystick only prompt for calibration once...
9497 - *
9498 - * Revision 1.275  1995/01/24  18:21:00  john
9499 - * Added Adam's text warning.
9500 - *
9501 - * Revision 1.274  1995/01/22  15:57:20  john
9502 - * Took out code that printed warning out as game exited.
9503 - *
9504 - * Revision 1.273  1995/01/22  13:31:35  matt
9505 - * Added load of mission 0, so there's always a default mission
9506 - *
9507 - * Revision 1.272  1995/01/19  17:00:41  john
9508 - * Made save game work between levels.
9509 - *
9510 - * Revision 1.271  1995/01/18  11:47:57  adam
9511 - * changed copyright notice
9512 - *
9513 - * Revision 1.270  1995/01/15  13:42:42  john
9514 - * Moved low_mem cutoff higher.
9515 - *
9516 - * Revision 1.269  1995/01/12  18:53:50  john
9517 - * Put ifdef EDITOR around the code that checked for
9518 - * a 800x600 mode, because this trashed some people's
9519 - * computers (maybe) causing the mem allocation error in
9520 - * mouse.c that many users reported.
9521 - *
9522 - * Revision 1.268  1995/01/12  11:41:42  john
9523 - * Added external control reading.
9524 - *
9525 - * Revision 1.267  1995/01/06  10:26:55  john
9526 - * Added -nodoscheck command line switch.
9527 - *
9528 - * Revision 1.266  1995/01/05  16:59:30  yuan
9529 - * Don't show orderform in editor version.
9530 - *
9531 - * Revision 1.265  1994/12/28  15:33:51  john
9532 - * Added -slowjoy option.
9533 - *
9534 - * Revision 1.264  1994/12/15  16:44:15  matt
9535 - * Added trademark notice
9536 - *
9537 - * Revision 1.263  1994/12/14  20:13:59  john
9538 - * Reduced physical mem requments to 2 MB.
9539 - *
9540 - * Revision 1.262  1994/12/14  19:06:17  john
9541 - * Lowered physical memory requments to 2 MB.
9542 - *
9543 - * Revision 1.261  1994/12/14  09:41:29  allender
9544 - * change to drive and directory (if needed) of command line invocation
9545 - * so descent can be started from anywhere
9546 - *
9547 - * Revision 1.260  1994/12/13  19:08:59  john
9548 - * Updated memory requirements.
9549 - *
9550 - * Revision 1.259  1994/12/13  17:30:33  john
9551 - * Made the timer rate be changed right after initializing it.
9552 - *
9553 - * Revision 1.258  1994/12/13  02:46:25  matt
9554 - * Added imbedded copyright
9555 - *
9556 - * Revision 1.257  1994/12/13  02:06:46  john
9557 - * Added code to check stack used by descent... initial
9558 - * check showed stack used 35k/50k, so we decided it wasn't
9559 - * worth pursuing any more.
9560 - *
9561 - * Revision 1.256  1994/12/11  23:17:54  john
9562 - * Added -nomusic.
9563 - * Added RealFrameTime.
9564 - * Put in a pause when sound initialization error.
9565 - * Made controlcen countdown and framerate use RealFrameTime.
9566 - *
9567 - * Revision 1.255  1994/12/10  00:56:51  matt
9568 - * Added -nomusic to command-line help
9569 - *
9570 - * Revision 1.254  1994/12/08  11:55:11  john
9571 - * Took out low memory print.
9572 - *
9573 - * Revision 1.253  1994/12/08  11:51:00  john
9574 - * Made strcpy only copy corect number of chars,.
9575 - *
9576 - * Revision 1.252  1994/12/08  00:38:29  matt
9577 - * Cleaned up banner messages
9578 - *
9579 - * Revision 1.251  1994/12/07  19:14:52  matt
9580 - * Cleaned up command-line options and command-line help message
9581 - *
9582 - * Revision 1.250  1994/12/06  19:33:28  john
9583 - * Fixed text of message to make more sense.
9584 - *
9585 - * Revision 1.249  1994/12/06  16:30:55  john
9586 - * Neatend mem message,..
9587 - *
9588 - * Revision 1.248  1994/12/06  16:17:35  john
9589 - * Added better mem checking/printing.
9590 - *
9591 - * Revision 1.247  1994/12/06  14:14:37  john
9592 - * Added code to set low mem based on memory.
9593 - *
9594 - * Revision 1.246  1994/12/05  12:29:09  allender
9595 - * removed ifdefs around -norun option
9596 - *
9597 - * Revision 1.245  1994/12/05  00:03:30  matt
9598 - * Added -norun option to exit after writing pig
9599 - *
9600 - * Revision 1.244  1994/12/04  14:47:01  john
9601 - * MAde the intro and menu be the same song.
9602 - *
9603 - * Revision 1.243  1994/12/04  14:36:42  john
9604 - * Added menu music.
9605 - *
9606 - * Revision 1.242  1994/12/02  13:50:17  yuan
9607 - * Localization.
9608 - *
9609 - * Revision 1.241  1994/12/01  17:28:30  adam
9610 - * added end-shareware stuff
9611 - *
9612 - * Revision 1.240  1994/11/30  12:10:57  adam
9613 - * added support for PCX titles/brief screens
9614 - *
9615 - * Revision 1.239  1994/11/29  15:47:33  matt
9616 - * Moved error_init to start of game, so error message prints last
9617 - *
9618 - * Revision 1.238  1994/11/29  14:19:22  jasen
9619 - * reduced dos mem requirments.
9620 - *
9621 - * Revision 1.237  1994/11/29  03:46:35  john
9622 - * Added joystick sensitivity; Added sound channels to detail menu.  Removed -maxchannels
9623 - * command line arg.
9624 - *
9625 - * Revision 1.236  1994/11/29  02:50:18  john
9626 - * Increased the amount a joystick has to be off before
9627 - * asking if they want to recalibrate their joystick.
9628 - *
9629 - * Revision 1.235  1994/11/29  02:01:29  john
9630 - * Corrected some of the Descent command line help items.
9631 - *
9632 - * Revision 1.234  1994/11/29  01:39:56  john
9633 - * Fixed minor bug with vfx_light help not wrapping correctly.
9634 - *
9635 - * Revision 1.233  1994/11/28  21:34:17  john
9636 - * Reduced dos mem rqment to 70k.
9637 - *
9638 - * Revision 1.232  1994/11/28  21:20:38  john
9639 - * First version with memory checking.
9640 - *
9641 - * Revision 1.231  1994/11/28  20:06:21  rob
9642 - * Removed old serial param command line options.
9643 - * Added -noserial and -nonetwork to help listing.
9644 - *
9645 - * Revision 1.230  1994/11/27  23:15:24  matt
9646 - * Made changes for new mprintf calling convention
9647 - *
9648 - * Revision 1.229  1994/11/27  20:50:51  matt
9649 - * Don't set mem stuff if no debug
9650 - *
9651 - * Revision 1.228  1994/11/27  18:46:21  matt
9652 - * Cleaned up command-line switches a little
9653 - *
9654 - * Revision 1.227  1994/11/21  17:48:00  matt
9655 - * Added text to specifiy whether shareware or registered version
9656 - *
9657 - * Revision 1.226  1994/11/21  14:44:20  john
9658 - * Fixed some bugs with setting volumes even when -nosound was used. Duh!
9659 - *
9660 - * Revision 1.225  1994/11/21  13:53:42  matt
9661 - * Took out dos extender copyright
9662 - *
9663 - * Revision 1.224  1994/11/21  09:46:54  john
9664 - * Added -showmeminfo parameter.
9665 - *
9666 - * Revision 1.223  1994/11/20  22:12:05  mike
9667 - * Make some stuff dependent on SHAREWARE.
9668 - *
9669 - * Revision 1.222  1994/11/20  21:14:09  john
9670 - * Changed -serial to -noserial.  MAde a 1 sec delay
9671 - * before leaving title screen.  Clear keyboard buffer
9672 - * before asking for player name.
9673 - *
9674 - * Revision 1.221  1994/11/19  15:20:20  mike
9675 - * rip out unused code and data
9676 - *
9677 - * Revision 1.220  1994/11/17  19:14:29  adam
9678 - * prevented order screen from coming up when -notitles is used
9679 - *
9680 - * Revision 1.219  1994/11/16  11:34:39  john
9681 - * Added -nottitle switch.
9682 - *
9683 - * Revision 1.218  1994/11/16  10:05:53  john
9684 - * Added verbose messages.
9685 - *
9686 - * Revision 1.217  1994/11/15  20:12:34  john
9687 - * Added back in inferno and parallax screens.
9688 - *
9689 - * Revision 1.216  1994/11/15  18:35:30  john
9690 - * Added verbose setting.
9691 - *
9692 - * Revision 1.215  1994/11/15  17:47:44  john
9693 - * Added ordering info screen.
9694 - *
9695 - * Revision 1.214  1994/11/15  08:57:44  john
9696 - * Added MS-DOS version checking and -nonetwork option.
9697 - *
9698 - * Revision 1.213  1994/11/15  08:34:32  john
9699 - * Added better error messages for IPX init.
9700 - *
9701 - * Revision 1.212  1994/11/14  20:14:18  john
9702 - * Fixed some warnings.
9703 - *
9704 - * Revision 1.211  1994/11/14  19:50:49  john
9705 - * Added joystick cal values to descent.cfg.
9706 - *
9707 - * Revision 1.210  1994/11/14  17:56:44  allender
9708 - * make call to ReadConfigFile at startup
9709 - *
9710 - * Revision 1.209  1994/11/14  11:41:55  john
9711 - * Fixed bug with editor/game sequencing.
9712 - *
9713 - * Revision 1.208  1994/11/13  17:05:11  john
9714 - * Made the callsign entry be a list box and gave the ability
9715 - * to delete players.
9716 - *
9717 - * Revision 1.207  1994/11/13  15:39:22  john
9718 - * Added critical error handler to game.  Took out -editor command line
9719 - * option because it didn't work anymore and wasn't worth fixing.  Made scores
9720 - * not use MINER enviroment variable on release version, and made scores
9721 - * not print an error if there is no descent.hi.
9722 - *
9723 - * Revision 1.206  1994/11/10  20:53:29  john
9724 - * Used new sound install parameters.
9725 - *
9726 - * Revision 1.205  1994/11/10  11:07:52  mike
9727 - * Set default detail level.
9728 - *
9729 - * Revision 1.204  1994/11/09  13:45:43  matt
9730 - * Made -? work again for help
9731 - *
9732 - * Revision 1.203  1994/11/09  10:55:58  matt
9733 - * Cleaned up initialization for editor -> game transitions
9734 - *
9735 - * Revision 1.202  1994/11/07  21:35:47  matt
9736 - * Use new function iff_read_into_bitmap()
9737 - *
9738 - * Revision 1.201  1994/11/05  17:22:16  john
9739 - * Fixed lots of sequencing problems with newdemo stuff.
9740 - *
9741 - * Revision 1.200  1994/11/05  14:05:44  john
9742 - * Fixed fade transitions between all screens by making
9743 - * gr_palette_fade_in and out keep track of whether the palette is
9744 - * faded in or not.  Then, wherever the code needs to fade out, it
9745 - * just calls gr_palette_fade_out and it will fade out if it isn't
9746 - * already.  The same with fade_in.
9747 - * This eliminates the need for all the flags like Menu_fade_out,
9748 - * game_fade_in palette, etc.
9749 - *
9750 - * Revision 1.199  1994/11/04  14:36:30  allender
9751 - * change Auto_demo meaning to mean autostart from menu only.  Use
9752 - * FindArgs when searching for AutoDemo from command line.  also,
9753 - * set N_Players to 1 when starting in editor mode.
9754 - *
9755 - * Revision 1.198  1994/11/02  11:59:49  john
9756 - * Moved menu out of game into inferno main loop.
9757 - *
9758 - * Revision 1.197  1994/11/01  17:57:39  mike
9759 - * -noscreens option to bypass all screens.
9760 - *
9761 - * Revision 1.196  1994/10/28  15:42:34  allender
9762 - * don't register player if Autodemo is on
9763 - *
9764 - * Revision 1.195  1994/10/28  10:58:01  matt
9765 - * Added copyright notice for DOS4GW
9766 - *
9767 - * Revision 1.194  1994/10/20  21:26:48  matt
9768 - * Took out old serial name/number code, and put up message if this
9769 - * is a marked version.
9770 - *
9771 - * Revision 1.193  1994/10/19  09:52:14  allender
9772 - * Print out who descent.exe belongs to if descent.exe is stamped.
9773 - *
9774 - * Revision 1.192  1994/10/18  16:43:05  allender
9775 - * Added check for identifier stamp and time after which descent will
9776 - * no longer run.
9777 - *
9778 - * Revision 1.191  1994/10/17  13:07:17  john
9779 - * Moved the descent.cfg info into the player config file.
9780 - *
9781 - * Revision 1.190  1994/10/04  10:26:31  matt
9782 - * Support new menu fade in
9783 - *
9784 - * Revision 1.189  1994/10/03  22:58:46  matt
9785 - * Changed some values of game_mode
9786 - *
9787 - * Revision 1.188  1994/10/03  18:55:39  rob
9788 - * Changed defaults for com port settings.
9789 - *
9790 - * Revision 1.187  1994/10/03  13:34:47  matt
9791 - * Added new (and hopefully better) game sequencing functions
9792 - *
9793 - * Revision 1.186  1994/09/30  12:37:28  john
9794 - * Added midi,digi volume to configuration.
9795 - *
9796 - * Revision 1.185  1994/09/30  10:08:48  john
9797 - * Changed sound stuff... made it so the reseting card doesn't hang,
9798 - * made volume change only if sound is installed.
9799 - *
9800 - * Revision 1.184  1994/09/28  17:25:00  matt
9801 - * Added first draft of game save/load system
9802 - *
9803 - * Revision 1.183  1994/09/28  16:18:23  john
9804 - * Added capability to play midi song.
9805 - *
9806 - * Revision 1.182  1994/09/28  11:31:18  john
9807 - * Made text output unbuffered.
9808 - *
9809 - * Revision 1.181  1994/09/27  19:23:44  john
9810 - * Added -nojoystick and -nomouse
9811 - *
9812 - * Revision 1.180  1994/09/24  16:55:29  rob
9813 - * No longer open COM port immediately upon program start.
9814 - * No longer set Network_active is serial_active is set.
9815 - *
9816 - * Revision 1.179  1994/09/24  14:16:30  mike
9817 - * Support new game mode constants.
9818 - *
9819 - * Revision 1.178  1994/09/22  17:52:31  rob
9820 - * Added Findargs hooks for -serial, -speed, and -com.
9821 - *
9822 - * Revision 1.177  1994/09/22  16:14:11  john
9823 - * Redid intro sequecing.
9824 - *
9825 - * Revision 1.176  1994/09/21  16:32:58  john
9826 - * Made mouse and keyboard init after bm_init. Why?
9827 - * Because it seems to work better under virtual
9828 - * memory.
9829 - *
9830 - * Revision 1.175  1994/09/21  16:27:52  john
9831 - * Added mouse_init
9832 - *
9833 - * Revision 1.174  1994/09/20  15:14:10  matt
9834 - * New message for new VFX switches
9835 - *
9836 - * Revision 1.173  1994/09/16  16:14:27  john
9837 - * Added acrade sequencing.
9838 - *
9839 - * Revision 1.172  1994/09/16  11:49:52  john
9840 - * Added first version of arcade joystick support;
9841 - * Also fixed some bugs in kconfig.c, such as reading non-present
9842 - * joysticks, which killed frame rate, and not reading key_down_time
9843 - * when in slide mode or bank mode.
9844 - *
9845 - * Revision 1.171  1994/09/15  16:11:35  john
9846 - * Added support for VFX1 head tracking. Fixed bug with memory over-
9847 - * write when using stereo mode.
9848 - *
9849 - * Revision 1.170  1994/09/12  19:38:23  john
9850 - * Made some stuff that prints to the DOS screen go to the
9851 - * mono instead, since it really is debugging info.
9852 - *
9853 - * Revision 1.169  1994/08/29  21:18:28  john
9854 - * First version of new keyboard/oystick remapping stuff.
9855 - *
9856 - * Revision 1.168  1994/08/26  13:02:00  john
9857 - * Put high score system in.
9858 - *
9859 - * Revision 1.167  1994/08/24  19:00:23  john
9860 - * Changed key_down_time to return fixed seconds instead of
9861 - * milliseconds.
9862 - *
9863 - * Revision 1.166  1994/08/18  16:24:20  john
9864 - * changed socket to channel in text.
9865 - *
9866 - * Revision 1.165  1994/08/18  16:16:51  john
9867 - * Added support for different sockets.
9868 - *
9869 - * Revision 1.164  1994/08/18  10:47:53  john
9870 - * *** empty log message ***
9871 - *
9872 - * Revision 1.163  1994/08/12  09:15:54  john
9873 - * *** empty log message ***
9874 - *
9875 - * Revision 1.162  1994/08/12  03:11:19  john
9876 - * Made network be default off; Moved network options into
9877 - * main menu.  Made starting net game check that mines are the
9878 - * same.
9879 - *
9880 - * Revision 1.161  1994/08/10  19:57:05  john
9881 - * Changed font stuff; Took out old menu; messed up lots of
9882 - * other stuff like game sequencing messages, etc.
9883 - *
9884 - * Revision 1.160  1994/08/05  16:30:23  john
9885 - * Added capability to turn off network.
9886 - *
9887 - * Revision 1.159  1994/08/04  19:42:51  matt
9888 - * Moved serial number & name (and version name) from inferno.c to inferno.ini
9889 - *
9890 - * Revision 1.158  1994/08/03  10:30:23  matt
9891 - * Change cybermaxx switches, updated command-line help, and added serial number system
9892 - *
9893 - * Revision 1.157  1994/07/29  18:30:10  matt
9894 - * New parms (lack of parms, actually) for g3_init()
9895 - *
9896 - * Revision 1.156  1994/07/24  00:39:25  matt
9897 - * Added more text to TEX file; make NewGame() take a start level; made game
9898 - * load/save menus use open/close window funcs.
9899 - *
9900 - * Revision 1.155  1994/07/21  21:31:27  john
9901 - * First cheapo version of VictorMaxx tracking.
9902 - *
9903 - * Revision 1.154  1994/07/21  18:15:34  matt
9904 - * Ripped out a bunch of unused stuff
9905 - *
9906 - * Revision 1.153  1994/07/21  17:59:10  matt
9907 - * Cleaned up initial mode game/editor code
9908 - *
9909 - * Revision 1.152  1994/07/21  13:11:19  matt
9910 - * Ripped out remants of old demo system, and added demo only system that
9911 - * disables object movement and game options from menu.
9912 - *
9913 - * Revision 1.151  1994/07/20  15:58:27  john
9914 - * First installment of ipx stuff.
9915 - *
9916 - * Revision 1.150  1994/07/15  16:04:24  matt
9917 - * Changed comment for milestone 3 version
9918 - *
9919 - * Revision 1.149  1994/07/15  13:59:24  matt
9920 - * Fixed stupid mistake I make in the last revision
9921 - *
9922 - * Revision 1.148  1994/07/15  13:20:15  matt
9923 - * Updated comand-line help
9924 - *
9925 - * Revision 1.147  1994/07/14  23:29:43  matt
9926 - * Open two mono debug messages, one for errors & one for spew
9927 - *
9928 - * Revision 1.146  1994/07/09  22:48:05  matt
9929 - * Added localizable text
9930 - *
9931 - * Revision 1.145  1994/07/02  13:49:47  matt
9932 - * Cleaned up includes
9933 - *
9934 - * Revision 1.144  1994/06/30  20:04:43  john
9935 - * Added -joydef support.
9936 - *
9937 - * Revision 1.143  1994/06/24  17:01:44  john
9938 - * Add VFX support; Took Game Sequencing, like EndGame and stuff and
9939 - * took it out of game.c and into gameseq.c
9940
9941 ------------------------------------------------------------------------
9942 main/joydefs.c:
9943
9944 - * Revision 1.10  1995/10/18  22:21:21  allender
9945 - * fixed bug with gravis mousestick and call key_flush when
9946 - * calibrating joystick since it used keystrokes for the trigger
9947 - * (at least most of them do)
9948 - *
9949 - * Revision 1.9  1995/10/17  13:12:32  allender
9950 - * fixed up controller support for mac world
9951 - *
9952 - * Revision 1.8  1995/10/15  19:27:04  allender
9953 - * new Dave Denhart controller code
9954 - *
9955 - * Revision 1.7  1995/10/15  16:14:59  allender
9956 - * fixed axis value for Thrustmaster rudders
9957 - *
9958 - * Revision 1.6  1995/09/13  11:39:39  allender
9959 - * made joystick cal menu all text so buttons will work properly
9960 - *
9961 - * Revision 1.5  1995/09/01  13:13:13  allender
9962 - * added close box on controls menu
9963 - *
9964 - * Revision 1.4  1995/08/18  10:22:47  allender
9965 - * if thrustmaster choosen, set joystick at thrustmaster type
9966 - * for proper reading in joyc.c
9967 - *
9968 - * Revision 1.3  1995/07/26  17:00:34  allender
9969 - * put back in code to make joysticks work
9970 - *
9971 - * Revision 1.2  1995/07/17  08:52:21  allender
9972 - * put back in code that was taken out previously
9973 - *
9974 - * Revision 1.1  1995/05/16  15:26:48  allender
9975 - * Initial revision
9976 - *
9977 - * Revision 2.2  1995/06/30  12:30:22  john
9978 - * Added -Xname command line.
9979 - *
9980 - * Revision 2.1  1995/04/06  12:13:20  john
9981 - * Made so you can calibrate Gravis Gamepad.
9982 - *
9983 - * Revision 2.0  1995/02/27  11:30:27  john
9984 - * New version 2.0, which has no anonymous unions, builds with
9985 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
9986 - *
9987 - * Revision 1.71  1995/02/12  02:06:10  john
9988 - * Fixed bug with joystick incorrectly asking for
9989 - * calibration.
9990 - *
9991 - * Revision 1.70  1995/01/28  15:58:07  john
9992 - * Made joystick calibration be only when wrong detected in
9993 - * menu or joystick axis changed.
9994 - *
9995 - * Revision 1.69  1995/01/25  14:37:55  john
9996 - * Made joystick only prompt for calibration once...
9997 - *
9998 - * Revision 1.68  1995/01/24  16:34:29  john
9999 - * Made so that if you reconfigure joystick and
10000 - * add or subtract an axis, it asks for a recalibration
10001 - * upon leaving.
10002 - *
10003 - * Revision 1.67  1994/12/29  11:08:51  john
10004 - * Fixed Thrustmaster and Logitech Wingman extreme
10005 - * Hat by reading the y2 axis during the center stage
10006 - * of the calibration, and using 75, 50, 27, and 3 %
10007 - * as values for the 4 positions.
10008 - *
10009 - * Revision 1.66  1994/12/15  18:17:39  john
10010 - * Fixed warning with previous.
10011 - *
10012 - * Revision 1.65  1994/12/15  18:15:48  john
10013 - * Made the joy cal only write the .cfg file, not
10014 - * the player file.
10015 - *
10016 - * Revision 1.64  1994/12/13  14:43:35  john
10017 - * Took out the code in kconfig to build direction array.
10018 - * Called kc_set_controls after selecting a new control type.
10019 - *
10020 - * Revision 1.63  1994/12/10  12:08:47  john
10021 - * Changed some delays to use TICKER instead of timer_get_fixed_seconds.
10022 - *
10023 - * Revision 1.62  1994/12/09  11:01:07  mike
10024 - * force calibration of joystick on joystick selection from Controls... menu.
10025 - *
10026 - * Revision 1.61  1994/12/07  21:50:27  john
10027 - * Put stop/start time around joystick delay.
10028 - *
10029 - * Revision 1.60  1994/12/07  19:34:39  john
10030 - * Added delay.
10031 - *
10032 - * Revision 1.59  1994/12/07  18:12:14  john
10033 - * NEatened up joy cal.,
10034 - *
10035 - * Revision 1.58  1994/12/07  17:07:51  john
10036 - * Fixed up joy cal.
10037 - *
10038 - * Revision 1.57  1994/12/07  16:48:53  yuan
10039 - * localization
10040 - *
10041 - * Revision 1.56  1994/12/07  16:05:55  john
10042 - * Changed the way joystick calibration works.
10043 - *
10044 - * Revision 1.55  1994/12/06  20:15:22  john
10045 - * Took out code that unpauses songs that were never paused.
10046 - *
10047 - * Revision 1.54  1994/12/06  15:14:09  yuan
10048 - * Localization
10049 - *
10050 - * Revision 1.53  1994/12/05  16:29:16  john
10051 - * Took out music pause around the cheat menu.
10052 - *
10053 - * Revision 1.52  1994/12/04  12:39:10  john
10054 - * MAde so that FCS calibration doesn't ask for axis #2.
10055 - *
10056 - * Revision 1.51  1994/12/03  15:14:59  john
10057 - * Took out the delay mentioned previosuly cause it would
10058 - * cause bigger problems than it helps, especially with netgames.
10059 - *
10060 - * Revision 1.50  1994/12/03  14:16:14  john
10061 - * Put a delay between screens in joy cal to keep Yuan from
10062 - * double hitting.
10063 - *
10064 - * Revision 1.49  1994/12/03  11:04:06  john
10065 - * Changed newmenu code a bit to fix bug with bogus
10066 - * backgrounds occcasionally.
10067 - *
10068 - * Revision 1.48  1994/12/02  11:03:44  yuan
10069 - * Localization.
10070 - *
10071 - * Revision 1.47  1994/12/02  10:50:33  yuan
10072 - * Localization
10073 - *
10074 - * Revision 1.46  1994/12/01  12:21:59  john
10075 - * Added code to calibrate 2 joysticks separately.
10076 - *
10077 - * Revision 1.45  1994/12/01  11:52:31  john
10078 - * Added message when you select FCS to say that if
10079 - * you have WCS, see manuel.
10080 - *
10081 - * Revision 1.44  1994/11/29  02:26:28  john
10082 - * Made the prompts for upper-left, lower right for joy
10083 - * calibration more obvious.
10084 - *
10085 - * Revision 1.43  1994/11/26  13:13:59  matt
10086 - * Changed "none" option to "keyboard only"
10087 - *
10088 - * Revision 1.42  1994/11/21  19:35:13  john
10089 - * Replaced calls to joy_init with if (joy_present)
10090 - *
10091 - * Revision 1.41  1994/11/21  19:28:34  john
10092 - * Changed warning for no joystick to use nm_messagebox..
10093 - *
10094 - * Revision 1.40  1994/11/21  19:06:25  john
10095 - * Made it so that it only stops sound when your in game mode.
10096 - *
10097 - * Revision 1.39  1994/11/21  11:47:18  john
10098 - * Made sound pause during joystick calibration.
10099 - *
10100 - * Revision 1.38  1994/11/10  20:34:18  rob
10101 - * Removed menu-specific network mode support in favor in new stuff
10102 - * in newmenu.c
10103 - *
10104 - * Revision 1.37  1994/11/08  21:21:38  john
10105 - * Made Esc exit joystick calibration.
10106 - *
10107 - * Revision 1.36  1994/11/08  15:14:42  john
10108 - * Added more calls so net doesn't die in net game.
10109 - *
10110 - * Revision 1.35  1994/11/08  14:59:12  john
10111 - * Added code to respond to network while in menus.
10112 - *
10113 - * Revision 1.34  1994/10/24  19:56:32  john
10114 - * Made the new user setup prompt for config options.
10115 - *
10116 - * Revision 1.33  1994/10/22  14:11:52  mike
10117 - * Suppress compiler warning message.
10118 - *
10119 - * Revision 1.32  1994/10/19  12:44:24  john
10120 - * Added hours field to player structure.
10121 - *
10122 - * Revision 1.31  1994/10/17  13:07:13  john
10123 - * Moved the descent.cfg info into the player config file.
10124 - *
10125 - * Revision 1.30  1994/10/13  21:41:12  john
10126 - * MAde Esc exit out of joystick calibration.
10127 - *
10128 - * Revision 1.29  1994/10/13  19:22:27  john
10129 - * Added separate config saves for different devices.
10130 - * Made all the devices work together better, such as mice won't
10131 - * get read when you're playing with the joystick.
10132 - *
10133 - * Revision 1.28  1994/10/13  11:40:18  john
10134 - * Took out warnings.
10135 - *
10136 - * Revision 1.27  1994/10/13  11:35:23  john
10137 - * Made Thrustmaster FCS Hat work.  Put a background behind the
10138 - * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
10139 - * menu to new menu. Made F6 be calibrate joystick.
10140 - *
10141 - * Revision 1.26  1994/10/11  21:29:03  matt
10142 - * Made a bunch of menus have good initial selected values
10143 - *
10144 - * Revision 1.25  1994/10/11  17:08:39  john
10145 - * Added sliders for volume controls.
10146 - *
10147 - * Revision 1.24  1994/10/10  17:59:21  john
10148 - * Neatend previous.
10149 - *
10150 - * Revision 1.23  1994/10/10  17:57:59  john
10151 - * Neatend previous.
10152 - *
10153 - * Revision 1.22  1994/10/10  17:56:11  john
10154 - * Added messagebox that tells that config has been saved.
10155 - *
10156 - * Revision 1.21  1994/09/30  12:37:26  john
10157 - * Added midi,digi volume to configuration.
10158 - *
10159 - * Revision 1.20  1994/09/22  16:14:14  john
10160 - * Redid intro sequecing.
10161 - *
10162 - * Revision 1.19  1994/09/19  18:50:15  john
10163 - * Added switch to disable joystick.
10164 - *
10165 - * Revision 1.18  1994/09/12  11:47:36  john
10166 - * Made stupid cruise work better.  Make kconfig values get
10167 - * read/written to disk.
10168 - *
10169 - * Revision 1.17  1994/09/10  15:46:47  john
10170 - * First version of new keyboard configuration.
10171 - *
10172 - * Revision 1.16  1994/09/06  19:35:44  john
10173 - * Fixed bug that didn';t load new size .cal file.
10174 - *
10175 - * Revision 1.15  1994/09/06  14:51:58  john
10176 - * Added sensitivity adjustment, fixed bug with joystick button not
10177 - * staying down.
10178 - *
10179 - * Revision 1.14  1994/09/02  16:13:47  john
10180 - * Made keys fill in position.
10181 - *
10182 - * Revision 1.13  1994/08/31  17:58:50  john
10183 - * Made a bit simpler.
10184 - *
10185 - * Revision 1.12  1994/08/31  14:17:54  john
10186 - * *** empty log message ***
10187 - *
10188 - * Revision 1.11  1994/08/31  14:10:56  john
10189 - * Made keys not work when KEY_DELETE pressed.
10190 - *
10191 - * Revision 1.10  1994/08/31  13:40:47  mike
10192 - * Change constant
10193 - *
10194 - * Revision 1.9  1994/08/31  12:56:27  john
10195 - * *** empty log message ***
10196 - *
10197 - * Revision 1.8  1994/08/30  20:38:29  john
10198 - * Add more config stuff..
10199 - *
10200 - * Revision 1.7  1994/08/30  16:37:25  john
10201 - * Added menu options to set controls.
10202 - *
10203 - * Revision 1.6  1994/08/30  09:27:18  john
10204 - * *** empty log message ***
10205 - *
10206 - * Revision 1.5  1994/08/30  09:12:01  john
10207 - * *** empty log message ***
10208 - *
10209 - * Revision 1.4  1994/08/29  21:18:32  john
10210 - * First version of new keyboard/oystick remapping stuff.
10211 - *
10212 - * Revision 1.3  1994/08/24  19:00:29  john
10213 - * Changed key_down_time to return fixed seconds instead of
10214 - * milliseconds.
10215 - *
10216 - * Revision 1.2  1994/08/17  16:50:37  john
10217 - * Added damaging fireballs, missiles.
10218 - *
10219 - * Revision 1.1  1994/08/17  10:07:12  john
10220 - * Initial revision
10221
10222 ------------------------------------------------------------------------
10223 main/joydefs.h:
10224
10225 - * Revision 2.0  1995/02/27  11:32:12  john
10226 - * New version 2.0, which has no anonymous unions, builds with
10227 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
10228 - *
10229 - * Revision 1.12  1995/01/25  14:37:52  john
10230 - * Made joystick only prompt for calibration once...
10231 - *
10232 - * Revision 1.11  1994/10/13  11:35:43  john
10233 - * Made Thrustmaster FCS Hat work.  Put a background behind the
10234 - * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
10235 - * menu to new menu. Made F6 be calibrate joystick.
10236 - *
10237 - * Revision 1.10  1994/09/10  15:46:49  john
10238 - * First version of new keyboard configuration.
10239 - *
10240 - * Revision 1.9  1994/09/06  14:51:29  john
10241 - * Added sensitivity adjustment, fixed bug with joystick button not
10242 - * staying down.
10243 - *
10244 - * Revision 1.8  1994/08/31  12:56:29  john
10245 - * *** empty log message ***
10246 - *
10247 - * Revision 1.7  1994/08/30  16:37:07  john
10248 - * Added menu options to set controls.
10249 - *
10250 - * Revision 1.6  1994/08/29  21:18:33  john
10251 - * First version of new keyboard/oystick remapping stuff.
10252 - *
10253 - * Revision 1.5  1994/08/24  19:00:30  john
10254 - * Changed key_down_time to return fixed seconds instead of
10255 - * milliseconds.
10256 - *
10257 - * Revision 1.4  1994/08/17  16:50:04  john
10258 - * Added damaging fireballs, missiles.
10259 - *
10260 - * Revision 1.3  1994/07/01  10:55:18  john
10261 - * Added analog joystick throttle
10262 - *
10263 - * Revision 1.2  1994/06/30  20:04:46  john
10264 - * Added -joydef support.
10265 - *
10266 - * Revision 1.1  1994/06/30  18:08:12  john
10267 - * Initial revision
10268
10269 ------------------------------------------------------------------------
10270 main/kconfig.c:
10271
10272 - * Revision 1.18  1995/10/29  20:14:10  allender
10273 - * don't read mouse 30x/sec.  Still causes problems -- left with
10274 - * exposure at > 60 frame/s
10275 - *
10276 - * Revision 1.17  1995/10/27  14:16:35  allender
10277 - * don't set lastreadtime when doing mouse stuff if we didn't
10278 - * read mouse this frame
10279 - *
10280 - * Revision 1.16  1995/10/24  18:10:22  allender
10281 - * get mouse stuff working right this time?
10282 - *
10283 - * Revision 1.15  1995/10/23  14:50:50  allender
10284 - * corrected values for control type in kc_set_controls
10285 - *
10286 - * Revision 1.14  1995/10/21  16:36:54  allender
10287 - * fix up mouse read time
10288 - *
10289 - * Revision 1.13  1995/10/20  00:46:53  allender
10290 - * fix up mouse reading problem
10291 - *
10292 - * Revision 1.12  1995/10/19  13:36:38  allender
10293 - * mouse support in kconfig screens
10294 - *
10295 - * Revision 1.11  1995/10/18  21:06:06  allender
10296 - * removed Int3 in cruise stuff -- was in there for debugging and
10297 - * now not needed
10298 - *
10299 - * Revision 1.10  1995/10/17  13:12:47  allender
10300 - * fixed config menus so buttons don't get configured
10301 - *
10302 - * Revision 1.9  1995/10/15  23:07:55  allender
10303 - * added return key as second button for primary fire
10304 - *
10305 - * Revision 1.8  1995/09/05  08:49:47  allender
10306 - * change 'PADRTN' label to 'ENTER'
10307 - *
10308 - * Revision 1.7  1995/09/01  15:38:22  allender
10309 - * took out cap of reading controls max 25 times/sec
10310 - *
10311 - * Revision 1.6  1995/09/01  13:33:59  allender
10312 - * erase all old text
10313 - *
10314 - * Revision 1.5  1995/08/18  10:20:55  allender
10315 - * keep controls reading to 25 times/s max so fast
10316 - * frame rates don't mess up control reading
10317 - *
10318 - * Revision 1.4  1995/07/28  15:43:13  allender
10319 - * make mousebutton control primary fire
10320 - *
10321 - * Revision 1.3  1995/07/26  17:04:32  allender
10322 - * new defaults and make joystick main button work correctly
10323 - *
10324 - * Revision 1.2  1995/07/17  08:51:03  allender
10325 - * fixed up configuration menus to look right
10326 - *
10327 - * Revision 1.1  1995/05/16  15:26:56  allender
10328 - * Initial revision
10329 - *
10330 - * Revision 2.11  1995/08/23  16:08:04  john
10331 - * Added version 2 of external controls that passes the ship
10332 - * position and orientation the drivers.
10333 - *
10334 - * Revision 2.10  1995/07/07  16:48:01  john
10335 - * Fixed bug with new interface.
10336 - *
10337 - * Revision 2.9  1995/07/03  15:02:32  john
10338 - * Added new version of external controls for Cybermouse absolute position.
10339 - *
10340 - * Revision 2.8  1995/06/30  12:30:28  john
10341 - * Added -Xname command line.
10342 - *
10343 - * Revision 2.7  1995/03/30  16:36:56  mike
10344 - * text localization.
10345 - *
10346 - * Revision 2.6  1995/03/21  14:39:31  john
10347 - * Ifdef'd out the NETWORK code.
10348 - *
10349 - * Revision 2.5  1995/03/16  10:53:07  john
10350 - * Move VFX center to Shift+Z instead of Enter because
10351 - * it conflicted with toggling HUD on/off.
10352 - *
10353 - * Revision 2.4  1995/03/10  13:47:24  john
10354 - * Added head tracking sensitivity.
10355 - *
10356 - * Revision 2.3  1995/03/09  18:07:06  john
10357 - * Fixed bug with iglasses tracking not "centering" right.
10358 - * Made VFX have bright headlight lighting.
10359 - *
10360 - * Revision 2.2  1995/03/08  15:32:39  john
10361 - * Made VictorMaxx head tracking use Greenleaf code.
10362 - *
10363 - * Revision 2.1  1995/03/06  15:23:31  john
10364 - * New screen techniques.
10365 - *
10366 - * Revision 2.0  1995/02/27  11:29:26  john
10367 - * New version 2.0, which has no anonymous unions, builds with
10368 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
10369 - *
10370 - * Revision 1.105  1995/02/22  14:11:58  allender
10371 - * remove anonymous unions from object structure
10372 - *
10373 - * Revision 1.104  1995/02/13  12:01:56  john
10374 - * Fixed bug with buggin not mmaking player faster.
10375 - *
10376 - * Revision 1.103  1995/02/09  22:00:46  john
10377 - * Added i-glasses tracking.
10378 - *
10379 - * Revision 1.102  1995/01/24  21:25:47  john
10380 - * Fixed bug with slide/bank on not working with
10381 - * Cyberman heading.,
10382 - *
10383 - * Revision 1.101  1995/01/24  16:09:56  john
10384 - * Fixed bug with Wingman extreme customize text overwriting title.
10385 - *
10386 - * Revision 1.100  1995/01/24  12:37:46  john
10387 - * Made Esc exit key define menu.
10388 - *
10389 - * Revision 1.99  1995/01/23  23:54:43  matt
10390 - * Made keypad enter work
10391 - *
10392 - * Revision 1.98  1995/01/23  16:42:00  john
10393 - * Made the external controls always turn banking off, leveling off
10394 - * and passed automap state thru to the tsr.
10395 - *
10396 - * Revision 1.97  1995/01/12  11:41:33  john
10397 - * Added external control reading.
10398 - *
10399 - * Revision 1.96  1995/01/05  10:43:58  mike
10400 - * Handle case when timer_get_fixed_seconds() goes negative.  Happens at 9.1
10401 - * hours.  Previously, joystick would stop functioning.  Now will work.
10402 - *
10403 - * Revision 1.95  1994/12/29  11:17:38  john
10404 - * Took out some warnings and mprintf.
10405 - *
10406 - * Revision 1.94  1994/12/29  11:07:41  john
10407 - * Fixed Thrustmaster and Logitech Wingman extreme
10408 - * Hat by reading the y2 axis during the center stage
10409 - * of the calibration, and using 75, 50, 27, and 3 %
10410 - * as values for the 4 positions.
10411 - *
10412 - * Revision 1.93  1994/12/27  12:16:20  john
10413 - * Fixed bug with slide on not working with joystick or mouse buttons.
10414 - *
10415 - * Revision 1.92  1994/12/20  10:34:15  john
10416 - * Made sensitivity work for mouse & joystick and made
10417 - * it only affect, pitch, heading, and roll.
10418 - *
10419 - * Revision 1.91  1994/12/16  00:11:23  matt
10420 - * Made delete key act normally when debug out
10421 - *
10422 - * Revision 1.90  1994/12/14  17:41:15  john
10423 - * Added more buttons so that  Yoke would work.
10424 - *
10425 - * Revision 1.89  1994/12/13  17:25:35  allender
10426 - * Added Assert for bogus time for joystick reading.
10427 - *
10428 - * Revision 1.88  1994/12/13  14:48:01  john
10429 - * Took out some debugging mprintf's
10430 - *
10431 - *
10432 - * Revision 1.87  1994/12/13  14:43:02  john
10433 - * Took out the code in kconfig to build direction array.
10434 - * Called kc_set_controls after selecting a new control type.
10435 - *
10436 - * Revision 1.86  1994/12/13  01:11:32  john
10437 - * Fixed bug with message clearing overwriting
10438 - * right border.
10439 - *
10440 - * Revision 1.85  1994/12/12  00:35:58  john
10441 - * Added or thing for keys.
10442 - *
10443 - * Revision 1.84  1994/12/09  17:08:06  john
10444 - * Made mouse a bit less sensitive.
10445 - *
10446 - * Revision 1.83  1994/12/09  16:04:00  john
10447 - * Increased mouse sensitivity.
10448 - *
10449 - * Revision 1.82  1994/12/09  00:41:26  mike
10450 - * fix hang in automap print screen
10451 - *
10452 - * Revision 1.81  1994/12/08  11:50:37  john
10453 - * Made strcpy only copy corect number of chars,.
10454 - *
10455 - * Revision 1.80  1994/12/07  16:16:06  john
10456 - * Added command to check to see if a joystick axes has been used.
10457 - *
10458 - * Revision 1.79  1994/12/07  14:52:28  yuan
10459 - * Localization 492
10460 - *
10461 - * Revision 1.78  1994/12/07  13:37:40  john
10462 - * Made the joystick thrust work in reverse.
10463 - *
10464 - * Revision 1.77  1994/12/07  11:28:24  matt
10465 - * Did a little localization support
10466 - *
10467 - * Revision 1.76  1994/12/04  12:30:03  john
10468 - * Made the Thrustmaster stick read every frame, not every 10 frames,
10469 - * because it uses analog axis as buttons.
10470 - *
10471 - * Revision 1.75  1994/12/03  22:35:25  yuan
10472 - * Localization 412
10473 - *
10474 - * Revision 1.74  1994/12/03  15:39:24  john
10475 - * Made numeric keypad move in conifg.
10476 - *
10477 - * Revision 1.73  1994/12/01  16:23:39  john
10478 - * Fixed include mistake.
10479 - *
10480 - * Revision 1.72  1994/12/01  16:07:57  john
10481 - * Fixed bug that disabled joystick in automap because it used gametime, which is
10482 - * paused during automap. Fixed be used timer_Get_fixed_seconds instead of GameTime.
10483 - *
10484 - * Revision 1.71  1994/12/01  12:30:49  john
10485 - * Made Ctrl+D delete, not Ctrl+E
10486 - *
10487 - * Revision 1.70  1994/12/01  11:52:52  john
10488 - * Added default values for GamePad.
10489 - *
10490 - * Revision 1.69  1994/11/30  00:59:12  mike
10491 - * optimizations.
10492 - *
10493 - * Revision 1.68  1994/11/29  03:45:50  john
10494 - * Added joystick sensitivity; Added sound channels to detail menu.  Removed -maxchannels
10495 - * command line arg.
10496 - *
10497 - * Revision 1.67  1994/11/27  23:13:44  matt
10498 - * Made changes for new mprintf calling convention
10499 - *
10500 - * Revision 1.66  1994/11/27  19:52:12  matt
10501 - * Made screen shots work in a few more places
10502 - *
10503 - * Revision 1.65  1994/11/22  16:54:50  mike
10504 - * autorepeat on missiles.
10505 - *
10506 - * Revision 1.64  1994/11/21  11:16:17  rob
10507 - * Changed calls to GameLoop to calls to multi_menu_poll and changed
10508 - * conditions under which they are called.
10509 - *
10510 - * Revision 1.63  1994/11/19  15:14:48  mike
10511 - * remove unused code and data
10512 - *
10513 - * Revision 1.62  1994/11/18  23:37:56  john
10514 - * Changed some shorts to ints.
10515 - *
10516 - * Revision 1.61  1994/11/17  13:36:35  rob
10517 - * Added better network hook in kconfig menu.
10518 - *
10519 - * Revision 1.60  1994/11/14  20:09:13  john
10520 - * Made Tab be default for automap.
10521 - *
10522 - * Revision 1.59  1994/11/13  16:34:07  matt
10523 - * Fixed victormaxx angle conversions
10524 - *
10525 - * Revision 1.58  1994/11/12  14:47:05  john
10526 - * Added support for victor head tracking.
10527 - *
10528 - * Revision 1.57  1994/11/08  15:14:55  john
10529 - * Added more calls so net doesn't die in net game.
10530 - *
10531 - * Revision 1.56  1994/11/07  14:01:07  john
10532 - * Changed the gamma correction sequencing.
10533 - *
10534 - * Revision 1.55  1994/11/01  16:40:08  john
10535 - * Added Gamma correction.
10536 - *
10537 - * Revision 1.54  1994/10/25  23:09:26  john
10538 - * Made the automap key configurable.
10539 - *
10540 - * Revision 1.53  1994/10/25  13:11:59  john
10541 - * Made keys the way Adam speced 'em for final game.
10542 - *
10543 - * Revision 1.52  1994/10/24  17:44:22  john
10544 - * Added stereo channel reversing.
10545 - *
10546 - * Revision 1.51  1994/10/22  13:23:18  john
10547 - * Made default rear view key be R.
10548 - *
10549 - * Revision 1.50  1994/10/22  13:20:09  john
10550 - * Took out toggle primary/secondary weapons.  Fixed black
10551 - * background for 'axes' and 'buttons' text.
10552 - *
10553 - * Revision 1.49  1994/10/21  15:20:15  john
10554 - * Made PrtScr do screen dump, not F2.
10555 - *
10556 - * Revision 1.48  1994/10/21  13:41:36  john
10557 - * Allowed F2 to screen dump.
10558 - *
10559 - * Revision 1.47  1994/10/17  13:07:05  john
10560 - * Moved the descent.cfg info into the player config file.
10561 - *
10562 - * Revision 1.46  1994/10/14  15:30:22  john
10563 - * Added Cyberman default positions.
10564 - *
10565 - * Revision 1.45  1994/10/14  15:24:54  john
10566 - * Made Cyberman work with config.
10567 - *
10568 - * Revision 1.44  1994/10/14  12:46:04  john
10569 - * Added the ability to reset all to default.
10570 - *
10571 - * Revision 1.43  1994/10/14  12:18:31  john
10572 - * Made mouse invert axis always be 0 or 1.
10573 - *
10574 - * Revision 1.42  1994/10/14  12:16:03  john
10575 - * Changed code so that by doing DEL+F12 saves the current kconfig
10576 - * values as default. Added support for drop_bomb key.  Took out
10577 - * unused slots for keyboard.  Made keyboard use control_type of 0
10578 - * save slots.
10579 - *
10580 - * Revision 1.41  1994/10/13  21:27:02  john
10581 - * Made axis invert value always be 0 or 1.
10582 - *
10583 - * Revision 1.40  1994/10/13  20:18:15  john
10584 - * Added some more system keys, such as F? and CAPSLOCK.
10585 - *
10586 - * Revision 1.39  1994/10/13  19:22:29  john
10587 - * Added separate config saves for different devices.
10588 - * Made all the devices work together better, such as mice won't
10589 - * get read when you're playing with the joystick.
10590 - *
10591 - * Revision 1.38  1994/10/13  15:41:57  mike
10592 - * Remove afterburner.
10593
10594 ------------------------------------------------------------------------
10595 main/kconfig.h:
10596
10597 - * Revision 1.1  1995/05/16  15:58:27  allender
10598 - * Initial revision
10599 - *
10600 - * Revision 2.0  1995/02/27  11:29:38  john
10601 - * New version 2.0, which has no anonymous unions, builds with
10602 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
10603 - *
10604 - * Revision 1.23  1995/01/12  11:41:44  john
10605 - * Added external control reading.
10606 - *
10607 - * Revision 1.22  1994/12/07  16:15:30  john
10608 - * Added command to check to see if a joystick axes has been used.
10609 - *
10610 - * Revision 1.21  1994/11/29  03:46:29  john
10611 - * Added joystick sensitivity; Added sound channels to detail menu.  Removed -maxchannels
10612 - * command line arg.
10613 - *
10614 - * Revision 1.20  1994/11/22  16:54:45  mike
10615 - * autorepeat on missiles.
10616 - *
10617 - * Revision 1.19  1994/11/07  14:01:27  john
10618 - * Changed the gamma correction sequencing.
10619 - *
10620 - * Revision 1.18  1994/11/01  16:40:02  john
10621 - * Added Gamma correction.
10622 - *
10623 - * Revision 1.17  1994/10/25  23:09:24  john
10624 - * Made the automap key configurable.
10625 - *
10626 - * Revision 1.16  1994/10/24  19:56:51  john
10627 - * Made the new user setup prompt for config options.
10628 - *
10629 - * Revision 1.15  1994/10/24  17:44:18  john
10630 - * Added stereo channel reversing.
10631 - *
10632 - * Revision 1.14  1994/10/22  13:19:33  john
10633 - * Took out toggle primary/secondary weapons.  Fixed black
10634 - * background for 'axes' and 'buttons' text.
10635 - *
10636 - * Revision 1.13  1994/10/17  13:06:51  john
10637 - * Moved the descent.cfg info into the player config file.
10638 - *
10639 - * Revision 1.12  1994/10/14  12:14:47  john
10640 - * Changed code so that by doing DEL+F12 saves the current kconfig
10641 - * values as default. Added support for drop_bomb key.  Took out
10642 - * unused slots for keyboard.  Made keyboard use control_type of 0
10643 - * save slots.
10644 - *
10645 - * Revision 1.11  1994/10/13  19:21:33  john
10646 - * Added separate config saves for different devices.
10647 - * Made all the devices work together better, such as mice won't
10648 - * get read when you're playing with the joystick.
10649 - *
10650 - * Revision 1.10  1994/10/13  15:18:41  john
10651 - * Started ripping out old afterburner, show message, show automap
10652 - * keys in the keyboard config stuff.
10653 - *
10654 - * Revision 1.9  1994/10/13  11:35:27  john
10655 - * Made Thrustmaster FCS Hat work.  Put a background behind the
10656 - * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
10657 - * menu to new menu. Made F6 be calibrate joystick.
10658 - *
10659 - * Revision 1.8  1994/10/06  14:10:50  matt
10660 - * New function reset_cruise()
10661 - *
10662 - * Revision 1.7  1994/10/03  14:58:25  john
10663 - * Added rear_view_down_state so that the rear view can
10664 - * work like the automap.
10665 - *
10666 - * Revision 1.6  1994/09/30  12:37:25  john
10667 - * Added midi,digi volume to configuration.
10668 - *
10669 - * Revision 1.5  1994/09/19  18:49:59  john
10670 - * Added switch to disable joystick.
10671 - *
10672 - * Revision 1.4  1994/09/15  16:11:21  john
10673 - * Added support for VFX1 head tracking. Fixed bug with memory over-
10674 - * write when using stereo mode.
10675 - *
10676 - * Revision 1.3  1994/09/12  11:47:38  john
10677 - * Made stupid cruise work better.  Make kconfig values get
10678 - * read/written to disk.
10679 - *
10680 - * Revision 1.2  1994/09/10  15:46:55  john
10681 - * First version of new keyboard configuration.
10682 - *
10683 - * Revision 1.1  1994/09/10  13:51:40  john
10684 - * Initial revision
10685
10686 ------------------------------------------------------------------------
10687 main/kmatrix.c:
10688
10689 - * Revision 1.6  1995/09/24  10:57:48  allender
10690 - * made any key move off of kill matrix screen as text indicates it should
10691 - *
10692 - * Revision 1.5  1995/08/18  08:33:05  allender
10693 - * fixed text problem with top level player names
10694 - *
10695 - * Revision 1.4  1995/07/26  17:03:05  allender
10696 - * sort of fixed spacing for mac
10697 - *
10698 - * Revision 1.3  1995/06/06  15:36:14  allender
10699 - * be sure to bitblt to screen inside of kmatrix loop
10700 - *
10701 - * Revision 1.2  1995/06/02  07:47:15  allender
10702 - * removed bogus include files
10703 - *
10704 - * Revision 1.1  1995/05/16  15:27:07  allender
10705 - * Initial revision
10706 - *
10707 - * Revision 2.3  1995/05/02  17:01:22  john
10708 - * Fixed bug with kill list not showing up in VFX mode.
10709 - *
10710 - * Revision 2.2  1995/03/21  14:38:20  john
10711 - * Ifdef'd out the NETWORK code.
10712 - *
10713 - * Revision 2.1  1995/03/06  15:22:54  john
10714 - * New screen techniques.
10715 - *
10716 - * Revision 2.0  1995/02/27  11:25:56  john
10717 - * New version 2.0, which has no anonymous unions, builds with
10718 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
10719 - *
10720 - * Revision 1.19  1995/02/15  14:47:23  john
10721 - * Added code to keep track of kills during endlevel.
10722 - *
10723 - * Revision 1.18  1995/02/08  11:00:06  rob
10724 - * Moved string to localized file
10725 - *
10726 - * Revision 1.17  1995/02/01  23:45:55  rob
10727 - * Fixed string.
10728 - *
10729 - * Revision 1.16  1995/01/30  21:47:11  rob
10730 - * Added a line of instructions.
10731 - *
10732 - * Revision 1.15  1995/01/20  16:58:43  rob
10733 - * careless careless careless...
10734 - *
10735 - *
10736 - * Revision 1.14  1995/01/20  13:43:48  rob
10737 - * Longer time to view.
10738 - *
10739 - * Revision 1.13  1995/01/20  13:42:34  rob
10740 - * Fixed sorting bug.
10741 - *
10742 - * Revision 1.12  1995/01/19  17:35:21  rob
10743 - * Fixed coloration of player names in team mode.
10744 - *
10745 - * Revision 1.11  1995/01/16  21:26:15  rob
10746 - * Fixed it!!
10747 - *
10748 - * Revision 1.10  1995/01/16  18:55:41  rob
10749 - * Added include of network.h
10750 - *
10751 - * Revision 1.9  1995/01/16  18:22:35  rob
10752 - * Fixed problem with signs.
10753 - *
10754 - * Revision 1.8  1995/01/12  16:07:51  rob
10755 - * ADded sorting before display.
10756 - *
10757 - * Revision 1.7  1995/01/04  08:46:53  rob
10758 - * JOHN CHECKED IN FOR ROB !!!
10759 - *
10760 - * Revision 1.6  1994/12/09  20:17:20  yuan
10761 - * Touched up
10762 - *
10763 - * Revision 1.5  1994/12/09  19:46:35  yuan
10764 - * Localized the sucker.
10765 - *
10766 - * Revision 1.4  1994/12/09  19:24:58  rob
10767 - * Yuan's fix to the centering.
10768 - *
10769 - * Revision 1.3  1994/12/09  19:02:37  yuan
10770 - * Cleaned up a bit.
10771 - *
10772 - * Revision 1.2  1994/12/09  16:19:46  yuan
10773 - * kill matrix stuff.
10774 - *
10775 - * Revision 1.1  1994/12/09  15:08:58  yuan
10776 - * Initial revision
10777
10778 ------------------------------------------------------------------------
10779 main/kmatrix.h:
10780
10781 - * Revision 1.1  1995/05/16  15:58:35  allender
10782 - * Initial revision
10783 - *
10784 - * Revision 2.0  1995/02/27  11:28:51  john
10785 - * New version 2.0, which has no anonymous unions, builds with
10786 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
10787 - *
10788 - * Revision 1.3  1995/02/15  14:47:39  john
10789 - * Added code to keep track of kills during endlevel.
10790 - *
10791 - * Revision 1.2  1994/12/09  16:19:46  yuan
10792 - * kill matrix stuff.
10793 - *
10794 - * Revision 1.1  1994/12/09  15:58:33  yuan
10795 - * Initial revision
10796
10797 ------------------------------------------------------------------------
10798 main/laser.c:
10799
10800 - * Revision 1.1  1993/11/29  17:19:02  john
10801 - * Initial revision
10802
10803 ------------------------------------------------------------------------
10804 main/laser.h:
10805
10806 - * Revision 1.1  1995/05/16  15:58:43  allender
10807 - * Initial revision
10808 - *
10809 - * Revision 2.0  1995/02/27  11:32:27  john
10810 - * New version 2.0, which has no anonymous unions, builds with
10811 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
10812 - *
10813 - * Revision 1.50  1995/02/01  21:03:44  john
10814 - * Lintified.
10815 - *
10816 - * Revision 1.49  1995/02/01  16:34:11  john
10817 - * Linted.
10818 - *
10819 - * Revision 1.48  1995/01/31  16:16:16  mike
10820 - * Separate smart blobs for robot and player.
10821 - *
10822 - * Revision 1.47  1995/01/27  17:02:55  mike
10823 - * Add LASER_ID -- why wasn't this added in June?
10824 - *
10825 - * Revision 1.46  1995/01/25  10:53:27  mike
10826 - * make badass damage go through grates.
10827 - *
10828 - * Revision 1.45  1994/12/12  17:17:32  mike
10829 - * make boss cloak/teleport when get hit, make quad laser 3/4 as powerful.
10830 - *
10831 - * Revision 1.44  1994/12/04  16:17:23  mike
10832 - * spruce up homing missile behavior.
10833 - *
10834 - * Revision 1.43  1994/12/03  12:48:30  mike
10835 - * make homing missile tracking not frame rate dependent (more-or-less)
10836 - *
10837 - * Revision 1.42  1994/10/12  08:04:54  mike
10838 - * Clean up proximity/homing mess.
10839 - *
10840 - * Revision 1.41  1994/10/09  20:07:04  rob
10841 - * Change prototype for do_laser_firing
10842 - *
10843 - * Revision 1.40  1994/10/09  00:15:48  mike
10844 - * Add constants for super mech missile, regular mech missile, silent spreadfire.
10845 - *
10846 - * Revision 1.39  1994/10/08  19:52:09  rob
10847 - * Added new weapon fire flags.
10848 - *
10849 - * Revision 1.38  1994/10/07  15:31:12  mike
10850 - * Prototypes for new laser functions which don't necessarily make sound.
10851 - *
10852 - * Revision 1.37  1994/10/05  17:08:29  matt
10853 - * Fixed a couple of small bugs, and made homing missiles alternate sides
10854 - *
10855 - * Revision 1.36  1994/09/28  14:28:55  rob
10856 - * Added firing of missiles on networks/serial.
10857 - *
10858 - * Revision 1.35  1994/09/24  14:17:02  mike
10859 - * Prototype do_laser_firing.
10860 - *
10861 - * Revision 1.34  1994/09/23  11:36:49  mike
10862 - * Prototype Laser_create_new_easy.
10863 - *
10864 - * Revision 1.33  1994/09/20  11:55:01  mike
10865 - * Fix bug.
10866 - *
10867 - * Revision 1.32  1994/09/20  11:48:34  mike
10868 - * Change spreadfire laser to use new bitmap. (Define SPREADFIRE_ID)
10869 - *
10870 - * Revision 1.31  1994/09/15  16:31:28  mike
10871 - * Prototype object_to_object_visibility.
10872 - *
10873 - * Revision 1.30  1994/09/10  17:31:40  mike
10874 - * Add thrust to weapons.
10875 - *
10876 - * Revision 1.29  1994/09/08  14:49:44  mike
10877 - * Bunch of IDs for new weapon types.
10878 - *
10879 - * Revision 1.28  1994/09/07  19:16:40  mike
10880 - * Homing missile.
10881 - *
10882 - * Revision 1.27  1994/09/07  15:59:47  mike
10883 - * Kill FLARE_MAX_TIME (now defined in bitmaps.tbl), add PROXIMITY_ID (shame!), prototype do_laser_firing, do_missile_firing.
10884 - *
10885 - * Revision 1.26  1994/09/03  15:22:41  mike
10886 - * Kill Projectile_player_fire prototype.
10887 - *
10888 - * Revision 1.25  1994/09/02  16:39:00  mike
10889 - * IDs for primary weapons.
10890 - *
10891 - * Revision 1.24  1994/09/02  11:55:54  mike
10892 - * Define some illegal constants.
10893 - *
10894 - * Revision 1.23  1994/08/25  18:12:06  matt
10895 - * Made player's weapons and flares fire from the positions on the 3d model.
10896 - * Also added support for quad lasers.
10897 - *
10898 - * Revision 1.22  1994/08/19  15:22:28  mike
10899 - * Define constant for MAX_LASER_LEVEL.
10900 - *
10901 - * Revision 1.21  1994/08/13  12:20:47  john
10902 - * Made the networking uise the Players array.
10903 - *
10904 - * Revision 1.20  1994/08/10  10:44:05  john
10905 - * Made net players fire..
10906 - *
10907 - * Revision 1.19  1994/06/27  18:30:57  mike
10908 - * Add flares.
10909 - *
10910 - * Revision 1.18  1994/06/09  15:32:37  mike
10911 - * Muzzle flash
10912 - *
10913 - * Revision 1.17  1994/05/19  09:09:00  mike
10914 - * Move a bunch of laser variables to bm.h, I think.
10915 - * Also, added Robot_laser_speed, instead of hard-coding Laser_speed/4.
10916 - *
10917 - * Revision 1.16  1994/05/14  17:16:20  matt
10918 - * Got rid of externs in source (non-header) files
10919 - *
10920 - * Revision 1.15  1994/05/13  20:27:39  john
10921 - * Version II of John's new object code.
10922 - *
10923 - * Revision 1.14  1994/04/20  15:06:47  john
10924 - * Neatend laser code and fixed some laser bugs.
10925 - *
10926 - * Revision 1.13  1994/04/01  13:35:15  matt
10927 - * Cleaned up laser code a bit; moved some code here object.c to laser.c
10928 - *
10929 - * Revision 1.12  1994/04/01  11:14:24  yuan
10930 - * Added multiple bitmap functionality to all objects...
10931 - * (hostages, powerups, lasers, etc.)
10932 - * Hostages and powerups are implemented in the object system,
10933 - * just need to finish function call to "affect" player.
10934 - *
10935 - * Revision 1.11  1994/03/31  09:10:09  matt
10936 - * Added #define to turn crosshair off
10937 - *
10938 - * Revision 1.10  1994/02/17  11:33:15  matt
10939 - * Changes in object system
10940 - *
10941 - * Revision 1.9  1994/01/06  11:56:01  john
10942 - * Made lasers be lines, not purple blobs
10943 - *
10944 - * Revision 1.8  1994/01/05  10:53:35  john
10945 - * New object code by John.
10946 - *
10947 - * Revision 1.7  1993/12/08  14:21:36  john
10948 - * Added ExplodeObject
10949 - *
10950 - * Revision 1.6  1993/12/08  11:28:54  john
10951 - * Made lasers look like bolts.
10952 - *
10953 - * Revision 1.5  1993/12/01  13:12:40  john
10954 - * made lasers frame-rate independant
10955 - *
10956 - * Revision 1.4  1993/11/30  19:00:42  john
10957 - * lasers working kinda
10958 - *
10959 - * Revision 1.3  1993/11/29  19:44:53  john
10960 - * *** empty log message ***
10961 - *
10962 - * Revision 1.2  1993/11/29  17:44:55  john
10963 - * *** empty log message ***
10964 - *
10965 - * Revision 1.1  1993/11/29  17:19:19  john
10966 - * Initial revision
10967
10968 ------------------------------------------------------------------------
10969 main/lighting.c:
10970
10971  * Revision 1.4  1995/09/20  14:26:12  allender
10972  * more optimizations(?) ala MK
10973  *
10974  * Revision 1.2  1995/07/05  21:27:31  allender
10975  * new and improved lighting code by MK!
10976  *
10977  * Revision 2.1  1995/07/24  13:21:56  john
10978  * Added new lighting calculation code to speed things up.
10979  *
10980  * Revision 2.0  1995/02/27  11:27:33  john
10981  * New version 2.0, which has no anonymous unions, builds with
10982  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
10983  *
10984  * Revision 1.43  1995/02/22  13:57:10  allender
10985  * remove anonymous union from object structure
10986  *
10987  * Revision 1.42  1995/02/13  20:35:07  john
10988  * Lintized
10989  *
10990  * Revision 1.41  1995/02/04  21:43:40  matt
10991  * Changed an assert() to an int3() and deal with the bad case
10992  *
10993  * Revision 1.40  1995/01/15  20:48:27  mike
10994  * support light field for powerups.
10995  *
10996  * Revision 1.39  1994/12/15  13:04:19  mike
10997  * Replace Players[Player_num].time_total references with GameTime.
10998  *
10999  * Revision 1.38  1994/11/28  21:50:41  mike
11000  * optimizations.
11001  *
11002  * Revision 1.37  1994/11/28  01:32:33  mike
11003  * lighting optimization.
11004  *
11005  * Revision 1.36  1994/11/15  12:01:00  john
11006  * Changed a bunch of code that uses timer_get_milliseconds to
11007  * timer_get_fixed_Seconds.
11008  *
11009  * Revision 1.35  1994/10/31  21:56:07  matt
11010  * Fixed bug & added error checking
11011  *
11012  * Revision 1.34  1994/10/21  11:24:57  mike
11013  * Trap divide overflows in lighting.
11014  *
11015  * Revision 1.33  1994/10/08  14:49:11  matt
11016  * If viewer changed, don't do smooth lighting hack
11017  *
11018  * Revision 1.32  1994/09/25  23:41:07  matt
11019  * Changed the object load & save code to read/write the structure fields one
11020  * at a time (rather than the whole structure at once).  This mean that the
11021  * object structure can be changed without breaking the load/save functions.
11022  * As a result of this change, the local_object data can be and has been
11023  * incorporated into the object array.  Also, timeleft is now a property
11024  * of all objects, and the object structure has been otherwise cleaned up.
11025  *
11026  * Revision 1.31  1994/09/25  15:45:15  matt
11027  * Added OBJ_LIGHT, a type of object that casts light
11028  * Added generalized lifeleft, and moved it to local_object
11029  *
11030  * Revision 1.30  1994/09/11  15:48:27  mike
11031  * Use vm_vec_mag_quick in place of vm_vec_mag in point_dist computation.
11032  *
11033  * Revision 1.29  1994/09/08  21:44:49  matt
11034  * Made lighting ramp 4x as fast; made only static (ambient) light ramp
11035  * up, but not headlight & dynamic light
11036  *
11037  * Revision 1.28  1994/09/02  14:00:07  matt
11038  * Simplified explode_object() & mutliple-stage explosions
11039  *
11040  * Revision 1.27  1994/08/29  19:06:44  mike
11041  * Make lighting proportional to square of distance, not linear.
11042  *
11043  * Revision 1.26  1994/08/25  18:08:38  matt
11044  * Made muzzle flash cast 3x as much light
11045  *
11046  * Revision 1.25  1994/08/23  16:38:31  mike
11047  * Key weapon light off bitmaps.tbl.
11048  *
11049  * Revision 1.24  1994/08/13  12:20:44  john
11050  * Made the networking uise the Players array.
11051  *
11052  * Revision 1.23  1994/08/12  22:42:18  john
11053  * Took away Player_stats; added Players array.
11054  *
11055  * Revision 1.22  1994/07/06  10:19:22  matt
11056  * Changed include
11057  *
11058  * Revision 1.21  1994/06/28  13:20:22  mike
11059  * Oops, fixed a dumb typo.
11060  *
11061  * Revision 1.20  1994/06/28  12:53:25  mike
11062  * Change lighting function for flares, make brighter and asynchronously flicker.
11063  *
11064  * Revision 1.19  1994/06/27  18:31:15  mike
11065  * Add flares.
11066  *
11067  * Revision 1.18  1994/06/20  13:41:17  matt
11068  * Added time-based gradual lighting hack for objects
11069  * Took out strobing robots
11070  *
11071  * Revision 1.17  1994/06/19  16:25:54  mike
11072  * Optimize lighting.
11073  *
11074  * Revision 1.16  1994/06/17  18:08:08  mike
11075  * Make robots cast more and variable light.
11076  *
11077  * Revision 1.15  1994/06/13  15:15:55  mike
11078  * Fix phantom light, every 64K milliseconds, muzzle flash would flash again.
11079
11080 ------------------------------------------------------------------------
11081 main/lighting.h:
11082
11083 - * Revision 1.1  1995/05/16  15:58:51  allender
11084 - * Initial revision
11085 - *
11086 - * Revision 2.0  1995/02/27  11:27:52  john
11087 - * New version 2.0, which has no anonymous unions, builds with
11088 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11089 - *
11090 - * Revision 1.6  1994/11/28  21:50:56  mike
11091 - * optimizations.
11092 - *
11093 - * Revision 1.5  1994/06/07  16:51:58  matt
11094 - * Made object lighting work correctly; changed name of Ambient_light to
11095 - * Dynamic_light; cleaned up polygobj object rendering a little.
11096 - *
11097 - * Revision 1.4  1994/05/31  18:41:35  matt
11098 - * Added comments
11099 - *
11100 - * Revision 1.3  1994/05/23  15:00:08  mike
11101 - * Change MIN_LIGHT_DIST.
11102 - *
11103 - * Revision 1.2  1994/05/22  15:30:09  mike
11104 - * First version.
11105 - *
11106 - * Revision 1.1  1994/05/22  15:16:44  mike
11107 - * Initial revision
11108
11109 ------------------------------------------------------------------------
11110 main/menu.h:
11111
11112 - * Revision 1.1  1995/05/16  15:59:14  allender
11113 - * Initial revision
11114 - *
11115 - * Revision 2.1  1995/03/06  16:47:41  mike
11116 - * destination saturn
11117 - *
11118 - * Revision 2.0  1995/02/27  11:29:47  john
11119 - * New version 2.0, which has no anonymous unions, builds with
11120 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11121 - *
11122 - * Revision 1.34  1994/12/12  00:16:16  john
11123 - * Added auto-leveling flag.
11124 - *
11125 - * Revision 1.33  1994/12/07  20:04:26  mike
11126 - * set Max_debris_objects.
11127 - *
11128 - * Revision 1.32  1994/11/14  17:23:19  rob
11129 - * ADded extern for default difficulty settings.
11130 - *
11131 - * Revision 1.31  1994/11/10  11:08:29  mike
11132 - * detail level stuff.
11133 - *
11134 - * Revision 1.30  1994/11/05  14:05:53  john
11135 - * Fixed fade transitions between all screens by making gr_palette_fade_in and out keep
11136 - * track of whether the palette is faded in or not.  Then, wherever the code needs to fade out,
11137 - * it just calls gr_palette_fade_out and it will fade out if it isn't already.  The same with fade_in.
11138 - * This eliminates the need for all the flags like Menu_fade_out, game_fade_in palette, etc.
11139 - *
11140 - * Revision 1.29  1994/11/02  11:59:44  john
11141 - * Moved menu out of game into inferno main loop.
11142 - *
11143 - * Revision 1.28  1994/10/17  20:30:59  john
11144 - * Made the text for the difficulty labels global so that
11145 - * the high score screen can print "rookie" or whatever.
11146 - *
11147 - * Revision 1.27  1994/10/04  10:47:09  matt
11148 - * Made main menu remember selected item
11149 - *
11150 - * Revision 1.26  1994/08/10  19:55:19  john
11151 - * Changed font stuff; Took out old menu; messed up lots of
11152 - * other stuff like game sequencing messages, etc.
11153 - *
11154 - * Revision 1.25  1994/06/23  18:54:09  matt
11155 - * Cleaned up game start/menu interaction, and improved main menu a little
11156 - *
11157 - * Revision 1.24  1994/06/21  12:11:50  yuan
11158 - * Fixed up menus and added HUDisplay messages.
11159 - *
11160 - * Revision 1.23  1994/06/20  23:15:16  yuan
11161 - * Color switching capability for the menus.
11162 - *
11163 - * Revision 1.22  1994/06/20  22:02:25  yuan
11164 - * Made menu GREEN by POPULAR DEMAND!!
11165 - *
11166 - * Revision 1.21  1994/06/20  21:05:48  yuan
11167 - * Fixed up menus.
11168 - *
11169 - * Revision 1.20  1994/06/20  19:19:29  yuan
11170 - * Tidied up the menu and the "message blocks" between levels, etc.
11171 - *
11172 - * Revision 1.19  1994/06/17  18:01:10  john
11173 - * A bunch of new stuff by John
11174 - *
11175 - * Revision 1.18  1994/05/16  09:37:22  matt
11176 - * Got rid of global continue_flag
11177 - *
11178 - * Revision 1.17  1994/05/14  17:14:51  matt
11179 - * Got rid of externs in source (non-header) files
11180 - *
11181 - * Revision 1.16  1994/05/10  12:14:26  yuan
11182 - * Game save/load... Demo levels 1-5 added...
11183 - * High scores fixed...
11184 - *
11185 - * Revision 1.15  1994/05/05  09:21:21  yuan
11186 - * *** empty log message ***
11187 - *
11188 - * Revision 1.14  1994/04/29  14:55:40  mike
11189 - * Change some menu colors.
11190 - *
11191 - * Revision 1.13  1994/04/28  18:04:36  yuan
11192 - * Gamesave added.
11193 - * Trigger problem fixed (seg pointer is replaced by index now.)
11194 - *
11195 - * Revision 1.12  1994/02/18  11:55:01  yuan
11196 - * Fixed menu to be called from game.
11197 - *
11198 - * Revision 1.11  1994/02/10  17:45:39  yuan
11199 - * Integrated some hacks which still need to be fixed.
11200 - *
11201 - * Revision 1.10  1994/02/01  22:50:23  yuan
11202 - * Final menu version for demo
11203 - *
11204 - * Revision 1.9  1994/02/01  11:50:17  yuan
11205 - * Moved quit message down just a tiny bit
11206 - *
11207 - * Revision 1.8  1994/01/31  17:30:16  yuan
11208 - * Fixed quit not disappearing problem
11209 - *
11210 - * Revision 1.7  1994/01/31  12:25:20  yuan
11211 - * New menu stuff
11212 - *
11213 - * Revision 1.6  1994/01/26  13:14:04  john
11214 - * *** empty log message ***
11215 - *
11216 - * Revision 1.5  1993/12/29  16:44:44  yuan
11217 - * Added some function definitions
11218 - *
11219 - * Revision 1.4  1993/12/13  18:53:12  yuan
11220 - * Fixed dependency problem
11221 - *
11222 - * Revision 1.3  1993/12/12  13:53:51  yuan
11223 - * Added menu and -g flag
11224 - *
11225 - * Revision 1.2  1993/12/10  16:07:17  yuan
11226 - * Working on menu system.  Updated the title screen.
11227 - *
11228 - * Revision 1.1  1993/12/10  12:45:27  yuan
11229 - * Initial revision
11230
11231 ------------------------------------------------------------------------
11232 main/mglobal.c:
11233
11234 - * Revision 1.1  1995/12/05  16:03:10  allender
11235 - * Initial revision
11236 - *
11237 - * Revision 1.3  1995/10/10  11:49:41  allender
11238 - * removed malloc of static data now in ai module
11239 - *
11240 - * Revision 1.2  1995/07/12  12:48:52  allender
11241 - * malloc out edge_list global here, not static in automap.c
11242 - *
11243 - * Revision 1.1  1995/05/16  15:27:40  allender
11244 - * Initial revision
11245 - *
11246 - * Revision 2.2  1995/03/14  18:24:37  john
11247 - * Force Destination Saturn to use CD-ROM drive.
11248 - *
11249 - * Revision 2.1  1995/03/06  16:47:23  mike
11250 - * destination saturn
11251 - *
11252 - * Revision 2.0  1995/02/27  11:30:00  john
11253 - * New version 2.0, which has no anonymous unions, builds with
11254 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11255 - *
11256 - * Revision 1.43  1995/01/19  17:00:53  john
11257 - * Made save game work between levels.
11258 - *
11259 - * Revision 1.42  1994/12/05  14:23:53  adam
11260 - * changed default detail to max, not custom
11261 - *
11262 - * Revision 1.41  1994/11/19  15:15:07  mike
11263 - * remove unused code and data
11264 - *
11265 - * Revision 1.40  1994/11/03  10:13:19  yuan
11266 - * Added #include "game.h"
11267 - *
11268 - * Revision 1.39  1994/11/03  10:09:59  matt
11269 - * Properly initialize detail & difficulty levels
11270 - *
11271 - * Revision 1.38  1994/10/30  14:11:21  mike
11272 - * rip out local segments stuff.
11273 - *
11274 - * Revision 1.37  1994/10/26  15:21:30  mike
11275 - * detail level.
11276 - *
11277 - * Revision 1.36  1994/09/22  10:46:12  mike
11278 - * Add difficulty levels.
11279 - *
11280 - * Revision 1.35  1994/09/13  11:19:11  mike
11281 - * Add Next_missile_fire_time.
11282 - *
11283 - * Revision 1.34  1994/08/31  19:25:34  mike
11284 - * GameTime and laser-firing limiting stuff added.
11285 - *
11286 - * Revision 1.33  1994/08/11  18:58:53  mike
11287 - * Add Side_to_verts_int.
11288 - *
11289 - * Revision 1.32  1994/07/21  19:01:38  mike
11290 - * Add Lsegment.
11291 - *
11292 - * Revision 1.31  1994/07/21  13:11:24  matt
11293 - * Ripped out remants of old demo system, and added demo only system that
11294 - * disables object movement and game options from menu.
11295 - *
11296 - * Revision 1.30  1994/06/17  18:06:48  matt
11297 - * Made password be treated as lowercase, since cmdline parsing converts
11298 - * everything to lowercase.
11299 - *
11300 - * Revision 1.29  1994/03/15  16:33:04  yuan
11301 - * Cleaned up bm-loading code.
11302 - * (Fixed structures too)
11303 - *
11304 - * Revision 1.28  1994/02/17  11:32:45  matt
11305 - * Changes in object system
11306 - *
11307 - * Revision 1.27  1994/02/16  17:08:43  matt
11308 - * Added needed include of 3d.h
11309 - *
11310 - * Revision 1.26  1994/02/16  13:47:58  mike
11311 - * fix bugs so editor can compile out.
11312 - *
11313 - * Revision 1.25  1994/02/11  21:52:13  matt
11314 - * Made password protection selectable by #define (and thus INFERNO.INI)
11315 - *
11316 - * Revision 1.24  1994/02/10  15:35:56  matt
11317 - * Various changes to make editor compile out.
11318 - *
11319 - * Revision 1.23  1994/02/02  12:34:29  mike
11320 - * take out BATS encryption.
11321 - *
11322 - * Revision 1.22  1994/01/21  16:08:11  matt
11323 - * Added FrameCount variable
11324 - *
11325 - * Revision 1.21  1994/01/06  17:13:10  john
11326 - * Added Video clip functionality
11327 - *
11328 - * Revision 1.20  1993/12/08  17:45:08  matt
11329 - * Changed password again
11330 - *
11331 - * Revision 1.19  1993/12/08  17:41:05  matt
11332 - * Changed password
11333 - *
11334 - * Revision 1.18  1993/12/08  10:55:10  mike
11335 - * Add free_obj_list
11336 - *
11337 - * Revision 1.17  1993/12/07  13:46:38  john
11338 - * Added Explosion bitmap array
11339 - *
11340 - * Revision 1.16  1993/12/06  18:40:35  matt
11341 - * Changed object loading & handling
11342 - *
11343 - * Revision 1.15  1993/12/05  22:47:48  matt
11344 - * Reworked include files in an attempt to cut down on build times
11345 - *
11346 - * Revision 1.14  1993/12/01  11:44:11  matt
11347 - * Chagned Frfract to FrameTime
11348 - *
11349 - * Revision 1.13  1993/12/01  00:27:11  yuan
11350 - * Implemented new bitmap structure system...
11351 - * overall bitmap scheme still needs some work.
11352 - *
11353 - * Revision 1.12  1993/11/19  17:21:59  matt
11354 - * Changed the bitmap number of object class UNICLASS
11355 - * Removed static initialization for objects
11356 - *
11357 - * Revision 1.11  1993/11/18  13:51:47  mike
11358 - * Add Classes, Class_views, Objects
11359 - *
11360 - * Revision 1.10  1993/11/04  18:52:36  matt
11361 - * Made Vertices[] and Segment_points[] use same constant for size, since
11362 - * they must be the same size anyway
11363 - *
11364 - * Revision 1.9  1993/11/04  14:01:06  matt
11365 - * Mucked with include files
11366 - *
11367 - * Revision 1.8  1993/10/26  13:58:42  mike
11368 - * Add password protection.
11369 - *
11370 - * Revision 1.7  1993/10/14  18:05:50  mike
11371 - * Change Side_to_verts to use MAX_SIDES_PER_SEGMENT in place of CONNECTIVITY
11372 - *
11373 - * Revision 1.6  1993/10/12  13:57:19  john
11374 - * added texture[]
11375 - *
11376 - * Revision 1.5  1993/10/12  09:58:15  mike
11377 - * Move Side_to_verts here from eglobal.c, since it is needed in the game.
11378 - *
11379 - * Revision 1.4  1993/10/09  15:52:30  mike
11380 - * Move test_pos, test_orient here from render.c.
11381 - *
11382 - * Revision 1.3  1993/10/02  18:15:45  mike
11383 - * Killed include of segment.h, which gets included by inferno.h.
11384 - *
11385 - * Revision 1.2  1993/09/23  17:54:24  mike
11386 - * Add Segment_points
11387 - *
11388 - * Revision 1.1  1993/09/23  15:01:50  mike
11389 - * Initial revision
11390
11391 ------------------------------------------------------------------------
11392 main/mission.c:
11393
11394 - * Revision 1.4  1995/10/31  10:21:40  allender
11395 - * no mission support in shareware
11396 - *
11397 - * Revision 1.3  1995/10/21  22:53:04  allender
11398 - * moved missions to data folder
11399 - *
11400 - * Revision 1.2  1995/09/13  08:47:29  allender
11401 - * made to work with Chris' direct stuff
11402 - *
11403 - * Revision 1.1  1995/05/16  15:27:48  allender
11404 - * Initial revision
11405 - *
11406 - * Revision 2.9  1995/05/26  16:16:32  john
11407 - * Split SATURN into define's for requiring cd, using cd, etc.
11408 - * Also started adding all the Rockwell stuff.
11409 - *
11410 - * Revision 2.8  1995/03/20  15:49:31  mike
11411 - * Remove eof char from comment which confused make depend, causing
11412 - * no mission.obj: line in makefile.  Pretty stupid tool, huh?
11413 - *
11414 - * Revision 2.7  1995/03/20  12:12:11  john
11415 - * Added ifdef SATURN.
11416 - *
11417 - * Revision 2.6  1995/03/15  14:32:49  john
11418 - * Added code to force the Descent CD-rom in the drive.
11419 - *
11420 - * Revision 2.5  1995/03/15  11:41:15  john
11421 - * Better Saturn CD-ROM support.
11422 - *
11423 - * Revision 2.4  1995/03/14  18:24:14  john
11424 - * Force Destination Saturn to use CD-ROM drive.
11425 - *
11426 - * Revision 2.3  1995/03/07  14:19:41  mike
11427 - * More destination saturn stuff.
11428 - *
11429 - * Revision 2.2  1995/03/06  23:09:03  mike
11430 - * more saturn stuff: make briefings work for saturn mission.
11431 - *
11432 - * Revision 2.1  1995/03/06  16:47:48  mike
11433 - * destination saturn
11434 - *
11435 - * Revision 2.0  1995/02/27  11:27:49  john
11436 - * New version 2.0, which has no anonymous unions, builds with
11437 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11438 - *
11439 - * Revision 1.14  1995/02/15  11:30:37  john
11440 - * Fixed bug with potential mem overwrite on line 160.
11441 - *
11442 - * Revision 1.13  1995/02/10  17:53:20  matt
11443 - * Changed mission name again
11444 - *
11445 - * Revision 1.12  1995/02/10  17:35:38  matt
11446 - * Changed name of built-in mission
11447 - *
11448 - * Revision 1.11  1995/02/07  17:13:51  allender
11449 - * removed return statement in load_mission so that built in mission will
11450 - * actually set the Current_mission_name and _filename
11451 - *
11452 - * Revision 1.10  1995/01/31  01:19:45  matt
11453 - * Made build_mission_list() sort missions by name
11454 - *
11455 - * Revision 1.9  1995/01/30  13:49:58  allender
11456 - * changed build_mission_list in load_mission_by_name to include
11457 - * anarchy levels.
11458 - *
11459 - * Revision 1.8  1995/01/30  13:03:51  matt
11460 - * Fixed dumb mistake
11461 - *
11462 - * Revision 1.7  1995/01/30  12:55:22  matt
11463 - * Added vars to point to mission names
11464 - *
11465 - * Revision 1.6  1995/01/22  18:57:28  matt
11466 - * Made player highest level work with missions
11467 - *
11468 - * Revision 1.5  1995/01/22  14:13:08  matt
11469 - * Added flag in mission list for anarchy-only missions
11470 - *
11471 - * Revision 1.4  1995/01/21  23:13:12  matt
11472 - * Made high scores with (not work, really) with loaded missions
11473 - * Don't give player high score when quit game
11474 - *
11475 - * Revision 1.3  1995/01/21  16:27:12  matt
11476 - * Made endlevel briefing work with missions
11477 - *
11478 - * Revision 1.2  1995/01/20  22:47:50  matt
11479 - * Mission system implemented, though imcompletely
11480 - *
11481 - * Revision 1.1  1995/01/20  13:42:19  matt
11482 - * Initial revision
11483
11484 ------------------------------------------------------------------------
11485 main/mission.h:
11486
11487 - * Revision 1.1  1995/05/16  15:59:22  allender
11488 - * Initial revision
11489 - *
11490 - * Revision 2.0  1995/02/27  11:31:35  john
11491 - * New version 2.0, which has no anonymous unions, builds with
11492 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11493 - *
11494 - * Revision 1.6  1995/01/30  12:55:41  matt
11495 - * Added vars to point to mission names
11496 - *
11497 - * Revision 1.5  1995/01/22  18:57:21  matt
11498 - * Made player highest level work with missions
11499 - *
11500 - * Revision 1.4  1995/01/22  14:13:21  matt
11501 - * Added flag in mission list for anarchy-only missions
11502 - *
11503 - * Revision 1.3  1995/01/21  23:13:12  matt
11504 - * Made high scores with (not work, really) with loaded missions
11505 - * Don't give player high score when quit game
11506 - *
11507 - * Revision 1.2  1995/01/20  22:47:53  matt
11508 - * Mission system implemented, though imcompletely
11509 - *
11510 - * Revision 1.1  1995/01/20  13:42:26  matt
11511 - * Initial revision
11512
11513 ------------------------------------------------------------------------
11514 main/modem.h:
11515
11516 - * Revision 1.2  1995/09/05  14:06:40  allender
11517 - * checkpoint again
11518 - *
11519 - * Revision 1.1  1995/05/16  15:59:29  allender
11520 - * Initial revision
11521 - *
11522 - * Revision 2.1  1995/03/21  14:40:38  john
11523 - * Ifdef'd out the NETWORK code.
11524 - *
11525 - * Revision 2.0  1995/02/27  11:31:34  john
11526 - * New version 2.0, which has no anonymous unions, builds with
11527 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11528 - *
11529 - * Revision 1.18  1994/11/22  17:12:05  rob
11530 - * Starting working on secret level fix for modem games.
11531 - *
11532 - * Revision 1.17  1994/11/17  16:43:17  rob
11533 - * Added prototype for com_level_sync function.
11534 - *
11535 - * Revision 1.16  1994/11/15  21:30:32  rob
11536 - * Added prototype for new menu hook.
11537 - *
11538 - * Revision 1.15  1994/10/07  16:15:33  rob
11539 - * Changed calls to multi_send_position.
11540 - *
11541 - * Revision 1.14  1994/10/07  12:52:24  rob
11542 - * Fixed some problems.
11543 - *
11544 - * Revision 1.13  1994/10/07  11:25:47  rob
11545 - * Tried to fix modem to work with new multi stuff.  Still a bit jacked up, tho.
11546 - *
11547 - * Revision 1.12  1994/10/05  19:14:50  rob
11548 - * Exported macros and arrays to support network object mapping.
11549 - *
11550 - * Revision 1.11  1994/10/05  17:48:59  rob
11551 - * Several changes, most to end_of_level sequencing.
11552 - *
11553 - * Revision 1.10  1994/10/05  14:22:54  rob
11554 - * Added com_end_level.
11555 - *
11556 - * Revision 1.9  1994/09/30  18:37:22  rob
11557 - * Another day's worth of work.  Mostly menus, error checking.  Added
11558 - * level checksums during sync, carrier detect during all com calls,
11559 - * generic com_abort() procedure for bailing out, and nm_messagebox
11560 - * handling of QUIT instead of HUD message (which never gets seen).
11561 - *
11562 - * Revision 1.8  1994/09/29  20:55:16  rob
11563 - * Lots of changes.
11564 - *
11565 - * Revision 1.7  1994/09/29  16:09:20  rob
11566 - * Added explode stuff.
11567 - *
11568 - * Revision 1.6  1994/09/28  14:31:08  rob
11569 - * Added serial setup menu.
11570 - *
11571 - * Revision 1.5  1994/09/27  15:02:49  rob
11572 - * Null modem basic routines working.  Sending DEAD messages and
11573 - * missiles still need to be done.
11574 - *
11575 - * Revision 1.4  1994/09/24  16:52:33  rob
11576 - * Added stubbed funcs for startup and stop of serial games.
11577 - *
11578 - * Revision 1.3  1994/09/24  14:47:31  rob
11579 - * New function protos.
11580 - *
11581 - * Revision 1.2  1994/09/22  17:53:29  rob
11582 - * First revision, not yet functional.
11583 - *
11584 - * Revision 1.1  1994/09/22  12:39:25  rob
11585 - * Initial revision
11586
11587 ------------------------------------------------------------------------
11588 main/morph.c:
11589
11590 - * Revision 1.5  1995/08/23  21:36:10  allender
11591 - * mcc compiler warnings fixed
11592 - *
11593 - * Revision 1.4  1995/08/12  11:34:19  allender
11594 - * removed #ifdef NEWDEMO -- always in
11595 - *
11596 - * Revision 1.3  1995/07/28  15:39:51  allender
11597 - * removed fixdiv thing
11598 - *
11599 - * Revision 1.2  1995/07/28  15:21:23  allender
11600 - * inverse magnitude fixup thing
11601 - *
11602 - * Revision 1.1  1995/05/16  15:28:05  allender
11603 - * Initial revision
11604 - *
11605 - * Revision 2.1  1995/02/27  18:26:33  john
11606 - * Fixed bug that was caused by externing Polygon_models, and I had
11607 - * changed the type of it in polyobj.c, thus causing page faults.
11608 - *
11609 - * Revision 2.0  1995/02/27  11:27:44  john
11610 - * New version 2.0, which has no anonymous unions, builds with
11611 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11612 - *
11613 - * Revision 1.35  1995/02/22  14:45:37  allender
11614 - * remove anonymous unions from object structure
11615 - *
11616 - * Revision 1.34  1995/01/14  19:16:52  john
11617 - * First version of new bitmap paging code.
11618 - *
11619 - * Revision 1.33  1995/01/03  20:38:36  john
11620 - * Externed MAX_MORPH_OBJECTS
11621 - *
11622 - * Revision 1.32  1994/11/17  15:34:04  matt
11623 - * Attempt #4 to fix morph bug
11624 - *
11625 - * Revision 1.31  1994/11/15  10:57:14  matt
11626 - * Tried again to fix morph
11627 - *
11628 - * Revision 1.30  1994/11/14  14:06:45  matt
11629 - * Fixed stupid bug
11630 - *
11631 - * Revision 1.29  1994/11/14  11:55:13  matt
11632 - * Added divide overflow check
11633 - *
11634 - * Revision 1.28  1994/09/26  17:28:14  matt
11635 - * Made new multiple-object morph code work with the demo system
11636 - *
11637 - * Revision 1.27  1994/09/26  15:39:56  matt
11638 - * Allow multiple simultaneous morphing objects
11639 - *
11640 - * Revision 1.26  1994/09/11  22:44:59  mike
11641 - * quick on vecmat function.
11642 - *
11643 - * Revision 1.25  1994/08/26  15:36:00  matt
11644 - * Made eclips usable on more than one object at a time
11645 - *
11646 - * Revision 1.24  1994/07/25  00:02:46  matt
11647 - * Various changes to accomodate new 3d, which no longer takes point numbers
11648 - * as parms, and now only takes pointers to points.
11649 - *
11650 - * Revision 1.23  1994/07/12  12:39:58  matt
11651 - * Revamped physics system
11652 - *
11653 - * Revision 1.22  1994/06/28  11:54:51  john
11654 - * Made newdemo system record/play directly to/from disk, so
11655 - * we don't need the 4 MB buffer anymore.
11656 - *
11657 - * Revision 1.21  1994/06/27  15:53:01  john
11658 - * #define'd out the newdemo stuff
11659 - *
11660 - *
11661 - * Revision 1.20  1994/06/16  14:30:19  matt
11662 - * Moved morph record data call to reder routine
11663 - *
11664 - * Revision 1.19  1994/06/16  13:57:23  matt
11665 - * Added support for morphing objects in demos
11666 - *
11667 - * Revision 1.18  1994/06/16  12:24:23  matt
11668 - * Made robot lighting not mess with Lighting_on so robots now night
11669 - * according to this variable.
11670 - *
11671 - * Revision 1.17  1994/06/14  16:55:01  matt
11672 - * Got rid of physics_object speed field
11673 - *
11674 - * Revision 1.16  1994/06/08  21:16:29  matt
11675 - * Made objects spin while morphing
11676 - *
11677 - * Revision 1.15  1994/06/08  18:21:53  matt
11678 - * Made morphing objects light correctly
11679 - *
11680 - * Revision 1.14  1994/06/07  16:50:49  matt
11681 - * Made object lighting work correctly; changed name of Ambient_light to
11682 - * Dynamic_light; cleaned up polygobj object rendering a little.
11683 - *
11684 - * Revision 1.13  1994/06/01  16:33:59  yuan
11685 - * Fixed bug.
11686 - *
11687 - *
11688 - * Revision 1.12  1994/06/01  16:29:08  matt
11689 - * If morph_frame called on object this isn't the morph object, kill it.
11690 - *
11691 - * Revision 1.11  1994/06/01  12:46:34  matt
11692 - * Added needed include
11693 - *
11694 - * Revision 1.10  1994/05/31  22:12:41  matt
11695 - * Set lighting for morph objects
11696 - * Don't let another object start morph while one is morphing, unless
11697 - * that one dies.
11698 - *
11699 - * Revision 1.9  1994/05/31  18:49:53  john
11700 - * Took out debugging printf's that Matt left in.
11701 - *
11702 - * Revision 1.8  1994/05/30  22:50:22  matt
11703 - * Added morph effect for robots
11704
11705 ------------------------------------------------------------------------
11706 main/morph.h:
11707
11708 - * Revision 1.2  1995/08/23  21:35:58  allender
11709 - * fix mcc compiler warnings
11710 - *
11711 - * Revision 1.1  1995/05/16  15:59:37  allender
11712 - * Initial revision
11713 - *
11714 - * Revision 2.0  1995/02/27  11:32:19  john
11715 - * New version 2.0, which has no anonymous unions, builds with
11716 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11717 - *
11718 - * Revision 1.9  1995/01/04  12:20:46  john
11719 - * Declearations to work better with game state save.
11720 - *
11721 - *
11722 - * Revision 1.8  1995/01/03  20:38:44  john
11723 - * Externed MAX_MORPH_OBJECTS
11724 - *
11725 - * Revision 1.7  1994/09/26  17:28:33  matt
11726 - * Made new multiple-object morph code work with the demo system
11727 - *
11728 - * Revision 1.6  1994/09/26  15:40:17  matt
11729 - * Allow multiple simultaneous morphing objects
11730 - *
11731 - * Revision 1.5  1994/06/28  11:55:19  john
11732 - * Made newdemo system record/play directly to/from disk, so
11733 - * we don't need the 4 MB buffer anymore.
11734 - *
11735 - * Revision 1.4  1994/06/16  13:57:40  matt
11736 - * Added support for morphing objects in demos
11737 - *
11738 - * Revision 1.3  1994/06/08  18:22:03  matt
11739 - * Made morphing objects light correctly
11740 - *
11741 - * Revision 1.2  1994/05/30  22:50:25  matt
11742 - * Added morph effect for robots
11743 - *
11744 - * Revision 1.1  1994/05/30  12:04:19  matt
11745 - * Initial revision
11746
11747 ------------------------------------------------------------------------
11748 main/multi.h:
11749
11750 - * Revision 2.3  1995/04/03  08:49:50  john
11751 - * Added code to get someone's player struct.
11752 - *
11753 - * Revision 2.2  1995/03/27  12:59:17  john
11754 - * Initial version of multiplayer save games.
11755 - *
11756 - * Revision 2.1  1995/03/21  14:39:06  john
11757 - * Ifdef'd out the NETWORK code.
11758 - *
11759 - * Revision 2.0  1995/02/27  11:28:34  john
11760 - * New version 2.0, which has no anonymous unions, builds with
11761 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
11762 - *
11763 - * Revision 1.74  1995/02/11  11:36:42  rob
11764 - * Added new var.
11765 - *
11766 - * Revision 1.73  1995/02/08  18:17:41  rob
11767 - * Added prototype for reset function.
11768 - *
11769 - * Revision 1.72  1995/02/05  14:37:42  rob
11770 - * Made object mapping more efficient.
11771 - *
11772 - * Revision 1.71  1995/02/01  18:07:36  rob
11773 - * Change object mapping to int functions.
11774 - *
11775 - * Revision 1.70  1995/02/01  12:55:00  rob
11776 - * Changed message type.
11777 - *
11778 - * Revision 1.69  1995/01/31  12:46:12  rob
11779 - * Fixed a bug with object overflow handling.
11780 - *
11781 - * Revision 1.68  1995/01/27  11:15:13  rob
11782 - * removed extern of variable no longer in multi.c
11783 - *
11784 - * Revision 1.67  1995/01/24  11:53:13  john
11785 - * Added better macro defining code.
11786 - *
11787 - * Revision 1.66  1995/01/24  11:32:03  john
11788 - * Added new defining macro method.
11789 - *
11790 - * Revision 1.65  1995/01/23  17:17:06  john
11791 - * Added multi_sending_message.
11792 - *
11793 - * Revision 1.64  1995/01/23  16:02:42  rob
11794 - * Added prototype for mission select function.
11795 - *
11796 - * Revision 1.63  1995/01/18  19:01:21  rob
11797 - * Added new message for hostage door sync.
11798 - *
11799 - * Revision 1.62  1995/01/14  18:39:57  rob
11800 - * Added new message type for dropping robot powerups.
11801 - *
11802 - * Revision 1.61  1995/01/12  21:41:13  rob
11803 - * Fixed incompat. with 1.0 and 1.1.
11804 - *
11805 - * Revision 1.60  1995/01/04  21:40:55  rob
11806 - * Added new type for boss actions in coop.
11807 - *
11808 - * Revision 1.59  1995/01/04  11:38:09  rob
11809 - * Fixed problem with lost character in messages.
11810 - *
11811 - * Revision 1.58  1995/01/03  20:12:44  rob
11812 - * Made max message length in shareware = 40.
11813 - *
11814 - * Revision 1.57  1995/01/03  14:27:25  rob
11815 - * ADded trigger messages.
11816 - *
11817 - * Revision 1.56  1995/01/02  20:08:21  rob
11818 - * Added robot creation.
11819 - *
11820 - * Revision 1.55  1995/01/02  14:41:30  rob
11821 - * Added score syncing.
11822 - *
11823 - * Revision 1.54  1994/12/21  21:02:01  rob
11824 - * Added new message type for ROBOT_FIRE
11825 - *
11826 - * Revision 1.53  1994/12/21  17:27:25  rob
11827 - * Changed the format for send_create_powerup messages.
11828 - *
11829 - *
11830 - * Revision 1.52  1994/12/20  20:41:39  rob
11831 - * ADded robot release message type.
11832 - *
11833 - * Revision 1.51  1994/12/19  19:00:12  rob
11834 - * Changed buf to multibuf so it can be safely externed.
11835 - *
11836 - * Revision 1.50  1994/12/19  16:41:14  rob
11837 - * Added new message types for robot support.
11838 - * Added prototype for external use of multi_send_data (from multibot.c)
11839 - *
11840 - * Revision 1.49  1994/12/11  13:30:13  rob
11841 - * Added new variables to get players out of nested menus.
11842 - *
11843 - * Revision 1.48  1994/12/11  01:58:57  rob
11844 - * Added variable to track menu deth..
11845 - *
11846 - * Revision 1.47  1994/12/08  12:41:17  rob
11847 - * Added audio taunts.
11848 - *
11849 - * Revision 1.46  1994/12/07  21:53:12  rob
11850 - * Fixing sequencing bugginess in modem/serial.
11851 - *
11852 - * Revision 1.45  1994/12/07  16:46:58  rob
11853 - * Added prototype.
11854 - *
11855 - * Revision 1.44  1994/12/01  12:22:31  rob
11856 - * Added de-cloak message for demo.
11857 - *
11858 - * Revision 1.43  1994/12/01  00:54:14  rob
11859 - * Added variable for tracking homing missiles.
11860 - *
11861 - * Revision 1.42  1994/11/30  16:04:39  rob
11862 - * Added show reticle name variable for team games.
11863 - *
11864 - * Revision 1.41  1994/11/29  19:33:38  rob
11865 - * Team support.
11866 - *
11867 - * Revision 1.40  1994/11/29  12:49:37  rob
11868 - * Added more team support stuff.
11869 - *
11870 - * Revision 1.39  1994/11/28  21:20:49  rob
11871 - * Cleaned up the .h file, removed an unused function.
11872 - *
11873 - * Revision 1.38  1994/11/28  21:04:50  rob
11874 - * Added support for network sound-casting.
11875 - *
11876 - * Revision 1.37  1994/11/28  14:02:08  rob
11877 - * Added protocol versioning for registered versus shareware.
11878 - *
11879 - * Revision 1.36  1994/11/28  13:30:04  rob
11880 - * Added a define for protocol version.
11881 - *
11882 - * Revision 1.35  1994/11/22  19:19:48  rob
11883 - * remove unused function.
11884 - *
11885 - * Revision 1.34  1994/11/22  18:47:34  rob
11886 - * Added hooks for modem support for secret levels.
11887 - *
11888 - * Revision 1.33  1994/11/22  17:10:50  rob
11889 - * Fix for secret levels in network play mode.
11890 - *
11891 - * Revision 1.32  1994/11/21  16:00:28  rob
11892 - * Added secret-level hooks.
11893 - *
11894 - * Revision 1.31  1994/11/18  18:28:50  rob
11895 - * Added new function for multiplayer score screen.
11896 - *
11897 - * Revision 1.30  1994/11/18  16:31:05  rob
11898 - * Added kill list timer variable.
11899 - *
11900 - * Revision 1.29  1994/11/17  16:38:15  rob
11901 - * Added creation of net powerups.
11902 - *
11903 - * Revision 1.28  1994/11/17  13:37:33  rob
11904 - * Added prototype for multi_new_game.
11905 - *
11906 - * Revision 1.27  1994/11/17  12:58:45  rob
11907 - * Added kill matrix.
11908 - *
11909 - * Revision 1.26  1994/11/16  20:35:24  rob
11910 - * Changed explosion hook.
11911 - *
11912 - * Revision 1.25  1994/11/15  21:31:13  rob
11913 - * Bumped max message size, was giving modem.c fits.
11914 - *
11915 - * Revision 1.24  1994/11/15  19:28:37  matt
11916 - * Added prototypes
11917 - *
11918 - * Revision 1.23  1994/11/14  17:22:19  rob
11919 - * Added extern for message macros.
11920 - *
11921 - * Revision 1.22  1994/11/11  18:16:44  rob
11922 - * Made multi_menu_poll return a value to exit menus.
11923 - *
11924 - * Revision 1.21  1994/11/11  11:06:19  rob
11925 - * Added prototype for multi_menu_poll.
11926 - *
11927 - * Revision 1.20  1994/11/10  21:48:41  rob
11928 - * Changed multi_endlevel to return an int.
11929 - *
11930 - * Revision 1.19  1994/11/08  17:48:14  rob
11931 - * Fixing endlevel stuff.
11932 - *
11933 - * Revision 1.18  1994/11/07  17:49:07  rob
11934 - * Changed prototype for object mapping funcs.
11935 - *
11936 - * Revision 1.17  1994/11/07  15:46:32  rob
11937 - * Changed the way remote object number mapping works, and it was a real
11938 - * pain in the ass..  I think it will work more reliably now.
11939 - *
11940 - * Revision 1.16  1994/11/04  19:53:01  rob
11941 - * Added a new message type for Player_leave 'explosions'.
11942 - * Added a prototype for function moved over from network.c
11943 - *
11944 - * Revision 1.15  1994/11/02  18:02:33  rob
11945 - * Added message type for control center firing.
11946 - *
11947 - * Revision 1.14  1994/11/02  11:38:00  rob
11948 - * Added player-in-process-of-dying explosions to network game.
11949 - *
11950 - * Revision 1.13  1994/11/01  19:31:44  rob
11951 - * Bumped max_net_create_objects to 20 to accomodate a fully equipped
11952 - * character blowing up.
11953 - *
11954 - * Revision 1.12  1994/10/31  13:48:02  rob
11955 - * Fixed bug in opening doors over network/modem.  Added a new message
11956 - * type to multi.c that communicates door openings across the net.
11957 - * Changed includes in multi.c and wall.c to accomplish this.
11958 - *
11959 - * Revision 1.11  1994/10/09  20:08:20  rob
11960 - * Added some exported func prototypes.
11961 - * Changed max net message length to 25 (from 30).
11962 - * Removed some message types no longer used.
11963 - *
11964 - * Revision 1.10  1994/10/08  20:06:10  rob
11965 - * fixed a typo.
11966 - *
11967 - * Revision 1.9  1994/10/08  19:59:43  rob
11968 - * Moved MAX_MESSAGE_LEN to here.
11969 - *
11970 - * Revision 1.8  1994/10/07  23:09:54  rob
11971 - * Fixed some prototypes.
11972 - *
11973 - * Revision 1.7  1994/10/07  18:11:19  rob
11974 - * Added multi_do_death to multi.c.
11975 - *
11976 - * Revision 1.6  1994/10/07  16:14:32  rob
11977 - * Added new message type for player reappear
11978 - *
11979 - * Revision 1.5  1994/10/07  12:58:17  rob
11980 - * Added multi_leave_game.
11981 - *
11982 - * Revision 1.4  1994/10/07  12:17:17  rob
11983 - * Fixed some stuff in multi_do_frame and exported the message_length
11984 - * array.
11985 - *
11986 - * Revision 1.3  1994/10/07  11:10:17  john
11987 - * Added function to parse multiple messages into individual
11988 - * messages.
11989 - *
11990 - * Revision 1.2  1994/10/07  10:28:06  rob
11991 - * Headers and stuff for multi.c (obviously)
11992 - *
11993 - * Revision 1.1  1994/10/06  16:07:39  rob
11994 - * Initial revision
11995
11996 ------------------------------------------------------------------------
11997 main/multibot.h:
11998
11999 - * Revision 1.2  1995/08/24  16:04:38  allender
12000 - * fix function prototype for compiler warning
12001 - *
12002 - * Revision 1.1  1995/05/16  15:59:53  allender
12003 - * Initial revision
12004 - *
12005 - * Revision 2.1  1995/03/21  14:40:18  john
12006 - * Ifdef'd out the NETWORK code.
12007 - *
12008 - * Revision 2.0  1995/02/27  11:30:57  john
12009 - * New version 2.0, which has no anonymous unions, builds with
12010 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
12011 - *
12012 - * Revision 1.20  1995/02/06  18:18:05  rob
12013 - * Tweaking cooperative stuff.
12014 - *
12015 - * Revision 1.19  1995/02/04  16:49:50  rob
12016 - * Changed multi_send_robot_frame to return the number of robot positions that were sent.
12017 - *
12018 - * Revision 1.18  1995/02/04  12:29:32  rob
12019 - * Added buffered fire sends.
12020 - *
12021 - * Revision 1.17  1995/01/30  17:22:02  rob
12022 - * Added prototype for modem robot send function.
12023 - *
12024 - * Revision 1.16  1995/01/26  18:24:56  rob
12025 - * Reduced # of controlled bots.
12026 - *
12027 - * Revision 1.15  1995/01/25  19:26:35  rob
12028 - * Added define for robot laser agitation.
12029 - *
12030 - * Revision 1.14  1995/01/25  13:45:26  rob
12031 - * Added prototype of robot transfer fucm.
12032 - *
12033 - * Revision 1.13  1995/01/14  19:01:08  rob
12034 - * Added prototypes for new functionality.
12035 - *
12036 - * Revision 1.12  1995/01/12  16:41:53  rob
12037 - * Added new prototypes.
12038 - *
12039 - * Revision 1.11  1995/01/12  15:42:55  rob
12040 - * Fixing score awards for coop.
12041 - *
12042 - * Revision 1.10  1995/01/02  21:00:40  rob
12043 - * added robot matcen support.
12044 - *
12045 - * Revision 1.9  1994/12/31  21:03:53  rob
12046 - * More tweaking for robot behavior.
12047 - *
12048 - * Revision 1.8  1994/12/29  13:54:25  rob
12049 - * Ooops.. fixed a bug..
12050 - *
12051 - * Revision 1.7  1994/12/29  12:51:38  rob
12052 - * ADded proto for multi_robot_explode_sub
12053 - *
12054 - * Revision 1.6  1994/12/21  21:08:32  rob
12055 - * Added new functions for robot firing.
12056 - *
12057 - * Revision 1.5  1994/12/21  19:04:02  rob
12058 - * Fixing score accounting for multi robot games.
12059 - *
12060 - * Revision 1.4  1994/12/21  17:36:09  rob
12061 - * Added a new func.
12062 - *
12063 - * Revision 1.3  1994/12/21  11:12:02  rob
12064 - * Added new function and new vars.
12065 - *
12066 - * Revision 1.2  1994/12/19  16:41:42  rob
12067 - * first revision.
12068 - *
12069 - * Revision 1.1  1994/12/16  15:48:20  rob
12070 - * Initial revision
12071
12072 ------------------------------------------------------------------------
12073 main/netmisc.c:
12074
12075 - * Revision 1.1  1995/05/16  15:28:41  allender
12076 - * Initial revision
12077 - *
12078 - * Revision 2.0  1995/02/27  11:27:24  john
12079 - * New version 2.0, which has no anonymous unions, builds with
12080 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
12081 - *
12082 - * Revision 1.3  1994/11/19  15:19:34  mike
12083 - * rip out unused code and data.
12084 - *
12085 - * Revision 1.2  1994/08/09  19:31:53  john
12086 - * Networking changes.
12087 - *
12088 - * Revision 1.1  1994/08/08  11:06:07  john
12089 - * Initial revision
12090
12091 ------------------------------------------------------------------------
12092 main/netmisc.h:
12093
12094 - * Revision 1.1  1995/05/16  16:00:08  allender
12095 - * Initial revision
12096 - *
12097 - * Revision 2.0  1995/02/27  11:30:18  john
12098 - * New version 2.0, which has no anonymous unions, builds with
12099 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
12100 - *
12101 - * Revision 1.2  1994/08/09  19:31:54  john
12102 - * Networking changes.
12103 - *
12104 - * Revision 1.1  1994/08/08  11:18:40  john
12105 - * Initial revision
12106
12107 ------------------------------------------------------------------------
12108 main/network.h:
12109
12110 - * Revision 1.7  1995/10/31  10:20:04  allender
12111 - * shareware stuff
12112 - *
12113 - * Revision 1.6  1995/09/21  14:31:18  allender
12114 - * new appltalk type packet which contains shortpos
12115 - *
12116 - * Revision 1.5  1995/09/18  08:07:08  allender
12117 - * added function prototype to remove netgame NBP
12118 - *
12119 - * Revision 1.4  1995/08/31  15:51:55  allender
12120 - * new prototypes for join and start games
12121 - *
12122 - * Revision 1.3  1995/07/26  17:02:29  allender
12123 - * implemented and working on mac
12124 - *
12125 - * Revision 1.2  1995/06/02  07:42:34  allender
12126 - * fixed prototype for network_endlevel_poll2
12127 - *
12128 - * Revision 1.1  1995/05/16  16:00:15  allender
12129 - * Initial revision
12130 - *
12131 - * Revision 2.2  1995/03/21  14:58:09  john
12132 - * *** empty log message ***
12133 - *
12134 - * Revision 2.1  1995/03/21  14:39:43  john
12135 - * Ifdef'd out the NETWORK code.
12136 - *
12137 - * Revision 2.0  1995/02/27  11:29:48  john
12138 - * New version 2.0, which has no anonymous unions, builds with
12139 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
12140 - *
12141 - * Revision 1.72  1995/02/11  14:24:39  rob
12142 - * Added suppor for invul. cntrlcen.
12143 - *
12144 - * Revision 1.71  1995/02/08  19:18:43  rob
12145 - * Added extern for segments checksum.
12146 - *
12147 - * Revision 1.70  1995/02/08  11:01:16  rob
12148 - * Fixed a bug.
12149 - *
12150 - * Revision 1.69  1995/02/07  21:16:49  rob
12151 - * Added flag for automap.
12152 - *
12153 - * Revision 1.68  1995/02/06  18:18:33  rob
12154 - * Extern'ed Packet Urgent.
12155 - *
12156 - * Revision 1.67  1995/02/05  14:36:29  rob
12157 - * Moved defines to network.h.
12158 - *
12159 - * Revision 1.66  1995/02/01  16:34:09  john
12160 - * Linted.
12161 - *
12162 - * Revision 1.65  1995/01/30  21:14:35  rob
12163 - * Fixed a bug in join menu.
12164 - * Simplified mission load support.
12165 - *
12166 - * Revision 1.64  1995/01/30  18:19:40  rob
12167 - * Added mission title to gameinfo packet.
12168 - *
12169 - * Revision 1.63  1995/01/28  17:02:39  rob
12170 - * Fixed monitor syncing bug (minor 19).
12171 - *
12172 - * Revision 1.62  1995/01/27  11:15:25  rob
12173 - * removed extern of variable no longer in network.c
12174 - *
12175 - * Revision 1.61  1995/01/26  12:17:34  rob
12176 - * Added new param to network_do_frame.
12177 - *
12178 - * Revision 1.60  1995/01/22  17:32:11  rob
12179 - * Added mission support for network games.
12180 - *
12181 - * Revision 1.59  1995/01/17  17:10:33  rob
12182 - * Added some flags to netgame struct.
12183 - *
12184 - * Revision 1.58  1995/01/12  18:57:15  rob
12185 - * Added score resync stuff.
12186 - *
12187 - * Revision 1.57  1995/01/12  16:42:18  rob
12188 - * Added new prototypes.
12189 - *
12190 - * Revision 1.56  1995/01/05  12:12:10  rob
12191 - * Fixed a problem with packet size.
12192 - *
12193 - * Revision 1.55  1995/01/05  11:12:36  rob
12194 - * Reduced packet size by 1 byte just to be safe.
12195 - *
12196 - * Revision 1.54  1995/01/04  21:39:32  rob
12197 - * New framedata packet for registered.
12198 - *
12199 - * Revision 1.53  1995/01/04  08:47:04  rob
12200 - * JOHN CHECKED IN FOR ROB !!!
12201 - *
12202 - * Revision 1.52  1994/12/30  20:09:07  rob
12203 - * ADded a toggle for showing player names on HUD.
12204 - *
12205 - * Revision 1.51  1994/12/29  15:59:52  rob
12206 - * Centralized network disconnects.
12207 - *
12208 - * Revision 1.50  1994/12/09  21:21:57  rob
12209 - * rolled back changes.
12210 - *
12211 - * Revision 1.48  1994/12/05  22:59:27  rob
12212 - * added prototype for send_endlevel_packet.
12213 - *
12214 - * Revision 1.47  1994/12/05  21:47:34  rob
12215 - * Added a new field to netgame struct.
12216 - *
12217 - * Revision 1.46  1994/12/05  14:39:16  rob
12218 - * Added new variable to indicate new net game starting.
12219 - *
12220 - * Revision 1.45  1994/12/04  15:37:18  rob
12221 - * Fixed a typo.
12222 - *
12223 - * Revision 1.44  1994/12/04  15:30:42  rob
12224 - * Added new fields to netgame struct.
12225 - *
12226 - * Revision 1.43  1994/12/03  18:03:19  rob
12227 - * ADded team kill syncing.
12228 - *
12229 - * Revision 1.42  1994/12/01  21:21:27  rob
12230 - * Added new system for object sync on rejoin.
12231 - *
12232 - * Revision 1.41  1994/11/29  13:07:33  rob
12233 - * Changed structure defs to .h files.
12234 - *
12235 - * Revision 1.40  1994/11/22  17:10:48  rob
12236 - * Fix for secret levels in network play mode.
12237 - *
12238 - * Revision 1.39  1994/11/18  16:36:31  rob
12239 - * Added variable network_rejoined to enable random placement
12240 - * of rejoining palyers.
12241 - *
12242 - * Revision 1.38  1994/11/12  19:51:13  rob
12243 - * Changed prototype for network_send_data to pass
12244 - * urgent flag.
12245 - *
12246 - * Revision 1.37  1994/11/10  21:48:26  rob
12247 - * Changed net_endlevel to return an int.
12248 - *
12249 - * Revision 1.36  1994/11/10  20:32:49  rob
12250 - * Added extern for LastPacketTime.
12251 - *
12252 - * Revision 1.35  1994/11/09  11:36:34  rob
12253 - * ADded return value to network_level_sync for success/fail.
12254 - *
12255 - * Revision 1.34  1994/11/08  21:22:31  rob
12256 - * Added proto for network_endlevel_snyc
12257 - *
12258 - * Revision 1.33  1994/11/08  15:20:00  rob
12259 - * added proto for change_playernum_to
12260 - *
12261 - * Revision 1.32  1994/11/07  17:45:40  rob
12262 - * Added prototype for network_endlevel (called from multi.c)
12263 - *
12264 - * Revision 1.31  1994/11/04  19:52:37  rob
12265 - * Removed a function from network.h (network_show_player_list)
12266 - *
12267 - * Revision 1.30  1994/11/01  19:39:26  rob
12268 - * Removed a couple of variables that should be externed from multi.c
12269 - * (remnants of the changover)
12270 - *
12271 - * Revision 1.29  1994/10/31  19:18:24  rob
12272 - * Changed prototype for network_do_frame to add a parameter if you wish
12273 - * to force the frame to be sent.  Important if this is a leave_game frame.
12274 - *
12275 - * Revision 1.28  1994/10/08  19:59:20  rob
12276 - * Removed network message variables.
12277 - *
12278 - * Revision 1.27  1994/10/08  11:08:38  john
12279 - * Moved network_delete_unused objects into multi.c,
12280 - * took out network callsign stuff and used Matt's net
12281 - * players[.].callsign stuff.
12282 - *
12283 - * Revision 1.26  1994/10/07  11:26:20  rob
12284 - * Changed network_start_frame to network_do_frame,.
12285 - *
12286 - *
12287 - * Revision 1.25  1994/10/05  13:58:10  rob
12288 - * Added a new function net_endlevel that is called after each level is
12289 - * completed.  Currently it only does anything if SERIAL game is in effect.
12290 - *
12291 - * Revision 1.24  1994/10/04  19:34:57  rob
12292 - * export network_find_max_net_players.
12293 - *
12294 - * Revision 1.23  1994/10/04  17:31:10  rob
12295 - * Exported MaxNumNetPlayers.
12296 - *
12297 - * Revision 1.22  1994/10/03  22:57:30  matt
12298 - * Took out redundant definition of callsign_len
12299 - *
12300 - * Revision 1.21  1994/10/03  15:12:48  rob
12301 - * Boosted MAX_CREATE_OBJECTS to 15.
12302 - *
12303 - * Revision 1.20  1994/09/30  18:19:51  rob
12304 - * Added two new variables for tracking object creation.
12305 - *
12306 - * Revision 1.19  1994/09/27  15:03:18  rob
12307 - * Added prototype for network_delete_extra_objects used by modem.c
12308 - *
12309 - * Revision 1.18  1994/09/27  14:36:45  rob
12310 - * Added two new varaibles for network/serial weapon firing.
12311 - *
12312 - * Revision 1.17  1994/09/07  17:10:57  john
12313 - * Started adding code to sync powerups.
12314 - *
12315 - * Revision 1.16  1994/09/06  19:29:05  john
12316 - * Added trial version of rejoin function.
12317 - *
12318 - * Revision 1.15  1994/08/26  13:01:54  john
12319 - * Put high score system in.
12320 - *
12321 - * Revision 1.14  1994/08/25  18:12:04  matt
12322 - * Made player's weapons and flares fire from the positions on the 3d model.
12323 - * Also added support for quad lasers.
12324 - *
12325 - * Revision 1.13  1994/08/17  16:50:00  john
12326 - * Added damaging fireballs, missiles.
12327 - *
12328 - * Revision 1.12  1994/08/16  12:25:22  john
12329 - * Added hooks for sending messages.
12330 - *
12331 - * Revision 1.11  1994/08/13  12:20:18  john
12332 - * Made the networking uise the Players array.
12333 - *
12334 - * Revision 1.10  1994/08/12  22:41:27  john
12335 - * Took away Player_stats; add Players array.
12336 - *
12337 - * Revision 1.9  1994/08/12  03:10:22  john
12338 - * Made network be default off; Moved network options into
12339 - * main menu.  Made starting net game check that mines are the
12340 - * same.
12341 - *
12342 - * Revision 1.8  1994/08/11  21:57:08  john
12343 - * Moved network options to main menu.
12344 - *
12345 - * Revision 1.7  1994/08/10  11:29:20  john
12346 - * *** empty log message ***
12347 - *
12348 - * Revision 1.6  1994/08/10  10:44:12  john
12349 - * Made net players fire..
12350 - *
12351 - * Revision 1.5  1994/08/09  19:31:46  john
12352 - * Networking changes.
12353 - *
12354 - * Revision 1.4  1994/08/05  16:30:26  john
12355 - * Added capability to turn off network.
12356 - *
12357 - * Revision 1.3  1994/08/05  16:11:43  john
12358 - * Psuedo working version of networking.
12359 - *
12360 - * Revision 1.2  1994/07/25  12:33:34  john
12361 - * Network "pinging" in.
12362 - *
12363 - * Revision 1.1  1994/07/20  16:09:05  john
12364 - * Initial revision
12365
12366 ------------------------------------------------------------------------
12367 main/newdemo.c:
12368
12369 - * Old Log:
12370 - * Revision 1.12  1995/10/31  10:19:43  allender
12371 - * shareware stuff
12372 - *
12373 - * Revision 1.11  1995/10/17  13:19:16  allender
12374 - * close boxes for demo save
12375 - *
12376 - * Revision 1.10  1995/10/05  10:36:07  allender
12377 - * fixed calls to digi_play_sample to account for differing volume and angle calculations
12378 - *
12379 - * Revision 1.9  1995/09/12  15:49:13  allender
12380 - * define __useAppleExts__ if not already defined
12381 - *
12382 - * Revision 1.8  1995/09/05  14:28:32  allender
12383 - * fixed previous N_players bug in newdemo_goto_end
12384 - *
12385 - * Revision 1.7  1995/09/05  14:16:51  allender
12386 - * added space to allowable demo filename characters
12387 - * and fixed bug with netgame demos N_players got getting
12388 - * set correctly
12389 - *
12390 - * Revision 1.6  1995/09/01  16:10:47  allender
12391 - * fixed bug with reading in N_players variable on
12392 - * netgame demo playback
12393 - *
12394 - * Revision 1.5  1995/08/24  16:04:11  allender
12395 - * fix signed byte problem
12396 - *
12397 - * Revision 1.4  1995/08/12  12:21:59  allender
12398 - * made call to create_shortpos not swap the shortpos
12399 - * elements
12400 - *
12401 - * Revision 1.3  1995/08/01  16:04:19  allender
12402 - * made random picking of demo work
12403 - *
12404 - * Revision 1.2  1995/08/01  13:56:56  allender
12405 - * demo system working on the mac
12406 - *
12407 - * Revision 1.1  1995/05/16  15:28:59  allender
12408 - * Initial revision
12409 - *
12410 - * Revision 2.7  1995/05/26  16:16:06  john
12411 - * Split SATURN into define's for requiring cd, using cd, etc.
12412 - * Also started adding all the Rockwell stuff.
12413 - *
12414 - * Revision 2.6  1995/03/21  14:39:38  john
12415 - * Ifdef'd out the NETWORK code.
12416 - *
12417 - * Revision 2.5  1995/03/14  18:24:31  john
12418 - * Force Destination Saturn to use CD-ROM drive.
12419 - *
12420 - * Revision 2.4  1995/03/14  16:22:29  john
12421 - * Added cdrom alternate directory stuff.
12422 - *
12423 - * Revision 2.3  1995/03/10  12:58:33  allender
12424 - * only display rear view cockpit when cockpit mode was CM_FULL_COCKPIT.
12425 - *
12426 - * Revision 2.2  1995/03/08  16:12:15  allender
12427 - * changes for Destination Saturn
12428 - *
12429 - * Revision 2.1  1995/03/08  12:11:26  allender
12430 - * fix shortpos reading
12431 - *
12432 - * Revision 2.0  1995/02/27  11:29:40  john
12433 - * New version 2.0, which has no anonymous unions, builds with
12434 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
12435 - *
12436 - * Revision 1.189  1995/02/22  14:53:42  allender
12437 - * missed some anonymous stuff
12438 - *
12439 - * Revision 1.188  1995/02/22  13:24:53  john
12440 - * Removed the vecmat anonymous unions.
12441 - *
12442 - * Revision 1.187  1995/02/22  13:13:54  allender
12443 - * remove anonymous unions from object structure
12444 - *
12445 - * Revision 1.186  1995/02/14  15:36:41  allender
12446 - * fix fix for morph effect
12447 - *
12448 - * Revision 1.185  1995/02/14  11:25:48  allender
12449 - * save cockpit mode and restore after playback.  get orientation for morph
12450 - * effect when object is morph vclip
12451 - *
12452 - * Revision 1.184  1995/02/13  12:18:14  allender
12453 - * change to decide about interpolating or not
12454 - *
12455 - * Revision 1.183  1995/02/12  00:46:23  adam
12456 - * don't decide to skip frames until after at least 10 frames have
12457 - * passed -- allender
12458 - *
12459 - * Revision 1.182  1995/02/11  22:34:01  john
12460 - * Made textures page in for newdemos before playback time.
12461 - *
12462 - * Revision 1.181  1995/02/11  17:28:32  allender
12463 - * strip frames from end of demo
12464 - *
12465 - * Revision 1.180  1995/02/11  16:40:35  allender
12466 - * start of frame stripping debug code
12467 - *
12468 - * Revision 1.179  1995/02/10  17:40:06  allender
12469 - * put back in wall_hit_process code to fix door problem
12470 - *
12471 - * Revision 1.178  1995/02/10  17:17:24  adam
12472 - * allender } fix
12473 - *
12474 - * Revision 1.177  1995/02/10  17:16:24  allender
12475 - * fix possible tmap problems
12476 - *
12477 - * Revision 1.176  1995/02/10  15:54:37  allender
12478 - * changes for out of space on device.
12479 - *
12480 - * Revision 1.175  1995/02/09  19:55:00  allender
12481 - * fix bug with morph recording -- force rendertype to RT_POLYOBJ when
12482 - * playing back since it won't render until fully morphed otherwise
12483 - *
12484 - * Revision 1.174  1995/02/07  17:15:35  allender
12485 - * DOH!!!!!
12486 - *
12487 - * Revision 1.173  1995/02/07  17:14:21  allender
12488 - * immediately return when loading bogus level stuff when reading a frame
12489 - *
12490 - * Revision 1.172  1995/02/02  11:15:03  allender
12491 - * after loading new level, read next frame (forward or back) always because
12492 - * of co-op ships showing up when level is loaded
12493 - *
12494 - * Revision 1.171  1995/02/02  10:24:16  allender
12495 - * removed cfile stuff.  Use standard FILE functions for demo playback
12496 - *
12497 - * Revision 1.170  1995/01/30  13:54:32  allender
12498 - * support for missions
12499 - *
12500 - * Revision 1.169  1995/01/27  16:27:35  allender
12501 - * put game mode to demo_game_mode when sorting multiplayer kill (and score)
12502 - * list
12503 - *
12504 - * Revision 1.168  1995/01/27  09:52:25  allender
12505 - * minor changes because of object/segment linking problems
12506 - *
12507 - * Revision 1.167  1995/01/27  09:22:28  allender
12508 - * changed way multi-player score is recorded.  Record difference, not
12509 - * actual
12510 - *
12511 - * Revision 1.166  1995/01/25  14:32:44  allender
12512 - * changed with recorded player flags.  More checks for paused state
12513 - * during interpolation reading of objects
12514 - *
12515 - * Revision 1.165  1995/01/25  11:23:32  allender
12516 - * found bug with out of disk space problem
12517 - *
12518 - * Revision 1.164  1995/01/25  11:11:33  allender
12519 - * coupla' things.  Fix problem with objects apparently being linked in
12520 - * the wrong segment.  Put an Int3 in to check why demos will write to
12521 - * end of space on drive. close demo file if demo doens't start playing
12522 - * back.  Put obj->type == OBJ_ROBOT around checking for boss cloaking
12523 - *
12524 - * Revision 1.163  1995/01/24  19:44:30  allender
12525 - * fix obscure problem with rewinding and having the wrong object linked
12526 - * to the wrong segments.  will investigate further.
12527 - *
12528 - * Revision 1.162  1995/01/23  09:31:28  allender
12529 - * add team score in team mode playback
12530 - *
12531 - * Revision 1.161  1995/01/20  22:47:39  matt
12532 - * Mission system implemented, though imcompletely
12533 - *
12534 - * Revision 1.160  1995/01/20  09:30:37  allender
12535 - * don't call LoadLevel with bogus data
12536 - *
12537 - * Revision 1.159  1995/01/20  09:13:23  allender
12538 - * *&^%&*%$ typo
12539 - *
12540 - * Revision 1.158  1995/01/20  09:12:04  allender
12541 - * record team names during demo recoring in GM_TEAM
12542 - *
12543 - * Revision 1.157  1995/01/19  16:31:09  allender
12544 - * forgot to bump demo version for new weapon change stuff
12545 - *
12546 - * Revision 1.156  1995/01/19  16:29:33  allender
12547 - * added new byte for weapon change (old weapon) so rewinding works
12548 - * correctly for weapon changes in registered
12549 - *
12550 - * Revision 1.155  1995/01/19  15:00:05  allender
12551 - * remove code to take away blastable walls in multiplayer demo playbacks
12552 - *
12553 - * Revision 1.154  1995/01/19  11:07:05  allender
12554 - * put in psuedo cloaking for boss robots.  Problem is that cloaking is
12555 - * time based, and that don't get done in demos, so bosses just disappear.
12556 - * oh well
12557 - *
12558 - * Revision 1.153  1995/01/19  09:42:29  allender
12559 - * record laser levels in demos
12560 - *
12561 - * Revision 1.152  1995/01/18  20:43:12  allender
12562 - * fix laser level stuff on goto-beginning and goto-end
12563 - *
12564 - * Revision 1.151  1995/01/18  20:28:18  allender
12565 - * cloak robots now cloak (except maybe for boss........)  Put in function
12566 - * to deal with control center triggers
12567 - *
12568 - * Revision 1.150  1995/01/18  18:55:07  allender
12569 - * bug fix
12570 - *
12571 - * Revision 1.149  1995/01/18  18:49:03  allender
12572 - * lots 'o stuff....record laser level.  Record beginning of door opening
12573 - * sequence.  Fix some problems with control center stuff.  Control center
12574 - * triggers now work in reverse
12575 - *
12576 - * Revision 1.148  1995/01/18  08:51:40  allender
12577 - * forgot to record ammo counts at beginning of demo
12578 - *
12579 - * Revision 1.147  1995/01/17  17:42:07  allender
12580 - * added primary and secondary ammo counts.  Changed goto_end routine
12581 - * to be more efficient
12582 - *
12583 - * Revision 1.146  1995/01/17  13:46:35  allender
12584 - * fix problem with destroyed control center and rewinding a demo.
12585 - * Save callsign and restore after demo playback
12586 - *
12587 - * Revision 1.145  1995/01/12  10:21:53  allender
12588 - * fixes for 1.0 to 1.1 demo incompatibility
12589 - *
12590 - * Revision 1.144  1995/01/05  13:51:43  allender
12591 - * fixed type of player num variable
12592 - *
12593 - * Revision 1.143  1995/01/04  16:58:28  allender
12594 - * bumped up demo version number
12595 - *
12596 - * Revision 1.142  1995/01/04  14:59:02  allender
12597 - * added more information to end of demo for registered.  Forced game mode
12598 - * to be GM_NORMAL on demo playback
12599 - *
12600 - * Revision 1.141  1995/01/03  17:30:47  allender
12601 - * fixed logic problem with cloak stuf
12602 - *
12603 - * Revision 1.140  1995/01/03  17:12:23  allender
12604 - * fix for getting cloak stuff at end of demo for shareware
12605 - *
12606 - * Revision 1.139  1995/01/03  15:20:24  allender
12607 - * fix goto_end for shareware -- changes to goto_end for registered
12608 - *
12609 - * Revision 1.138  1995/01/03  13:13:26  allender
12610 - * add } I forgot
12611 - *
12612 - * Revision 1.137  1995/01/03  13:10:29  allender
12613 - * make score work forwards and backwards
12614 - *
12615 - * Revision 1.136  1995/01/03  11:45:20  allender
12616 - * added code to record players scores
12617 - *
12618 - * Revision 1.135  1994/12/30  10:03:57  allender
12619 - * put cloak stuff at end of demo for fast forward to the end
12620 - *
12621 - * Revision 1.134  1994/12/29  17:02:55  allender
12622 - * spelling fix on SHAREWARE
12623 - *
12624 - * Revision 1.133  1994/12/29  16:43:41  allender
12625 - * lots of new multiplayer stuff.  wrapped much code with SHAREWARE defines
12626 - *
12627 - * Revision 1.132  1994/12/28  14:15:01  allender
12628 - * added routines to deal with connecting and reconnecting players when
12629 - * recording multiplayer demos
12630 - *
12631 - * Revision 1.131  1994/12/21  12:57:59  allender
12632 - * bug fix
12633 - *
12634 - * Revision 1.130  1994/12/21  12:46:53  allender
12635 - * record multi player deaths and kills
12636 - *
12637 - * Revision 1.129  1994/12/19  16:37:27  allender
12638 - * pick good filename when trying to save in network play and player
12639 - * gets bumped out of menu by multi-player code
12640 - *
12641 - * Revision 1.128  1994/12/14  10:49:01  allender
12642 - * reset bad_read variable when starting demo playback
12643 - *
12644 - * Revision 1.127  1994/12/14  08:53:06  allender
12645 - * lowered watermark for out of space
12646 - *
12647 - * Revision 1.126  1994/12/14  08:49:52  allender
12648 - * put up warning when starting demo recording if not enough space and
12649 - * not let them record
12650 - *
12651 - * Revision 1.125  1994/12/13  00:01:37  allender
12652 - * CLOAK FIX -- (I'm tempted to take cloak out of game because I can't
12653 - * seem to get it right in demo playback)
12654 - *
12655 - * Revision 1.124  1994/12/12  14:51:21  allender
12656 - * more fixed to multiplayer cloak stuff
12657 - *
12658 - * Revision 1.123  1994/12/12  11:33:11  allender
12659 - * fixed rearview mode to work again
12660 - *
12661 - * Revision 1.122  1994/12/12  11:00:16  matt
12662 - * Added code to handle confusion with attached objects
12663 - *
12664 - * Revision 1.121  1994/12/12  00:31:29  allender
12665 - * give better warning when out of space when recording.  Don't record
12666 - * until no space left.  We have 500K watermark when we now stop recording
12667 - *
12668 - * Revision 1.120  1994/12/10  16:44:54  matt
12669 - * Added debugging code to track down door that turns into rock
12670 - *
12671 - * Revision 1.119  1994/12/09  18:46:15  matt
12672 - * Added code to handle odd error condition
12673 - *
12674 - * Revision 1.118  1994/12/09  17:27:37  allender
12675 - * force playernum to 0 when demo is done playing
12676 - *
12677 - * Revision 1.117  1994/12/09  16:40:39  allender
12678 - * yet more cloak stuff.  Assign cloak/invuln time when starting demo
12679 - * if flags are set.  Check cloak and invuln time when demo
12680 - * even when paused
12681 - *
12682 - * Revision 1.116  1994/12/09  14:59:22  matt
12683 - * Added system to attach a fireball to another object for rendering purposes,
12684 - * so the fireball always renders on top of (after) the object.
12685 - *
12686 - * Revision 1.115  1994/12/09  12:21:45  allender
12687 - * only allow valid chars when typing in demo filename
12688 - *
12689 - * Revision 1.114  1994/12/08  23:19:02  allender
12690 - * final(?) fix for getting cloak gauge to work on demo playback
12691 - * with forward and reverse
12692 - *
12693 - * Revision 1.113  1994/12/08  21:34:38  allender
12694 - * record old and new player flags to accuratedly record cloaking and
12695 - * decloaking
12696 - * ./
12697 - *
12698 - * Revision 1.112  1994/12/08  18:04:47  allender
12699 - * bashed playernum right after reading it in demo header so shields
12700 - * and energy are put in right place
12701 - *
12702 - * Revision 1.111  1994/12/08  17:10:07  allender
12703 - * encode playernum in demo header.  Bash viewer segment to 0 if in
12704 - * bogus segnum.  Don't link render objs for same reason
12705 - *
12706 - * Revision 1.110  1994/12/08  15:36:12  allender
12707 - * cloak stuff works forwards and backwards
12708 - *
12709 - * Revision 1.109  1994/12/08  13:46:03  allender
12710 - * don't record rearview anymore, but leave in case statement for playback
12711 - * purposes.  change the way letterbox <--> cockpit transitions happen
12712 - *
12713 - * Revision 1.108  1994/12/08  12:36:06  matt
12714 - * Added new object allocation & deallocation functions so other code
12715 - * could stop messing around with internal object data structures.
12716 - *
12717 - * Revision 1.107  1994/12/08  11:19:04  allender
12718 - * handle out of space (more) gracefully then before
12719 - *
12720 - * Revision 1.106  1994/12/08  00:29:49  allender
12721 - * fixed bug that didn't load level on goto_beginning
12722 - *
12723 - * Revision 1.105  1994/12/08  00:11:51  mike
12724 - * change matrix interpolation.
12725 - *
12726 - * Revision 1.104  1994/12/07  23:46:37  allender
12727 - * changed invulnerability and cloak to work (almost) correctly both
12728 - * in single and multi player
12729 - *
12730 - * Revision 1.103  1994/12/07  11:48:49  adam
12731 - * BY ALLENDER -- added dampening of interpolation factor to 1 if greater
12732 - * than 1 (although I have not seen this happen).  this is attempt to
12733 - * get wobbling problem solved
12734 - *
12735 - * Revision 1.102  1994/12/07  11:23:56  allender
12736 - * attempt at getting rid of wobbling on demo playback
12737 - *
12738 - * Revision 1.101  1994/12/06  19:31:17  allender
12739 - * moved blastable wall stuff code to where we load level during demo
12740 - * playback
12741 - *
12742 - * Revision 1.100  1994/12/06  19:21:51  allender
12743 - * multi games, destroy blastable walls.  Do wall toggle when control center
12744 - * destroyed
12745 - *
12746 - * Revision 1.99  1994/12/06  16:54:48  allender
12747 - * fixed code so if demo automatically started from menu, don't bring up
12748 - * message if demo is too old
12749 - *
12750 - * Revision 1.98  1994/12/06  13:55:15  matt
12751 - * Use new rounding func, f2ir()
12752 - *
12753 - * Revision 1.97  1994/12/06  13:44:45  allender
12754 - * suppressed compiler warnings
12755 - *
12756 - * Revision 1.96  1994/12/06  13:38:03  allender
12757 - * removed recording of wall hit process.  I think that all bases are covered
12758 - * elsewhere
12759 - *
12760 - * Revision 1.95  1994/12/06  12:57:35  allender
12761 - * added recording of multi_decloaking.  Fixed some other cloaking code so
12762 - * that cloak should last as long as player was cloaked.  We will lose the
12763 - * guage effect, but the time is probably more important on playback
12764 - *
12765 - * Revision 1.94  1994/12/05  23:37:17  matt
12766 - * Took out calls to warning() function
12767 - *
12768 - * Revision 1.93  1994/12/03  17:52:04  yuan
12769 - * Localization 380ish
12770 - *
12771 - * Revision 1.92  1994/12/02  12:53:39  allender
12772 - * fixed goto_beginning and goto_end on demo playback
12773 - *
12774 - * Revision 1.91  1994/12/01  12:01:49  allender
12775 - * added multi player cloak stuff
12776 - *
12777 - * Revision 1.90  1994/11/30  09:33:58  allender
12778 - * added field in header to tell what version (shareware or registered)
12779 - * demo was recorded with.  Don't allow demo recorded on one to playback
12780 - * on the other
12781 - *
12782 - * Revision 1.89  1994/11/29  00:31:01  allender
12783 - * major changes -- added level recording feature which records level
12784 - * advancement.  Changes to internal code to handle this.
12785 - *
12786 - * Revision 1.88  1994/11/27  23:13:54  matt
12787 - * Made changes for new mprintf calling convention
12788 - *
12789 - * Revision 1.87  1994/11/27  23:07:35  allender
12790 - * starting on code to get all level transitions recorded. not done yet
12791 - *
12792 - * Revision 1.86  1994/11/27  17:39:47  matt
12793 - * Don't xlate tmap numbers when editor compiled out
12794 - *
12795 - * Revision 1.85  1994/11/23  09:27:21  allender
12796 - * put up info box with message if demo version is too old or level
12797 - * cannot be loaded
12798 - *
12799 - * Revision 1.84  1994/11/22  19:37:39  allender
12800 - * fix array mistake
12801 - *
12802 - * Revision 1.83  1994/11/22  19:35:09  allender
12803 - * record player ship colors in multiplayer demo recordings
12804 - *
12805 - * Revision 1.82  1994/11/19  15:36:42  mike
12806 - * fix fix.
12807 - *
12808 - * Revision 1.81  1994/11/19  15:23:21  mike
12809 - * rip out unused code
12810 - *
12811 - * Revision 1.80  1994/11/16  14:51:49  rob
12812 - * Fixed network/demo incompatibility.
12813 - *
12814 - * Revision 1.79  1994/11/15  10:55:48  allender
12815 - * made start of demo playback read initial demo information so
12816 - * level will get loaded.  Made demo record to single file which
12817 - * will get renamed.  Added numerics after old filename so
12818 - * sequential filenames would be defaulted to
12819 - *
12820 - * Revision 1.78  1994/11/15  09:46:06  allender
12821 - * added versioning.  Fixed problems with trying to interpolating a completely
12822 - * 0 orientation matrix
12823 - *
12824 - * Revision 1.77  1994/11/14  14:34:31  matt
12825 - * Fixed up handling when textures can't be found during remap
12826 - *
12827 - * Revision 1.76  1994/11/14  09:15:29  allender
12828 - * make ESC from file save menu exit w/o saving.  Fix letterbox, rear view,
12829 - * to normal cockpit mode transition to work correctly when skipping and
12830 - * interpolating frames
12831 - *
12832 - * Revision 1.75  1994/11/11  16:22:07  allender
12833 - * made morphing objects record only the object being morphed.
12834 - *
12835 - * Revision 1.74  1994/11/08  14:59:19  john
12836 - * Added code to respond to network while in menus.
12837 - *
12838 - * Revision 1.73  1994/11/08  14:52:20  adam
12839 - * *** empty log message ***
12840 - *
12841 - * Revision 1.72  1994/11/07  15:47:04  allender
12842 - * prompt for filename when done recording demo
12843 - *
12844 - * Revision 1.71  1994/11/07  11:47:19  allender
12845 - * when interpolating frames, delete weapon, fireball, and debris objects
12846 - * from an inpolated frame if they don't appear in the next recorded
12847 - * frame
12848 - *
12849 - * Revision 1.70  1994/11/07  11:02:41  allender
12850 - * more with interpolation. I believe that I have it right now
12851 - *
12852 - * Revision 1.69  1994/11/07  08:47:40  john
12853 - * Made wall state record.
12854 - *
12855 - * Revision 1.68  1994/11/05  17:22:51  john
12856 - * Fixed lots of sequencing problems with newdemo stuff.
12857 - *
12858 - * Revision 1.67  1994/11/04  20:11:52  john
12859 - * Neatening up palette stuff with demos.
12860 - *
12861 - * Revision 1.66  1994/11/04  16:49:44  allender
12862 - * changed newdemo_do_interpolate to default to on
12863 - *
12864 - * Revision 1.65  1994/11/04  16:44:51  allender
12865 - * added filename support for demo recording.  more auto demo stuff
12866 - *
12867 - * Revision 1.64  1994/11/04  13:05:31  allender
12868 - * fixing the lifeleft variable again.  (I think I got it right this time)
12869 - *
12870 - * Revision 1.63  1994/11/04  11:37:37  allender
12871 - * commented out fprintfs and fixed compiler warning
12872 - *
12873 - * Revision 1.62  1994/11/04  11:33:50  allender
12874 - * added OBJ_FLARE and OBJ_LIGHT to obj->lifeleft recording
12875 - *
12876 - * Revision 1.61  1994/11/04  11:29:21  allender
12877 - * more interpolation stuff -- not done yet.  Fixed so hostage vclips
12878 - * render correctly.  Changed lifeleft to full precision, but only
12879 - * write it when object is fireball or weapon type of object
12880 - *
12881 - * Revision 1.60  1994/11/03  10:00:11  allender
12882 - * fixed divide by zero in calculating render time.  more interpolation
12883 - * stuff which isn't quite done
12884 - *
12885 - * Revision 1.59  1994/11/02  17:10:59  allender
12886 - * never play recorded frames when interpolation is occuring
12887 - *
12888 - * Revision 1.58  1994/11/02  14:28:58  allender
12889 - * profile total playback time and average frame render time
12890 - *
12891 - * Revision 1.57  1994/11/02  14:09:03  allender
12892 - * record rear view.  start of playback interpolation code -- this
12893 - * is not yet done
12894 - *
12895 - * Revision 1.56  1994/11/01  13:25:30  allender
12896 - * drop frames if playing back demo on slower machine
12897 - *
12898 - * Revision 1.55  1994/10/31  16:10:40  allender
12899 - * record letterbox mode on death seq, and then restore
12900 - *
12901 - * Revision 1.54  1994/10/29  16:01:38  allender
12902 - * added ND_STATE_NODEMOS to indicate that there are no demos currently
12903 - * available for playback
12904 - *
12905 - * Revision 1.53  1994/10/29  15:38:42  allender
12906 - * in newdemo_start_playback, make Newdemo_at_eof = 0
12907 - *
12908 - * Revision 1.52  1994/10/28  14:45:28  john
12909 - * fixed typo from last checkin.
12910 - *
12911 - * Revision 1.51  1994/10/28  14:42:55  john
12912 - * Added sound volumes to all sound calls.
12913 - *
12914 - * Revision 1.50  1994/10/28  14:31:57  allender
12915 - * homing missle and autodemo stuff
12916 - *
12917 - * Revision 1.49  1994/10/28  12:42:14  allender
12918 - * record homing distance
12919 - *
12920 - * Revision 1.48  1994/10/27  16:57:54  allender
12921 - * changed demo vcr to be able to play any number of frames by storing
12922 - * frame length (in bytes) in the demo file.  Added blowing up monitors
12923 - *
12924 - * Revision 1.47  1994/10/26  16:50:50  allender
12925 - * put two functions inside of VCR_MODE ifdef
12926 - *
12927 - * Revision 1.46  1994/10/26  15:20:32  allender
12928 - * added CT_REMOTE as valid control type for recording
12929 - *
12930 - * Revision 1.45  1994/10/26  14:45:35  allender
12931 - * completed hacked in vcr demo playback stuff
12932 - *
12933 - * Revision 1.44  1994/10/26  13:40:52  allender
12934 - * vcr playback of demo stuff
12935 - *
12936 - * Revision 1.43  1994/10/26  08:51:57  allender
12937 - * record player weapon change
12938 - *
12939 - * Revision 1.42  1994/10/25  15:48:01  allender
12940 - * add shields, energy, and player flags to demo recording.
12941 - * ,
12942 - *
12943 - * Revision 1.41  1994/10/24  08:19:35  allender
12944 - * fixed compilation errors
12945 - *
12946 - * Revision 1.40  1994/10/23  19:17:08  matt
12947 - * Fixed bug with "no key" messages
12948 - *
12949 - * Revision 1.39  1994/10/22  14:15:08  mike
12950 - * Suppress compiler warnings.
12951 - *
12952 - * Revision 1.38  1994/10/21  15:24:55  allender
12953 - * compressed writing of object structures with specialized code
12954 - * to write out only pertinent object structures.
12955 - *
12956 - * Revision 1.37  1994/10/20  13:03:17  matt
12957 - * Replaced old save files (MIN/SAV/HOT) with new LVL files
12958 - *
12959 - * Revision 1.36  1994/09/28  23:13:10  matt
12960 - * Macroized palette flash system
12961 - *
12962 - * Revision 1.35  1994/09/26  17:28:32  matt
12963 - * Made new multiple-object morph code work with the demo system
12964 - *
12965 - * Revision 1.34  1994/09/10  13:31:54  matt
12966 - * Made exploding walls a type of blastable walls.
12967 - * Cleaned up blastable walls, making them tmap2 bitmaps.
12968 - *
12969 - * Revision 1.33  1994/08/15  18:05:28  john
12970 - * *** empty log message ***
12971 - *
12972 - * Revision 1.32  1994/08/15  17:56:38  john
12973 - * ,
12974 - *
12975 - * Revision 1.31  1994/08/10  09:44:54  john
12976 - * *** empty log message ***
12977 - *
12978 - * Revision 1.30  1994/07/22  12:35:48  matt
12979 - * Cleaned up editor/game interactions some more.
12980 - *
12981 - * Revision 1.29  1994/07/21  13:06:45  matt
12982 - * Ripped out remants of old demo system, and added demo only system that
12983 - * disables object movement and game options from menu.
12984 - *
12985 - * Revision 1.28  1994/07/18  16:22:44  john
12986 - * Made all file read/writes call the same routine.
12987 - *
12988 - * Revision 1.27  1994/07/14  22:38:27  matt
12989 - * Added exploding doors
12990 - *
12991 - * Revision 1.26  1994/07/05  12:49:04  john
12992 - * Put functionality of New Hostage spec into code.
12993 - *
12994 - * Revision 1.25  1994/06/29  11:05:38  john
12995 - * Made demos read in compressed.
12996 - *
12997 - * Revision 1.24  1994/06/29  09:14:06  john
12998 - * Made files write out uncompressed and read in compressed.
12999 - *
13000 - * Revision 1.23  1994/06/28  11:55:28  john
13001 - * Made newdemo system record/play directly to/from disk, so
13002 - * we don't need the 4 MB buffer anymore.
13003 - *
13004 - * Revision 1.22  1994/06/27  15:52:38  john
13005 - * #define'd out the newdemo stuff
13006 - *
13007 - *
13008 - * Revision 1.21  1994/06/22  00:29:04  john
13009 - * Fixed bug with playing demo then playing game without
13010 - * loading new mine.
13011 - *
13012 - * Revision 1.20  1994/06/22  00:14:23  john
13013 - * Attempted to fix sign.
13014 - *
13015 - * Revision 1.19  1994/06/21  23:57:54  john
13016 - * Hopefully fixed bug with negative countdowns.
13017 - *
13018 - * Revision 1.18  1994/06/21  23:47:44  john
13019 - * MAde Malloc always 4*1024*1024.
13020 - *
13021 - * Revision 1.17  1994/06/21  22:58:47  john
13022 - * Added error if out of memory.
13023 - *
13024 - * Revision 1.16  1994/06/21  22:15:48  john
13025 - * Added  % done to demo recording.
13026 - *
13027 - *
13028 - * Revision 1.15  1994/06/21  19:45:55  john
13029 - * Added palette effects to demo recording.
13030 - *
13031 - * Revision 1.14  1994/06/21  15:08:54  john
13032 - * Made demo record HUD message and cleaned up the HUD code.
13033 - *
13034 - * Revision 1.13  1994/06/21  14:20:08  john
13035 - * Put in hooks to record HUD messages.
13036 - *
13037 - * Revision 1.12  1994/06/20  11:50:15  john
13038 - * Made demo record flash effect, and control center triggers.
13039 - *
13040 - * Revision 1.11  1994/06/17  18:01:33  john
13041 - * A bunch of new stuff by John
13042 - *
13043 - * Revision 1.10  1994/06/17  12:13:31  john
13044 - * More newdemo stuff; made editor->game transition start in slew mode.
13045 - *
13046 - * Revision 1.9  1994/06/16  13:14:36  matt
13047 - * Fixed typo
13048 - *
13049 - * Revision 1.8  1994/06/16  13:02:07  john
13050 - * Added morph hooks.
13051 - *
13052 - * Revision 1.7  1994/06/15  19:01:33  john
13053 - * Added the capability to make 3d sounds play just once for the
13054 - * laser hit wall effects.
13055 - *
13056 - * Revision 1.6  1994/06/15  14:56:59  john
13057 - * Added triggers to demo recording.
13058 - *
13059 - * Revision 1.5  1994/06/14  20:42:15  john
13060 - * Made robot matztn cntr not work until no robots or player are
13061 - * in the segment.
13062 - *
13063 - * Revision 1.4  1994/06/14  14:43:27  john
13064 - * Made doors work with newdemo system.
13065 - *
13066 - * Revision 1.3  1994/06/14  11:32:29  john
13067 - * Made Newdemo record & restore the current mine.
13068 - *
13069 - * Revision 1.2  1994/06/13  21:02:43  john
13070 - * Initial version of new demo recording system.
13071 - *
13072 - * Revision 1.1  1994/06/13  11:09:00  john
13073 - * Initial revision
13074
13075 ------------------------------------------------------------------------
13076 main/newdemo.h:
13077
13078 - * Revision 1.1  1995/05/16  16:00:24  allender
13079 - * Initial revision
13080 - *
13081 - * Revision 2.0  1995/02/27  11:27:18  john
13082 - * New version 2.0, which has no anonymous unions, builds with
13083 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
13084 - *
13085 - * Revision 1.43  1995/01/19  09:41:43  allender
13086 - * prototype for laser level recording
13087 - *
13088 - * Revision 1.42  1995/01/18  18:48:49  allender
13089 - * added function prototype for door_open
13090 - *
13091 - * Revision 1.41  1995/01/17  17:42:31  allender
13092 - * new prototypes for ammo counts
13093 - *
13094 - * Revision 1.40  1995/01/04  15:04:27  allender
13095 - * added some different prototypes for registered
13096 - *
13097 - * Revision 1.39  1995/01/03  11:45:11  allender
13098 - * extern function definition
13099 - *
13100 - * Revision 1.38  1994/12/29  16:43:31  allender
13101 - * new function prototype
13102 - *
13103 - * Revision 1.37  1994/12/28  14:15:27  allender
13104 - * new function prototypes
13105 - *
13106 - * Revision 1.36  1994/12/21  12:46:41  allender
13107 - * new functions for multiplayer deaths and kills
13108 - *
13109 - * Revision 1.35  1994/12/12  11:32:55  allender
13110 - * added new record function to restore after in rearview mode
13111 - *
13112 - * Revision 1.34  1994/12/08  21:03:15  allender
13113 - * added new param to record_player_flags
13114 - *
13115 - * Revision 1.33  1994/12/08  13:47:01  allender
13116 - * removed function call to record_rearview
13117 - *
13118 - * Revision 1.32  1994/12/06  12:57:10  allender
13119 - * added new prototype for multi decloaking
13120 - *
13121 - * Revision 1.31  1994/12/01  11:46:34  allender
13122 - * added recording prototype for multi player cloak
13123 - *
13124 - * Revision 1.30  1994/11/27  23:04:22  allender
13125 - * function prototype for recording new levels
13126 - *
13127 - * Revision 1.29  1994/11/07  08:47:43  john
13128 - * Made wall state record.
13129 - *
13130 - * Revision 1.28  1994/11/05  17:22:53  john
13131 - * Fixed lots of sequencing problems with newdemo stuff.
13132 - *
13133 - * Revision 1.27  1994/11/04  16:48:49  allender
13134 - * extern Newdemo_do_interpolate variable
13135 - *
13136 - * Revision 1.26  1994/11/02  14:08:53  allender
13137 - * record rearview
13138 - *
13139 - * Revision 1.25  1994/10/31  13:35:04  allender
13140 - * added two record functions to save and restore cockpit state on
13141 - * death sequence
13142 - *
13143 - * Revision 1.24  1994/10/29  16:01:11  allender
13144 - * added ND_STATE_NODEMOS to indicate that there are no demos currently
13145 - * available for playback
13146 - *
13147 - * Revision 1.23  1994/10/28  12:41:58  allender
13148 - * add homing distance recording event
13149 - *
13150 - * Revision 1.22  1994/10/27  16:57:32  allender
13151 - * removed VCR_MODE stuff, and added monitor blowup effects
13152 - *
13153 - * Revision 1.21  1994/10/26  14:44:48  allender
13154 - * completed hacked in vcr type demo playback states
13155 - *
13156 - * Revision 1.20  1994/10/26  13:40:38  allender
13157 - * more vcr demo playback defines
13158 - *
13159 - * Revision 1.19  1994/10/26  08:51:26  allender
13160 - * record player weapon change
13161 - *
13162 - * Revision 1.18  1994/10/25  16:25:31  allender
13163 - * prototypes for shield, energy and flags
13164 - *
13165 - * Revision 1.17  1994/08/15  18:05:30  john
13166 - * *** empty log message ***
13167 - *
13168 - * Revision 1.16  1994/07/21  13:11:26  matt
13169 - * Ripped out remants of old demo system, and added demo only system that
13170 - * disables object movement and game options from menu.
13171 - *
13172 - * Revision 1.15  1994/07/05  12:49:02  john
13173 - * Put functionality of New Hostage spec into code.
13174 - *
13175 - * Revision 1.14  1994/06/27  15:53:12  john
13176 - * #define'd out the newdemo stuff
13177 - *
13178 - *
13179 - * Revision 1.13  1994/06/24  17:01:25  john
13180 - * Add VFX support; Took Game Sequencing, like EndGame and stuff and
13181 - * took it out of game.c and into gameseq.c
13182 - *
13183 - * Revision 1.12  1994/06/21  19:46:05  john
13184 - * Added palette effects to demo recording.
13185 - *
13186 - * Revision 1.11  1994/06/21  14:19:58  john
13187 - * Put in hooks to record HUD messages.
13188 - *
13189 - * Revision 1.10  1994/06/20  11:50:42  john
13190 - * Made demo record flash effect, and control center triggers.
13191 - *
13192 - * Revision 1.9  1994/06/17  18:01:29  john
13193 - * A bunch of new stuff by John
13194 - *
13195 - * Revision 1.8  1994/06/17  12:13:34  john
13196 - * More newdemo stuff; made editor->game transition start in slew mode.
13197 - *
13198 - * Revision 1.7  1994/06/16  13:02:02  john
13199 - * Added morph hooks.
13200 - *
13201 - * Revision 1.6  1994/06/15  19:01:42  john
13202 - * Added the capability to make 3d sounds play just once for the
13203 - * laser hit wall effects.
13204 - *
13205 - * Revision 1.5  1994/06/15  14:57:11  john
13206 - * Added triggers to demo recording.
13207 - *
13208 - * Revision 1.4  1994/06/14  20:42:19  john
13209 - * Made robot matztn cntr not work until no robots or player are
13210 - * in the segment.
13211 - *
13212 - * Revision 1.3  1994/06/14  14:43:52  john
13213 - * Made doors work with newdemo system.
13214 - *
13215 - * Revision 1.2  1994/06/13  21:02:44  john
13216 - * Initial version of new demo recording system.
13217 - *
13218 - * Revision 1.1  1994/06/13  15:51:09  john
13219 - * Initial revision
13220
13221 ------------------------------------------------------------------------
13222 main/newmenu.c:
13223
13224 - * Revision 1.26  1996/04/14  21:07:35  allender
13225 - * some change for update
13226 - *
13227 - * Revision 1.25  1995/10/31  10:19:25  allender
13228 - * shareware stuff
13229 - *
13230 - * Revision 1.24  1995/10/27  11:09:04  allender
13231 - * always cd to descent dir before any menu processing --
13232 - * sanity check because of way mac does volume mounting and
13233 - * other file stuff
13234 - *
13235 - * Revision 1.23  1995/10/24  18:11:19  allender
13236 - * do_appl_quit saves and restores background -- don't
13237 - * do any special processing.  fixed newmenu_do3 to pass width
13238 - * and height to ...do_4
13239 - *
13240 - * Revision 1.22  1995/10/21  23:26:25  allender
13241 - * can't do cmd-q in multiplayer games
13242 - *
13243 - * Revision 1.21  1995/10/21  22:53:25  allender
13244 - * menus need to be 8 byte multiple wide -- printscreen stuff
13245 - *
13246 - * Revision 1.20  1995/10/20  00:50:15  allender
13247 - * redbook stuff and make esc leave menu always
13248 - *
13249 - * Revision 1.19  1995/10/17  13:14:52  allender
13250 - * mouse support for other menus now operational -- dragging
13251 - * mouse will also move sliders
13252 - *
13253 - * Revision 1.18  1995/10/12  17:35:19  allender
13254 - * mouse support for pilot and demos
13255 - *
13256 - * Revision 1.17  1995/10/11  12:17:47  allender
13257 - * removed event loop processing
13258 - *
13259 - * Revision 1.16  1995/10/10  11:51:29  allender
13260 - * align menus to 8 byte boundry
13261 - *
13262 - * Revision 1.15  1995/10/05  14:09:36  allender
13263 - * lowered starting x location on menus to fixup network
13264 - * status screen chopping off characters
13265 - *
13266 - * Revision 1.14  1995/09/24  10:52:27  allender
13267 - * made close boxes work
13268 - * maybe some other minor stuff?
13269 - *
13270 - * Revision 1.13  1995/09/15  09:02:04  allender
13271 - * started putting mouse support in listboxes
13272 - *
13273 - * Revision 1.12  1995/09/13  08:50:14  allender
13274 - * close box in this rev?  Worked on getting list box better
13275 - * looking
13276 - *
13277 - * Revision 1.11  1995/09/01  10:52:37  allender
13278 - * fixed up list boxes
13279 - *
13280 - * Revision 1.10  1995/08/24  16:23:08  allender
13281 - * mouse support for most menus
13282 - *
13283 - * Revision 1.9  1995/08/08  13:46:56  allender
13284 - * added macsys header file
13285 - *
13286 - * Revision 1.8  1995/08/01  16:03:54  allender
13287 - * added file list with Desalvo's directory stuff
13288 - *
13289 - * Revision 1.7  1995/07/26  17:03:37  allender
13290 - * show then hide cursor during newmenu operations -- not quite
13291 - * right yet
13292 - *
13293 - * Revision 1.6  1995/07/17  08:56:26  allender
13294 - * fixed up menus to look better with new high res fonts
13295 - *
13296 - * Revision 1.5  1995/07/12  10:35:52  allender
13297 - * removed old debug thing
13298 - *
13299 - * Revision 1.4  1995/06/23  10:23:21  allender
13300 - * menus should work in any resolution now
13301 - *
13302 - * Revision 1.3  1995/06/20  09:11:19  allender
13303 - * changed menu system to support 640x480 instead of 320x200
13304 - *
13305 - * Revision 1.2  1995/06/13  13:07:30  allender
13306 - * added special key to move 320x200 window to upper left corner of screen
13307 - *
13308 - * Revision 1.1  1995/05/16  15:29:13  allender
13309 - * Initial revision
13310 - *
13311 - * Revision 2.8  1995/05/26  16:16:28  john
13312 - * Split SATURN into define's for requiring cd, using cd, etc.
13313 - * Also started adding all the Rockwell stuff.
13314 - *
13315 - * Revision 2.7  1995/04/23  14:54:17  john
13316 - * Fixed bug with background breaking in first menu.
13317 - *
13318 - * Revision 2.6  1995/03/21  14:38:46  john
13319 - * Ifdef'd out the NETWORK code.
13320 - *
13321 - * Revision 2.5  1995/03/15  14:33:29  john
13322 - * Added code to force the Descent CD-rom in the drive.
13323 - *
13324 - * Revision 2.4  1995/03/14  18:24:28  john
13325 - * Force Destination Saturn to use CD-ROM drive.
13326 - *
13327 - * Revision 2.3  1995/03/14  16:22:23  john
13328 - * Added cdrom alternate directory stuff.
13329 - *
13330 - * Revision 2.2  1995/03/06  18:30:51  john
13331 - * Fixed bug with newmenu trashing editor font.
13332 - *
13333 - * Revision 2.1  1995/03/06  15:23:17  john
13334 - * New screen techniques.
13335 - *
13336 - * Revision 2.0  1995/02/27  11:27:55  john
13337 - * New version 2.0, which has no anonymous unions, builds with
13338 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
13339 - *
13340 - * Revision 1.129  1995/02/11  16:19:56  john
13341 - * Added code to make the default mission be the one last played.
13342 - *
13343 - * Revision 1.128  1995/02/02  19:41:33  john
13344 - * Added 10 save game slots.
13345 - *
13346 - * Revision 1.127  1995/02/01  18:13:52  john
13347 - * Fixed some constants.
13348 - *
13349 - * Revision 1.126  1995/02/01  18:04:01  yuan
13350 - * Added 50 characters to list.
13351 - *
13352 - * Revision 1.125  1995/02/01  13:39:35  john
13353 - * Made menu text that changes not overwrite.
13354 - *
13355 - * Revision 1.124  1995/01/31  10:47:57  john
13356 - * Added menu that you can specify the width of the menu.
13357 - *
13358 - * Revision 1.123  1995/01/28  17:18:12  john
13359 - * Added file list box.
13360 - *
13361 - * Revision 1.122  1995/01/27  17:15:55  john
13362 - * Made prev comment actually work.
13363 - *
13364 - * Revision 1.121  1995/01/27  16:49:03  john
13365 - * *** empty log message ***
13366 - *
13367 - * Revision 1.120  1995/01/27  16:46:40  john
13368 - * Made so that input_menu only clears text if -empty-.
13369 - *
13370 - * Revision 1.119  1995/01/27  15:25:04  john
13371 - * Delete saved game when deleteing a pilot file.
13372 - *
13373 - * Revision 1.118  1995/01/25  16:36:09  john
13374 - * Made so that when you hit enter during
13375 - * game save, -empty- goes away.
13376 - *
13377 - * Revision 1.117  1995/01/24  16:59:30  john
13378 - * took out mono debugging text.
13379 - *
13380 - * Revision 1.116  1995/01/24  16:23:16  john
13381 - * Fixed some bugs with listboxes.
13382 - *
13383 - * Revision 1.115  1995/01/23  23:47:36  matt
13384 - * Made keypad enter work in menus
13385 - *
13386 - * Revision 1.114  1995/01/23  19:29:59  john
13387 - * Added scrolling listbox menus.
13388 - *
13389 - * Revision 1.113  1995/01/19  12:33:34  john
13390 - * Made keys jump to sliders, etc in menus.
13391 - *
13392 - * Revision 1.112  1995/01/15  14:33:08  rob
13393 - * Fixed problem with nested nm_messageboxes.
13394 - *
13395 - * Revision 1.111  1995/01/03  17:33:40  john
13396 - * Made scrolling textbox. Used it for scores cool saying.
13397 - *
13398 - * Revision 1.110  1994/12/28  10:42:58  john
13399 - * More VFX tweaking.
13400 - *
13401 - * Revision 1.109  1994/12/28  10:26:39  john
13402 - * Fixed some VFX problems.
13403 - *
13404 - * Revision 1.108  1994/12/15  23:18:10  john
13405 - * Added fix so that VFX mode doesn't hang.
13406 - *
13407 - * Revision 1.107  1994/12/15  12:19:55  john
13408 - * Made menu use clipped bitblt functions.
13409 - *
13410 - * Revision 1.106  1994/12/09  00:41:30  mike
13411 - * fix hang in automap print screen
13412 - *
13413 - * Revision 1.105  1994/12/08  10:01:34  john
13414 - * Changed the way the player callsign stuff works.
13415 - *
13416 - * Revision 1.104  1994/12/04  15:34:30  john
13417 - * Fixed bug with newmenu not restoring font properly.
13418 - *
13419 - * Revision 1.103  1994/12/03  17:47:09  john
13420 - * Fixed bug that didn't free filename mem when not .plr files found.
13421 - *
13422 - * Revision 1.102  1994/12/03  15:06:15  john
13423 - * If no pilot exists, bring up box asking for name.
13424 - *
13425 - * Revision 1.101  1994/12/03  11:04:02  john
13426 - * Changed newmenu code a bit to fix bug with bogus
13427 - * backgrounds occcasionally.
13428 - *
13429 - * Revision 1.100  1994/12/01  20:15:48  yuan
13430 - * Localization.
13431 - *
13432 - * Revision 1.99  1994/12/01  10:33:28  john
13433 - * Fixed bug with large menu backgrounds not drawing correctly.
13434 - *
13435 - * Revision 1.98  1994/12/01  02:41:56  john
13436 - * Fixed warnining.
13437 - *
13438 - * Revision 1.97  1994/11/30  22:52:43  john
13439 - * Fixed bug in code that made the backgrounds behind menus.
13440 - *
13441 - * Revision 1.96  1994/11/30  19:47:42  john
13442 - * Added a check for out o' memory when mallocing background.
13443 - *
13444 - * Revision 1.95  1994/11/30  19:39:10  john
13445 - * ..
13446 - *
13447 - * Revision 1.94  1994/11/30  19:38:27  john
13448 - * fixed bug with previous.
13449 - *
13450 - * Revision 1.93  1994/11/30  19:36:47  john
13451 - * Made Gravis Ultrasound work again.  Made the scores blink
13452 - * at a constant rate.  Revamped the newmenu background storage,
13453 - * which hopefully fixed some bugs.  Made menus in ame not pause
13454 - * sound, except for the pause key.               ^== Game!
13455 - *
13456 - * Revision 1.92  1994/11/30  18:06:05  matt
13457 - * When player types space in callsign, comes up as underscore
13458 - *
13459 - * Revision 1.91  1994/11/30  12:28:22  adam
13460 - * added PCX support
13461 - *
13462 - * Revision 1.90  1994/11/30  12:10:59  adam
13463 - * added support for PCX titles/brief screens
13464 - *
13465 - * Revision 1.89  1994/11/29  00:59:12  allender
13466 - * change newmenu_get_filename so demo files can be deleted too
13467 - *
13468 - * Revision 1.88  1994/11/27  21:16:18  allender
13469 - * made some return values in newmenu_get_filename 0 instead of -1
13470 - *
13471 - * Revision 1.87  1994/11/27  16:58:17  matt
13472 - * Made printscreen work all the time (not just when no ndebug) and made it
13473 - * work when getting a filename.
13474 - *
13475 - * Revision 1.86  1994/11/27  16:47:51  john
13476 - * Made the call to fade in palette only happen if it needs to be, just
13477 - * because I thought it might reduce code paging with vm in menus.
13478 - *
13479 - * Revision 1.85  1994/11/26  15:30:16  matt
13480 - * Allow escape out of change pilot menu
13481 - *
13482 - * Revision 1.84  1994/11/26  14:17:26  matt
13483 - * Player can now only enter valid chars for his name
13484 - *
13485 - * Revision 1.83  1994/11/23  14:13:17  allender
13486 - * if no demo files, displays less "techy" message
13487 - *
13488 - * Revision 1.82  1994/11/21  11:55:52  john
13489 - * Fixed some sound pausing in menus bugs.
13490 - *
13491 - * Revision 1.81  1994/11/19  15:14:58  mike
13492 - * remove unused code and data
13493 - *
13494 - * Revision 1.80  1994/11/18  23:37:54  john
13495 - * Changed some shorts to ints.
13496 - *
13497 - * Revision 1.79  1994/11/15  09:29:21  john
13498 - * Made it so that pressing a letter when selecting players moves to
13499 - * a matching choice.
13500 - *
13501 - * Revision 1.78  1994/11/14  17:12:28  adam
13502 - * *** empty log message ***
13503 - *
13504 - * Revision 1.77  1994/11/14  16:58:31  rob
13505 - * Tried to fix a problem with save demo dialog.
13506 - *
13507 - * Revision 1.76  1994/11/14  16:13:46  matt
13508 - * Fixed handling of players with DOS device names
13509 - *
13510 - * Revision 1.75  1994/11/13  18:12:53  matt
13511 - * Fixed handling of filenames that are the same as DOS devices
13512 - *
13513 - * Revision 1.74  1994/11/13  17:20:44  john
13514 - * Fixed text a bit.
13515 - *
13516 - * Revision 1.73  1994/11/13  17:18:22  john
13517 - * Changed wording of new pilot.
13518 - *
13519 - * Revision 1.72  1994/11/13  17:14:21  john
13520 - * Fixed bug with player list box.
13521 - *
13522 - * Revision 1.71  1994/11/13  17:12:48  john
13523 - * Fixed broken demo file list.
13524 - *
13525 - * Revision 1.70  1994/11/13  17:04:49  john
13526 - * Made the callsign entry be a list box and gave the ability
13527 - * to delete players.
13528 - *
13529 - * Revision 1.69  1994/11/13  15:38:03  john
13530 - * Added critical error handler to game.  Took out -editor command line
13531 - * option because it didn't work anymore and wasn't worth fixing.  Made scores
13532 - * not use MINER enviroment variable on release version, and made scores
13533 - * not print an error if there is no descent.hi.
13534 - *
13535 - * Revision 1.68  1994/11/11  18:17:03  rob
13536 - * Made multi_menu_poll return a value to exit menus.
13537 - *
13538 - * Revision 1.67  1994/11/11  11:07:06  rob
13539 - * Added include of multi.h
13540 - *
13541 - * Revision 1.66  1994/11/10  20:25:16  rob
13542 - * John's stuff to make network menus work.
13543 - *
13544 - * Revision 1.65  1994/11/08  14:51:39  john
13545 - * Added nm_messagebox1, (like the original, only you can pass a function).
13546 - *
13547 - * Revision 1.64  1994/11/08  08:30:39  john
13548 - * Fixed bug with centering titles.
13549 - *
13550 - * Revision 1.63  1994/11/08  08:27:00  john
13551 - * Made titles and subtitles center.
13552 - *
13553 - * Revision 1.62  1994/11/07  09:40:48  john
13554 - * Neatend file list box some.
13555 - *
13556 - * Revision 1.61  1994/11/05  17:22:41  john
13557 - * Fixed lots of sequencing problems with newdemo stuff.
13558 - *
13559 - * Revision 1.60  1994/11/05  15:04:08  john
13560 - * Added non-popup menu for the main menu, so that scores and credits don't have to save
13561 - * the background.
13562 - *
13563 - * Revision 1.59  1994/11/05  14:03:52  john
13564 - * Fixed fade transitions between all screens by making gr_palette_fade_in and out keep
13565 - * track of whether the palette is faded in or not.  Then, wherever the code needs to fade out,
13566 - * it just calls gr_palette_fade_out and it will fade out if it isn't already.  The same with fade_in.
13567 - * This eliminates the need for all the flags like Menu_fade_out, game_fade_in palette, etc.
13568 - *
13569 - * Revision 1.58  1994/11/04  20:11:50  john
13570 - * Neatening up palette stuff with demos.
13571 - *
13572 - * Revision 1.57  1994/11/04  13:49:24  allender
13573 - * fixed newmenu_get_filename to work with less than 10 files
13574 - *
13575 - * Revision 1.56  1994/11/03  19:37:44  john
13576 - * Added scrolling file list box
13577 - *
13578 - * Revision 1.55  1994/10/31  18:16:42  john
13579 - * Made Pad arrows work with menus.
13580 - *
13581 - * Revision 1.54  1994/10/28  14:54:25  john
13582 - * Added forward dec. for newmenu_close.
13583 - * .\
13584 - *
13585 - * Revision 1.53  1994/10/28  14:53:00  john
13586 - * Fixed hideous bug that would bomb if you called newmenu_draw_background
13587 - * before any menus were ever displayed.
13588 - *
13589 - * Revision 1.52  1994/10/24  19:56:53  john
13590 - * Made the new user setup prompt for config options.
13591 - *
13592 - * Revision 1.51  1994/10/24  15:15:49  john
13593 - * Made Esc exit nm_messagebox's,
13594 - * ,
13595 - *
13596 - * Revision 1.50  1994/10/21  15:20:20  john
13597 - * Made PrtScr do screen dump, not F2.
13598 - *
13599 - * Revision 1.49  1994/10/18  12:33:38  john
13600 - * Only used copy the item text into the saved_text field
13601 - * if it is an inputbox or inputbox_menu.
13602 - *
13603 - * Revision 1.48  1994/10/17  11:04:01  john
13604 - * Made backtab work also.
13605 - *
13606 - * Revision 1.47  1994/10/17  10:47:49  john
13607 - * MAde Tab work like down arrow.
13608 - *
13609 - * Revision 1.46  1994/10/17  10:45:10  john
13610 - * Made the player able to abort death by pressing any button or key.
13611 - *
13612 - * Revision 1.45  1994/10/13  21:52:02  john
13613 - * Made it so that if a messagebox has 1 choice, then
13614 - * Esc will return -1.
13615 - *
13616 - * Revision 1.44  1994/10/13  11:35:38  john
13617 - * Made Thrustmaster FCS Hat work.  Put a background behind the
13618 - * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
13619 - * menu to new menu. Made F6 be calibrate joystick.
13620 - *
13621 - * Revision 1.43  1994/10/11  17:18:52  john
13622 - * Fixed bug with sliders always starting at -1.
13623 - *
13624 - * Revision 1.42  1994/10/11  17:08:29  john
13625 - * Added sliders for volume controls.
13626 - *
13627 - * Revision 1.41  1994/10/06  16:04:40  john
13628 - * Made text items color differently than others. Adam
13629 - * is gonna make a diff colored font for these.
13630 - *
13631 - * Revision 1.40  1994/10/06  15:08:23  rob
13632 - * Allowed any negative key value to abort the menu and return.
13633 - *
13634 - * Revision 1.39  1994/10/04  10:26:06  matt
13635 - * Changed fade in to happen every time a global var is set
13636 - *
13637 - * Revision 1.38  1994/10/04  09:16:08  john
13638 - * If you pass -1 as choice in newmenu_do1, then
13639 - * no item is highlighted until you press up or
13640 - * down arrows.
13641 - *
13642 - * Revision 1.37  1994/10/03  23:44:37  matt
13643 - * Save & restore palette effect around menus & pause message
13644 - *
13645 - * Revision 1.36  1994/10/03  22:59:40  matt
13646 - * Re-enabled backspace to generate Int3()
13647 - *
13648 - * Revision 1.35  1994/10/03  19:11:21  matt
13649 - * Changed string input cursor to blinking underscore
13650 - *
13651 - * Revision 1.34  1994/10/03  14:44:15  john
13652 - * Added newmenu_do1, which allows you to pass the starting
13653 - * item to the menu system
13654 - *
13655 - * Revision 1.33  1994/09/30  11:51:21  john
13656 - * Added Matt's NM_TYPE_INPUT_MENU
13657 - *
13658 - * Revision 1.32  1994/09/28  17:22:56  matt
13659 - * Added extra space between subtitle and menu items
13660 - * Made shortcut key check ignore leading spaces in text
13661 - *
13662 - * Revision 1.31  1994/09/15  16:11:22  john
13663 - * Added support for VFX1 head tracking. Fixed bug with memory over-
13664 - * write when using stereo mode.
13665 - *
13666 - * Revision 1.30  1994/09/12  09:52:59  john
13667 - * Made global flush function that flushes keyboard,mouse, and joystick.
13668 - *
13669 - * Revision 1.29  1994/09/10  19:10:54  matt
13670 - * Fixed a few things (like arrow key handling) for menus with all
13671 - * text items, such as the key help message.
13672 - *
13673 - * Revision 1.28  1994/09/01  18:55:38  john
13674 - * freed scores.lbm
13675 - *
13676 - * Revision 1.27  1994/09/01  18:03:50  john
13677 - * Neatened up scores a bit.
13678 - *
13679 - * Revision 1.26  1994/08/30  20:38:13  john
13680 - * Passed citem in newmenu sub.
13681 - *
13682 - * Revision 1.25  1994/08/30  11:13:01  john
13683 - * Added beveled edges to menus.
13684 - *
13685 - * Revision 1.24  1994/08/26  13:01:58  john
13686 - * Put high score system in.
13687 - *
13688 - * Revision 1.23  1994/08/16  00:18:44  john
13689 - * Made pressing the first letter of a menu
13690 - * item move to it.
13691 - *
13692 - * Revision 1.22  1994/08/15  23:17:43  john
13693 - * *** empty log message ***
13694 - *
13695 - * Revision 1.21  1994/08/15  23:15:28  john
13696 - * Made 1 menu/checkbox return with any keypress.
13697 - *
13698 - * Revision 1.20  1994/08/12  10:18:23  john
13699 - * *** empty log message ***
13700 - *
13701 - * Revision 1.19  1994/08/12  10:09:11  john
13702 - * Made borders better.
13703 - *
13704 - * Revision 1.18  1994/08/12  03:11:16  john
13705 - * Made network be default off; Moved network options into
13706 - * main menu.  Made starting net game check that mines are the
13707 - * same.
13708 - *
13709 - * Revision 1.17  1994/08/11  22:14:43  john
13710 - * Free'd up some memory that I forgot to free.
13711 - *
13712 - * Revision 1.16  1994/08/11  19:27:35  john
13713 - * Made the Backspace drop into the debugger only
13714 - * if you're not in an inputbox.
13715 - *
13716 - * Revision 1.15  1994/08/11  18:01:49  matt
13717 - * Added F2 and BACKSPACE keys to new menu system
13718 - *
13719 - * Revision 1.14  1994/08/11  14:25:58  john
13720 - * *** empty log message ***
13721 - *
13722 - * Revision 1.13  1994/08/11  14:25:40  john
13723 - * *** empty log message ***
13724 - *
13725 - * Revision 1.12  1994/08/11  13:47:02  john
13726 - * Made newmenu have subtitles, passed key through to
13727 - * the newmenu subfunctions.
13728 - *
13729 - * Revision 1.11  1994/08/11  12:45:08  john
13730 - * *** empty log message ***
13731 - *
13732 - * Revision 1.10  1994/08/11  12:25:45  john
13733 - * Made right_offset spacing different
13734 - *
13735 - * Revision 1.9  1994/08/11  12:09:49  john
13736 - * Made work with bitmapped fonts.
13737 - *
13738 - * Revision 1.8  1994/08/10  19:56:16  john
13739 - * Changed font stuff; Took out old menu; messed up lots of
13740 - * other stuff like game sequencing messages, etc.
13741 - *
13742 - * Revision 1.7  1994/07/27  16:12:23  john
13743 - * Changed newmenu system to have a callback function.
13744 - * /.
13745 - *
13746 - * Revision 1.6  1994/07/25  15:10:23  john
13747 - * *** empty log message ***
13748 - *
13749 - * Revision 1.5  1994/07/25  12:33:35  john
13750 - * Network "pinging" in.
13751 - *
13752 - * Revision 1.4  1994/07/24  18:21:27  john
13753 - * Took out first time stuff.
13754 - *
13755 - * Revision 1.3  1994/07/24  17:32:47  john
13756 - * Added percent item.  Also neatend up a bit.
13757 - *
13758 - * Revision 1.2  1994/07/22  17:48:13  john
13759 - * Added new menuing system.
13760 - *
13761 - * Revision 1.1  1994/07/22  13:55:38  john
13762 - * Initial revision
13763
13764 ------------------------------------------------------------------------
13765 main/newmenu.h:
13766
13767 - * Revision 1.3  1995/10/17  13:15:19  allender
13768 - * new call to nm_listbox for close_box
13769 - *
13770 - * Revision 1.2  1995/09/13  08:48:50  allender
13771 - * new prototype for newmenu -- have close box
13772 - *
13773 - * Revision 1.1  1995/05/16  16:00:32  allender
13774 - * Initial revision
13775 - *
13776 - * Revision 2.0  1995/02/27  11:32:28  john
13777 - * New version 2.0, which has no anonymous unions, builds with
13778 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
13779 - *
13780 - * Revision 1.24  1995/02/11  16:20:05  john
13781 - * Added code to make the default mission be the one last played.
13782 - *
13783 - * Revision 1.23  1995/01/31  10:21:41  john
13784 - * Added code to specify width, height.
13785 - *
13786 - * Revision 1.22  1995/01/28  17:09:21  john
13787 - * *** empty log message ***
13788 - *
13789 - * Revision 1.21  1995/01/23  18:38:43  john
13790 - * Added listbox function.
13791 - *
13792 - * Revision 1.20  1994/11/26  15:29:55  matt
13793 - * Allow escape out of change pilot menu
13794 - *
13795 - * Revision 1.19  1994/11/26  14:17:05  matt
13796 - * Player can now only enter valid chars for his name
13797 - *
13798 - * Revision 1.18  1994/11/18  16:17:13  mike
13799 - * prototype Max_linear_depth_objects.
13800 - *
13801 - * Revision 1.17  1994/11/08  14:51:17  john
13802 - * Added nm_messagebox1, (like the original, only you can pass a function).
13803 - *
13804 - * Revision 1.16  1994/11/05  14:31:45  john
13805 - * Added a new menu function for the background.
13806 - *
13807 - * Revision 1.15  1994/11/05  14:05:46  john
13808 - * Fixed fade transitions between all screens by making gr_palette_fade_in and out keep
13809 - * track of whether the palette is faded in or not.  Then, wherever the code needs to fade out,
13810 - * it just calls gr_palette_fade_out and it will fade out if it isn't already.  The same with fade_in.
13811 - * This eliminates the need for all the flags like Menu_fade_out, game_fade_in palette, etc.
13812 - *
13813 - * Revision 1.14  1994/11/03  19:37:35  john
13814 - * Added scrolling file list box
13815 - *
13816 - * Revision 1.13  1994/10/13  11:34:03  john
13817 - * Made Thrustmaster FCS Hat work.  Put a background behind the
13818 - * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
13819 - * menu to new menu. Made F6 be calibrate joystick.
13820 - *
13821 - * Revision 1.12  1994/10/11  17:08:32  john
13822 - * Added sliders for volume controls.
13823 - *
13824 - * Revision 1.11  1994/10/04  10:26:23  matt
13825 - * Changed fade in to happen every time a global var is set
13826 - *
13827 - * Revision 1.10  1994/10/03  14:43:56  john
13828 - * Added newmenu_do1, which allows you to pass the starting
13829 - * item to the menu system
13830 - *
13831 - * Revision 1.9  1994/09/30  11:51:33  john
13832 - * Added Matt's NM_TYPE_INPUT_MENU
13833 - *
13834 - * Revision 1.8  1994/08/30  20:38:28  john
13835 - * Passed citem in newmenu sub.
13836 - *
13837 - * Revision 1.7  1994/08/12  03:11:00  john
13838 - * Made network be default off; Moved network options into
13839 - * main menu.  Made starting net game check that mines are the
13840 - * same.
13841 - *
13842 - * Revision 1.6  1994/08/11  13:47:05  john
13843 - * Made newmenu have subtitles, passed key through to
13844 - * the newmenu subfunctions.
13845 - *
13846 - * Revision 1.5  1994/07/27  16:12:24  john
13847 - * Changed newmenu system to have a callback function.
13848 - * /.
13849 - *
13850 - * Revision 1.4  1994/07/24  17:41:38  john
13851 - * *** empty log message ***
13852 - *
13853 - * Revision 1.3  1994/07/24  17:33:01  john
13854 - * Added percent item.  Also neatend up a bit.
13855 - *
13856 - * Revision 1.2  1994/07/22  17:48:12  john
13857 - * Added new menuing system.
13858 - *
13859 - * Revision 1.1  1994/07/22  13:55:51  john
13860 - * Initial revision
13861
13862 ------------------------------------------------------------------------
13863 main/object.c:
13864
13865 - * Revision 1.5  1995/10/26  14:08:03  allender
13866 - * optimization to do physics on objects that didn't render last
13867 - * frame only every so often
13868 - *
13869 - * Revision 1.4  1995/10/20  00:50:57  allender
13870 - * make alt texture for player ship work correctly when cloaked
13871 - *
13872 - * Revision 1.3  1995/09/14  14:11:32  allender
13873 - * fix_object_segs returns void
13874 - *
13875 - * Revision 1.2  1995/08/12  11:31:01  allender
13876 - * removed #ifdef NEWDEMO -- always in
13877 - *
13878 - * Revision 1.1  1995/05/16  15:29:23  allender
13879 - * Initial revision
13880 - *
13881 - * Revision 2.3  1995/06/15  12:30:51  john
13882 - * Fixed bug with multiplayer ships cloaking out wrongly.
13883 - *
13884 - * Revision 2.2  1995/05/15  11:34:53  john
13885 - * Fixed bug as Matt directed that fixed problems with the exit
13886 - * triggers being missed on slow frame rate computer.
13887 - *
13888 - * Revision 2.1  1995/03/21  14:38:51  john
13889 - * Ifdef'd out the NETWORK code.
13890 - *
13891 - * Revision 2.0  1995/02/27  11:28:14  john
13892 - * New version 2.0, which has no anonymous unions, builds with
13893 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
13894 - *
13895 - * Revision 1.335  1995/02/22  12:57:30  allender
13896 - * remove anonymous unions from object structure
13897 - *
13898 - * Revision 1.334  1995/02/09  22:04:40  mike
13899 - * fix lifeleft on badass weapons.
13900 - *
13901 - * Revision 1.333  1995/02/08  12:54:00  matt
13902 - * Fixed object freeing code which was deleting some explosions it shouldn't
13903 - *
13904 - * Revision 1.332  1995/02/08  11:37:26  mike
13905 - * Check for failures in call to obj_create.
13906 - *
13907 - * Revision 1.331  1995/02/05  17:48:52  rob
13908 - * Changed assert in obj_relink, more robust.
13909 - *
13910 - * Revision 1.330  1995/02/05  13:39:48  mike
13911 - * remove invulnerability effect code (actually, comment out).
13912 - *
13913 - * Revision 1.329  1995/02/04  12:29:52  rob
13914 - * Get rid of potential assert error for explosion detachment.
13915 - *
13916 - * Revision 1.328  1995/02/01  18:15:57  rob
13917 - * Removed debugging output from engine glow change.
13918 - *
13919 - * Revision 1.327  1995/02/01  16:20:12  matt
13920 - * Made engine glow vary over a wider range, and made the glow be based
13921 - * on thrust/speed, without regard to direction.
13922 - *
13923 - * Revision 1.326  1995/01/29  14:46:24  rob
13924 - * Fixed invul. vclip to only appear on player who is invul.
13925 - *
13926 - * Revision 1.325  1995/01/29  13:48:16  mike
13927 - * Add invulnerability graphical effect viewable by other players.
13928 - *
13929 - * Revision 1.324  1995/01/29  11:39:25  mike
13930 - * Add invulnerability effect.
13931 - *
13932 - * Revision 1.323  1995/01/27  17:02:41  mike
13933 - * add more information to an Error call.
13934 - *
13935 - * Revision 1.322  1995/01/26  22:11:30  mike
13936 - * Purple chromo-blaster (ie, fusion cannon) spruce up (chromification)
13937 - *
13938 - * Revision 1.321  1995/01/25  20:04:10  matt
13939 - * Moved matrix check to avoid orthogonalizing an uninitialize matrix
13940 - *
13941 - * Revision 1.320  1995/01/25  12:11:35  matt
13942 - * Make sure orient matrix is orthogonal when resetting player object
13943 - *
13944 - * Revision 1.319  1995/01/21  21:46:22  mike
13945 - * Optimize code in Assert (and prevent warning message).
13946 - *
13947 - * Revision 1.318  1995/01/21  21:22:16  rob
13948 - * Removed HUD clear messages.
13949 - * Added more Asserts to try and find illegal control type bug.
13950 - *
13951 - * Revision 1.317  1995/01/15  15:34:30  matt
13952 - * When freeing object slots, don't free fireballs that will be deleting
13953 - * other objects.
13954 - *
13955 - * Revision 1.316  1995/01/14  19:16:48  john
13956 - * First version of new bitmap paging code.
13957 - *
13958 - * Revision 1.315  1995/01/12  18:53:37  john
13959 - * Fixed parameter passing error.
13960 - *
13961 - * Revision 1.314  1995/01/12  12:09:47  yuan
13962 - * Added coop object capability.
13963 - *
13964 - * Revision 1.313  1994/12/15  16:45:44  matt
13965 - * Took out slew stuff for release version
13966 - *
13967 - * Revision 1.312  1994/12/15  13:04:25  mike
13968 - * Replace Players[Player_num].time_total references with GameTime.
13969 - *
13970 - * Revision 1.311  1994/12/15  11:01:04  mike
13971 - * add Object_minus_one for debugging.
13972 - *
13973 - * Revision 1.310  1994/12/15  03:03:33  matt
13974 - * Added error checking for NULL return from object_create_explosion()
13975 - *
13976 - * Revision 1.309  1994/12/14  17:25:31  matt
13977 - * Made next viewer func based on release not ndebug
13978 - *
13979 - * Revision 1.308  1994/12/13  12:55:42  mike
13980 - * hostages on board messages for when you die.
13981 - *
13982 - * Revision 1.307  1994/12/12  17:18:11  mike
13983 - * make boss cloak/teleport when get hit, make quad laser 3/4 as powerful.
13984 - *
13985 - * Revision 1.306  1994/12/12  00:27:11  matt
13986 - * Added support for no-levelling option
13987 - *
13988 - * Revision 1.305  1994/12/11  22:41:14  matt
13989 - * Added command-line option, -nolevel, which turns off player ship levelling
13990 - *
13991 - * Revision 1.304  1994/12/11  22:03:23  mike
13992 - * free up object slots as necessary.
13993 - *
13994 - * Revision 1.303  1994/12/11  14:09:31  mike
13995 - * make boss explosion sounds softer.
13996 - *
13997 - * Revision 1.302  1994/12/11  13:25:11  matt
13998 - * Restored calls to fix_object_segs() when debugging is turned off, since
13999 - * it's not a big routine, and could fix some possibly bad problems.
14000 - *
14001 - * Revision 1.301  1994/12/11  12:38:25  mike
14002 - * make boss explosion sounds louder in create_small_fireball.
14003 - *
14004 - * Revision 1.300  1994/12/10  15:28:37  matt
14005 - * Added asserts for debugging
14006 - *
14007 - * Revision 1.299  1994/12/09  16:18:51  matt
14008 - * Fixed init_player_object, for editor
14009 - *
14010 - * Revision 1.298  1994/12/09  15:03:10  matt
14011 - * Two changes for Mike:
14012 - *   1.  Do better placement of camera during death sequence (prevents hang)
14013 - *   2.  Only record dodging information if the player fired in a frame
14014 - *
14015 - * Revision 1.297  1994/12/09  14:59:12  matt
14016 - * Added system to attach a fireball to another object for rendering purposes,
14017 - * so the fireball always renders on top of (after) the object.
14018 - *
14019 - * Revision 1.296  1994/12/08  20:05:07  matt
14020 - * Removed unneeded debug message
14021 - *
14022 - * Revision 1.295  1994/12/08  12:36:02  matt
14023 - * Added new object allocation & deallocation functions so other code
14024 - * could stop messing around with internal object data structures.
14025 - *
14026 - * Revision 1.294  1994/12/07  20:13:37  matt
14027 - * Added debris object limiter
14028 - *
14029 - * Revision 1.293  1994/12/06  16:58:38  matt
14030 - * Killed warnings
14031 - *
14032 - * Revision 1.292  1994/12/05  22:34:35  matt
14033 - * Make tmap_override objects use override texture as alt texture.  This
14034 - * should have the effect of making simpler models use the override texture.
14035 - *
14036 - * Revision 1.291  1994/12/05  12:23:53  mike
14037 - * make camera start closer, but move away from player in death sequence.
14038 - *
14039 - * Revision 1.290  1994/12/02  11:11:18  mike
14040 - * hook sound effect to player small explosions (ctrlcen, too).
14041 - *
14042 - * Revision 1.289  1994/11/28  21:50:52  mike
14043 - * optimizations.
14044 - *
14045 - * Revision 1.288  1994/11/27  23:12:28  matt
14046 - * Made changes for new mprintf calling convention
14047 - *
14048 - * Revision 1.287  1994/11/27  20:35:50  matt
14049 - * Fixed dumb mistake
14050 - *
14051 - * Revision 1.286  1994/11/27  20:30:52  matt
14052 - * Got rid of warning
14053 - *
14054 - * Revision 1.285  1994/11/21  11:43:21  mike
14055 - * ndebug stuff.
14056 - *
14057 - * Revision 1.284  1994/11/19  15:19:37  mike
14058 - * rip out unused code and data.
14059 - *
14060 - * Revision 1.283  1994/11/18  23:41:59  john
14061 - * Changed some shorts to ints.
14062 - *
14063 - * Revision 1.282  1994/11/18  16:16:17  mike
14064 - * Separate depth on objects vs. walls.
14065 - *
14066 - * Revision 1.281  1994/11/18  12:05:35  rob
14067 - * Removed unnecessary invulnerability flag set in player death.
14068 - * (I hope its unnecessary.. its commented out if it proves crucial)
14069 - * fixes powerup dropping bug for net play.
14070 - *
14071 - * Revision 1.280  1994/11/16  20:36:34  rob
14072 - * Changed player explosion (small) code.
14073 - *
14074 - * Revision 1.279  1994/11/16  18:26:04  matt
14075 - * Clear tmap override on player, to fix "rock ship" bug
14076 - *
14077 - * Revision 1.278  1994/11/16  14:54:12  rob
14078 - * Moved hook for network explosions.
14079 - *
14080 - * Revision 1.277  1994/11/14  11:40:42  mike
14081 - * plot inner polygon on laser based on detail level.
14082 - *
14083 - * Revision 1.276  1994/11/10  14:02:59  matt
14084 - * Hacked in support for player ships with different textures
14085 - *
14086 - * Revision 1.275  1994/11/08  12:19:08  mike
14087 - * Make a generally useful function for putting small explosions on any object.
14088 - *
14089 - * Revision 1.274  1994/11/04  19:55:54  rob
14090 - * Changed calls to player_explode to accomodate new parameter.
14091 - *
14092 - * Revision 1.273  1994/11/02  21:54:27  matt
14093 - * Delete the camera when the death sequence is done
14094 - *
14095 - * Revision 1.272  1994/11/02  11:36:35  rob
14096 - * Added player-in-process-of-dying explosions to network play.
14097 - *
14098 - * Revision 1.271  1994/10/31  17:25:33  matt
14099 - * Fixed cloaked bug
14100 - *
14101 - * Revision 1.270  1994/10/31  16:11:19  allender
14102 - * on demo recording, store letterbox mode in demo.
14103 - *
14104 - * Revision 1.269  1994/10/31  10:36:18  mike
14105 - * Make cloak effect fadein/fadeout different for robots versus player.
14106 - *
14107 - * Revision 1.268  1994/10/30  14:11:44  mike
14108 - * rip out repair center stuff.
14109 - *
14110 - * Revision 1.267  1994/10/28  19:43:52  mike
14111 - * Boss cloaking effect.
14112 - *
14113 - * Revision 1.266  1994/10/27  11:33:42  mike
14114 - * Add Highest_ever_object_index -- high water mark in object creation.
14115 - *
14116 - * Revision 1.265  1994/10/25  10:51:12  matt
14117 - * Vulcan cannon powerups now contain ammo count
14118 - *
14119 - * Revision 1.264  1994/10/24  20:49:24  matt
14120 - * Made cloaked objects pulse
14121 - *
14122 - * Revision 1.263  1994/10/21  12:19:45  matt
14123 - * Clear transient objects when saving (& loading) games
14124 - *
14125 - * Revision 1.262  1994/10/21  11:25:23  mike
14126 - * Use new constant IMMORTAL_TIME.
14127 - *
14128 - * Revision 1.261  1994/10/19  16:50:35  matt
14129 - * If out of segment, put player in center of segment when checking objects
14130 - *
14131 - *
14132 - * Revision 1.260  1994/10/17  23:21:55  mike
14133 - * Clean up robot cloaking, move more to ai.c
14134 - *
14135 - * Revision 1.259  1994/10/17  21:34:49  matt
14136 - * Added support for new Control Center/Main Reactor
14137 - *
14138 - * Revision 1.258  1994/10/17  21:18:04  mike
14139 - * robot cloaking.
14140 - *
14141 - * Revision 1.257  1994/10/17  14:12:23  matt
14142 - * Cleaned up problems with player dying from mine explosion
14143 - *
14144 - * Revision 1.256  1994/10/15  19:04:31  mike
14145 - * Don't remove proximity bombs after you die.
14146 - *
14147 - * Revision 1.255  1994/10/14  15:57:00  mike
14148 - * Don't show ids in network mode.
14149 - * Fix, I hope, but in death sequence.
14150 - *
14151 - * Revision 1.254  1994/10/12  08:04:29  mike
14152 - * Don't decloak player on death.
14153 - *
14154 - * Revision 1.253  1994/10/11  20:36:16  matt
14155 - * Clear "transient" objects (weapons,explosions,etc.) when starting a level
14156 - *
14157 - * Revision 1.252  1994/10/11  12:24:09  matt
14158 - * Cleaned up/change badass explosion calls
14159 - *
14160 - * Revision 1.251  1994/10/08  19:30:20  matt
14161 - * Fixed (I hope) a bug in cloaking of multiplayer objects
14162 - *
14163 - * Revision 1.250  1994/10/08  14:03:15  rob
14164 - * Changed cloaking routine.
14165 - *
14166 - * Revision 1.249  1994/10/07  22:17:27  mike
14167 - * Asserts on valid segnum.
14168 - *
14169 - * Revision 1.248  1994/10/07  19:11:14  matt
14170 - * Added cool cloak transition effect
14171
14172 ------------------------------------------------------------------------
14173 main/object.h:
14174
14175 - * Revision 1.6  1995/09/20  14:24:45  allender
14176 - * swap bytes on extractshortpos
14177 - *
14178 - * Revision 1.5  1995/09/14  14:11:42  allender
14179 - * fix_object_segs returns void
14180 - *
14181 - * Revision 1.4  1995/08/12  12:02:44  allender
14182 - * added flag to create_shortpos
14183 - *
14184 - * Revision 1.3  1995/07/12  12:55:08  allender
14185 - * move structures back to original form as found on PC because
14186 - * of network play
14187 - *
14188 - * Revision 1.2  1995/06/19  07:55:06  allender
14189 - * rearranged structure members for possible better alignment
14190 - *
14191 - * Revision 1.1  1995/05/16  16:00:40  allender
14192 - * Initial revision
14193 - *
14194 - * Revision 2.1  1995/03/31  12:24:10  john
14195 - * I had changed alt_textures from a pointer to a byte. This hosed old
14196 - * saved games, so I restored it to an int.
14197 - *
14198 - * Revision 2.0  1995/02/27  11:26:47  john
14199 - * New version 2.0, which has no anonymous unions, builds with
14200 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
14201 - *
14202 - * Revision 1.122  1995/02/22  12:35:53  allender
14203 - * remove anonymous unions
14204 - *
14205 - * Revision 1.121  1995/02/06  20:43:25  rob
14206 - * Extern'ed Dead_player_camera so it can be reset by multi.c
14207 - *
14208 - * Revision 1.120  1995/02/01  16:34:07  john
14209 - * Linted.
14210 - *
14211 - * Revision 1.119  1995/01/29  13:46:42  mike
14212 - * adapt to new create_small_fireball_on_object prototype.
14213 - *
14214 - * Revision 1.118  1995/01/26  22:11:27  mike
14215 - * Purple chromo-blaster (ie, fusion cannon) spruce up (chromification)
14216 - *
14217 - * Revision 1.117  1995/01/24  12:09:29  mike
14218 - * Boost MAX_OBJECTS from 250 to 350.
14219 - *
14220 - * Revision 1.116  1995/01/13  19:39:51  rob
14221 - * Removed outdated remote_info structure.  (looking for cause of bugs
14222 - *
14223 - * Revision 1.115  1995/01/12  12:09:38  yuan
14224 - * Added coop object capability.
14225 - *
14226 - * Revision 1.114  1994/12/15  13:04:20  mike
14227 - * Replace Players[Player_num].time_total references with GameTime.
14228 - *
14229 - * Revision 1.113  1994/12/12  17:18:09  mike
14230 - * make boss cloak/teleport when get hit, make quad laser 3/4 as powerful.
14231 - *
14232 - * Revision 1.112  1994/12/09  14:58:42  matt
14233 - * Added system to attach a fireball to another object for rendering purposes,
14234 - * so the fireball always renders on top of (after) the object.
14235 - *
14236 - * Revision 1.111  1994/12/08  12:35:35  matt
14237 - * Added new object allocation & deallocation functions so other code
14238 - * could stop messing around with internal object data structures.
14239 - *
14240 - * Revision 1.110  1994/11/21  17:30:21  matt
14241 - * Increased max number of objects
14242 - *
14243 - * Revision 1.109  1994/11/18  23:41:52  john
14244 - * Changed some shorts to ints.
14245 - *
14246 - * Revision 1.108  1994/11/10  14:02:45  matt
14247 - * Hacked in support for player ships with different textures
14248 - *
14249 - * Revision 1.107  1994/11/08  12:19:27  mike
14250 - * Small explosions on objects.
14251 - *
14252 - * Revision 1.106  1994/10/25  10:51:17  matt
14253 - * Vulcan cannon powerups now contain ammo count
14254 - *
14255 - * Revision 1.105  1994/10/21  12:19:41  matt
14256 - * Clear transient objects when saving (& loading) games
14257 - *
14258 - * Revision 1.104  1994/10/21  11:25:04  mike
14259 - * Add IMMORTAL_TIME.
14260 - *
14261 - * Revision 1.103  1994/10/17  21:34:54  matt
14262 - * Added support for new Control Center/Main Reactor
14263 - *
14264 - * Revision 1.102  1994/10/14  18:12:28  mike
14265 - * Make egg dropping return object number.
14266 - *
14267 - * Revision 1.101  1994/10/12  21:07:19  matt
14268 - * Killed unused field in object structure
14269 - *
14270 - * Revision 1.100  1994/10/12  10:38:24  mike
14271 - * Add field OF_SILENT to obj->flags.
14272 - *
14273 - * Revision 1.99  1994/10/11  20:35:48  matt
14274 - * Clear "transient" objects (weapons,explosions,etc.) when starting a level
14275 - *
14276 - * Revision 1.98  1994/10/03  20:56:13  rob
14277 - * Added velocity to shortpos strucutre.
14278 - *
14279 - * Revision 1.97  1994/09/30  18:24:00  rob
14280 - * Added new control type CT_REMOTE for remote controlled objects.
14281 - * Also added a union struct 'remote_info' for this type.
14282 - *
14283 - * Revision 1.96  1994/09/28  09:23:05  mike
14284 - * Prototype Object_type_names.
14285 - *
14286 - * Revision 1.95  1994/09/25  23:32:37  matt
14287 - * Changed the object load & save code to read/write the structure fields one
14288 - * at a time (rather than the whole structure at once).  This mean that the
14289 - * object structure can be changed without breaking the load/save functions.
14290 - * As a result of this change, the local_object data can be and has been
14291 - * incorporated into the object array.  Also, timeleft is now a property
14292 - * of all objects, and the object structure has been otherwise cleaned up.
14293 - *
14294 - * Revision 1.94  1994/09/25  15:45:28  matt
14295 - * Added OBJ_LIGHT, a type of object that casts light
14296 - * Added generalized lifeleft, and moved it to local_object
14297 - *
14298 - * Revision 1.93  1994/09/24  17:41:19  mike
14299 - * Add stuff to Local_object structure for materialization centers.
14300 - *
14301 - * Revision 1.92  1994/09/24  13:16:50  matt
14302 - * Added (hacked in, really) support for overriding the bitmaps used on to
14303 - * texture map a polygon object, and using a new bitmap for all the faces.
14304 - *
14305 - * Revision 1.91  1994/09/22  19:02:14  mike
14306 - * Prototype functions extract_shortpos and create_shortpos which reside in
14307 - * gameseg.c, but are prototyped here to prevent circular dependencies.
14308 - *
14309 - * Revision 1.90  1994/09/15  21:47:14  mike
14310 - * Prototype dead_player_end().
14311 - *
14312 - * Revision 1.89  1994/09/15  16:34:47  mike
14313 - * Add danger_laser_num and danger_laser_signature to object_local to
14314 - * enable robots to efficiently (too efficiently!) avoid player fire.
14315 - *
14316 - * Revision 1.88  1994/09/11  22:46:19  mike
14317 - * Death_sequence_aborted prototyped.
14318 - *
14319 - * Revision 1.87  1994/09/09  20:04:30  mike
14320 - * Add vclips for weapons.
14321 - *
14322 - * Revision 1.86  1994/09/09  14:20:54  matt
14323 - * Added flag that says object uses thrust
14324 - *
14325 - * Revision 1.85  1994/09/08  14:51:32  mike
14326 - * Make a crucial name change to a field of local_object struct.
14327 - *
14328 - * Revision 1.84  1994/09/07  19:16:45  mike
14329 - * Homing missile.
14330 - *
14331 - * Revision 1.83  1994/09/06  17:05:43  matt
14332 - * Added new type for dead player
14333 - *
14334 - * Revision 1.82  1994/09/02  11:56:09  mike
14335 - * Add persistency (PF_PERSISTENT) to physics_info.
14336 - *
14337 - * Revision 1.81  1994/08/28  19:10:28  mike
14338 - * Add Player_is_dead.
14339 - *
14340 - * Revision 1.80  1994/08/18  15:11:44  mike
14341 - * powerup stuff.
14342 - *
14343 - * Revision 1.79  1994/08/15  15:24:54  john
14344 - * Made players know who killed them; Disabled cheat menu
14345 - * during net player; fixed bug with not being able to turn
14346 - * of invulnerability; Made going into edit/starting new leve
14347 - * l drop you out of a net game; made death dialog box.
14348 - *
14349 - * Revision 1.78  1994/08/14  23:15:12  matt
14350 - * Added animating bitmap hostages, and cleaned up vclips a bit
14351 - *
14352 - * Revision 1.77  1994/08/13  14:58:27  matt
14353 - * Finished adding support for miscellaneous objects
14354 - *
14355 - * Revision 1.76  1994/08/09  16:04:13  john
14356 - * Added network players to editor.
14357 - *
14358 - * Revision 1.75  1994/08/03  21:06:19  matt
14359 - * Added prototype for fix_object_segs(), and renamed now-unused spawn_pos
14360 - *
14361 - * Revision 1.74  1994/08/02  12:30:27  matt
14362 - * Added support for spinning objects
14363 - *
14364 - * Revision 1.73  1994/07/27  20:53:25  matt
14365 - * Added rotational drag & thrust, so turning now has momemtum like moving
14366 - *
14367 - * Revision 1.72  1994/07/27  19:44:21  mike
14368 - * Objects containing objects.
14369 - *
14370 - * Revision 1.71  1994/07/22  20:43:29  matt
14371 - * Fixed flares, by adding a physics flag that makes them stick to walls.
14372 - *
14373 - * Revision 1.70  1994/07/21  12:42:10  mike
14374 - * Prototype new find_object_seg and update_object_seg.
14375 - *
14376 - * Revision 1.69  1994/07/19  15:26:39  mike
14377 - * New ai_static structure.
14378 - *
14379 - * Revision 1.68  1994/07/13  00:15:06  matt
14380 - * Moved all (or nearly all) of the values that affect player movement to
14381 - * bitmaps.tbl
14382 - *
14383 - * Revision 1.67  1994/07/12  12:40:12  matt
14384 - * Revamped physics system
14385 - *
14386 - * Revision 1.66  1994/07/06  15:26:23  yuan
14387 - * Added chase mode.
14388
14389 ------------------------------------------------------------------------
14390 main/paging.c:
14391
14392 - * Revision 1.5  1995/10/30  11:06:58  allender
14393 - * added change to paging code ala John -- check tmap_override
14394 - * when paging in robots
14395 - *
14396 - * Revision 1.4  1995/09/13  08:48:28  allender
14397 - * John's new paging code
14398 - *
14399 - * Revision 1.3  1995/08/18  10:20:31  allender
14400 - * changed hard coded black pixel value to use BM_XRGB
14401 - *
14402 - * Revision 1.2  1995/07/26  17:02:10  allender
14403 - * small fix to page in effect bitmaps correctly
14404 - *
14405 - * Revision 1.1  1995/05/16  15:29:35  allender
14406 - * Initial revision
14407 - *
14408 - * Revision 2.5  1995/10/07  13:18:21  john
14409 - * Added PSX debugging stuff that builds .PAG files.
14410 - *
14411 - * Revision 2.4  1995/08/24  13:40:03  john
14412 - * Added code to page in vclip for powerup disapperance and to
14413 - * fix bug that made robot makers not page in the correct bot
14414 - * textures.
14415 - *
14416 - * Revision 2.3  1995/07/26  12:09:19  john
14417 - * Made code that pages in weapon_info->robot_hit_vclip not
14418 - * page in unless it is a badass weapon.  Took out old functionallity
14419 - * of using this if no robot exp1_vclip, since all robots have these.
14420 - *
14421 - * Revision 2.2  1995/07/24  13:22:11  john
14422 - * Made sure everything gets paged in at the
14423 - * level start.  Fixed bug with robot effects not
14424 - * getting paged in correctly.
14425 - *
14426 - * Revision 2.1  1995/05/12  15:50:16  allender
14427 - * fix to check effects dest_bm_num > -1 before paging in
14428 - *
14429 - * Revision 2.0  1995/02/27  11:27:39  john
14430 - * New version 2.0, which has no anonymous unions, builds with
14431 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
14432 - *
14433 - * Revision 1.18  1995/02/22  14:12:28  allender
14434 - * remove anonyous union from object structure
14435 - *
14436 - * Revision 1.17  1995/02/11  22:54:15  john
14437 - * Made loading for pig not show up for demos.
14438 - *
14439 - * Revision 1.16  1995/02/11  22:37:04  john
14440 - * Made cockpit redraw.
14441 - *
14442 - * Revision 1.15  1995/01/28  16:29:35  john
14443 - * *** empty log message ***
14444 - *
14445 - * Revision 1.14  1995/01/27  17:16:18  john
14446 - * Added code to page in all the weapons.
14447 - *
14448 - * Revision 1.13  1995/01/24  21:51:22  matt
14449 - * Clear the boxed message to fix a mem leakage
14450 - *
14451 - * Revision 1.12  1995/01/23  13:00:46  john
14452 - * Added hostage vclip paging.
14453 - *
14454 - * Revision 1.11  1995/01/23  12:29:52  john
14455 - * Added code to page in eclip on robots, dead control center,
14456 - * gauges bitmaps, and weapon pictures.
14457 - *
14458 - * Revision 1.10  1995/01/21  12:54:15  adam
14459 - * *** empty log message ***
14460 - *
14461 - * Revision 1.9  1995/01/21  12:41:29  adam
14462 - * changed orb to loading box
14463 - *
14464 - * Revision 1.8  1995/01/18  15:09:02  john
14465 - * Added start/stop time around paging.
14466 - * Made paging clear screen around globe.
14467 - *
14468 - * Revision 1.7  1995/01/18  10:37:00  john
14469 - * Added code to page in exploding monitors.
14470 - *
14471 - * Revision 1.6  1995/01/17  19:03:35  john
14472 - * Added cool spinning orb during loading.
14473 - *
14474 - * Revision 1.5  1995/01/17  14:49:26  john
14475 - * Paged in weapons.
14476 - *
14477 - * Revision 1.4  1995/01/17  12:14:07  john
14478 - * Made walls, object explosion vclips load at level start.
14479 - *
14480 - * Revision 1.3  1995/01/15  13:23:24  john
14481 - * First working version
14482 - *
14483 - * Revision 1.2  1995/01/15  11:56:45  john
14484 - * Working version of paging.
14485 - *
14486 - * Revision 1.1  1995/01/15  11:33:37  john
14487 - * Initial revision
14488
14489 ------------------------------------------------------------------------
14490 main/paging.h:
14491
14492 - * Revision 1.1  1995/05/16  16:00:48  allender
14493 - * Initial revision
14494 - *
14495 - * Revision 2.0  1995/02/27  11:30:12  john
14496 - * New version 2.0, which has no anonymous unions, builds with
14497 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
14498 - *
14499 - * Revision 1.2  1995/01/15  11:56:39  john
14500 - * Working version of paging.
14501 - *
14502 - * Revision 1.1  1995/01/15  11:33:52  john
14503 - * Initial revision
14504
14505 ------------------------------------------------------------------------
14506 main/physics.c:
14507
14508 - * Revision 1.5  1995/10/12  17:28:08  allender
14509 - * put in code to move and object to center of segment in
14510 - * do_physics sim when fvi fails with bad point
14511 - *
14512 - * Revision 1.4  1995/08/23  21:32:44  allender
14513 - * fix mcc compiler warnings
14514 - *
14515 - * Revision 1.3  1995/07/28  15:38:56  allender
14516 - * removed isqrt thing -- not required here
14517 - *
14518 - * Revision 1.2  1995/07/28  15:13:29  allender
14519 - * fixed vector magnitude thing
14520 - *
14521 - * Revision 1.1  1995/05/16  15:29:42  allender
14522 - * Initial revision
14523 - *
14524 - * Revision 2.2  1995/03/24  14:48:54  john
14525 - * Added cheat for player to go thru walls.
14526 - *
14527 - * Revision 2.1  1995/03/20  18:15:59  john
14528 - * Added code to not store the normals in the segment structure.
14529 - *
14530 - * Revision 2.0  1995/02/27  11:32:06  john
14531 - * New version 2.0, which has no anonymous unions, builds with
14532 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
14533 - *
14534 - * Revision 1.213  1995/02/22  13:40:48  allender
14535 - * remove anonymous unions from object structure
14536 - *
14537 - * Revision 1.212  1995/02/22  13:24:42  john
14538 - * Removed the vecmat anonymous unions.
14539 - *
14540 - * Revision 1.211  1995/02/06  19:46:59  matt
14541 - * New function (untested), set_thrust_from_velocity()
14542 - *
14543 - * Revision 1.210  1995/02/02  16:26:12  matt
14544 - * Changed assert that was causing a problem
14545 - *
14546 - * Revision 1.209  1995/02/02  14:07:00  matt
14547 - * Fixed confusion about which segment you are touching when you're
14548 - * touching a wall.  This manifested itself in spurious lava burns.
14549 - *
14550 - * Revision 1.208  1995/02/01  21:03:24  john
14551 - * Lintified.
14552 - *
14553 - * Revision 1.207  1995/01/25  13:53:35  rob
14554 - * Removed an Int3 from multiplayer games.
14555 - *
14556 - * Revision 1.206  1995/01/23  17:30:47  rob
14557 - * Removed Int3 on bogus sim time.
14558 - *
14559 - * Revision 1.205  1995/01/17  11:08:56  matt
14560 - * Disable new-ish FVI edge checking for all objects except the player,
14561 - * since it was causing problems with the fusion cannon.
14562 - *
14563 - * Revision 1.204  1995/01/05  09:43:49  matt
14564 - * Took out int3s from new code
14565 - *
14566 - * Revision 1.203  1995/01/04  22:19:23  matt
14567 - * Added hack to keep player from squeezing through closed walls/doors
14568 - *
14569 - * Revision 1.202  1995/01/02  12:38:48  mike
14570 - * physics hack to crazy josh not get hung up on proximity bombs.  Matt notified via email.
14571 - *
14572 - * Revision 1.201  1994/12/13  15:39:22  mike
14573 - * #ifndef NDEBUG some code.
14574 - *
14575 - * Revision 1.200  1994/12/13  13:28:34  yuan
14576 - * Fixed type.
14577 - *
14578 - * Revision 1.199  1994/12/13  13:25:00  matt
14579 - * Made bump hack compile out if so desired
14580 - *
14581 - * Revision 1.198  1994/12/13  12:02:39  matt
14582 - * Added hack to bump player a little if stuck
14583 - *
14584 - * Revision 1.197  1994/12/12  00:32:23  matt
14585 - * When objects other than player go out of mine, jerk to center of segment
14586 - *
14587 - * Revision 1.196  1994/12/10  22:52:42  mike
14588 - * make physics left-the-mine checking always be in.
14589 - *
14590 - * Revision 1.195  1994/12/08  00:53:01  mike
14591 - * oops...phys rot bug.
14592 - *
14593 - * Revision 1.194  1994/12/07  12:54:54  mike
14594 - * tweak rotvel applied from collisions.
14595 - *
14596 - * Revision 1.193  1994/12/07  00:36:08  mike
14597 - * fix phys_apply_rot for robots -- ai was bashing effect in next frame.
14598 - *
14599 - * Revision 1.192  1994/12/05  17:23:10  matt
14600 - * Made a bunch of debug code compile out
14601 - *
14602 - * Revision 1.191  1994/12/05  16:30:10  matt
14603 - * Was illegally changing an object's segment...shoot me.
14604 - *
14605 - * Revision 1.190  1994/12/05  11:58:51  mike
14606 - * fix stupid apply_force_rot() bug.
14607 - *
14608 - * Revision 1.189  1994/12/05  09:42:17  mike
14609 - * fix 0 mag problem when object applies force to itself.
14610 - *
14611 - * Revision 1.188  1994/12/04  22:48:40  matt
14612 - * Physics & FVI now only build seglist for player objects, and they
14613 - * responsilby deal with buffer full conditions
14614 - *
14615 - * Revision 1.187  1994/12/04  22:14:07  mike
14616 - * apply instantaneous rotation to an object due to a force blow.
14617 - *
14618 - * Revision 1.186  1994/12/04  18:51:30  matt
14619 - * When weapons get stuck, delete them!
14620 - *
14621 - * Revision 1.185  1994/12/04  18:38:56  matt
14622 - * Added better handling of point-not-in-seg problem
14623 - *
14624 - * Revision 1.184  1994/11/27  23:13:42  matt
14625 - * Made changes for new mprintf calling convention
14626 - *
14627 - * Revision 1.183  1994/11/25  23:46:18  matt
14628 - * Fixed drag problems with framerates over 60Hz
14629 - *
14630 - * Revision 1.182  1994/11/25  22:15:52  matt
14631 - * Added asserts to try to trap frametime < 0 bug
14632 - *
14633 - * Revision 1.181  1994/11/21  11:42:44  mike
14634 - * ndebug stuff.
14635 - *
14636 - * Revision 1.180  1994/11/19  15:15:04  mike
14637 - * remove unused code and data
14638 - *
14639 - * Revision 1.179  1994/11/16  11:25:22  matt
14640 - * Abort physics if negative frametime
14641 - *
14642 - * Revision 1.178  1994/10/05  19:50:41  rob
14643 - * Removed a non-critical Int3 where an object's segnum is checked.
14644 - * Left mprintf message.
14645 - *
14646 - * Revision 1.177  1994/10/03  22:57:50  matt
14647 - * Fixed problem with matrix corruption of non-moving (but rotating) objects
14648 - *
14649 - * Revision 1.176  1994/09/28  09:23:28  mike
14650 - * Add useful information to mprintf(1,... error messages.
14651 - *
14652 - * Revision 1.175  1994/09/21  17:16:54  mike
14653 - * Make objects stuck in doors go away when door opens.
14654 - *
14655 - * Revision 1.174  1994/09/12  14:19:06  matt
14656 - * Drag & thrust now handled differently
14657 - *
14658 - * Revision 1.173  1994/09/09  14:21:12  matt
14659 - * Use new thrust flag
14660 - *
14661 - * Revision 1.172  1994/09/08  16:21:57  matt
14662 - * Cleaned up player-hit-wall code, and added object scrape handling
14663 - * Also added weapon-on-weapon hit sound
14664 - *
14665 - * Revision 1.171  1994/09/02  12:30:37  matt
14666 - * Fixed weapons which go through objects
14667 - *
14668 - * Revision 1.170  1994/09/02  11:55:14  mike
14669 - * Kill redefinition of a constant which is properly defined in object.h
14670 - *
14671 - * Revision 1.169  1994/09/02  11:35:01  matt
14672 - * Fixed typo
14673 - *
14674 - * Revision 1.168  1994/09/02  11:32:48  matt
14675 - * Fixed object/object collisions, so you can't fly through robots anymore.
14676 - * Cleaned up object damage system.
14677 - *
14678 - * Revision 1.167  1994/08/30  21:58:15  matt
14679 - * Made phys_apply_force() do nothing to an object if it's not a phys object
14680 - *
14681 - * Revision 1.166  1994/08/26  10:47:01  john
14682 - * New version of controls.
14683 - *
14684 - * Revision 1.165  1994/08/25  21:53:57  mike
14685 - * Prevent counts of -1 which eventually add up to a positive number in do_ai_frame, causing
14686 - * the too-many-retries behavior.
14687 - *
14688 - * Revision 1.164  1994/08/25  18:43:33  john
14689 - * First revision of new control code.
14690 - *
14691 - * Revision 1.163  1994/08/17  22:18:05  mike
14692 - * Make robots which have rotvel or rotthrust, but not movement, move.
14693 - *
14694 - * Revision 1.162  1994/08/13  17:31:18  mike
14695 - * retry count stuff.
14696 - *
14697 - * Revision 1.161  1994/08/11  18:59:16  mike
14698 - * *** empty log message ***
14699 - *
14700 - * Revision 1.160  1994/08/10  19:53:47  mike
14701 - * Debug code (which is still in...)
14702 - * and adapt to changed interface to create_path_to_player.
14703 - *
14704 - * Revision 1.159  1994/08/08  21:38:43  matt
14705 - * Cleaned up a code a little and optimized a little
14706 - *
14707 - * Revision 1.158  1994/08/08  15:21:50  mike
14708 - * Trap retry count >= 4, but don't do AI hack unless >= 6.
14709 - *
14710 - * Revision 1.157  1994/08/08  11:47:15  matt
14711 - * Cleaned up fvi and physics a little
14712 - *
14713 - * Revision 1.156  1994/08/05  10:10:10  yuan
14714 - * Commented out debug stuff that was killing framerate.
14715 - *
14716 - * Revision 1.155  1994/08/04  19:12:36  matt
14717 - * Changed a bunch of vecmat calls to use multiple-function routines, and to
14718 - * allow the use of C macros for some functions
14719 - *
14720 - * Revision 1.154  1994/08/04  16:33:57  mike
14721 - * Kill a pile of RCS stuff.
14722 - * Call create_path_to_player for a stuck object.
14723 - *
14724 - * Revision 1.153  1994/08/04  00:21:02  matt
14725 - * Cleaned up fvi & physics error handling; put in code to make sure objects
14726 - * are in correct segment; simplified segment finding for objects and points
14727 - *
14728 - * Revision 1.152  1994/08/01  16:25:34  matt
14729 - * Check for moved_time == 0 when computing hit speed
14730 - *
14731 - * Revision 1.151  1994/08/01  13:30:32  matt
14732 - * Made fvi() check holes in transparent walls, and changed fvi() calling
14733 - * parms to take all input data in query structure.
14734 - *
14735 - * Revision 1.150  1994/07/29  23:41:46  matt
14736 - * Fixed turn banking, which changed when I added rotational velocity
14737 - *
14738 - * Revision 1.149  1994/07/27  20:53:23  matt
14739 - * Added rotational drag & thrust, so turning now has momemtum like moving
14740
14741 ------------------------------------------------------------------------
14742 main/physics.h:
14743
14744 - * Revision 1.2  1995/08/23  21:33:04  allender
14745 - * fix mcc compiler warnings
14746 - *
14747 - * Revision 1.1  1995/05/16  16:00:56  allender
14748 - * Initial revision
14749 - *
14750 - * Revision 2.0  1995/02/27  11:33:06  john
14751 - * New version 2.0, which has no anonymous unions, builds with
14752 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
14753 - *
14754 - * Revision 1.29  1995/02/06  19:47:18  matt
14755 - * New function (untested), set_thrust_from_velocity()
14756 - *
14757 - * Revision 1.28  1994/12/04  22:14:20  mike
14758 - * apply instantaneous rotation to an object due to a force blow.
14759 - *
14760 - * Revision 1.27  1994/08/01  13:29:42  matt
14761 - * Made fvi() check holes in transparent walls, and changed fvi() calling
14762 - * parms to take all input data in query structure.
14763 - *
14764 - * Revision 1.26  1994/07/28  12:35:22  matt
14765 - * Added prototype
14766 - *
14767 - * Revision 1.25  1994/07/13  21:48:05  matt
14768 - * FVI() and physics now keep lists of segments passed through which the
14769 - * trigger code uses.
14770 - *
14771 - * Revision 1.24  1994/06/30  19:01:55  matt
14772 - * Moved flying controls code from physics.c to controls.c
14773 - *
14774 - * Revision 1.23  1994/06/16  14:14:20  mike
14775 - * Change physics_lookahead to return hit_info.
14776 - *
14777 - * Revision 1.22  1994/06/09  09:58:43  matt
14778 - * Moved find_vector_intersection() from physics.c to new file fvi.c
14779 - *
14780 - * Revision 1.21  1994/05/20  16:11:07  matt
14781 - * Added new parm, ignore_obj, to find_vector_intersection()
14782 - *
14783 - * Revision 1.20  1994/05/20  15:16:58  matt
14784 - * Added new fvi return type; took out some troublesome (and troubling) asserts
14785
14786 ------------------------------------------------------------------------
14787 main/piggy.c:
14788
14789 - * Revision 1.16  1995/11/09  17:27:47  allender
14790 - * put in missing quote on new gauge name
14791 - *
14792 - * Revision 1.15  1995/11/08  17:28:03  allender
14793 - * add PC gauges to gauge list of non-substitutatble bitmaps
14794 - *
14795 - * Revision 1.14  1995/11/08  15:14:49  allender
14796 - * fixed horrible bug where the piggy cache size was incorrect
14797 - * for mac shareware
14798 - *
14799 - * Revision 1.13  1995/11/03  12:53:37  allender
14800 - * shareware changes
14801 - *
14802 - * Revision 1.12  1995/10/21  22:25:14  allender
14803 - * added bald guy cheat
14804 - *
14805 - * Revision 1.11  1995/10/20  22:42:15  allender
14806 - * changed load path of descent.pig to :data:descent.pig
14807 - *
14808 - * Revision 1.10  1995/10/20  00:08:01  allender
14809 - * put in event loop calls when loading data (hides it nicely
14810 - * from user) so TM can get it's strokes stuff
14811 - *
14812 - * Revision 1.9  1995/09/13  08:48:01  allender
14813 - * added lower memory requirement to load alternate bitmaps
14814 - *
14815 - * Revision 1.8  1995/08/16  09:39:13  allender
14816 - * moved "loading" text up a little
14817 - *
14818 - * Revision 1.7  1995/08/08  13:54:26  allender
14819 - * added macsys header file
14820 - *
14821 - * Revision 1.6  1995/07/12  12:49:56  allender
14822 - * total hack for bitmaps > 512 bytes wide -- check these by name
14823 - *
14824 - * Revision 1.5  1995/07/05  16:47:05  allender
14825 - * kitchen stuff
14826 - *
14827 - * Revision 1.4  1995/06/23  08:55:28  allender
14828 - * make "loading data" text y loc based off of curcanv
14829 - *
14830 - * Revision 1.3  1995/06/08  14:08:52  allender
14831 - * PPC aligned data sets
14832 - *
14833 - * Revision 1.2  1995/05/26  06:54:27  allender
14834 - * removed refences to sound data at end of pig file (since they will
14835 - * now be Macintosh snd resources for effects
14836 - *
14837 - * Revision 1.1  1995/05/16  15:29:51  allender
14838 - * Initial revision
14839 - *
14840 - * Revision 2.10  1995/10/07  13:17:26  john
14841 - * Made all bitmaps paged out by default.
14842 - *
14843 - * Revision 2.9  1995/04/14  14:05:24  john
14844 - * *** empty log message ***
14845 - *
14846 - * Revision 2.8  1995/04/12  13:39:37  john
14847 - * Fixed bug with -lowmem not working.
14848 - *
14849 - * Revision 2.7  1995/03/29  23:23:17  john
14850 - * Fixed major bug with sounds not building into pig right.
14851 - *
14852 - * Revision 2.6  1995/03/28  18:05:00  john
14853 - * Fixed it so you don't have to delete pig after changing bitmaps.tbl
14854 - *
14855 - * Revision 2.5  1995/03/16  23:13:06  john
14856 - * Fixed bug with piggy paging in bitmap not checking for disk
14857 - * error, hence bogifying textures if you pull the CD out.
14858 - *
14859 - * Revision 2.4  1995/03/14  16:22:27  john
14860 - * Added cdrom alternate directory stuff.
14861 - *
14862 - * Revision 2.3  1995/03/06  15:23:20  john
14863 - * New screen techniques.
14864 - *
14865 - * Revision 2.2  1995/02/27  13:13:40  john
14866 - * Removed floating point.
14867 - *
14868 - * Revision 2.1  1995/02/27  12:31:25  john
14869 - * Made work without editor.
14870 - *
14871 - * Revision 2.0  1995/02/27  11:28:02  john
14872 - * New version 2.0, which has no anonymous unions, builds with
14873 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
14874 - *
14875 - * Revision 1.85  1995/02/09  12:54:24  john
14876 - * Made paged out bitmaps have bm_data be a valid pointer
14877 - * instead of NULL, in case anyone accesses it.
14878 - *
14879 - * Revision 1.84  1995/02/09  12:50:59  john
14880 - * Bullet-proofed the piggy loading code.
14881 - *
14882 - * Revision 1.83  1995/02/07  17:08:51  john
14883 - * Added some error handling stuff instead of asserts.
14884 - *
14885 - * Revision 1.82  1995/02/03  17:06:48  john
14886 - * Changed sound stuff to allow low memory usage.
14887 - * Also, changed so that Sounds isn't an array of digi_sounds, it
14888 - * is a ubyte pointing into GameSounds, this way the digi.c code that
14889 - * locks sounds won't accidentally unlock a sound that is already playing, but
14890 - * since it's Sounds[soundno] is different, it would erroneously be unlocked.
14891 - *
14892 - * Revision 1.81  1995/02/02  21:56:39  matt
14893 - * Added data for new gauge bitmaps
14894 - *
14895 - * Revision 1.80  1995/02/01  23:31:57  john
14896 - * Took out loading bar.
14897 - *
14898 - * Revision 1.79  1995/01/28  15:13:18  allender
14899 - * bumped up Piggy_bitmap_cache_size
14900 - *
14901 - * Revision 1.78  1995/01/26  12:30:43  john
14902 - * Took out prev.
14903 - *
14904 - * Revision 1.77  1995/01/26  12:12:17  john
14905 - * Made buffer be big for bitmaps.
14906 - *
14907 - * Revision 1.76  1995/01/25  20:15:38  john
14908 - * Made editor allocate all mem.
14909 - *
14910 - * Revision 1.75  1995/01/25  14:52:56  john
14911 - * Made bitmap buffer be 1.5 MB.
14912 - *
14913 - * Revision 1.74  1995/01/22  16:03:19  mike
14914 - * localization.
14915 - *
14916 - * Revision 1.73  1995/01/22  15:58:36  mike
14917 - * localization
14918 - *
14919 - * Revision 1.72  1995/01/18  20:51:20  john
14920 - * Took out warnings.
14921 - *
14922 - * Revision 1.71  1995/01/18  20:47:21  john
14923 - * Added code to allocate sounds & bitmaps into diff
14924 - * buffers, also made sounds not be compressed for registered.
14925 - *
14926 - * Revision 1.70  1995/01/18  15:08:41  john
14927 - * Added start/stop time around paging.
14928 - * Made paging clear screen around globe.
14929 - *
14930 - * Revision 1.69  1995/01/18  10:07:51  john
14931 - *
14932 - * Took out debugging mprintfs.
14933 - *
14934 - * Revision 1.68  1995/01/17  14:27:42  john
14935 - * y
14936 - *
14937 - * Revision 1.67  1995/01/17  12:14:39  john
14938 - * Made walls, object explosion vclips load at level start.
14939 - *
14940 - * Revision 1.66  1995/01/15  13:15:44  john
14941 - * Made so that paging always happens, lowmem just loads less.
14942 - * Also, make KB load print to hud.
14943 - *
14944 - * Revision 1.65  1995/01/15  11:56:28  john
14945 - * Working version of paging.
14946 - *
14947 - * Revision 1.64  1995/01/14  19:17:07  john
14948 - * First version of new bitmap paging code.
14949 - *
14950 - * Revision 1.63  1994/12/15  12:26:44  john
14951 - * Added -nolowmem function.
14952 - *
14953 - * Revision 1.62  1994/12/14  21:12:26  john
14954 - * Fixed bug with page fault when exiting and using
14955 - * -nosound.
14956 - *
14957 - * Revision 1.61  1994/12/14  11:35:31  john
14958 - * Evened out thermometer for pig read.
14959 - *
14960 - * Revision 1.60  1994/12/14  10:51:00  john
14961 - * Sped up sound loading.
14962 - *
14963 - * Revision 1.59  1994/12/14  10:12:08  john
14964 - * Sped up pig loading.
14965 - *
14966 - * Revision 1.58  1994/12/13  09:14:47  john
14967 - * *** empty log message ***
14968 - *
14969 - * Revision 1.57  1994/12/13  09:12:57  john
14970 - * Made the bar always fill up.
14971 - *
14972 - * Revision 1.56  1994/12/13  03:49:08  john
14973 - * Made -lowmem not load the unnecessary bitmaps.
14974 - *
14975 - * Revision 1.55  1994/12/06  16:06:35  john
14976 - * Took out piggy sorting.
14977 - *
14978 - * Revision 1.54  1994/12/06  15:11:14  john
14979 - * Fixed bug with reading pigs.
14980 - *
14981 - * Revision 1.53  1994/12/06  14:14:47  john
14982 - * Added code to set low mem based on memory.
14983 - *
14984 - * Revision 1.52  1994/12/06  14:01:10  john
14985 - * Fixed bug that was causing -lowmem all the time..
14986 - *
14987 - * Revision 1.51  1994/12/06  13:33:48  john
14988 - * Added lowmem option.
14989 - *
14990 - * Revision 1.50  1994/12/05  19:40:10  john
14991 - * If -nosound or no sound card selected, don't load sounds from pig.
14992 - *
14993 - * Revision 1.49  1994/12/05  12:17:44  john
14994 - * Added code that locks/unlocks digital sounds on demand.
14995 - *
14996 - * Revision 1.48  1994/12/05  11:39:03  matt
14997 - * Fixed little mistake
14998 - *
14999 - * Revision 1.47  1994/12/05  09:29:22  john
15000 - * Added clength to the sound field.
15001 - *
15002 - * Revision 1.46  1994/12/04  15:27:15  john
15003 - * Fixed my stupid bug that looked at -nosound instead of digi_driver_card
15004 - * to see whether or not to lock down sound memory.
15005 - *
15006 - * Revision 1.45  1994/12/03  14:17:00  john
15007 - * Took out my debug mprintf.
15008 - *
15009 - * Revision 1.44  1994/12/03  13:32:37  john
15010 - * Fixed bug with offscreen bitmap.
15011 - *
15012 - * Revision 1.43  1994/12/03  13:07:13  john
15013 - * Made the pig read/write compressed sounds.
15014 - *
15015 - * Revision 1.42  1994/12/03  11:48:51  matt
15016 - * Added option to not dump sounds to pigfile
15017 - *
15018 - * Revision 1.41  1994/12/02  20:02:20  matt
15019 - * Made sound files constant match constant for table
15020 - *
15021 - * Revision 1.40  1994/11/29  11:03:09  adam
15022 - * upped # of sounds
15023 - *
15024 - * Revision 1.39  1994/11/27  23:13:51  matt
15025 - * Made changes for new mprintf calling convention
15026 - *
15027 - * Revision 1.38  1994/11/20  18:40:34  john
15028 - * MAde the piggy.lst and piggy.all not dump for release.
15029 - *
15030 - * Revision 1.37  1994/11/19  23:54:45  mike
15031 - * up number of bitmaps for shareware version.
15032 - *
15033 - * Revision 1.36  1994/11/19  19:53:05  mike
15034 - * change MAX_BITMAP_FILES
15035 - *
15036 - * Revision 1.35  1994/11/19  10:42:56  matt
15037 - * Increased number of bitmaps for non-shareware version
15038 - *
15039 - * Revision 1.34  1994/11/19  09:11:52  john
15040 - * Added avg_color to bitmaps saved in pig.
15041 - *
15042 - * Revision 1.33  1994/11/19  00:07:05  john
15043 - * Fixed bug with 8 char sound filenames not getting read from pig.
15044 - *
15045 - * Revision 1.32  1994/11/18  22:24:54  john
15046 - * Added -bigpig command line that doesn't rle your pig.
15047 - *
15048 - * Revision 1.31  1994/11/18  21:56:53  john
15049 - * Added a better, leaner pig format.
15050 - *
15051 - * Revision 1.30  1994/11/16  12:06:16  john
15052 - * Fixed bug with calling .bbms abms.
15053 - *
15054 - * Revision 1.29  1994/11/16  12:00:56  john
15055 - * Added piggy.all dump.
15056 - *
15057 - * Revision 1.28  1994/11/10  21:16:02  adam
15058 - * nothing important
15059 - *
15060 - * Revision 1.27  1994/11/10  13:42:00  john
15061 - * Made sounds not lock down if using -nosound.
15062 - *
15063 - * Revision 1.26  1994/11/09  19:55:40  john
15064 - * Added full rle support with texture rle caching.
15065 - *
15066 - * Revision 1.25  1994/11/09  16:36:42  john
15067 - * First version with RLE bitmaps in Pig.
15068 - *
15069 - * Revision 1.24  1994/10/27  19:42:59  john
15070 - * Disable the piglet option.
15071 - *
15072 - * Revision 1.23  1994/10/27  18:51:40  john
15073 - * Added -piglet option that only loads needed textures for a
15074 - * mine.  Only saved ~1MB, and code still doesn't free textures
15075 - * before you load a new mine.
15076 - *
15077 - * Revision 1.22  1994/10/25  13:11:42  john
15078 - * Made the sounds sort. Dumped piggy.lst.
15079 - *
15080 - * Revision 1.21  1994/10/06  17:06:23  john
15081 - * Took out rle stuff.
15082 - *
15083 - * Revision 1.20  1994/10/06  15:45:36  adam
15084 - * bumped MAX_BITMAP_FILES again!
15085 - *
15086 - * Revision 1.19  1994/10/06  11:01:17  yuan
15087 - * Upped MAX_BITMAP_FILES
15088 - *
15089 - * Revision 1.18  1994/10/06  10:44:45  john
15090 - * Added diagnostic message and psuedo run-length-encoder
15091 - * to see how much memory we would save by storing bitmaps
15092 - * in a RLE method.  Also, I commented out the code that
15093 - * stores 4K bitmaps on a 4K boundry to reduce pig size
15094 - * a bit.
15095 - *
15096 - * Revision 1.17  1994/10/04  20:03:13  matt
15097 - * Upped maximum number of bitmaps
15098 - *
15099 - * Revision 1.16  1994/10/03  18:04:20  john
15100 - * Fixed bug with data_offset not set right for bitmaps
15101 - * that are 64x64 and not aligned on a 4k boundry.
15102 - *
15103 - * Revision 1.15  1994/09/28  11:30:55  john
15104 - * changed inferno.pig to descent.pig, changed the way it
15105 - * is read.
15106 - *
15107 - * Revision 1.14  1994/09/22  16:14:17  john
15108 - * Redid intro sequecing.
15109 - *
15110 - * Revision 1.13  1994/09/19  14:42:47  john
15111 - * Locked down sounds with Virtual memory.
15112 - *
15113 - * Revision 1.12  1994/09/10  17:31:52  mike
15114 - * Increase number of loadable bitmaps.
15115 - *
15116 - * Revision 1.11  1994/09/01  19:32:49  mike
15117 - * Boost texture map allocation.
15118 - *
15119 - * Revision 1.10  1994/08/16  11:51:02  john
15120 - * Added grwased pigs.
15121 - *
15122 - * Revision 1.9  1994/07/06  09:18:03  adam
15123 - * upped bitmap #s
15124 - *
15125 - * Revision 1.8  1994/06/20  22:02:15  matt
15126 - * Fixed bug from last change
15127 - *
15128 - * Revision 1.7  1994/06/20  21:33:18  matt
15129 - * Made bm.h not include sounds.h, to reduce dependencies
15130 - *
15131 - * Revision 1.6  1994/06/20  16:52:19  john
15132 - * cleaned up init output a bit.
15133 - *
15134 - * Revision 1.5  1994/06/08  14:20:57  john
15135 - * Made piggy dump before going into game.
15136 - *
15137 - * Revision 1.4  1994/06/02  18:59:22  matt
15138 - * Clear selector field of bitmap loaded from pig file
15139 - *
15140 - * Revision 1.3  1994/05/06  15:31:41  john
15141 - * Made name field a bit longer.
15142 - *
15143 - * Revision 1.2  1994/05/06  13:02:44  john
15144 - * Added piggy stuff; worked on supertransparency
15145 - *
15146 - * Revision 1.1  1994/05/06  11:47:26  john
15147 - * Initial revision
15148
15149 ------------------------------------------------------------------------
15150 main/piggy.h:
15151
15152 - * Revision 1.1  1995/05/16  16:01:04  allender
15153 - * Initial revision
15154 - *
15155 - * Revision 2.0  1995/02/27  11:31:21  john
15156 - * New version 2.0, which has no anonymous unions, builds with
15157 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15158 - *
15159 - * Revision 1.10  1995/02/03  17:08:29  john
15160 - * Changed sound stuff to allow low memory usage.
15161 - * Also, changed so that Sounds isn't an array of digi_sounds, it
15162 - * is a ubyte pointing into GameSounds, this way the digi.c code that
15163 - * locks sounds won't accidentally unlock a sound that is already playing, but
15164 - * since it's Sounds[soundno] is different, it would erroneously be unlocked.
15165 - *
15166 - * Revision 1.9  1995/01/24  14:33:49  john
15167 - * *** empty log message ***
15168 - *
15169 - * Revision 1.8  1995/01/24  14:32:35  john
15170 - * Took out paging in code.
15171 - *
15172 - * Revision 1.7  1995/01/23  12:30:17  john
15173 - * Made debug code that mprintf what bitmap gets paged in.
15174 - *
15175 - * Revision 1.6  1995/01/17  14:11:37  john
15176 - * Added function that is called after level loaded.
15177 - *
15178 - * Revision 1.5  1995/01/14  19:16:58  john
15179 - * First version of new bitmap paging code.
15180 - *
15181 - * Revision 1.4  1994/10/27  18:51:57  john
15182 - * Added -piglet option that only loads needed textures for a
15183 - * mine.  Only saved ~1MB, and code still doesn't free textures
15184 - * before you load a new mine.
15185 - *
15186 - * Revision 1.3  1994/06/08  14:20:47  john
15187 - * Made piggy dump before going into game.
15188 - *
15189 - * Revision 1.2  1994/05/06  13:02:40  john
15190 - * Added piggy stuff; worked on supertransparency
15191 - *
15192 - * Revision 1.1  1994/05/06  11:47:46  john
15193 - * Initial revision
15194
15195 ------------------------------------------------------------------------
15196 main/player.h:
15197
15198 - * Revision 1.1  1995/05/16  16:01:11  allender
15199 - * Initial revision
15200 - *
15201 - * Revision 2.0  1995/02/27  11:30:25  john
15202 - * New version 2.0, which has no anonymous unions, builds with
15203 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15204 - *
15205 - * Revision 1.41  1994/12/20  17:56:43  yuan
15206 - * Multiplayer object capability.
15207 - *
15208 - * Revision 1.40  1994/12/02  15:04:42  matt
15209 - * Fixed bogus weapon constants and arrays
15210 - *
15211 - * Revision 1.39  1994/11/25  22:47:08  matt
15212 - * Made saved game descriptions longer
15213 - *
15214 - * Revision 1.38  1994/11/21  17:29:38  matt
15215 - * Cleaned up sequencing & game saving for secret levels
15216 - *
15217 - * Revision 1.37  1994/11/17  12:57:13  rob
15218 - * Changed net_kills_level to net_killed_total.
15219 - *
15220 - * Revision 1.36  1994/11/14  17:20:33  rob
15221 - * Bumped player file version.
15222 - *
15223 - * Revision 1.35  1994/11/04  19:55:06  rob
15224 - * Changed a previously unused pad character to represent whether or not
15225 - * the player is connected to a net game (used to be objnum=-1 but we
15226 - * want to keep the objnum info in case of re-joins)
15227 - *
15228 - * Revision 1.34  1994/10/22  14:13:54  mike
15229 - * Add homing_object_dist field to player struct.
15230 - *
15231 - * Revision 1.33  1994/10/22  00:08:45  matt
15232 - * Fixed up problems with bonus & game sequencing
15233 - * Player doesn't get credit for hostages unless he gets them out alive
15234 - *
15235 - * Revision 1.32  1994/10/21  20:43:03  mike
15236 - * Add hostages_on_board to player struct.
15237 - *
15238 - * Revision 1.31  1994/10/19  20:00:00  john
15239 - * Added bonus points at the end of level based on skill level.
15240 - *
15241 - * Revision 1.30  1994/10/19  15:14:24  john
15242 - * Took % hits out of player structure, made %kills work properly.
15243 - *
15244 - * Revision 1.29  1994/10/19  12:12:27  john
15245 - * Added hour variable.
15246 - *
15247 - * Revision 1.28  1994/10/17  17:24:48  john
15248 - * Added starting_level to player struct.
15249 - *
15250 - * Revision 1.27  1994/10/13  15:42:02  mike
15251 - * Remove afterburner.
15252 - *
15253 - * Revision 1.26  1994/10/10  17:00:23  mike
15254 - * Lower number of players from 10 to 8.
15255 - *
15256 - * Revision 1.25  1994/10/09  14:53:26  matt
15257 - * Made player cockpit state & window size save/restore with saved games & automap
15258 - *
15259 - * Revision 1.24  1994/10/08  20:24:10  matt
15260 - * Added difficulty level to player structure for game load/save
15261 - *
15262 - * Revision 1.23  1994/10/05  17:39:53  rob
15263 - * Changed killer_objnum to a short (was char)
15264 - *
15265 - * Revision 1.22  1994/10/03  22:59:07  matt
15266 - * Limit callsign to 8 chars long, so we can use it as filename
15267 - *
15268 - * Revision 1.21  1994/09/23  10:14:30  mike
15269 - * Rename PLAYER_FLAGS_INVINCIBLE to PLAYER_FLAGS_INVULNERABLE.
15270 - * Add INVULNERABLE_TIME_MAX = 30 seconds.
15271 - *
15272 - * Revision 1.20  1994/09/21  20:44:22  matt
15273 - * Player explosion fireball now specified in bitmaps.tbl
15274 - *
15275 - * Revision 1.19  1994/09/21  12:27:37  mike
15276 - * Move CLOAK_TIME_MAX here from game.c
15277 - *
15278 - * Revision 1.18  1994/09/16  13:10:16  mike
15279 - * Add afterburner and cloak stuff.
15280 - *
15281 - * Revision 1.17  1994/09/11  20:30:26  matt
15282 - * Cleaned up thrust vars, changing a few names
15283 - *
15284 - * Revision 1.16  1994/09/09  14:22:45  matt
15285 - * Added extra gun for player
15286 - *
15287 - * Revision 1.15  1994/09/07  13:30:11  john
15288 - * Added code to tell how many packets were lost.
15289 - *
15290 - * Revision 1.14  1994/09/02  11:56:33  mike
15291 - * Alignment on the player struct.
15292 - *
15293 - * Revision 1.13  1994/08/25  18:12:05  matt
15294 - * Made player's weapons and flares fire from the positions on the 3d model.
15295 - * Also added support for quad lasers.
15296 - *
15297 - * Revision 1.12  1994/08/22  15:49:40  mike
15298 - * change spelling on num_missles -> num_missiles.
15299 - *
15300 - * Revision 1.11  1994/08/18  10:47:32  john
15301 - * Cleaned up game sequencing and player death stuff
15302 - * in preparation for making the player explode into
15303 - * pieces when dead.
15304 - *
15305 - * Revision 1.10  1994/08/17  16:50:05  john
15306 - * Added damaging fireballs, missiles.
15307 - *
15308 - * Revision 1.9  1994/08/15  00:24:10  john
15309 - * First version of netgame with players killing
15310 - * each other. still buggy...
15311 - *
15312 - * Revision 1.8  1994/08/12  22:41:26  john
15313 - * Took away Player_stats; add Players array.
15314 - *
15315 - * Revision 1.7  1994/08/09  17:53:25  adam
15316 - * *** empty log message ***
15317 - *
15318 - * Revision 1.6  1994/07/13  00:15:05  matt
15319 - * Moved all (or nearly all) of the values that affect player movement to
15320 - * bitmaps.tbl
15321 - *
15322 - * Revision 1.5  1994/07/08  21:44:17  matt
15323 - * Made laser powerups saturate correctly
15324 - *
15325 - * Revision 1.4  1994/07/07  14:59:02  john
15326 - * Made radar powerups.
15327 - *
15328 - *
15329 - * Revision 1.3  1994/07/02  13:49:39  matt
15330 - * Cleaned up includes
15331 - *
15332 - * Revision 1.2  1994/07/02  13:10:03  matt
15333 - * Moved player stats struct from gameseq.h to player.h
15334 - *
15335 - * Revision 1.1  1994/07/02  11:00:43  matt
15336 - * Initial revision
15337
15338 ------------------------------------------------------------------------
15339 main/playsave.c:
15340
15341 - * Revision 1.1  1995/12/05  16:05:47  allender
15342 - * Initial revision
15343 - *
15344 - * Revision 1.10  1995/11/03  12:53:24  allender
15345 - * shareware changes
15346 - *
15347 - * Revision 1.9  1995/10/31  10:19:12  allender
15348 - * shareware stuff
15349 - *
15350 - * Revision 1.8  1995/10/23  14:50:11  allender
15351 - * set control type for new player *before* calling kc_set_controls
15352 - *
15353 - * Revision 1.7  1995/10/21  22:25:31  allender
15354 - * *** empty log message ***
15355 - *
15356 - * Revision 1.6  1995/10/17  15:57:42  allender
15357 - * removed line setting wrong COnfig_control_type
15358 - *
15359 - * Revision 1.5  1995/10/17  13:16:44  allender
15360 - * new controller support
15361 - *
15362 - * Revision 1.4  1995/08/24  16:03:38  allender
15363 - * call joystick code when player file uses joystick
15364 - *
15365 - * Revision 1.3  1995/08/03  15:15:39  allender
15366 - * got player save file working (more to go for shareware)
15367 - *
15368 - * Revision 1.2  1995/08/01  13:57:20  allender
15369 - * macified the player file stuff -- in a seperate folder
15370 - *
15371 - * Revision 1.1  1995/05/16  15:30:00  allender
15372 - * Initial revision
15373 - *
15374 - * Revision 2.3  1995/05/26  16:16:23  john
15375 - * Split SATURN into define's for requiring cd, using cd, etc.
15376 - * Also started adding all the Rockwell stuff.
15377 - *
15378 - * Revision 2.2  1995/03/24  17:48:21  john
15379 - * Made player files from saturn excrement the highest level for
15380 - * normal descent levels.
15381 - *
15382 - * Revision 2.1  1995/03/21  14:38:49  john
15383 - * Ifdef'd out the NETWORK code.
15384 - *
15385 - * Revision 2.0  1995/02/27  11:27:59  john
15386 - * New version 2.0, which has no anonymous unions, builds with
15387 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15388 - *
15389 - * Revision 1.57  1995/02/13  20:34:55  john
15390 - * Lintized
15391 - *
15392 - * Revision 1.56  1995/02/13  13:23:24  john
15393 - * Fixed bug with new player joystick selection.
15394 - *
15395 - * Revision 1.55  1995/02/13  12:01:19  john
15396 - * Fixed bug with joystick throttle still asking for
15397 - * calibration with new pilots.
15398 - *
15399 - * Revision 1.54  1995/02/13  10:29:12  john
15400 - * Fixed bug with creating new player not resetting everything to default.
15401 - *
15402 - * Revision 1.53  1995/02/03  10:58:46  john
15403 - * Added code to save shareware style saved games into new format...
15404 - * Also, made new player file format not have the saved game array in it.
15405 - *
15406 - * Revision 1.52  1995/02/02  21:09:28  matt
15407 - * Let player start of level 8 if he made it to level 7 in the shareware
15408 - *
15409 - * Revision 1.51  1995/02/02  18:50:14  john
15410 - * Added warning for FCS when new pilot chooses.
15411 - *
15412 - * Revision 1.50  1995/02/02  11:21:34  john
15413 - * Made joystick calibrate when new user selects.
15414 - *
15415 - * Revision 1.49  1995/02/01  18:06:38  rob
15416 - * Put defaults macros into descent.tex
15417 - *
15418 - * Revision 1.48  1995/01/25  14:37:53  john
15419 - * Made joystick only prompt for calibration once...
15420 - *
15421 - * Revision 1.47  1995/01/24  19:37:12  matt
15422 - * Took out incorrect mprintf
15423 - *
15424 - * Revision 1.46  1995/01/22  18:57:22  matt
15425 - * Made player highest level work with missions
15426 - *
15427 - * Revision 1.45  1995/01/21  16:36:05  matt
15428 - * Made starting level system work for now, pending integration with
15429 - * mission code.
15430 - *
15431 - * Revision 1.44  1995/01/20  22:47:32  matt
15432 - * Mission system implemented, though imcompletely
15433 - *
15434 - * Revision 1.43  1995/01/04  14:58:39  rob
15435 - * Fixed for shareware build.
15436 - *
15437 - * Revision 1.42  1995/01/04  11:36:43  rob
15438 - * Added compatibility with older shareware pilot files.
15439 - *
15440 - * Revision 1.41  1995/01/03  11:01:58  rob
15441 - * fixed a default macro.
15442 - *
15443 - * Revision 1.40  1995/01/03  10:44:06  rob
15444 - * Added default taunt macros.
15445 - *
15446 - * Revision 1.39  1994/12/13  10:01:16  allender
15447 - * pop up message box when unable to correctly save player file
15448 - *
15449 - * Revision 1.38  1994/12/12  11:37:14  matt
15450 - * Fixed auto leveling defaults & saving
15451 - *
15452 - * Revision 1.37  1994/12/12  00:26:59  matt
15453 - * Added support for no-levelling option
15454 - *
15455 - * Revision 1.36  1994/12/10  19:09:54  matt
15456 - * Added assert for valid player number when loading game
15457 - *
15458 - * Revision 1.35  1994/12/08  10:53:07  rob
15459 - * Fixed a bug in highest_level tracking.
15460 - *
15461 - * Revision 1.34  1994/12/08  10:01:36  john
15462 - * Changed the way the player callsign stuff works.
15463 - *
15464 - * Revision 1.33  1994/12/07  18:30:38  rob
15465 - * Load highest level along with player (used to be only if higher)
15466 - * Capped at LAST_LEVEL in case a person loads a registered player in shareware.
15467 - *
15468 - * Revision 1.32  1994/12/03  16:01:12  matt
15469 - * When player file has bad version, force player to choose another
15470 - *
15471 - * Revision 1.31  1994/12/02  19:54:00  yuan
15472 - * Localization.
15473 - *
15474 - * Revision 1.30  1994/12/02  11:01:36  yuan
15475 - * Localization.
15476 - *
15477 - * Revision 1.29  1994/11/29  03:46:28  john
15478 - * Added joystick sensitivity; Added sound channels to detail menu.  Removed -maxchannels
15479 - * command line arg.
15480 - *
15481 - * Revision 1.28  1994/11/29  01:10:23  john
15482 - * Took out code that allowed new players to
15483 - * configure keyboard.
15484 - *
15485 - * Revision 1.27  1994/11/25  22:47:10  matt
15486 - * Made saved game descriptions longer
15487 - *
15488 - * Revision 1.26  1994/11/22  12:10:42  rob
15489 - * Fixed file handle left open if player file versions don't
15490 - * match.
15491 - *
15492 - * Revision 1.25  1994/11/21  19:35:30  john
15493 - * Replaced calls to joy_init with if (joy_present)
15494 - *
15495 - * Revision 1.24  1994/11/21  17:29:34  matt
15496 - * Cleaned up sequencing & game saving for secret levels
15497 - *
15498 - * Revision 1.23  1994/11/21  11:10:01  john
15499 - * Fixed bug with read-only .plr file making the config file
15500 - * not update.
15501 - *
15502 - * Revision 1.22  1994/11/20  19:03:08  john
15503 - * Fixed bug with if not having a joystick, default
15504 - * player input device is cyberman.
15505 - *
15506 - * Revision 1.21  1994/11/17  12:24:07  matt
15507 - * Made an array the right size, to fix error loading games
15508 - *
15509 - * Revision 1.20  1994/11/14  17:52:54  allender
15510 - * add call to WriteConfigFile when player files gets written
15511 - *
15512 - * Revision 1.19  1994/11/14  17:19:23  rob
15513 - * Removed gamma, joystick calibration, and sound settings from player file.
15514 - * Added default difficulty and multi macros.
15515 - *
15516 - * Revision 1.18  1994/11/07  14:01:23  john
15517 - * Changed the gamma correction sequencing.
15518 - *
15519 - * Revision 1.17  1994/11/05  17:22:49  john
15520 - * Fixed lots of sequencing problems with newdemo stuff.
15521 - *
15522 - * Revision 1.16  1994/11/01  16:40:11  john
15523 - * Added Gamma correction.
15524 - *
15525 - * Revision 1.15  1994/10/24  19:56:50  john
15526 - * Made the new user setup prompt for config options.
15527 - *
15528 - * Revision 1.14  1994/10/24  17:44:21  john
15529 - * Added stereo channel reversing.
15530 - *
15531 - * Revision 1.13  1994/10/24  16:05:12  matt
15532 - * Improved handling of player names that are the names of DOS devices
15533 - *
15534 - * Revision 1.12  1994/10/22  00:08:51  matt
15535 - * Fixed up problems with bonus & game sequencing
15536 - * Player doesn't get credit for hostages unless he gets them out alive
15537 - *
15538 - * Revision 1.11  1994/10/19  19:59:57  john
15539 - * Added bonus points at the end of level based on skill level.
15540 - *
15541 - * Revision 1.10  1994/10/19  15:14:34  john
15542 - * Took % hits out of player structure, made %kills work properly.
15543 - *
15544 - * Revision 1.9  1994/10/19  12:44:26  john
15545 - * Added hours field to player structure.
15546 - *
15547 - * Revision 1.8  1994/10/17  17:24:34  john
15548 - * Added starting_level to player struct.
15549 - *
15550 - * Revision 1.7  1994/10/17  13:07:15  john
15551 - * Moved the descent.cfg info into the player config file.
15552 - *
15553 - * Revision 1.6  1994/10/09  14:54:31  matt
15554 - * Made player cockpit state & window size save/restore with saved games & automap
15555 - *
15556 - * Revision 1.5  1994/10/08  23:08:09  matt
15557 - * Added error check & handling for game load/save disk io
15558 - *
15559 - * Revision 1.4  1994/10/05  17:40:54  rob
15560 - * Bumped save_file_version to 5 due to change in player.h
15561 - *
15562 - * Revision 1.3  1994/10/03  23:00:54  matt
15563 - * New file version for shorter callsigns
15564 - *
15565 - * Revision 1.2  1994/09/28  17:25:05  matt
15566 - * Added first draft of game save/load system
15567 - *
15568 - * Revision 1.1  1994/09/27  14:39:12  matt
15569 - * Initial revision
15570
15571 ------------------------------------------------------------------------
15572 main/playsave.h:
15573
15574 - * Revision 1.1  1995/05/16  16:01:19  allender
15575 - * Initial revision
15576 - *
15577 - * Revision 2.0  1995/02/27  11:31:24  john
15578 - * New version 2.0, which has no anonymous unions, builds with
15579 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15580 - *
15581 - * Revision 1.10  1995/01/22  18:57:04  matt
15582 - * Made player highest level work with missions
15583 - *
15584 - * Revision 1.9  1994/12/12  11:37:15  matt
15585 - * Fixed auto leveling defaults & saving
15586 - *
15587 - * Revision 1.8  1994/12/08  10:01:37  john
15588 - * Changed the way the player callsign stuff works.
15589 - *
15590 - * Revision 1.7  1994/11/25  22:46:56  matt
15591 - * Made saved game descriptions longer
15592 - *
15593 - * Revision 1.6  1994/10/24  20:00:02  john
15594 - * Added prototype for read_player_file.
15595 - *
15596 - * Revision 1.5  1994/10/17  13:07:12  john
15597 - * Moved the descent.cfg info into the player config file.
15598 - *
15599 - * Revision 1.4  1994/10/09  14:54:32  matt
15600 - * Made player cockpit state & window size save/restore with saved games & automap
15601 - *
15602 - * Revision 1.3  1994/10/08  23:08:09  matt
15603 - * Added error check & handling for game load/save disk io
15604 - *
15605 - * Revision 1.2  1994/09/28  17:25:06  matt
15606 - * Added first draft of game save/load system
15607 - *
15608 - * Revision 1.1  1994/09/27  15:47:23  matt
15609 - * Initial revision
15610
15611 ------------------------------------------------------------------------
15612 main/polyobj.c:
15613
15614 - * Revision 1.3  1995/10/25  14:07:07  allender
15615 - * removed load_poly_model function
15616 - *
15617 - * Revision 1.2  1995/09/14  14:10:20  allender
15618 - * two funtions should be void
15619 - *
15620 - * Revision 1.1  1995/05/16  15:30:08  allender
15621 - * Initial revision
15622 - *
15623 - * Revision 2.1  1995/05/26  16:10:37  john
15624 - * Support for new 4-byte align v8 pof files.
15625 - *
15626 - * Revision 2.0  1995/02/27  11:32:44  john
15627 - * New version 2.0, which has no anonymous unions, builds with
15628 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15629 - *
15630 - * Revision 1.64  1995/01/14  19:16:43  john
15631 - * First version of new bitmap paging code.
15632 - *
15633 - * Revision 1.63  1994/12/14  18:06:54  matt
15634 - * Removed compile warnings
15635 - *
15636 - * Revision 1.62  1994/12/09  17:54:31  john
15637 - * Made the CFILE's close right after reading in data.
15638 - *
15639 - * Revision 1.61  1994/12/09  16:13:28  mike
15640 - * speedup pof file reading, but still horribly slow using hog file...problem somewhere else.
15641 - *
15642 - * Revision 1.60  1994/12/08  17:41:20  yuan
15643 - * Cfiling stuff.
15644 - *
15645 - * Revision 1.59  1994/11/21  11:02:19  matt
15646 - * Added error checking
15647 - *
15648 - * Revision 1.58  1994/11/14  11:32:49  matt
15649 - * Allow switching to simpler models even when alt_textures specified
15650 - *
15651 - * Revision 1.57  1994/11/13  21:15:24  matt
15652 - * Added basic support for more than one level of detail simplification
15653 - *
15654 - * Revision 1.56  1994/11/11  19:29:25  matt
15655 - * Added code to show low detail polygon models
15656 - *
15657 - * Revision 1.55  1994/11/10  14:02:57  matt
15658 - * Hacked in support for player ships with different textures
15659 - *
15660 - * Revision 1.54  1994/11/03  11:01:59  matt
15661 - * Made robot pics lighted
15662 - *
15663 - * Revision 1.53  1994/11/02  16:18:34  matt
15664 - * Moved draw_model_picture() out of editor
15665 - *
15666 - * Revision 1.52  1994/10/18  14:38:11  matt
15667 - * Restored assert now that bug is fixed
15668 - *
15669 - * Revision 1.51  1994/10/17  21:35:03  matt
15670 - * Added support for new Control Center/Main Reactor
15671 - *
15672 - * Revision 1.50  1994/10/14  17:46:23  yuan
15673 - * Made the soft Int3 only work in net mode.
15674 - *
15675 - * Revision 1.49  1994/10/14  17:43:47  yuan
15676 - * Added soft int3's instead of Asserts  for some common network bugs.
15677 - *
15678 - * Revision 1.48  1994/10/14  17:09:04  yuan
15679 - * Made Assert on line 610 be if in an attempt
15680 - * to bypass.
15681 - *
15682 - * Revision 1.47  1994/09/09  14:23:42  matt
15683 - * Added glow code to polygon models for engine glow
15684 - *
15685 - * Revision 1.46  1994/08/26  18:03:30  matt
15686 - * Added code to remap polygon model numbers by matching filenames
15687 - *
15688 - * Revision 1.45  1994/08/26  15:35:58  matt
15689 - * Made eclips usable on more than one object at a time
15690 - *
15691 - * Revision 1.44  1994/08/25  18:11:58  matt
15692 - * Made player's weapons and flares fire from the positions on the 3d model.
15693 - * Also added support for quad lasers.
15694 - *
15695 - * Revision 1.43  1994/07/25  00:14:18  matt
15696 - * Made a couple of minor changes for the drivethrough
15697 - *
15698 - * Revision 1.42  1994/07/25  00:02:41  matt
15699 - * Various changes to accomodate new 3d, which no longer takes point numbers
15700 - * as parms, and now only takes pointers to points.
15701
15702 ------------------------------------------------------------------------
15703 main/polyobj.h:
15704
15705 - * Revision 1.2  1995/09/14  14:10:30  allender
15706 - * two functions should be void
15707 - *
15708 - * Revision 1.1  1995/05/16  16:01:27  allender
15709 - * Initial revision
15710 - *
15711 - * Revision 2.1  1995/02/27  18:21:54  john
15712 - * Added extern for robot_points.
15713 - *
15714 - * Revision 2.0  1995/02/27  11:29:58  john
15715 - * New version 2.0, which has no anonymous unions, builds with
15716 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15717 - *
15718 - * Revision 1.28  1995/01/12  12:10:16  adam
15719 - * *** empty log message ***
15720 - *
15721 - * Revision 1.27  1994/11/11  19:28:58  matt
15722 - * Added code to show low detail polygon models
15723 - *
15724 - * Revision 1.26  1994/11/10  14:03:05  matt
15725 - * Hacked in support for player ships with different textures
15726 - *
15727 - * Revision 1.25  1994/11/02  16:18:24  matt
15728 - * Moved draw_model_picture() out of editor
15729 - *
15730 - * Revision 1.24  1994/10/18  10:55:57  adam
15731 - * bumped MAX_POLYGON_OBJECTS up
15732 - *
15733 - * Revision 1.23  1994/10/17  21:35:01  matt
15734 - * Added support for new Control Center/Main Reactor
15735 - *
15736 - * Revision 1.22  1994/09/09  14:23:42  matt
15737 - * Added glow code to polygon models for engine glow
15738 - *
15739 - * Revision 1.21  1994/08/26  18:03:43  matt
15740 - * Added code to remap polygon model numbers by matching filenames
15741 - *
15742 - * Revision 1.20  1994/08/26  15:36:00  matt
15743 - * Made eclips usable on more than one object at a time
15744 - *
15745 - * Revision 1.19  1994/07/22  20:44:23  matt
15746 - * Killed unused fields in polygon model structure
15747 - *
15748 - * Revision 1.18  1994/06/16  17:52:11  matt
15749 - * Made submodels rotate around their centers, not their pivot points
15750 - *
15751 - * Revision 1.17  1994/06/14  12:22:05  matt
15752 - * Integrated with drive code, using #defines to switch versions
15753 - *
15754 - * Revision 1.16  1994/06/09  16:25:01  matt
15755 - * Fixed confusion with two constants, MAX_SUBOBJS & MAX_SUBMODELS, which
15756 - * were used for the same things, but had different values.
15757 - *
15758 - * Revision 1.15  1994/06/08  10:56:38  matt
15759 - * Improved debris: now get submodel size from new POF files; debris now has
15760 - * limited life; debris can now be blown up.
15761 - *
15762 - * Revision 1.14  1994/06/07  16:51:57  matt
15763 - * Made object lighting work correctly; changed name of Ambient_light to
15764 - * Dynamic_light; cleaned up polygobj object rendering a little.
15765 - *
15766 - * Revision 1.13  1994/05/26  21:08:59  matt
15767 - * Moved robot stuff out of polygon model and into robot_info struct
15768 - * Made new file, robot.c, to deal with robots
15769 - *
15770 - * Revision 1.12  1994/05/18  19:35:05  matt
15771 - * Added fields for the rest of the subobj data
15772 - *
15773 - * Revision 1.11  1994/05/16  16:17:13  john
15774 - * Bunch of stuff on my Inferno Task list May16-23
15775 - *
15776 - * Revision 1.10  1994/05/13  11:08:31  matt
15777 - * Added support for multiple gun positions on polygon models
15778 - *
15779 - * Revision 1.9  1994/04/29  09:18:04  matt
15780 - * Added support for multiple-piece explosions
15781 - *
15782 - * Revision 1.8  1994/04/28  18:44:18  matt
15783 - * Took out code for old-style (non-interpreted) objects.
15784 - *
15785 - * Revision 1.7  1994/03/25  16:54:38  matt
15786 - * draw_polygon_object() now takes pointer to animation data
15787 - *
15788 - * Revision 1.6  1994/03/15  17:44:33  matt
15789 - * Changed a bunch of names
15790 - *
15791 - * Revision 1.5  1994/03/07  20:02:29  matt
15792 - * Added pointer to normals in polyobj struct
15793 - * Added prototype for draw_polygon_object()
15794 - *
15795 - * Revision 1.4  1994/03/01  17:16:19  matt
15796 - * Lots of changes to support loadable binary ".pof" robot files
15797 - *
15798 - * Revision 1.3  1994/01/31  15:51:20  matt
15799 - * Added ptr for rgb table for robot colors
15800 - *
15801 - * Revision 1.2  1994/01/28  13:52:01  matt
15802 - * Added flesh to this previously skeletal file.
15803 - *
15804 - * Revision 1.1  1994/01/28  13:47:42  matt
15805 - * Initial revision
15806
15807 ------------------------------------------------------------------------
15808 main/powerup.c:
15809
15810 - * Revision 1.2  1995/10/31  10:18:55  allender
15811 - * shareware stuff
15812 - *
15813 - * Revision 1.1  1995/05/16  15:30:16  allender
15814 - * Initial revision
15815 - *
15816 - * Revision 2.2  1995/03/24  13:50:36  john
15817 - * Added mega-wowie zowie to release.
15818 - *
15819 - * Revision 2.1  1995/03/21  14:38:39  john
15820 - * Ifdef'd out the NETWORK code.
15821 - *
15822 - * Revision 2.0  1995/02/27  11:27:15  john
15823 - * New version 2.0, which has no anonymous unions, builds with
15824 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15825 - *
15826 - * Revision 1.94  1995/02/22  13:46:03  allender
15827 - * remove anonymous unions from object structure
15828 - *
15829 - * Revision 1.93  1995/02/06  15:52:51  mike
15830 - * add mini megawow powerup for giving reasonable weapons.
15831 - *
15832 - * Revision 1.92  1995/01/23  22:49:59  mike
15833 - * drop energy instead of primary weapon if you have primary weapon
15834 - * (drop nothing if want to drop vulcan ammo and you are maxed out)
15835 - * if you have primary weapon and primary weapon there, get energy instead.
15836 - *
15837 - * Revision 1.91  1995/01/19  09:42:22  allender
15838 - * record laser levels for demos
15839 - *
15840 - * Revision 1.90  1994/12/31  12:28:01  rob
15841 - * Added sound for coop key grabs.
15842 - *
15843 - * Revision 1.89  1994/12/19  19:55:17  rob
15844 - * Fixing key semantics for coop game.
15845 - *
15846 - * Revision 1.88  1994/12/07  12:55:21  mike
15847 - * tweak vulcan amounts.
15848 - *
15849 - * Revision 1.87  1994/12/06  13:55:36  matt
15850 - * Made shield & energy powerup messages round to match HUD message
15851 - *
15852 - * Revision 1.86  1994/12/03  19:03:57  matt
15853 - * Fixed vulcan ammo HUD message
15854 - *
15855 - * Revision 1.85  1994/11/29  11:35:41  rob
15856 - * Added sound casting for grabbing powerups.
15857 - *
15858 - * Revision 1.84  1994/11/28  11:26:38  matt
15859 - * Cleaned up hud message printing for picking up weapons
15860 - *
15861 - * Revision 1.83  1994/11/27  23:14:01  matt
15862 - * Made changes for new mprintf calling convention
15863 - *
15864 - * Revision 1.82  1994/11/21  16:02:51  mike
15865 - * comment out unused powerups.
15866 - *
15867 - * Revision 1.81  1994/11/20  18:25:47  john
15868 - * Fixed some #ifndef RELEASE inconsistancies.
15869 - *
15870 - * Revision 1.80  1994/11/19  23:54:13  mike
15871 - * limit megawowiezowie to shareware powerups if in shareware version.
15872 - *
15873 - * Revision 1.79  1994/11/14  16:06:16  yuan
15874 - * Made cloak and invulnerability only picked up once.
15875 - *
15876 - * Revision 1.78  1994/11/07  17:41:06  mike
15877 - * messages for when you're fully stocked with missiles.
15878 - *
15879 - * Revision 1.77  1994/10/28  14:42:50  john
15880 - * Added sound volumes to all sound calls.
15881 - *
15882 - * Revision 1.76  1994/10/26  15:55:23  yuan
15883 - * Made vulcan cannon give 100 ammo if it has less than that.
15884 - *
15885 - * Revision 1.75  1994/10/26  15:54:57  yuan
15886 - * *** empty log message ***
15887 - *
15888 - * Revision 1.74  1994/10/25  14:31:25  allender
15889 - * Fixed bug where getting cloak powerup while cloaked resulted in
15890 - * player being cloaked forever.
15891 - *
15892 - * Revision 1.73  1994/10/25  10:51:21  matt
15893 - * Vulcan cannon powerups now contain ammo count
15894 - *
15895 - * Revision 1.72  1994/10/21  20:41:32  mike
15896 - * Fix silly backwards (- instead of +) bug in invulnerability powerup.
15897 - *
15898 - * Revision 1.71  1994/10/20  09:49:23  mike
15899 - * Fix up powerups in some way.
15900 - *
15901 - * Revision 1.70  1994/10/19  11:16:25  mike
15902 - * Limit amount of each type of ammo player can hold.
15903 - *
15904 - * Revision 1.69  1994/10/17  14:12:11  matt
15905 - * Added sound for powerup disappearance effect
15906 - *
15907 - * Revision 1.68  1994/10/17  14:07:04  mike
15908 - * Make shields and energy max out at 200.
15909 - *
15910 - * Revision 1.67  1994/10/16  12:43:37  mike
15911 - * Don't allow you to pick up a primary weapon, or invulnerability, you already have.
15912 - * Make cloak time additive.
15913 - *
15914 - * Revision 1.66  1994/10/15  19:05:30  mike
15915 - * Define constants for vulcan ammo amounts.
15916 - *
15917 - * Revision 1.65  1994/10/14  15:57:28  mike
15918 - * When you pick up a laser boost or quad_laser powerup, update weapon display.
15919 - *
15920 - * Revision 1.64  1994/10/13  10:57:51  adam
15921 - * fiddled with powerup disappearance
15922 - *
15923 - * Revision 1.63  1994/10/12  13:07:33  mike
15924 - * Make powerup play vclip when it goes away.
15925 - *
15926 - * Revision 1.62  1994/10/12  08:04:42  mike
15927 - * Make proximity powerup worth 4 bombs.
15928 - *
15929 - * Revision 1.61  1994/10/08  23:37:33  matt
15930 - * Don't pick up weapons you already have; also fixed auto_select bug
15931 - * for seconary weapons
15932 - *
15933 - * Revision 1.60  1994/10/08  15:41:00  mike
15934 - * Diminish palette effect due to powerups.
15935 - *
15936 - * Revision 1.59  1994/10/07  23:37:45  matt
15937 - * Made weapons select when pick up better one
15938 - *
15939 - * Revision 1.58  1994/10/07  22:09:20  rob
15940 - * Added network hook for grabbing the cloaking device.
15941
15942 ------------------------------------------------------------------------
15943 main/powerup.h:
15944
15945 - * Revision 1.1  1995/05/16  16:01:35  allender
15946 - * Initial revision
15947 - *
15948 - * Revision 2.0  1995/02/27  11:27:35  john
15949 - * New version 2.0, which has no anonymous unions, builds with
15950 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
15951 - *
15952 - * Revision 1.34  1995/02/06  15:52:37  mike
15953 - * add mini megawow powerup for giving reasonable weapons.
15954 - *
15955 - * Revision 1.33  1995/01/30  17:14:11  mike
15956 - * halve rate of vulcan ammo consumption.
15957 - *
15958 - * Revision 1.32  1995/01/15  20:47:56  mike
15959 - * add lighting field to powerups.
15960 - *
15961 - * Revision 1.31  1994/12/12  21:39:58  matt
15962 - * Changed vulcan ammo: 10K max, 5K w/weapon, 1250 per powerup
15963 - *
15964 - * Revision 1.30  1994/12/07  12:55:26  mike
15965 - * tweak vulcan amounts.
15966 - *
15967 - * Revision 1.29  1994/12/02  20:06:46  matt
15968 - * Made vulcan ammo print at approx 25 times actual
15969 - *
15970 - * Revision 1.28  1994/10/26  15:56:27  yuan
15971 - * Made vulcan cannon give 100 ammo if it has less than that.
15972 - *
15973 - * Revision 1.27  1994/10/15  19:07:10  mike
15974 - * Define constants for amount of vulcan ammo per powerup.
15975 - *
15976 - * Revision 1.26  1994/09/26  13:29:38  matt
15977 - * Added extra life each 100,000 points, and show icons on HUD for num lives
15978 - *
15979 - * Revision 1.25  1994/09/22  19:00:25  mike
15980 - * Kill constants ENERGY_BOOST and SHIELD_BOOST: it's now difficulty level dependent.
15981 - *
15982 - * Revision 1.24  1994/09/20  19:46:11  mike
15983 - * Fix powerup number assignments.
15984 - *
15985 - * Revision 1.23  1994/09/02  11:53:34  mike
15986 - * Add the megawow powerup.  If you don't know about it, that's because it's a secret.
15987 - *
15988 - * Revision 1.22  1994/09/01  10:41:35  matt
15989 - * Sizes for powerups now specified in bitmaps.tbl; blob bitmaps now plot
15990 - * correctly if width & height of bitmap are different.
15991 - *
15992 - * Revision 1.21  1994/08/31  19:26:14  mike
15993 - * Start adding new pile of powerups.
15994 - *
15995 - * Revision 1.20  1994/08/25  17:56:08  matt
15996 - * Added quad laser powerup
15997 - *
15998 - * Revision 1.19  1994/08/18  15:11:50  mike
15999 - * missile powerups.
16000 - *
16001 - * Revision 1.18  1994/08/09  17:54:33  adam
16002 - * upped no. of powerup types
16003 - *
16004 - * Revision 1.17  1994/08/09  17:53:39  adam
16005 - * *** empty log message ***
16006 - *
16007 - * Revision 1.16  1994/07/27  19:44:16  mike
16008 - * Objects containing objects.
16009 - *
16010 - * Revision 1.15  1994/07/26  18:31:32  mike
16011 - * Move some constants here from eobject.c.
16012 - *
16013 - * Revision 1.14  1994/07/20  17:35:03  yuan
16014 - * Some minor bug fixes and new key gauges...
16015 - *
16016 - * Revision 1.13  1994/07/12  15:53:23  john
16017 - * *** empty log message ***
16018 - *
16019 - * Revision 1.12  1994/07/12  15:30:47  mike
16020 - * Prototype diminish_towards_max.
16021 - *
16022 - * Revision 1.11  1994/07/07  14:59:04  john
16023 - * Made radar powerups.
16024 - *
16025 - *
16026 - * Revision 1.10  1994/07/01  16:35:40  yuan
16027 - * Added key system
16028 - *
16029 - * Revision 1.9  1994/06/29  19:43:33  matt
16030 - * Made powerup animation not happen in render routine
16031 - *
16032 - * Revision 1.8  1994/06/21  18:54:03  matt
16033 - * Added support for powerups that don't get picked up if not needed, but this
16034 - * feature is commented out at the end of do_powerup(), since the physics gave
16035 - * me all sorts of problems, with the player getting stuck on a powerup.
16036 - *
16037 - * Revision 1.7  1994/06/08  18:16:32  john
16038 - * Bunch of new stuff that basically takes constants out of the code
16039 - * and puts them into bitmaps.tbl.
16040 - *
16041 - * Revision 1.6  1994/05/18  13:26:30  yuan
16042 - * *** empty log message ***
16043 - *
16044 - * Revision 1.5  1994/05/17  17:01:48  yuan
16045 - * Added constant for boosts.
16046 - *
16047 - * Revision 1.4  1994/04/06  14:42:50  yuan
16048 - * Adding new powerups.
16049 - *
16050 - * Revision 1.3  1994/04/01  14:36:59  yuan
16051 - * John's head is an extra life...
16052 - *
16053 - * Revision 1.2  1994/04/01  11:15:22  yuan
16054 - * Added multiple bitmap functionality to all objects...
16055 - * (hostages, powerups, lasers, etc.)
16056 - * Hostages and powerups are implemented in the object system,
16057 - * just need to finish function call to "affect" player.
16058 - *
16059 - * Revision 1.1  1994/03/31  17:01:43  yuan
16060 - * Initial revision
16061
16062 ------------------------------------------------------------------------
16063 main/render.c:
16064
16065 - * Revision 1.9  1995/11/20  17:17:48  allender
16066 - * *** empty log message ***
16067 - *
16068 - * Revision 1.8  1995/10/26  14:08:35  allender
16069 - * added assigment for physics optimization
16070 - *
16071 - * Revision 1.7  1995/09/22  14:28:46  allender
16072 - * changed render_zoom to make game match PC aspect
16073 - *
16074 - * Revision 1.6  1995/08/14  14:35:54  allender
16075 - * change transparency to 0
16076 - *
16077 - * Revision 1.5  1995/08/12  11:32:02  allender
16078 - * removed #ifdef NEWDEMO -- always in
16079 - *
16080 - * Revision 1.4  1995/07/05  16:48:31  allender
16081 - * kitchen stuff
16082 - *
16083 - * Revision 1.3  1995/06/23  10:22:54  allender
16084 - * fix outline mode
16085 - *
16086 - * Revision 1.2  1995/06/16  16:11:18  allender
16087 - * changed sort func to accept const parameters
16088 - *
16089 - * Revision 1.1  1995/05/16  15:30:24  allender
16090 - * Initial revision
16091 - *
16092 - * Revision 2.5  1995/12/19  15:31:36  john
16093 - * Made stereo mode only record 1 eye in demo.
16094 - *
16095 - * Revision 2.4  1995/03/20  18:15:53  john
16096 - * Added code to not store the normals in the segment structure.
16097 - *
16098 - * Revision 2.3  1995/03/13  16:11:05  john
16099 - * Maybe fixed bug that lighting didn't work with vr helmets.
16100 - *
16101 - * Revision 2.2  1995/03/09  15:33:49  john
16102 - * Fixed bug with iglasses timeout too long, and objects
16103 - * disappearing from left eye.
16104 - *
16105 - * Revision 2.1  1995/03/06  15:23:59  john
16106 - * New screen techniques.
16107 - *
16108 - * Revision 2.0  1995/02/27  11:31:01  john
16109 - * New version 2.0, which has no anonymous unions, builds with
16110 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16111 - *
16112 - * Revision 1.252  1995/02/22  13:49:38  allender
16113 - * remove anonymous unions from object structure
16114 - *
16115 - * Revision 1.251  1995/02/11  15:07:26  matt
16116 - * Took out code which was mostly intended as part of a larger renderer
16117 - * change which never happened.  This new code was causing problems with
16118 - * the level 4 control center.
16119 - *
16120 - * Revision 1.250  1995/02/07  16:28:53  matt
16121 - * Fixed problem with new code
16122 - *
16123 - * Revision 1.249  1995/02/06  14:38:58  matt
16124 - * Took out some code that didn't compile when editor in
16125 - *
16126 - * Revision 1.248  1995/02/06  13:45:25  matt
16127 - * Structural changes, plus small sorting improvements
16128 - *
16129 - * Revision 1.247  1995/02/02  15:59:26  matt
16130 - * Changed assert to int3.
16131 - *
16132 - * Revision 1.246  1995/02/01  21:02:27  matt
16133 - * Added partial fix for rendering bugs
16134 - * Ripped out laser hack system
16135 - *
16136 - * Revision 1.245  1995/01/20  15:14:30  matt
16137 - * Added parens to fix precedence bug
16138 - *
16139 - * Revision 1.244  1995/01/14  19:16:59  john
16140 - * First version of new bitmap paging code.
16141 - *
16142 - * Revision 1.243  1995/01/03  20:19:25  john
16143 - * Pretty good working version of game save.
16144 - *
16145 - * Revision 1.242  1994/12/29  13:51:05  john
16146 - * Made the floating reticle draw in the spot
16147 - * regardless of the eye offset.
16148 - *
16149 - * Revision 1.241  1994/12/23  15:02:55  john
16150 - * Tweaked floating reticle.
16151 - *
16152 - * Revision 1.240  1994/12/23  14:27:45  john
16153 - * Changed offset of floating reticle to line up with
16154 - * lasers a bit better.
16155 - *
16156 - * Revision 1.239  1994/12/23  14:22:50  john
16157 - * Added floating reticle for VR helments.
16158 - *
16159 - * Revision 1.238  1994/12/13  14:07:50  matt
16160 - * Fixed tmap_num2 bug in search mode
16161 - *
16162 - * Revision 1.237  1994/12/11  00:45:53  matt
16163 - * Fixed problem when object sort buffer got full
16164 - *
16165 - * Revision 1.236  1994/12/09  18:46:06  matt
16166 - * Added a little debugging
16167 - *
16168 - * Revision 1.235  1994/12/09  14:59:16  matt
16169 - * Added system to attach a fireball to another object for rendering purposes,
16170 - * so the fireball always renders on top of (after) the object.
16171 - *
16172 - * Revision 1.234  1994/12/08  15:46:54  matt
16173 - * Fixed buffer overflow that caused seg depth screwup
16174 - *
16175 - * Revision 1.233  1994/12/08  11:51:53  matt
16176 - * Took out some unused stuff
16177 - *
16178 - * Revision 1.232  1994/12/06  16:31:48  mike
16179 - * fix detriangulation problems.
16180 - *
16181 - * Revision 1.231  1994/12/05  15:32:51  matt
16182 - * Changed an assert to an int3 & return
16183 - *
16184 - * Revision 1.230  1994/12/04  17:28:04  matt
16185 - * Got rid of unused no_render_flag array, and took out box clear when searching
16186 - *
16187 - * Revision 1.229  1994/12/04  15:51:14  matt
16188 - * Fixed linear tmap transition for objects
16189 - *
16190 - * Revision 1.228  1994/12/03  20:16:50  matt
16191 - * Turn off window clip for objects
16192 - *
16193 - * Revision 1.227  1994/12/03  14:48:00  matt
16194 - * Restored some default settings
16195 - *
16196 - * Revision 1.226  1994/12/03  14:44:32  matt
16197 - * Fixed another difficult bug in the window clip system
16198 - *
16199 - * Revision 1.225  1994/12/02  13:19:56  matt
16200 - * Fixed rect clears at terminus of rendering
16201 - * Made a bunch of debug code compile out
16202 - *
16203 - * Revision 1.224  1994/12/02  11:58:21  matt
16204 - * Fixed window clip bug
16205 - *
16206 - * Revision 1.223  1994/11/28  21:50:42  mike
16207 - * optimizations.
16208 - *
16209 - * Revision 1.222  1994/11/28  01:32:15  mike
16210 - * turn off window clearing.
16211 - *
16212 - * Revision 1.221  1994/11/27  23:11:52  matt
16213 - * Made changes for new mprintf calling convention
16214 - *
16215 - * Revision 1.220  1994/11/20  15:58:55  matt
16216 - * Don't migrate the control center, since it doesn't move out of its segment
16217 - *
16218 - * Revision 1.219  1994/11/19  23:54:36  mike
16219 - * change window colors.
16220 - *
16221 - * Revision 1.218  1994/11/19  15:20:25  mike
16222 - * rip out unused code and data
16223 - *
16224 - * Revision 1.217  1994/11/18  13:21:24  mike
16225 - * Clear only view portals into rest of world based on value of Clear_window.
16226 - *
16227 - * Revision 1.216  1994/11/15  17:02:10  matt
16228 - * Re-added accidentally deleted variable
16229 - *
16230 - * Revision 1.215  1994/11/15  16:51:50  matt
16231 - * Made rear view only switch to rear cockpit if cockpit on in front view
16232 - *
16233 - * Revision 1.214  1994/11/14  20:47:57  john
16234 - * Attempted to strip out all the code in the game
16235 - * directory that uses any ui code.
16236 - *
16237 - * Revision 1.213  1994/11/11  15:37:07  mike
16238 - * write orange for background to show render bugs.
16239 - *
16240 - * Revision 1.212  1994/11/09  22:57:18  matt
16241 - * Keep tract of depth of segments rendered, for detail level optimization
16242 - *
16243 - * Revision 1.211  1994/11/01  23:40:14  matt
16244 - * Elegantly handler buffer getting full
16245 - *
16246 - * Revision 1.210  1994/10/31  22:28:13  mike
16247 - * Fix detriangulation bug.
16248 - *
16249 - * Revision 1.209  1994/10/31  11:48:56  mike
16250 - * Optimize detriangulation, speedup of about 4% in many cases, 0% in many.
16251 - *
16252 - * Revision 1.208  1994/10/30  20:08:34  matt
16253 - * For endlevel: added big explosion at tunnel exit; made lights in tunnel
16254 - * go out; made more explosions on walls.
16255 - *
16256 - * Revision 1.207  1994/10/27  14:14:35  matt
16257 - * Don't do light flash during endlevel sequence
16258 - *
16259 - * Revision 1.206  1994/10/11  12:05:42  mike
16260 - * Improve detriangulation.
16261 - *
16262 - * Revision 1.205  1994/10/07  15:27:00  john
16263 - * Commented out the code that moves your eye
16264 - * forward.
16265 - *
16266 - * Revision 1.204  1994/10/05  16:07:38  mike
16267 - * Don't detriangulate sides if in player's segment.  Prevents player going behind a wall,
16268 - * though there are cases in which it would be ok to detriangulate these.
16269 - *
16270 - * Revision 1.203  1994/10/03  12:44:05  matt
16271 - * Took out unreferenced code
16272 - *
16273 - * Revision 1.202  1994/09/28  14:08:45  john
16274 - * Added Zoom stuff back in, but ifdef'd it out.
16275 - *
16276 - * Revision 1.201  1994/09/25  23:41:49  matt
16277 - * Changed the object load & save code to read/write the structure fields one
16278 - * at a time (rather than the whole structure at once).  This mean that the
16279 - * object structure can be changed without breaking the load/save functions.
16280 - * As a result of this change, the local_object data can be and has been
16281 - * incorporated into the object array.  Also, timeleft is now a property
16282 - * of all objects, and the object structure has been otherwise cleaned up.
16283 - *
16284 - * Revision 1.200  1994/09/25  15:50:10  mike
16285 - * Integrate my debug changes which shows how many textures were rendered
16286 - * this frame.
16287 - *
16288 - * Revision 1.199  1994/09/25  15:45:22  matt
16289 - * Added OBJ_LIGHT, a type of object that casts light
16290 - * Added generalized lifeleft, and moved it to local_object
16291 - *
16292 - * Revision 1.198  1994/09/15  21:23:32  matt
16293 - * Changed system to keep track of whether & what cockpit is up
16294 - *
16295 - * Revision 1.197  1994/09/15  16:30:12  mike
16296 - * Comment out call to object_render_targets, which did nothing.
16297 - *
16298 - * Revision 1.196  1994/09/07  22:25:51  matt
16299 - * Don't migrate through semi-transparent walls
16300 - *
16301 - * Revision 1.195  1994/09/07  19:16:21  mike
16302 - * Homing missile.
16303 - *
16304 - * Revision 1.194  1994/08/31  20:54:17  matt
16305 - * Don't do flash effect while whiting out
16306 - *
16307 - * Revision 1.193  1994/08/23  17:20:12  john
16308 - * Added rear-view cockpit.
16309 - *
16310 - * Revision 1.192  1994/08/22  14:36:35  john
16311 - * Made R key make a "reverse" view render.
16312 - *
16313 - * Revision 1.191  1994/08/19  20:09:26  matt
16314 - * Added end-of-level cut scene with external scene
16315 - *
16316 - * Revision 1.190  1994/08/10  19:56:17  john
16317 - * Changed font stuff; Took out old menu; messed up lots of
16318 - * other stuff like game sequencing messages, etc.
16319 - *
16320 - * Revision 1.189  1994/08/10  14:45:05  john
16321 - * *** empty log message ***
16322 - *
16323 - * Revision 1.188  1994/08/09  16:04:06  john
16324 - * Added network players to editor.
16325 - *
16326 - * Revision 1.187  1994/08/05  17:07:05  john
16327 - * Made lasers be two objects, one drawing after the other
16328 - * all the time.
16329 - *
16330 - * Revision 1.186  1994/08/05  10:07:57  matt
16331 - * Disable window check checking (i.e., always use window check)
16332 - *
16333 - * Revision 1.185  1994/08/04  19:11:30  matt
16334 - * Changed a bunch of vecmat calls to use multiple-function routines, and to
16335 - * allow the use of C macros for some functions
16336 - *
16337 - * Revision 1.184  1994/08/04  00:21:14  matt
16338 - * Cleaned up fvi & physics error handling; put in code to make sure objects
16339 - * are in correct segment; simplified segment finding for objects and points
16340 - *
16341 - * Revision 1.183  1994/08/02  19:04:28  matt
16342 - * Cleaned up vertex list functions
16343 - *
16344 - * Revision 1.182  1994/07/29  15:13:33  matt
16345 - * When window check turned off, cut render depth in half
16346 - *
16347 - * Revision 1.181  1994/07/29  11:03:50  matt
16348 - * Use highest_segment_index instead of num_segments so render works from
16349 - * the editor
16350 - *
16351 - * Revision 1.180  1994/07/29  10:04:34  mike
16352 - * Update Cursegp when an object is selected.
16353 - *
16354 - * Revision 1.179  1994/07/25  00:02:50  matt
16355 - * Various changes to accomodate new 3d, which no longer takes point numbers
16356 - * as parms, and now only takes pointers to points.
16357 - *
16358 - * Revision 1.178  1994/07/24  14:37:49  matt
16359 - * Added angles for player head
16360 - *
16361 - * Revision 1.177  1994/07/20  19:08:07  matt
16362 - * If in editor, don't move eye from center of viewer object
16363
16364 ------------------------------------------------------------------------
16365 main/render.h:
16366
16367 - * Revision 1.1  1995/05/16  16:01:51  allender
16368 - * Initial revision
16369 - *
16370 - * Revision 2.0  1995/02/27  11:33:00  john
16371 - * New version 2.0, which has no anonymous unions, builds with
16372 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16373 - *
16374 - * Revision 1.17  1994/11/30  12:33:33  mike
16375 - * prototype Clear_window.
16376 - *
16377 - * Revision 1.16  1994/11/02  16:19:52  matt
16378 - * Increased size of extra object buffer
16379 - *
16380 - * Revision 1.15  1994/07/25  00:02:49  matt
16381 - * Various changes to accomodate new 3d, which no longer takes point numbers
16382 - * as parms, and now only takes pointers to points.
16383 - *
16384 - * Revision 1.14  1994/07/24  14:37:42  matt
16385 - * Added angles for player head
16386 - *
16387 - * Revision 1.13  1994/06/24  17:01:34  john
16388 - * Add VFX support; Took Game Sequencing, like EndGame and stuff and
16389 - * took it out of game.c and into gameseq.c
16390 - *
16391 - * Revision 1.12  1994/06/16  10:55:57  matt
16392 - * Made a bunch of test code dependent on #defines
16393 - *
16394 - * Revision 1.11  1994/06/01  00:01:36  matt
16395 - * Added mine destruction flashing effect
16396 - *
16397 - * Revision 1.10  1994/05/22  18:47:36  mike
16398 - * make Render_list a globally accessible variable.
16399 - *
16400 - * Revision 1.9  1994/05/22  15:29:32  mike
16401 - * Separation of lighting from render.c to lighting.c.
16402 - *
16403 - * Revision 1.8  1994/05/14  17:59:39  matt
16404 - * Added extern.
16405 - *
16406 - * Revision 1.7  1994/05/14  17:15:17  matt
16407 - * Got rid of externs in source (non-header) files
16408 - *
16409 - * Revision 1.6  1994/02/17  11:32:41  matt
16410 - * Changes in object system
16411 - *
16412 - * Revision 1.5  1994/01/21  17:31:48  matt
16413 - * Moved code from render_frame() to caller, making code cleaner
16414 - *
16415 - * Revision 1.4  1994/01/06  09:46:12  john
16416 - * Added removable walls... all code that checked for
16417 - * children to see if a wall was a doorway, i changed
16418 - * to yuan's wall_is_doorway function that is in wall.c...
16419 - * doesn't work yet.
16420 - *
16421 - * Revision 1.3  1994/01/05  11:25:47  john
16422 - * Changed Player_zoom to Render_zoom
16423 - *
16424 - * Revision 1.2  1994/01/05  10:53:43  john
16425 - * New object code by John.
16426 - *
16427 - * Revision 1.1  1993/11/04  14:01:43  matt
16428 - * Initial revision
16429
16430 ------------------------------------------------------------------------
16431 main/robot.c:
16432
16433 - * Revision 1.1  1995/05/16  15:30:34  allender
16434 - * Initial revision
16435 - *
16436 - * Revision 2.1  1995/03/07  16:52:02  john
16437 - * Fixed robots not moving without edtiro bug.
16438 - *
16439 - * Revision 2.0  1995/02/27  11:31:11  john
16440 - * New version 2.0, which has no anonymous unions, builds with
16441 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16442 - *
16443 - * Revision 1.19  1995/02/22  13:58:09  allender
16444 - * remove anonymous unions from object structure
16445 - *
16446 - * Revision 1.18  1995/01/27  11:17:06  rob
16447 - * Avoid problems with illegal gun num.
16448 - *
16449 - * Revision 1.17  1994/11/19  15:15:02  mike
16450 - * remove unused code and data
16451 - *
16452 - * Revision 1.16  1994/11/05  16:41:31  adam
16453 - * upped MAX_ROBOT_JOINTS
16454 - *
16455 - * Revision 1.15  1994/09/26  15:29:29  matt
16456 - * Allow morphing objects to fire
16457 - *
16458 - * Revision 1.14  1994/06/20  14:31:02  matt
16459 - * Don't include joint zero in animation data
16460 - *
16461 - * Revision 1.13  1994/06/10  14:39:58  matt
16462 - * Increased limit of robot joints
16463 - *
16464 - * Revision 1.12  1994/06/10  10:59:18  matt
16465 - * Do error checking on list of angles
16466 - *
16467 - * Revision 1.11  1994/06/09  16:21:32  matt
16468 - * Took out special-case and test code.
16469 - *
16470 - * Revision 1.10  1994/06/07  13:21:14  matt
16471 - * Added support for new chunk-based POF files, with robot animation data.
16472 - *
16473 - * Revision 1.9  1994/06/01  17:58:24  mike
16474 - * Greater flinch effect.
16475 - *
16476 - * Revision 1.8  1994/06/01  14:59:25  matt
16477 - * Fixed calc_gun_position(), which was rotating the wrong way for the
16478 - * object orientation.
16479 - *
16480 - * Revision 1.7  1994/06/01  12:44:04  matt
16481 - * Added flinch state for test robot
16482 - *
16483 - * Revision 1.6  1994/05/31  19:17:24  matt
16484 - * Fixed test robot angles
16485 - *
16486 - * Revision 1.5  1994/05/30  19:43:50  mike
16487 - * Call set_test_robot.
16488 - *
16489 - *
16490 - * Revision 1.4  1994/05/30  00:02:44  matt
16491 - * Got rid of robot render type, and generally cleaned up polygon model
16492 - * render objects.
16493 - *
16494 - * Revision 1.3  1994/05/29  18:46:15  matt
16495 - * Added stuff for getting robot animation info for different states
16496 - *
16497 - * Revision 1.2  1994/05/26  21:09:15  matt
16498 - * Moved robot stuff out of polygon model and into robot_info struct
16499 - * Made new file, robot.c, to deal with robots
16500 - *
16501 - * Revision 1.1  1994/05/26  18:02:04  matt
16502 - * Initial revision
16503
16504 ------------------------------------------------------------------------
16505 main/robot.h:
16506
16507 - * Revision 1.1  1995/05/16  16:01:59  allender
16508 - * Initial revision
16509 - *
16510 - * Revision 2.1  1995/03/07  16:52:00  john
16511 - * Fixed robots not moving without edtiro bug.
16512 - *
16513 - * Revision 2.0  1995/02/27  11:30:59  john
16514 - * New version 2.0, which has no anonymous unions, builds with
16515 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16516 - *
16517 - * Revision 1.25  1994/11/30  14:02:44  mike
16518 - * fields for see/attack/claw sounds.
16519 - *
16520 - * Revision 1.24  1994/10/27  15:55:41  adam
16521 - * *** empty log message ***
16522 - *
16523 - * Revision 1.23  1994/10/20  15:17:03  mike
16524 - * Add boss flag.
16525 - *
16526 - * Revision 1.22  1994/10/20  09:51:00  adam
16527 - * *** empty log message ***
16528 - *
16529 - * Revision 1.21  1994/10/18  10:52:54  mike
16530 - * Support robots lunging as an attack_type.
16531 - *
16532 - * Revision 1.20  1994/10/17  21:19:02  mike
16533 - * robot cloaking.
16534 - *
16535 - * Revision 1.19  1994/09/27  00:03:39  mike
16536 - * Add score_value to robot_info struct.
16537 - *
16538 - * Revision 1.18  1994/09/22  19:01:12  mike
16539 - * Move NDL from here to game.h
16540 - *
16541 - * Revision 1.17  1994/09/22  15:46:55  mike
16542 - * Add default contained objects for robots.
16543 - *
16544 - * Revision 1.16  1994/09/22  10:46:57  mike
16545 - * Add difficulty levels.
16546 - *
16547 - * Revision 1.15  1994/09/15  16:34:16  mike
16548 - * Change rapidfire_count to a byte, add evade_speed, dum1, dum2.
16549 - *
16550 - * Revision 1.14  1994/09/09  14:21:58  matt
16551 - * Increased maximum number of games
16552 - *
16553 - * Revision 1.13  1994/08/25  18:12:13  matt
16554 - * Made player's weapons and flares fire from the positions on the 3d model.
16555 - * Also added support for quad lasers.
16556 - *
16557 - * Revision 1.12  1994/08/23  16:37:24  mike
16558 - * Add rapidfire_count to robot_info.
16559 - *
16560 - * Revision 1.11  1994/07/27  19:45:01  mike
16561 - * Objects containing objects.
16562 - *
16563 - * Revision 1.10  1994/07/12  12:40:01  matt
16564 - * Revamped physics system
16565 - *
16566 - * Revision 1.9  1994/06/21  12:17:12  mike
16567 - * Add circle_distance to robot_info.
16568 - *
16569 - * Revision 1.8  1994/06/09  16:22:28  matt
16570 - * Moved header for calc_gun_point() here, where it belongs
16571 - *
16572 - * Revision 1.7  1994/06/08  18:16:23  john
16573 - * Bunch of new stuff that basically takes constants out of the code
16574 - * and puts them into bitmaps.tbl.
16575 - *
16576 - * Revision 1.6  1994/06/03  11:38:09  john
16577 - * Made robots get their strength for RobotInfo->strength, which
16578 - * is read in from bitmaps.tbl
16579 - *
16580 - * Revision 1.5  1994/05/30  19:43:31  mike
16581 - * Add voluminous comment for robot_get_anim_state.
16582 - *
16583 - * Revision 1.4  1994/05/30  00:03:18  matt
16584 - * Got rid of robot render type, and generally cleaned up polygon model
16585 - * render objects.
16586 - *
16587 - * Revision 1.3  1994/05/29  18:46:37  matt
16588 - * Added stuff for getting robot animation info for different states
16589 - *
16590 - * Revision 1.2  1994/05/26  21:09:18  matt
16591 - * Moved robot stuff out of polygon model and into robot_info struct
16592 - * Made new file, robot.c, to deal with robots
16593 - *
16594 - * Revision 1.1  1994/05/26  18:02:12  matt
16595 - * Initial revision
16596
16597 ------------------------------------------------------------------------
16598 main/scores.c:
16599
16600 - * Revision 1.1  1995/12/05  16:06:29  allender
16601 - * Initial revision
16602 - *
16603 - * Revision 1.3  1995/08/14  09:25:16  allender
16604 - * add byteswap header
16605 - *
16606 - * Revision 1.2  1995/07/14  13:45:17  allender
16607 - * fixed up high score code to work and look pretty good
16608 - * needs some work tho'
16609 - *
16610 - * Revision 1.1  1995/05/16  15:30:42  allender
16611 - * Initial revision
16612 - *
16613 - * Revision 2.2  1995/06/15  12:13:54  john
16614 - * Made end game, win game and title sequences all go
16615 - * on after 5 minutes automatically.
16616 - *
16617 - * Revision 2.1  1995/03/06  15:23:57  john
16618 - * New screen techniques.
16619 - *
16620 - * Revision 2.0  1995/02/27  11:30:53  john
16621 - * New version 2.0, which has no anonymous unions, builds with
16622 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16623 - *
16624 - * Revision 1.109  1995/02/09  12:23:19  rob
16625 - * Added assert for length of filename.
16626 - *
16627 - * Revision 1.108  1995/01/03  17:33:24  john
16628 - * Made scrolling textbox. Used it for scores cool saying.
16629 - *
16630 - * Revision 1.107  1994/12/28  10:42:51  john
16631 - * More VFX tweaking.
16632 - *
16633 - * Revision 1.106  1994/12/28  10:26:19  john
16634 - * Fixed some VFX problems.
16635 - *
16636 - * Revision 1.105  1994/12/15  16:42:12  adam
16637 - * some fix
16638 - *
16639 - * Revision 1.104  1994/12/14  11:59:19  john
16640 - * Changed the default high scores.
16641 - *
16642 - * Revision 1.103  1994/12/09  00:41:12  mike
16643 - * fix hang in automap print screen
16644 - *
16645 - * Revision 1.102  1994/12/07  00:36:26  mike
16646 - * scores sequencing stuff.
16647 - *
16648 - * Revision 1.101  1994/12/06  15:14:21  yuan
16649 - * Localization
16650 - *
16651 - * Revision 1.100  1994/12/03  17:07:52  yuan
16652 - * Localization 368
16653 - *
16654 - * Revision 1.99  1994/12/03  14:49:27  mark
16655 - * Fixed john's bug with previous.
16656 - *
16657 - * Revision 1.98  1994/12/03  14:43:54  john
16658 - * Added enter, space  to exit scores.
16659 - *
16660 - * Revision 1.97  1994/12/03  14:32:34  john
16661 - * Added integrated-super-deluxe-ctrl-r to reset high scores.
16662 - *
16663 - * Revision 1.96  1994/12/01  20:15:20  yuan
16664 - * Localization
16665 - *
16666 - * Revision 1.95  1994/11/30  19:36:36  john
16667 - * Made Gravis Ultrasound work again.  Made the scores blink
16668 - * at a constant rate.  Revamped the newmenu background storage,
16669 - * which hopefully fixed some bugs.  Made menus in ame not pause
16670 - * sound, except for the pause key.               ^== Game!
16671 - *
16672 - * Revision 1.94  1994/11/30  12:32:08  john
16673 - * Made secret levels print correctly.
16674 - *
16675 - * Revision 1.93  1994/11/30  12:06:47  mike
16676 - * fix bug: looper not initialized.
16677 - *
16678 - * Revision 1.92  1994/11/29  13:20:04  john
16679 - * changed the "Wow! You placed .." to something better.
16680 - *
16681 - * Revision 1.91  1994/11/29  01:35:38  john
16682 - * Made it so that even if you don't get a high score, you still show
16683 - * up on the chart..
16684 - *
16685 - * Revision 1.90  1994/11/23  17:29:29  mike
16686 - * fix xx-xx level bug in high scores.
16687 - *
16688 - * Revision 1.89  1994/11/22  16:55:27  mike
16689 - * allow high scores even in pudly trainee level.
16690 - *
16691 - * Revision 1.88  1994/11/21  17:28:33  john
16692 - * Changed default score values.
16693 - *
16694 - * Revision 1.87  1994/11/18  23:37:53  john
16695 - * Changed some shorts to ints.
16696 - *
16697 - * Revision 1.86  1994/11/13  15:39:24  john
16698 - * Added critical error handler to game.  Took out -editor command line
16699 - * option because it didn't work anymore and wasn't worth fixing.  Made scores
16700 - * not use MINER enviroment variable on release version, and made scores
16701 - * not print an error if there is no descent.hi.
16702 - *
16703 - * Revision 1.85  1994/11/06  10:15:58  john
16704 - * Took out kill % and hostage %
16705 - *
16706 - * Revision 1.84  1994/11/05  15:03:39  john
16707 - * Added non-popup menu for the main menu, so that scores and credits don't have to save
16708 - * the background.
16709 - *
16710 - * Revision 1.83  1994/11/05  14:05:57  john
16711 - * Fixed fade transitions between all screens by making gr_palette_fade_in and out keep
16712 - * track of whether the palette is faded in or not.  Then, wherever the code needs to fade out,
16713 - * it just calls gr_palette_fade_out and it will fade out if it isn't already.  The same with fade_in.
16714 - * This eliminates the need for all the flags like Menu_fade_out, game_fade_in palette, etc.
16715 - *
16716 - * Revision 1.82  1994/11/04  20:11:41  john
16717 - * Neatening up palette stuff with demos.
16718 - *
16719 - * Revision 1.81  1994/11/04  12:02:34  john
16720 - * Fixed fading transitions a bit more.
16721 - *
16722 - * Revision 1.80  1994/10/27  12:10:39  john
16723 - * Moved kill % a little to the right.
16724 - *
16725 - * Revision 1.79  1994/10/24  20:25:03  john
16726 - * Fixed bug with space at end of 1 line message.
16727 - * Made Enter go between the two input lines.
16728 - *
16729 - * Revision 1.78  1994/10/24  18:20:18  john
16730 - * Made the current high score flash.
16731 - *
16732 - * Revision 1.77  1994/10/24  13:37:22  mike
16733 - * Fix grammar error.  --anal Mike.
16734 - *
16735 - * Revision 1.76  1994/10/22  13:19:19  john
16736 - * Made joy/mouse buttons leave score screen.
16737 - *
16738 - * Revision 1.75  1994/10/21  15:26:57  john
16739 - * Used PrtScr instead of F2.
16740 - *
16741 - * Revision 1.74  1994/10/21  13:54:21  matt
16742 - * Replace '1' with special wide '1' to make numbers line up
16743 - *
16744 - * Revision 1.73  1994/10/19  20:48:01  john
16745 - * Made so that people playing on wimp level
16746 - * can't get high scores.
16747 - *
16748 - * Revision 1.72  1994/10/19  15:14:05  john
16749 - * Took % hits out of player structure, made %kills work properly.
16750 - *
16751 - * Revision 1.71  1994/10/19  14:39:27  john
16752 - * Finished up; added keys to prtscr, int3.
16753 - *
16754 - * Revision 1.70  1994/10/19  12:44:09  john
16755 - * Added hours field to player structure.
16756 - *
16757 - * Revision 1.69  1994/10/19  11:25:21  john
16758 - * Looking good.
16759 - *
16760 - * Revision 1.68  1994/10/19  10:54:12  john
16761 - * Test version.
16762 - *
16763 - * Revision 1.67  1994/10/19  10:00:27  john
16764 - * *** empty log message ***
16765 - *
16766 - * Revision 1.66  1994/10/19  09:59:03  john
16767 - * Made cool saying have the potential to be up to 50 chars
16768 - *
16769 - * Revision 1.65  1994/10/19  09:53:30  john
16770 - * Working version of scores.
16771 - *
16772 - * Revision 1.64  1994/10/18  21:07:46  john
16773 - * Fixed bug that didn't print name correctly.
16774 - *
16775 - * Revision 1.63  1994/10/18  18:21:46  john
16776 - * NEw score system.
16777 - *
16778 - * Revision 1.62  1994/10/17  20:31:42  john
16779 - * Made the text for the difficulty labels global so that
16780 - * the high score screen can print "rookie" or whatever.
16781 - *
16782 - * Revision 1.61  1994/10/17  17:27:44  john
16783 - * Added starting_level to high score system.
16784 - *
16785 - * Revision 1.60  1994/10/17  16:56:35  john
16786 - * Added starting level to stats menu.
16787 - *
16788 - * Revision 1.59  1994/10/17  16:55:25  john
16789 - * Added starting level, but didn't hook it to anything.
16790 - *
16791 - * Revision 1.58  1994/10/17  16:47:17  john
16792 - * Added diff. level.
16793 - *
16794 - * Revision 1.57  1994/10/17  15:49:53  john
16795 - * Added stats screen.
16796 - *
16797 - * Revision 1.56  1994/10/03  23:02:29  matt
16798 - * After player added or not to scores, scores are now displayed
16799 - *
16800 - * Revision 1.55  1994/09/01  18:09:38  john
16801 - * Made commas in scores work correctly .
16802 - *
16803 - *
16804 - * Revision 1.54  1994/09/01  18:03:57  john
16805 - * Neatened up scores a bit.
16806 - *
16807 - * Revision 1.53  1994/08/26  14:27:37  john
16808 - * Made it prompt for name
16809 - *
16810 - * Revision 1.52  1994/08/26  13:03:17  john
16811 - * *** empty log message ***
16812 - *
16813 - * Revision 1.51  1994/08/26  13:01:52  john
16814 - * Put high score system in.
16815 - *
16816 - * Revision 1.50  1994/08/10  19:57:01  john
16817 - * Changed font stuff; Took out old menu; messed up lots of
16818 - * other stuff like game sequencing messages, etc.
16819 - *
16820 - * Revision 1.49  1994/07/25  15:40:27  matt
16821 - * Took out debugging code accidentally left in.
16822
16823 ------------------------------------------------------------------------
16824 main/scores.h:
16825
16826 - * Revision 1.1  1995/05/16  16:02:07  allender
16827 - * Initial revision
16828 - *
16829 - * Revision 2.0  1995/02/27  11:31:53  john
16830 - * New version 2.0, which has no anonymous unions, builds with
16831 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16832 - *
16833 - * Revision 1.13  1994/12/07  00:36:36  mike
16834 - * scores sequencing stuff.
16835 - *
16836 - * Revision 1.12  1994/11/28  11:26:09  matt
16837 - * Took out scores for weapons, which are no longer used
16838 - *
16839 - * Revision 1.11  1994/10/24  18:20:03  john
16840 - * Made the current high score flash.
16841 - *
16842 - * Revision 1.10  1994/10/18  18:21:36  john
16843 - * NEw score system.
16844 - *
16845 - * Revision 1.9  1994/10/03  23:01:58  matt
16846 - * New parms for scores_view()
16847 - *
16848 - *
16849 - * Revision 1.8  1994/09/27  16:10:37  adam
16850 - * changed scores of course
16851 - *
16852 - * Revision 1.7  1994/08/31  19:25:46  mike
16853 - * Add score values for new powerups.
16854 - *
16855 - * Revision 1.6  1994/08/26  16:00:18  mike
16856 - * enhanced (?) scoring.
16857 - *
16858 - * Revision 1.5  1994/08/26  13:01:45  john
16859 - * Put high score system in.
16860 - *
16861 - * Revision 1.4  1994/05/30  16:33:21  yuan
16862 - * Revamping high scores.
16863 - *
16864 - * Revision 1.3  1994/05/14  17:15:07  matt
16865 - * Got rid of externs in source (non-header) files
16866 - *
16867 - * Revision 1.2  1994/05/13  13:13:57  yuan
16868 - * Added player death...
16869 - *
16870 - * When you die, if just pops up a a message.
16871 - * When game is over, a message is popped up, and if you have a high score,
16872 - * you get to enter it.
16873 - *
16874 - * Revision 1.1  1994/05/13  10:22:16  yuan
16875 - * Initial revision
16876
16877 ------------------------------------------------------------------------
16878 main/screens.h:
16879
16880 - * Revision 1.1  1995/05/16  16:02:15  allender
16881 - * Initial revision
16882 - *
16883 - * Revision 2.2  1995/03/14  12:14:00  john
16884 - * Made VR helmets have 4 resolutions to choose from.
16885 - *
16886 - * Revision 2.1  1995/03/06  15:24:09  john
16887 - * New screen techniques.
16888 - *
16889 - * Revision 2.0  1995/02/27  11:31:40  john
16890 - * New version 2.0, which has no anonymous unions, builds with
16891 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16892 - *
16893 - * Revision 1.15  1994/08/10  19:56:45  john
16894 - * Changed font stuff; Took out old menu; messed up lots of
16895 - * other stuff like game sequencing messages, etc.
16896 - *
16897 - * Revision 1.14  1994/07/20  21:04:26  john
16898 - * Add VictorMax VR helment support.
16899 - *
16900 - * Revision 1.13  1994/06/24  17:01:28  john
16901 - * Add VFX support; Took Game Sequencing, like EndGame and stuff and
16902 - * took it out of game.c and into gameseq.c
16903 - *
16904 - * Revision 1.12  1994/04/20  20:30:03  john
16905 - * *** empty log message ***
16906 - *
16907 - * Revision 1.11  1994/03/30  21:12:05  yuan
16908 - * Use only 119 lines (saves 3 scanlines)
16909 - *
16910 - * Revision 1.10  1994/03/17  16:49:37  john
16911 - * *** empty log message ***
16912 - *
16913 - * Revision 1.9  1994/02/11  15:07:44  matt
16914 - * Added extern of Canv_game_offscrn
16915 - *
16916 - * Revision 1.8  1994/01/31  16:52:43  john
16917 - * redid cockpit bounds.
16918 - *
16919 - * Revision 1.7  1994/01/26  18:13:53  john
16920 - * Changed 3d constants..
16921 - *
16922 - * Revision 1.6  1994/01/25  17:11:46  john
16923 - * *** empty log message ***
16924 - *
16925 - * Revision 1.5  1994/01/25  11:43:25  john
16926 - * Changed game window size.
16927 - *
16928 - * Revision 1.4  1993/12/13  16:32:39  yuan
16929 - * Fixed menu system memory errors, and other bugs.
16930 - *
16931 - * Revision 1.3  1993/12/10  16:07:23  yuan
16932 - * Working on menu system.  Updated the title screen.
16933 - *
16934 - * Revision 1.2  1993/12/09  21:27:46  matt
16935 - * Added 3d window sizing constants
16936 - *
16937 - * Revision 1.1  1993/12/06  09:50:33  matt
16938 - * Initial revision
16939
16940 ------------------------------------------------------------------------
16941 main/segment.h:
16942
16943 - * Revision 1.4  1995/11/03  12:53:11  allender
16944 - * shareware changes
16945 - *
16946 - * Revision 1.3  1995/07/26  16:53:45  allender
16947 - * put sides and segment structure back the PC way for checksumming reasons
16948 - *
16949 - * Revision 1.2  1995/06/19  07:55:22  allender
16950 - * rearranged structure members for possible better alignment
16951 - *
16952 - * Revision 1.1  1995/05/16  16:02:22  allender
16953 - * Initial revision
16954 - *
16955 - * Revision 2.1  1995/03/20  18:15:22  john
16956 - * Added code to not store the normals in the segment structure.
16957 - *
16958 - * Revision 2.0  1995/02/27  11:26:49  john
16959 - * New version 2.0, which has no anonymous unions, builds with
16960 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
16961 - *
16962 - * Revision 1.89  1995/01/24  15:07:55  yuan
16963 - * *** empty log message ***
16964 - *
16965 - * Revision 1.88  1994/12/12  01:04:06  yuan
16966 - * Boosted MAX_GAME_VERTS.
16967 - *
16968 - * Revision 1.87  1994/12/11  16:18:14  mike
16969 - * add constants so we can detect too-large mines for game while in editor.
16970 - *
16971 - * Revision 1.86  1994/12/08  15:07:29  yuan
16972 - * *** empty log message ***
16973 - *
16974 - * Revision 1.85  1994/12/01  21:06:39  matt
16975 - * Moved plane tolerance constant to gameseg.c, the only file that used it.
16976 - *
16977 - * Revision 1.84  1994/11/27  14:01:41  matt
16978 - * Fixed segment structure so LVLs work
16979 - *
16980 - * Revision 1.83  1994/11/26  22:50:20  matt
16981 - * Removed editor-only fields from segment structure when editor is compiled
16982 - * out, and padded segment structure to even multiple of 4 bytes.
16983 - *
16984 - * Revision 1.82  1994/11/21  11:43:36  mike
16985 - * smaller segment and vertex buffers.
16986 - *
16987 - * Revision 1.81  1994/11/17  11:39:35  matt
16988 - * Ripped out code to load old mines
16989 - *
16990 - * Revision 1.80  1994/10/30  14:12:05  mike
16991 - * rip out local segments stuff.
16992 - *
16993 - * Revision 1.79  1994/10/27  11:33:58  mike
16994 - * lower number of segments by 100, saving 116K.
16995 - *
16996 - * Revision 1.78  1994/08/25  21:54:50  mike
16997 - * Add macro IS_CHILD to make checking for the presence of a child centralized.
16998 - *
16999 - * Revision 1.77  1994/08/11  18:58:16  mike
17000 - * Add prototype for Side_to_verts_int.
17001 - *
17002 - * Revision 1.76  1994/08/01  11:04:13  yuan
17003 - * New materialization centers.
17004 - *
17005 - * Revision 1.75  1994/07/25  00:04:19  matt
17006 - * Various changes to accomodate new 3d, which no longer takes point numbers
17007 - * as parms, and now only takes pointers to points.
17008 - *
17009 - * Revision 1.74  1994/07/21  19:01:30  mike
17010 - * new lsegment structure.
17011 - *
17012 - * Revision 1.73  1994/06/08  14:30:48  matt
17013 - * Added static_light field to segment structure, and padded side struct
17014 - * to be longword aligned.
17015 - *
17016 - * Revision 1.72  1994/05/19  23:25:17  mike
17017 - * Change MINE_VERSION to 15, DEFAULT_LIGHTING to 0
17018 - *
17019 - * Revision 1.71  1994/05/12  14:45:54  mike
17020 - * New segment data structure (!!), group, special, object, value = short.
17021 - *
17022 - * Revision 1.70  1994/05/03  11:06:46  mike
17023 - * Remove constants VMAG and UMAG which are editor specific..
17024 - *
17025 - * Revision 1.69  1994/04/18  10:40:28  yuan
17026 - * Increased segment limit to 1000
17027 - * (From 500)
17028
17029 ------------------------------------------------------------------------
17030 main/segpoint.h:
17031
17032 - * Revision 1.1  1995/05/16  16:02:38  allender
17033 - * Initial revision
17034 - *
17035 - * Revision 2.0  1995/02/27  11:26:54  john
17036 - * New version 2.0, which has no anonymous unions, builds with
17037 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17038 - *
17039 - * Revision 1.2  1994/02/16  17:14:40  matt
17040 - * Added include of 3d.h
17041 - *
17042 - * Revision 1.1  1993/12/06  09:51:37  matt
17043 - * Initial revision
17044
17045 ------------------------------------------------------------------------
17046 main/slew.c:
17047
17048 - * Revision 1.1  1995/05/16  15:30:57  allender
17049 - * Initial revision
17050 - *
17051 - * Revision 2.0  1995/02/27  11:29:32  john
17052 - * New version 2.0, which has no anonymous unions, builds with
17053 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17054 - *
17055 - * Revision 1.34  1995/02/22  14:23:28  allender
17056 - * remove anonymous unions from object structure
17057 - *
17058 - * Revision 1.33  1995/02/22  13:24:26  john
17059 - * Removed the vecmat anonymous unions.
17060 - *
17061 - * Revision 1.32  1994/09/10  15:46:42  john
17062 - * First version of new keyboard configuration.
17063 - *
17064 - * Revision 1.31  1994/08/31  18:29:58  matt
17065 - * Made slew work with new key system
17066 - *
17067 - * Revision 1.30  1994/08/31  14:10:48  john
17068 - * Made slew go faster.
17069 - *
17070 - * Revision 1.29  1994/08/29  19:16:38  matt
17071 - * Made slew object not have physics movement type, so slew objects don't
17072 - * get bumped.
17073 - *
17074 - * Revision 1.28  1994/08/24  18:59:59  john
17075 - * Changed key_down_time to return fixed seconds instead of
17076 - * milliseconds.
17077 - *
17078 - * Revision 1.27  1994/07/01  11:33:05  john
17079 - * Fixed bug with looking for stick even if one not present.
17080 - *
17081 - * Revision 1.26  1994/05/20  11:56:33  matt
17082 - * Cleaned up find_vector_intersection() interface
17083 - * Killed check_point_in_seg(), check_player_seg(), check_object_seg()
17084 - *
17085 - * Revision 1.25  1994/05/19  12:08:41  matt
17086 - * Use new vecmat macros and globals
17087 - *
17088 - * Revision 1.24  1994/05/14  17:16:18  matt
17089 - * Got rid of externs in source (non-header) files
17090 - *
17091 - * Revision 1.23  1994/05/03  12:26:38  matt
17092 - * Removed use of physics_info var rotvel, which wasn't used for rotational
17093 - * velocity at all.
17094 - *
17095 - * Revision 1.22  1994/02/17  11:32:34  matt
17096 - * Changes in object system
17097 - *
17098 - * Revision 1.21  1994/01/18  14:03:53  john
17099 - * made joy_get_pos use the new ints instead of
17100 - * shorts.
17101 - *
17102 - * Revision 1.20  1994/01/10  17:11:35  mike
17103 - * Add prototype for check_object_seg
17104 - *
17105 - * Revision 1.19  1994/01/05  10:53:38  john
17106 - * New object code by John.
17107 - *
17108 - * Revision 1.18  1993/12/22  15:32:50  john
17109 - * took out previos code that attempted to make
17110 - * modifiers cancel keydowntime.
17111 - *
17112 - * Revision 1.17  1993/12/22  11:41:56  john
17113 - * Made so that keydowntime recognizes editor special case!
17114 - *
17115 - * Revision 1.16  1993/12/14  18:13:52  matt
17116 - * Made slew work in editor even when game isn't in slew mode
17117 - *
17118 - * Revision 1.15  1993/12/07  23:53:39  matt
17119 - * Made slew work in editor even when game isn't in slew mode
17120 - *
17121 - * Revision 1.14  1993/12/05  22:47:49  matt
17122 - * Reworked include files in an attempt to cut down on build times
17123 - *
17124 - * Revision 1.13  1993/12/01  11:44:14  matt
17125 - * Chagned Frfract to FrameTime
17126 - *
17127 - * Revision 1.12  1993/11/08  16:21:42  john
17128 - * made stop_slew or whatever return an int
17129 - *
17130 - * Revision 1.11  1993/11/01  13:59:49  john
17131 - * more slew experiments.
17132
17133 ------------------------------------------------------------------------
17134 main/slew.h:
17135
17136 - * Revision 1.1  1995/05/16  16:03:09  allender
17137 - * Initial revision
17138 - *
17139 - * Revision 2.0  1995/02/27  11:33:05  john
17140 - * New version 2.0, which has no anonymous unions, builds with
17141 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17142 - *
17143 - * Revision 1.5  1994/12/15  16:43:58  matt
17144 - * Made slew functions compile out for release versions
17145 - *
17146 - * Revision 1.4  1994/02/17  11:32:41  matt
17147 - * Changes in object system
17148 - *
17149 - * Revision 1.3  1994/01/05  10:53:42  john
17150 - * New object code by John.
17151 - *
17152 - * Revision 1.2  1993/12/05  22:48:57  matt
17153 - * Reworked include files in an attempt to cut down on build times
17154 - *
17155 - * Revision 1.1  1993/12/05  20:20:16  matt
17156 - * Initial revision
17157
17158 ------------------------------------------------------------------------
17159 main/songs.c:
17160
17161 - * Revision 1.5  1995/11/03  12:52:59  allender
17162 - * shareware changes
17163 - *
17164 - * Revision 1.4  1995/10/18  01:51:33  allender
17165 - * fixed up stuff for redbook
17166 - *
17167 - * Revision 1.3  1995/10/17  13:13:44  allender
17168 - * dont' add resource value to songs to play -- now done in digi
17169 - * code
17170 - *
17171 - * Revision 1.2  1995/07/17  08:50:35  allender
17172 - * make work with new music system
17173 - *
17174 - * Revision 1.1  1995/05/16  15:31:05  allender
17175 - * Initial revision
17176 - *
17177 - * Revision 2.1  1995/05/02  16:15:21  john
17178 - * Took out printf.
17179 - *
17180 - * Revision 2.0  1995/02/27  11:27:13  john
17181 - * New version 2.0, which has no anonymous unions, builds with
17182 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17183 - *
17184 - * Revision 1.2  1995/02/11  12:42:12  john
17185 - * Added new song method, with FM bank switching..
17186 - *
17187 - * Revision 1.1  1995/02/11  10:20:33  john
17188 - * Initial revision
17189
17190 ------------------------------------------------------------------------
17191 main/songs.h:
17192
17193 - * Revision 2.0  1995/02/27  11:30:52  john
17194 - * New version 2.0, which has no anonymous unions, builds with
17195 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17196 - *
17197 - * Revision 1.6  1995/02/11  22:21:44  adam
17198 - * *** empty log message ***
17199 - *
17200 - * Revision 1.5  1995/02/11  19:10:49  adam
17201 - * *** empty log message ***
17202 - *
17203 - * Revision 1.4  1995/02/11  18:34:40  adam
17204 - * *** empty log message ***
17205 - *
17206 - * Revision 1.3  1995/02/11  18:04:51  adam
17207 - * upped songs
17208 - *
17209 - * Revision 1.2  1995/02/11  12:42:12  john
17210 - * Added new song method, with FM bank switching..
17211 - *
17212 - * Revision 1.1  1995/02/11  10:20:18  john
17213 - * Initial revision
17214
17215 ------------------------------------------------------------------------
17216 main/sounds.h:
17217
17218 - * Revision 1.1  1995/05/16  16:03:32  allender
17219 - * Initial revision
17220 - *
17221 - * Revision 2.0  1995/02/27  11:27:32  john
17222 - * New version 2.0, which has no anonymous unions, builds with
17223 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17224 - *
17225 - * Revision 1.41  1995/02/03  17:08:28  john
17226 - * Changed sound stuff to allow low memory usage.
17227 - * Also, changed so that Sounds isn't an array of digi_sounds, it
17228 - * is a ubyte pointing into GameSounds, this way the digi.c code that
17229 - * locks sounds won't accidentally unlock a sound that is already playing, but
17230 - * since it's Sounds[soundno] is different, it would erroneously be unlocked.
17231 - *
17232 - * Revision 1.40  1995/01/30  21:45:17  adam
17233 - * added weapon change sounds
17234 - *
17235 - * Revision 1.39  1995/01/30  21:11:57  mike
17236 - * Use new weapon selection sounds, different for primary and secondary.
17237 - *
17238 - * Revision 1.38  1995/01/26  17:02:58  mike
17239 - * make fusion cannon have more chrome, make fusion, mega rock you!
17240 - *
17241 - * Revision 1.37  1995/01/18  19:46:15  matt
17242 - * Added sound for invulnerability wearing off, and voice message for cheating
17243 - *
17244 - * Revision 1.36  1995/01/18  19:05:04  john
17245 - * Increased MAX_SOUNDS.
17246 - *
17247 - * Revision 1.35  1994/12/14  16:57:08  adam
17248 - * *** empty log message ***
17249 - *
17250 - * Revision 1.34  1994/12/08  21:31:40  adam
17251 - * *** empty log message ***
17252 - *
17253 - * Revision 1.33  1994/12/08  12:33:01  mike
17254 - * make boss dying more interesting.
17255 - *
17256 - * Revision 1.32  1994/12/04  21:39:40  matt
17257 - * Added sound constants for endlevel explosions
17258 - *
17259 - * Revision 1.31  1994/11/30  14:02:58  mike
17260 - * see/claw/attack sounds.
17261 - *
17262 - * Revision 1.30  1994/11/29  20:43:54  matt
17263 - * Deleted a bunch of unused constants
17264 - *
17265 - * Revision 1.29  1994/11/29  15:48:11  matt
17266 - * Cleaned up, & added new sounds
17267 - *
17268 - * Revision 1.28  1994/11/29  14:35:36  adam
17269 - * moved lava noise index
17270 - *
17271 - * Revision 1.27  1994/11/29  13:23:30  matt
17272 - * Cleaned up sound constants
17273 - *
17274 - * Revision 1.26  1994/11/29  13:01:04  rob
17275 - * ADded badass explosion define.
17276 - *
17277 - * Revision 1.25  1994/11/29  11:34:23  rob
17278 - * Added new HUD sounds.
17279 - *
17280 - * Revision 1.24  1994/11/15  16:52:01  mike
17281 - * hiss sound placeholder.
17282 - *
17283 - * Revision 1.23  1994/10/25  16:21:45  adam
17284 - * changed homing sound
17285 - *
17286 - * Revision 1.22  1994/10/23  00:27:34  matt
17287 - * Made exploding wall do one long sound, instead of lots of small ones
17288 - *
17289 - * Revision 1.21  1994/10/22  14:12:35  mike
17290 - * Add sound for missile tracking player.
17291 - *
17292 - * Revision 1.20  1994/10/11  12:25:21  matt
17293 - * Added "hot rocks" that create badass explosion when hit by weapons
17294 - *
17295 - * Revision 1.19  1994/10/10  20:57:50  matt
17296 - * Added sound for exploding wall (hostage door)
17297 - *
17298 - * Revision 1.18  1994/10/04  15:33:31  john
17299 - * Took out the old PLAY_SOUND??? code and replaced it
17300 - * with direct calls into digi_link_??? so that all sounds
17301 - * can be made 3d.
17302 - *
17303 - * Revision 1.17  1994/09/29  21:13:41  john
17304 - * Added Master volumes for digi and midi. Also took out panning,
17305 - * because it doesn't work with MasterVolume stuff.
17306 - *
17307 - * Revision 1.16  1994/09/29  00:42:29  matt
17308 - * Made hitting a locked door play a sound
17309 - *
17310 - * Revision 1.15  1994/09/20  19:14:34  john
17311 - * Massaged the sound system; used a better formula for determining
17312 - * which l/r balance, also, put in Mike's stuff that searches for a connection
17313 - * between the 2 sounds' segments, stopping for closed doors, etc.
17314 - *
17315 - * Revision 1.14  1994/07/06  15:23:59  john
17316 - * Revamped hostage sound.
17317 - *
17318 - * Revision 1.13  1994/06/21  19:13:27  john
17319 - * *** empty log message ***
17320 - *
17321 - * Revision 1.12  1994/06/21  12:09:54  adam
17322 - * *** empty log message ***
17323 - *
17324 - * Revision 1.11  1994/06/21  12:03:15  john
17325 - * Added more sounds.
17326 - *
17327 - * Revision 1.10  1994/06/20  22:01:54  matt
17328 - * Added prototype for Play3D()
17329 - *
17330 - * Revision 1.9  1994/06/20  21:06:06  yuan
17331 - * Fixed up menus.
17332 - *
17333 - * Revision 1.8  1994/06/17  12:21:54  mike
17334 - * Hook for robot hits player.
17335 - *
17336 - * Revision 1.7  1994/06/15  19:01:35  john
17337 - * Added the capability to make 3d sounds play just once for the
17338 - * laser hit wall effects.
17339 - *
17340 - * Revision 1.6  1994/06/08  11:43:03  john
17341 - * Enable 3D sound.
17342 - *
17343 - * Revision 1.5  1994/06/07  18:21:20  john
17344 - * Start changing sound to the new 3D system.
17345 - *
17346 - * Revision 1.4  1994/05/16  16:17:41  john
17347 - * Bunch of stuff on my Inferno Task list May16-23
17348 - *
17349 - * Revision 1.3  1994/05/09  21:11:38  john
17350 - * Sound changes; pass index instead of pointer to digi routines.
17351 - * Made laser sound cut off the last laser sound.
17352 - *
17353 - * Revision 1.2  1994/04/27  11:47:46  john
17354 - * First version.
17355 - *
17356 - * Revision 1.1  1994/04/26  10:44:36  john
17357 - * Initial revision
17358
17359 ------------------------------------------------------------------------
17360 main/state.c:
17361
17362 - * Revision 1.7  1995/10/31  10:18:25  allender
17363 - * shareware stuff
17364 - *
17365 - * Revision 1.6  1995/10/21  22:25:45  allender
17366 - * put in creator code and file type for saved games.
17367 - * put save games in players folder
17368 - *
17369 - * Revision 1.5  1995/10/20  00:51:21  allender
17370 - * close boxes and proper mouse support on save game stuff
17371 - *
17372 - * Revision 1.4  1995/10/17  13:19:02  allender
17373 - * close boxes for load and save game
17374 - *
17375 - * Revision 1.3  1995/09/18  08:09:15  allender
17376 - * made larger thumbnail and handled NULL gr_bitmap pointers
17377 - * better
17378 - *
17379 - * Revision 1.2  1995/08/14  14:36:12  allender
17380 - * change transparency to 0
17381 - *
17382 - * Revision 1.1  1995/05/16  15:31:12  allender
17383 - * Initial revision
17384 - *
17385 - * Revision 2.14  1995/05/26  16:16:10  john
17386 - * Split SATURN into define's for requiring cd, using cd, etc.
17387 - * Also started adding all the Rockwell stuff.
17388 - *
17389 - * Revision 2.13  1995/04/06  15:12:20  john
17390 - * Fixed bug with lunacy not working.
17391 - *
17392 - * Revision 2.12  1995/04/04  13:33:05  john
17393 - * Removed multiplayer save.
17394 - *
17395 - * Revision 2.11  1995/03/31  13:42:10  john
17396 - * Made saved games from the bogus saturn version read in
17397 - * correctly.
17398 - *
17399 - * Revision 2.10  1995/03/31  12:45:28  john
17400 - * Fixed bug with previous.
17401 - *
17402 - * Revision 2.9  1995/03/31  12:24:40  john
17403 - * I had changed alt_textures from a pointer to a byte. This hosed old
17404 - * saved games, so I restored it to an int.
17405 - *
17406 - * Revision 2.8  1995/03/28  11:22:47  john
17407 - * Added cheats to save file. Changed lunacy text.
17408 - *
17409 - * Revision 2.7  1995/03/27  21:41:03  john
17410 - * Added code to verify that the proper multi save file
17411 - * is used when restoring a network game.
17412 - *
17413 - * Revision 2.6  1995/03/27  18:04:18  john
17414 - * Made multi save/restore require the -multisave command line arg.
17415 - *
17416 - * Revision 2.5  1995/03/27  17:01:52  john
17417 - * Made deafult choice work better.
17418 - *
17419 - * Revision 2.4  1995/03/27  15:49:44  john
17420 - * Added slots to save games.
17421 - *
17422 - * Revision 2.3  1995/03/27  12:59:19  john
17423 - * Initial version of multiplayer save games.
17424 - *
17425 - * Revision 2.2  1995/03/24  13:11:35  john
17426 - * Added save game during briefing screens.
17427 - *
17428 - * Revision 2.1  1995/03/21  14:38:36  john
17429 - * Ifdef'd out the NETWORK code.
17430 - *
17431 - * Revision 2.0  1995/02/27  11:27:00  john
17432 - * New version 2.0, which has no anonymous unions, builds with
17433 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17434 - *
17435 - * Revision 1.43  1995/02/22  14:32:41  allender
17436 - * remove anonymous unions from object structure
17437 - *
17438 - * Revision 1.42  1995/02/13  20:34:33  john
17439 - * Lintized
17440 - *
17441 - * Revision 1.41  1995/02/13  10:37:30  john
17442 - * Saved Buggin' cheat mode to save file.
17443 - *
17444 - * Revision 1.40  1995/02/09  10:24:25  john
17445 - * *** empty log message ***
17446 - *
17447 - * Revision 1.39  1995/02/09  10:22:20  john
17448 - * Fixed bug with callsign getting trashed if you copy somebody else
17449 - * 's save game file into your directory.
17450 - *
17451 - * Revision 1.38  1995/02/08  21:01:27  john
17452 - * Closed state file around the code that shows briefing screens so that the
17453 - * code works on machines with clean boot with only 5 file handles.
17454 - *
17455 - * Revision 1.37  1995/02/07  14:02:33  john
17456 - * Added code to verify game restore.
17457 - *
17458 - * Revision 1.36  1995/02/07  11:07:43  john
17459 - * Added hooks for confirm on game state restore.
17460 - *
17461 - * Revision 1.35  1995/02/03  11:27:36  john
17462 - * Made inbetween level save's thumbnail's have correct aspect.
17463 - *
17464 - * Revision 1.34  1995/02/03  10:58:43  john
17465 - * Added code to save shareware style saved games into new format...
17466 - * Also, made new player file format not have the saved game array in it.
17467 - *
17468 - * Revision 1.33  1995/02/02  19:40:52  john
17469 - * Added 10 save game slots.
17470 - *
17471 - * Revision 1.32  1995/02/02  12:23:20  john
17472 - * Made between level saves have picture.
17473 - *
17474 - * Revision 1.31  1995/01/31  11:21:43  john
17475 - * Added code for fixed with menus.
17476 - *
17477 - * Revision 1.30  1995/01/29  21:37:29  mike
17478 - * initialize variables on game load so you don't drain your energy when you fire.
17479 - *
17480 - * Revision 1.29  1995/01/29  13:47:58  mike
17481 - * Restore some variables on game load (in game).
17482 - *
17483 - * Revision 1.28  1995/01/26  10:46:57  john
17484 - * Fixed bug with state names getting hosed.
17485 - *
17486 - * Revision 1.27  1995/01/26  09:51:23  john
17487 - * Fixed bug with game descriptions getting hosed.
17488 - *
17489 - * Revision 1.26  1995/01/25  16:35:49  john
17490 - * Made so that when you hit enter during
17491 - * game save, -empty- goes away.
17492 - *
17493 - * Revision 1.25  1995/01/25  15:01:39  john
17494 - * Upped the save file version.
17495 - *
17496 - * Revision 1.24  1995/01/24  20:35:35  john
17497 - * *** empty log message ***
17498 - *
17499 - * Revision 1.23  1995/01/24  20:34:24  john
17500 - * Fixed bug with player stats not being set right for in
17501 - * between level saves.
17502 - *
17503 - * Revision 1.22  1995/01/23  10:39:03  john
17504 - * Added mission stuff to game saves.
17505 - *
17506 - * Revision 1.21  1995/01/22  16:07:12  mike
17507 - * localization.
17508 - *
17509 - * Revision 1.20  1995/01/22  15:58:32  mike
17510 - * localization
17511 - *
17512 - * Revision 1.19  1995/01/20  11:04:40  john
17513 - * Upped state save version.
17514 - *
17515 - * Revision 1.18  1995/01/19  17:00:44  john
17516 - * Made save game work between levels.
17517 - *
17518 - * Revision 1.17  1995/01/17  14:27:33  john
17519 - * *** empty log message ***
17520 - *
17521 - * Revision 1.16  1995/01/17  13:36:37  john
17522 - * Moved pig loading into StartNewLevelSub.
17523 - *
17524 - * Revision 1.15  1995/01/16  16:53:38  john
17525 - * Added code to save cheat state during save game.
17526 - *
17527 - * Revision 1.14  1995/01/15  16:55:22  john
17528 - * Improved mine texture parsing.
17529 - *
17530 - * Revision 1.13  1995/01/12  10:45:15  john
17531 - * Added difficulty level to save/restore game.
17532 - *
17533 - * Revision 1.12  1995/01/05  15:46:55  john
17534 - * Made weapons not rearm when starting a saved game.
17535 - *
17536 - * Revision 1.11  1995/01/05  11:51:45  john
17537 - * Added better Abort game menu.
17538 - * Made save state return success or nopt.
17539 - *
17540 - * Revision 1.10  1995/01/05  11:34:51  john
17541 - * Took out endlevel save stuff for registered.
17542 - *
17543 - * Revision 1.9  1995/01/04  18:19:52  john
17544 - * Added automap visited list saving.
17545 - *
17546 - * Revision 1.8  1995/01/04  17:29:56  john
17547 - * Made save/restore ALT+F?. Also made them not work
17548 - * in network mode, and if recording a demo, will
17549 - * quit recording.
17550 - *
17551 - * Revision 1.7  1995/01/04  13:18:31  john
17552 - * Added cool 6 game save.
17553 - *
17554 - * Revision 1.6  1995/01/03  20:38:46  john
17555 - * Saved morph objects.
17556 - *
17557 - * Revision 1.5  1995/01/03  20:19:29  john
17558 - * Pretty good working version of game save.
17559 - *
17560 - * Revision 1.4  1995/01/03  14:18:18  matt
17561 - * ifdefs added to compile code add.  Added by Mike, I think.
17562 - *
17563 - * Revision 1.3  1994/12/29  18:40:19  john
17564 - * Initial version.
17565 - *
17566 - * Revision 1.2  1994/12/29  15:26:40  john
17567 - * Put in hooks for saving/restoring game state.
17568 - *
17569 - * Revision 1.1  1994/12/29  15:16:02  john
17570 - * Initial revision
17571
17572 ------------------------------------------------------------------------
17573 main/state.h:
17574
17575 - * Revision 1.1  1995/05/16  16:03:40  allender
17576 - * Initial revision
17577 - *
17578 - * Revision 2.1  1995/03/27  21:40:35  john
17579 - * Added code to verify that the proper multi save file
17580 - * is used when restoring a network game.
17581 - *
17582 - * Revision 2.0  1995/02/27  11:28:44  john
17583 - * New version 2.0, which has no anonymous unions, builds with
17584 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17585 - *
17586 - * Revision 1.6  1995/02/07  10:54:05  john
17587 - * *** empty log message ***
17588 - *
17589 - * Revision 1.5  1995/02/03  10:58:12  john
17590 - * Added code to save shareware style saved games into new format...
17591 - * Also, made new player file format not have the saved game array in it.
17592 - *
17593 - * Revision 1.4  1995/01/19  17:00:51  john
17594 - * Made save game work between levels.
17595 - *
17596 - * Revision 1.3  1995/01/05  11:51:44  john
17597 - * Added better Abort game menu.
17598 - * Made save state return success or nopt.
17599 - *
17600 - * Revision 1.2  1994/12/29  15:26:39  john
17601 - * Put in hooks for saving/restoring game state.
17602 - *
17603 - * Revision 1.1  1994/12/29  15:15:47  john
17604 - * Initial revision
17605
17606 ------------------------------------------------------------------------
17607 main/switch.c:
17608
17609 - * Revision 1.2  1995/10/31  10:18:10  allender
17610 - * shareware stuff
17611 - *
17612 - * Revision 1.1  1995/05/16  15:31:21  allender
17613 - * Initial revision
17614 - *
17615 - * Revision 2.1  1995/03/21  14:39:08  john
17616 - * Ifdef'd out the NETWORK code.
17617 - *
17618 - * Revision 2.0  1995/02/27  11:28:41  john
17619 - * New version 2.0, which has no anonymous unions, builds with
17620 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17621 - *
17622 - * Revision 1.51  1995/01/31  15:26:23  rob
17623 - * Don't trigger matcens in anarchy games.
17624 - *
17625 - * Revision 1.50  1995/01/26  12:18:26  rob
17626 - * Changed network_do_frame call.
17627 - *
17628 - * Revision 1.49  1995/01/18  18:50:35  allender
17629 - * don't process triggers if in demo playback mode.  Fix for Rob to only do
17630 - * multi_send_endlevel_start if in multi player game
17631 - *
17632 - * Revision 1.48  1995/01/13  11:59:40  rob
17633 - * Added palette fade after secret level exit.
17634 - *
17635 - * Revision 1.47  1995/01/12  17:00:41  rob
17636 - * Fixed a problem with switches and secret levels.
17637 - *
17638 - * Revision 1.46  1995/01/12  13:35:11  rob
17639 - * Added data flush after secret level exit.
17640 - *
17641 - * Revision 1.45  1995/01/03  15:25:11  rob
17642 - * Fixed a compile error.
17643 - *
17644 - * Revision 1.44  1995/01/03  15:12:02  rob
17645 - * Adding multiplayer switching.
17646 - *
17647 - * Revision 1.43  1994/11/29  16:52:12  yuan
17648 - * Removed some obsolete commented out code.
17649 - *
17650 - * Revision 1.42  1994/11/27  23:15:07  matt
17651 - * Made changes for new mprintf calling convention
17652 - *
17653 - * Revision 1.41  1994/11/22  18:36:45  rob
17654 - * Added new hook for endlevel for secret doors.
17655 - *
17656 - * Revision 1.40  1994/11/21  17:29:43  matt
17657 - * Cleaned up sequencing & game saving for secret levels
17658 - *
17659 - * Revision 1.39  1994/11/19  15:20:32  mike
17660 - * rip out unused code and data
17661 - *
17662 - * Revision 1.38  1994/10/25  16:09:52  yuan
17663 - * Fixed byte bug.
17664 - *
17665 - * Revision 1.37  1994/10/24  16:05:28  matt
17666 - * Removed clear of fuelcen_control_center_destroyed
17667 - *
17668 - * Revision 1.36  1994/10/08  14:21:13  matt
17669 - * Added include
17670 - *
17671 - * Revision 1.35  1994/10/07  12:34:09  matt
17672 - * Added code fot going to/from secret levels
17673 - *
17674 - * Revision 1.34  1994/10/05  15:16:10  rob
17675 - * Used to be that only player #0 could trigger switches, now only the
17676 - * LOCAL player can do it (and he's expected to tell the other guy with
17677 - * a com message if its important!)
17678 - *
17679 - * Revision 1.33  1994/09/24  17:42:03  mike
17680 - * Kill temporary version of function written by Yuan, replaced by MK.
17681 - *
17682 - * Revision 1.32  1994/09/24  17:10:00  yuan
17683 - * Added Matcen triggers.
17684 - *
17685 - * Revision 1.31  1994/09/23  18:02:21  yuan
17686 - * Completed wall checking.
17687 - *
17688 - * Revision 1.30  1994/08/19  20:09:41  matt
17689 - * Added end-of-level cut scene with external scene
17690 - *
17691 - * Revision 1.29  1994/08/18  10:47:36  john
17692 - * Cleaned up game sequencing and player death stuff
17693 - * in preparation for making the player explode into
17694 - * pieces when dead.
17695 - *
17696 - * Revision 1.28  1994/08/12  22:42:11  john
17697 - * Took away Player_stats; added Players array.
17698 - *
17699 - * Revision 1.27  1994/07/02  13:50:44  matt
17700 - * Cleaned up includes
17701 - *
17702 - * Revision 1.26  1994/06/27  16:32:25  yuan
17703 - * Commented out incomplete code...
17704 - *
17705 - * Revision 1.25  1994/06/27  15:53:27  john
17706 - * #define'd out the newdemo stuff
17707 - *
17708 - *
17709 - * Revision 1.24  1994/06/27  15:10:04  yuan
17710 - * Might mess up triggers.
17711 - *
17712 - * Revision 1.23  1994/06/24  17:01:43  john
17713 - * Add VFX support; Took Game Sequencing, like EndGame and stuff and
17714 - * took it out of game.c and into gameseq.c
17715 - *
17716 - * Revision 1.22  1994/06/16  16:20:15  john
17717 - * Made player start out in physics mode; Neatend up game loop a bit.
17718 - *
17719 - * Revision 1.21  1994/06/15  14:57:22  john
17720 - * Added triggers to demo recording.
17721 - *
17722 - * Revision 1.20  1994/06/10  17:44:25  mike
17723 - * Assert on result of find_connect_side == -1
17724 - *
17725 - * Revision 1.19  1994/06/08  10:20:15  yuan
17726 - * Removed unused testing.
17727 - *
17728 - *
17729 - * Revision 1.18  1994/06/07  13:10:48  yuan
17730 - * Fixed bug in check trigger... Still working on other bugs.
17731 - *
17732 - * Revision 1.17  1994/05/30  20:22:04  yuan
17733 - * New triggers.
17734 - *
17735 - * Revision 1.16  1994/05/27  10:32:46  yuan
17736 - * New dialog boxes (Walls and Triggers) added.
17737 - *
17738 - *
17739 - * Revision 1.15  1994/05/25  18:06:46  yuan
17740 - * Making new dialog box controls for walls and triggers.
17741 - *
17742 - * Revision 1.14  1994/05/10  19:05:32  yuan
17743 - * Made end of level flag rather than menu popping up
17744 - *
17745 - * Revision 1.13  1994/04/29  15:05:25  yuan
17746 - * Added menu pop-up at exit trigger.
17747
17748 ------------------------------------------------------------------------
17749 main/switch.h:
17750
17751 - * Revision 1.1  1995/05/16  16:03:48  allender
17752 - * Initial revision
17753 - *
17754 - * Revision 2.0  1995/02/27  11:26:52  john
17755 - * New version 2.0, which has no anonymous unions, builds with
17756 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17757 - *
17758 - * Revision 1.19  1995/01/12  17:00:36  rob
17759 - * Fixed a problem with switches and secret levels.
17760 - *
17761 - * Revision 1.18  1994/10/06  21:24:40  matt
17762 - * Added switch for exit to secret level
17763 - *
17764 - * Revision 1.17  1994/09/29  17:05:52  matt
17765 - * Removed unused constant
17766 - *
17767 - * Revision 1.16  1994/09/24  17:10:07  yuan
17768 - * Added Matcen triggers.
17769 - *
17770 - * Revision 1.15  1994/08/15  18:06:39  yuan
17771 - * Added external trigger.
17772 - *
17773 - * Revision 1.14  1994/06/16  16:20:52  john
17774 - * Made player start out in physics mode; Neatend up game loop a bit.
17775 - *
17776 - * Revision 1.13  1994/05/30  20:22:08  yuan
17777 - * New triggers.
17778 - *
17779 - * Revision 1.12  1994/05/27  10:32:44  yuan
17780 - * New dialog boxes (Walls and Triggers) added.
17781 - *
17782 - *
17783 - * Revision 1.11  1994/05/25  18:06:32  yuan
17784 - * Making new dialog box controls for walls and triggers.
17785 - *
17786 - * Revision 1.10  1994/04/28  18:04:40  yuan
17787 - * Gamesave added.
17788 - * Trigger problem fixed (seg pointer is replaced by index now.)
17789 - *
17790 - * Revision 1.9  1994/04/26  11:19:01  yuan
17791 - * Make it so a trigger can only be triggered every 5 seconds.
17792
17793 ------------------------------------------------------------------------
17794 main/terrain.c:
17795
17796 - * Revision 1.1  1995/05/16  15:31:29  allender
17797 - * Initial revision
17798 - *
17799 - * Revision 2.0  1995/02/27  11:31:27  john
17800 - * New version 2.0, which has no anonymous unions, builds with
17801 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17802 - *
17803 - * Revision 1.12  1994/12/03  00:18:00  matt
17804 - * Made endlevel sequence cut off early
17805 - * Made exit model and bit explosion always plot last (after all terrain)
17806 - *
17807 - * Revision 1.11  1994/11/27  23:13:46  matt
17808 - * Made changes for new mprintf calling convention
17809 - *
17810 - * Revision 1.10  1994/11/21  18:04:36  matt
17811 - * Fixed alloc/free problem with height array
17812 - *
17813 - * Revision 1.9  1994/11/21  17:30:42  matt
17814 - * Properly free light array
17815 - *
17816 - * Revision 1.8  1994/11/19  12:40:55  matt
17817 - * Added system to read endlevel data from file, and to make it work
17818 - * with any exit tunnel.
17819 - *
17820 - * Revision 1.7  1994/11/16  11:49:44  matt
17821 - * Added code to rotate terrain to match mine
17822 - *
17823 - * Revision 1.6  1994/11/02  16:22:59  matt
17824 - * Killed mprintf
17825 - *
17826 - * Revision 1.5  1994/10/30  20:09:19  matt
17827 - * For endlevel: added big explosion at tunnel exit; made lights in tunnel
17828 - * go out; made more explosions on walls.
17829 - *
17830 - * Revision 1.4  1994/10/27  21:15:07  matt
17831 - * Added better error handling
17832 - *
17833 - * Revision 1.3  1994/10/27  01:03:17  matt
17834 - * Made terrain renderer use aribtary point in height array as origin
17835 - *
17836 - * Revision 1.2  1994/08/19  20:09:44  matt
17837 - * Added end-of-level cut scene with external scene
17838 - *
17839 - * Revision 1.1  1994/08/17  20:20:49  matt
17840 - * Initial revision
17841
17842 ------------------------------------------------------------------------
17843 main/terrain.h:
17844
17845 - * Revision 1.1  1995/05/16  16:03:56  allender
17846 - * Initial revision
17847 - *
17848 - * Revision 2.0  1995/02/27  11:32:53  john
17849 - * New version 2.0, which has no anonymous unions, builds with
17850 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17851 - *
17852 - * Revision 1.3  1994/10/27  01:03:51  matt
17853 - * Made terrain renderer use aribtary point in height array as origin
17854 - *
17855 - * Revision 1.2  1994/08/19  20:09:45  matt
17856 - * Added end-of-level cut scene with external scene
17857 - *
17858 - * Revision 1.1  1994/08/17  20:33:36  matt
17859 - * Initial revision
17860
17861 ------------------------------------------------------------------------
17862 main/texmerge.c:
17863
17864 - * Revision 1.1  1995/05/16  15:31:36  allender
17865 - * Initial revision
17866 - *
17867 - * Revision 2.0  1995/02/27  11:31:08  john
17868 - * New version 2.0, which has no anonymous unions, builds with
17869 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17870 - *
17871 - * Revision 1.28  1995/01/14  19:16:56  john
17872 - * First version of new bitmap paging code.
17873 - *
17874 - * Revision 1.27  1994/12/14  18:21:58  yuan
17875 - * *** empty log message ***
17876 - *
17877 - * Revision 1.26  1994/12/13  09:50:08  john
17878 - * Added Asserts to stop if wall looks like door.
17879 - *
17880 - * Revision 1.25  1994/12/07  00:35:24  mike
17881 - * change how flat shading average color is computed for paste-ons.
17882 - *
17883 - * Revision 1.24  1994/11/19  15:20:29  mike
17884 - * rip out unused code and data
17885 - *
17886 - * Revision 1.23  1994/11/12  16:38:51  mike
17887 - * deal with avg_color in texture merging.
17888 - *
17889 - * Revision 1.22  1994/11/09  19:55:39  john
17890 - * Added full rle support with texture rle caching.
17891 - *
17892 - * Revision 1.21  1994/10/20  15:21:16  john
17893 - * Took out the texmerge caching.
17894 - *
17895 - * Revision 1.20  1994/10/10  19:00:57  john
17896 - * Made caching info print every 1000 frames.
17897 - *
17898 - * Revision 1.19  1994/10/10  18:41:21  john
17899 - * Printed out texture caching info.
17900 - *
17901 - * Revision 1.18  1994/08/11  18:59:02  mike
17902 - * Use new assembler version of merge functions.
17903 - *
17904 - * Revision 1.17  1994/06/09  12:13:14  john
17905 - * Changed selectors so that all bitmaps have a selector of
17906 - * 0, but inside the texture mapper they get a selector set.
17907 - *
17908 - * Revision 1.16  1994/05/14  17:15:15  matt
17909 - * Got rid of externs in source (non-header) files
17910 - *
17911 - * Revision 1.15  1994/05/09  17:21:09  john
17912 - * Took out mprintf with cache hits/misses.
17913 - *
17914 - * Revision 1.14  1994/05/05  12:55:07  john
17915 - * Made SuperTransparency work.
17916 - *
17917 - * Revision 1.13  1994/05/04  11:15:37  john
17918 - * Added Super Transparency
17919 - *
17920 - * Revision 1.12  1994/04/28  23:36:04  john
17921 - * Took out a debugging mprintf.
17922 - *
17923 - * Revision 1.11  1994/04/22  17:44:48  john
17924 - * Made top 2 bits of paste-ons pick the
17925 - * orientation of the bitmap.
17926 - *
17927 - * Revision 1.10  1994/03/31  12:05:51  matt
17928 - * Cleaned up includes
17929 - *
17930 - * Revision 1.9  1994/03/15  16:31:52  yuan
17931 - * Cleaned up bm-loading code.
17932 - * (And structures)
17933 - *
17934 - * Revision 1.8  1994/01/24  13:15:19  john
17935 - * Made caching work with pointers, not texture numbers,
17936 - * that way, the animated textures cache.
17937 - *
17938 - * Revision 1.7  1994/01/21  16:38:10  john
17939 - * Took out debug info.
17940 - *
17941 - * Revision 1.6  1994/01/21  16:28:43  john
17942 - * added warning to print cache hit/miss.
17943 - *
17944 - * Revision 1.5  1994/01/21  16:22:30  john
17945 - * Put in caching/
17946 - *
17947 - * Revision 1.4  1994/01/21  15:34:49  john
17948 - * *** empty log message ***
17949 - *
17950 - * Revision 1.3  1994/01/21  15:33:08  john
17951 - * *** empty log message ***
17952 - *
17953 - * Revision 1.2  1994/01/21  15:15:35  john
17954 - * Created new module texmerge, that merges textures together and
17955 - * caches the results.
17956 - *
17957 - * Revision 1.1  1994/01/21  14:55:29  john
17958 - * Initial revision
17959
17960 ------------------------------------------------------------------------
17961 main/texmerge.h:
17962
17963 - * Revision 1.1  1995/05/16  16:04:03  allender
17964 - * Initial revision
17965 - *
17966 - * Revision 2.0  1995/02/27  11:28:05  john
17967 - * New version 2.0, which has no anonymous unions, builds with
17968 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17969 - *
17970 - * Revision 1.4  1995/01/14  19:16:26  john
17971 - * First version of new bitmap paging code.
17972 - *
17973 - * Revision 1.3  1994/01/21  15:23:26  john
17974 - * made texmerge_close return void.
17975 - *
17976 - *
17977 - * Revision 1.2  1994/01/21  15:16:01  john
17978 - * Created new module texmerge, that merges textures together and
17979 - * caches the results.
17980 - *
17981 - * Revision 1.1  1994/01/21  15:03:36  john
17982 - * Initial revision
17983
17984 ------------------------------------------------------------------------
17985 main/text.c:
17986
17987 - * Revision 1.1  1995/05/16  15:31:44  allender
17988 - * Initial revision
17989 - *
17990 - * Revision 2.0  1995/02/27  11:33:09  john
17991 - * New version 2.0, which has no anonymous unions, builds with
17992 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
17993 - *
17994 - * Revision 1.11  1994/12/14  12:53:23  matt
17995 - * Improved error handling
17996 - *
17997 - * Revision 1.10  1994/12/09  18:36:44  john
17998 - * Added code to make text read from hogfile.
17999 - *
18000 - * Revision 1.9  1994/12/08  20:56:34  john
18001 - * More cfile stuff.
18002 - *
18003 - * Revision 1.8  1994/12/08  17:20:06  yuan
18004 - * Cfiling stuff.
18005 - *
18006 - * Revision 1.7  1994/12/05  15:10:36  allender
18007 - * support encoded descent.tex file (descent.txb)
18008 - *
18009 - * Revision 1.6  1994/12/01  14:18:34  matt
18010 - * Now support backslash chars in descent.tex file
18011 - *
18012 - * Revision 1.5  1994/10/27  00:13:10  john
18013 - * Took out cfile.
18014 - *
18015 - * Revision 1.4  1994/07/11  15:33:49  matt
18016 - * Put in command-line switch to load different text files
18017 - *
18018 - * Revision 1.3  1994/07/10  09:56:25  yuan
18019 - * #include <stdio.h> added for FILE type.
18020 - *
18021 - * Revision 1.2  1994/07/09  22:48:14  matt
18022 - * Added localizable text
18023 - *
18024 - * Revision 1.1  1994/07/09  21:30:46  matt
18025 - * Initial revision
18026
18027 ------------------------------------------------------------------------
18028 main/text.h:
18029
18030 - * Revision 1.3  1995/10/18  23:30:29  allender
18031 - * fixed horrendous misspelling
18032 - *
18033 - * Revision 1.2  1995/10/18  23:27:33  allender
18034 - * added new printscreen line to end of text string
18035 - *
18036 - * Revision 1.1  1995/05/16  16:04:11  allender
18037 - * Initial revision
18038 - *
18039 - * Revision 2.2  1995/03/30  16:36:22  mike
18040 - * text localization.
18041 - *
18042 - * Revision 2.1  1995/03/08  15:33:24  allender
18043 - * *** empty log message ***
18044 - *
18045 - * Revision 2.0  1995/02/27  11:30:21  john
18046 - * New version 2.0, which has no anonymous unions, builds with
18047 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18048 - *
18049 - * Revision 1.63  1995/02/11  14:59:42  rob
18050 - * Added string for controlcen invul.
18051 - *
18052 - * Revision 1.62  1995/02/10  15:19:38  allender
18053 - * added text for bad write on demo write
18054 - *
18055 - * Revision 1.61  1995/02/08  10:59:11  rob
18056 - * Added string used in kill list view.
18057 - *
18058 - * Revision 1.60  1995/02/07  20:38:40  rob
18059 - * Added new localized strings for new multi options.
18060 - *
18061 - * Revision 1.59  1995/02/02  15:29:17  matt
18062 - * Changed & localized secret level text
18063 - *
18064 - * Revision 1.58  1995/02/02  12:24:14  adam
18065 - * added automap string
18066 - *
18067 - * Revision 1.57  1995/02/01  18:06:50  rob
18068 - * Localize default macros, other stuff frm network.c
18069 - *
18070 - * Revision 1.56  1995/01/30  15:29:53  rob
18071 - * Localizing.
18072 - *
18073 - * Revision 1.55  1995/01/30  13:54:25  allender
18074 - * added mission/demo text
18075 - *
18076 - * Revision 1.54  1995/01/24  22:03:22  mike
18077 - * text localization.
18078 - *
18079 - * Revision 1.53  1995/01/23  13:05:59  adam
18080 - * added save/load game text
18081 - *
18082 - * Revision 1.52  1995/01/22  15:58:42  mike
18083 - * localization
18084 - *
18085 - * Revision 1.51  1994/12/29  12:08:47  rob
18086 - * removed new text strings.
18087 - *
18088 - * Revision 1.50  1994/12/28  16:47:14  rob
18089 - * Added new com setup strings.
18090 - *
18091 - * Revision 1.49  1994/12/15  23:24:22  rob
18092 - * Added string for rejoin failure.
18093 - *
18094 - * Revision 1.48  1994/12/15  10:16:06  adam
18095 - * added lame trademark notice
18096 - *
18097 - * Revision 1.47  1994/12/14  18:21:23  yuan
18098 - * *** empty log message ***
18099 - *
18100 - * Revision 1.46  1994/12/14  16:57:01  matt
18101 - * Added text for hat2
18102 - *
18103 - * Revision 1.45  1994/12/14  08:50:12  allender
18104 - * *** empty log message ***
18105 - *
18106 - * Revision 1.44  1994/12/13  19:43:29  rob
18107 - * Added string.
18108 - *
18109 - * Revision 1.43  1994/12/13  12:54:45  mike
18110 - * add strings for hostages on board when you die.
18111 - *
18112 - * Revision 1.42  1994/12/13  10:04:09  allender
18113 - * *** empty log message ***
18114 - *
18115 - * Revision 1.41  1994/12/12  22:20:23  rob
18116 - * Added two new localized strings for modem.c
18117 - *
18118 - * Revision 1.40  1994/12/09  19:46:26  yuan
18119 - * Localized the sucker.
18120 - *
18121 - * Revision 1.39  1994/12/09  14:35:30  yuan
18122 - * Added localization string for Rob.
18123 - *
18124 - * Revision 1.38  1994/12/09  14:08:16  mike
18125 - * text message for remaining ships at end bonus.
18126 - *
18127 - * Revision 1.37  1994/12/09  00:28:26  rob
18128 - * Added "died in mine" string.
18129 - *
18130 - * Revision 1.36  1994/12/08  14:30:31  yuan
18131 - * Fixed off by one problem.
18132 - *
18133 - * Revision 1.35  1994/12/08  11:18:56  allender
18134 - * demo text string
18135 - *
18136 - * Revision 1.33  1994/12/07  19:14:33  matt
18137 - * Cleaned up command-line options and command-line help message
18138 - *
18139 - * Revision 1.32  1994/12/07  17:20:34  yuan
18140 - * Localization
18141 - *
18142 - * Revision 1.31  1994/12/07  16:49:15  yuan
18143 - * More localization
18144 - *
18145 - * Revision 1.30  1994/12/07  14:52:11  yuan
18146 - * Localization 492
18147 - *
18148 - * Revision 1.29  1994/12/07  11:28:12  matt
18149 - * Did a little localization support
18150 - *
18151 - * Revision 1.28  1994/12/06  18:29:31  mike
18152 - * Add text for cheat: Start at any level.
18153 - *
18154 - * Revision 1.27  1994/12/06  16:30:39  yuan
18155 - * Localization
18156 - *
18157 - * Revision 1.26  1994/12/06  15:14:55  yuan
18158 - * Fixed number of textstrings.
18159 - *
18160 - * Revision 1.25  1994/12/06  15:13:52  yuan
18161 - * Localization
18162 - *
18163 - * Revision 1.24  1994/12/06  13:46:24  adam
18164 - * *** empty log message ***
18165 - *
18166 - * Revision 1.23  1994/12/05  23:17:28  yuan
18167 - * Localization bugs fixed.
18168 - *
18169 - * Revision 1.22  1994/12/05  23:05:41  yuan
18170 - * Localization 425
18171 - *
18172 - * Revision 1.21  1994/12/05  22:42:27  rob
18173 - * Added new connect status strings
18174 - *
18175 - * Revision 1.20  1994/12/05  16:47:30  rob
18176 - * Added a new string.
18177 - *
18178 - *
18179 - * Revision 1.19  1994/12/03  22:35:17  yuan
18180 - * Localization 412
18181 - *
18182 - * Revision 1.18  1994/12/03  17:53:42  yuan
18183 - * 382.
18184
18185 ------------------------------------------------------------------------
18186 main/textures.h:
18187
18188 - * Revision 1.1  1995/05/16  16:04:20  allender
18189 - * Initial revision
18190 - *
18191 - * Revision 2.0  1995/02/27  11:31:54  john
18192 - * New version 2.0, which has no anonymous unions, builds with
18193 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18194 - *
18195 - * Revision 1.3  1994/03/15  16:32:56  yuan
18196 - * Cleaned up bm-loading code.
18197 - * (Fixed structures too)
18198 - *
18199 - * Revision 1.2  1993/12/05  22:49:53  matt
18200 - * Reworked include files in an attempt to cut down on build times
18201 - *
18202 - * Revision 1.1  1993/12/05  20:16:26  matt
18203 - * Initial revision
18204
18205 ------------------------------------------------------------------------
18206 main/titles.c:
18207
18208 - * Revision 1.13  1995/11/03  12:52:23  allender
18209 - * shareware changes
18210 - *
18211 - * Revision 1.12  1995/10/31  10:17:56  allender
18212 - * shareware stuff
18213 - *
18214 - * Revision 1.11  1995/10/24  18:12:02  allender
18215 - * don't do special processing on do_appl_quit anymore
18216 - *
18217 - * Revision 1.10  1995/10/21  22:25:02  allender
18218 - * added bald guy cheat
18219 - *
18220 - * Revision 1.9  1995/10/17  13:14:30  allender
18221 - * mouse will now move through title stuff
18222 - *
18223 - * Revision 1.8  1995/10/15  23:00:34  allender
18224 - * made mouse move through screens and do event processing
18225 - * at title screens
18226 - *
18227 - * Revision 1.7  1995/10/10  11:52:10  allender
18228 - * use appropriate end01 file for registered
18229 - *
18230 - * Revision 1.6  1995/09/24  10:53:09  allender
18231 - * added cmd-q to quit during titles screens and briefing screens
18232 - *
18233 - * Revision 1.5  1995/08/25  15:39:37  allender
18234 - * save and resotre interpolation method during briefing screens
18235 - *
18236 - * Revision 1.4  1995/08/24  16:10:57  allender
18237 - * endgame screen changes, and fixups to other stuff
18238 - *
18239 - * Revision 1.3  1995/08/14  14:40:37  allender
18240 - * fixed up briefing screens to look correct.
18241 - * made robot canvas smaller for now for speec
18242 - *
18243 - * Revision 1.2  1995/06/13  13:07:05  allender
18244 - * do a bitblt during tight loops to get spinning robots and cursor flashing
18245 - *
18246 - * Revision 1.1  1995/05/16  15:31:52  allender
18247 - * Initial revision
18248 - *
18249 - * Revision 2.10  1995/06/15  12:14:16  john
18250 - * Made end game, win game and title sequences all go
18251 - * on after 5 minutes automatically.
18252 - *
18253 - * Revision 2.9  1995/06/14  17:25:48  john
18254 - * Fixed bug with VFX palette not getting loaded for credits, titles.
18255 - *
18256 - * Revision 2.8  1995/05/26  16:16:30  john
18257 - * Split SATURN into define's for requiring cd, using cd, etc.
18258 - * Also started adding all the Rockwell stuff.
18259 - *
18260 - * Revision 2.7  1995/03/24  13:11:36  john
18261 - * Added save game during briefing screens.
18262 - *
18263 - * Revision 2.6  1995/03/21  14:41:17  john
18264 - * Ifdef'd out the NETWORK code.
18265 - *
18266 - * Revision 2.5  1995/03/15  14:33:45  john
18267 - * Added code to force the Descent CD-rom in the drive.
18268 - *
18269 - * Revision 2.4  1995/03/14  18:24:50  john
18270 - * Force Destination Saturn to use CD-ROM drive.
18271 - *
18272 - * Revision 2.3  1995/03/10  13:05:52  john
18273 - * Added code so that palette is correct for VFX1 helmets.
18274 - *
18275 - * Revision 2.2  1995/03/07  14:19:28  mike
18276 - * More destination saturn stuff.
18277 - *
18278 - * Revision 2.1  1995/03/06  15:24:16  john
18279 - * New screen techniques.
18280 - *
18281 - * Revision 2.0  1995/02/27  11:32:50  john
18282 - * New version 2.0, which has no anonymous unions, builds with
18283 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18284 - *
18285 - * Revision 1.95  1995/02/12  04:07:19  matt
18286 - * After freeing Robot_canv, set ptr to NULL
18287 - *
18288 - * Revision 1.94  1995/02/11  12:41:57  john
18289 - * Added new song method, with FM bank switching..
18290 - *
18291 - * Revision 1.93  1995/02/11  09:51:59  john
18292 - * Stripped out all SVGA references.
18293 - *
18294 - * Revision 1.92  1995/02/07  09:56:10  john
18295 - * Fixed bug with wrong title screen drawing during save btwn lvls.
18296 - *
18297 - * Revision 1.91  1995/02/04  13:53:16  john
18298 - * Added code to display the correct titles between levels
18299 - * that have robot maps..
18300 - *
18301 - * Revision 1.90  1995/02/02  16:36:33  adam
18302 - * *** empty log message ***
18303 - *
18304 - * Revision 1.89  1995/02/02  12:23:30  john
18305 - * Made between level saves have picture.
18306 - *
18307 - * Revision 1.88  1995/02/02  01:50:16  adam
18308 - * rearranged robot briefings.
18309 - *
18310 - * Revision 1.87  1995/02/01  22:28:54  mike
18311 - * *** empty log message ***
18312 - *
18313 - * Revision 1.86  1995/02/01  17:12:21  mike
18314 - * Make score come after endgame screens.
18315 - *
18316 - * Revision 1.85  1995/02/01  14:04:17  adam
18317 - * mucked with screens
18318 - *
18319 - * Revision 1.84  1995/01/28  16:59:30  adam
18320 - * added hook for special first briefing music
18321 - *
18322 - * Revision 1.83  1995/01/21  17:04:35  mike
18323 - * fix endgame text bogosity.
18324 - *
18325 - * Revision 1.82  1995/01/21  16:26:29  matt
18326 - * Made endlevel briefing work with missions
18327 - *
18328 - * Revision 1.81  1995/01/21  13:15:20  adam
18329 - * added new robot briefings.
18330 - *
18331 - * Revision 1.80  1995/01/20  22:47:33  matt
18332 - * Mission system implemented, though imcompletely
18333 - *
18334 - * Revision 1.79  1995/01/20  14:57:52  mike
18335 - * support arbitrary number of screens/level.
18336 - *
18337 - * Revision 1.78  1995/01/15  14:29:12  john
18338 - * Made the exit door page in.
18339 - *
18340 - * Revision 1.77  1995/01/15  14:27:09  adam
18341 - * messed with endgame stuff
18342 - *
18343 - * Revision 1.76  1995/01/14  15:42:49  mike
18344 - * Make endgame for registered support 3 screens.
18345 - *
18346 - * Revision 1.75  1995/01/14  14:00:59  adam
18347 - * *** empty log message ***
18348 - *
18349 - * Revision 1.74  1995/01/09  11:28:53  mike
18350 - * Support new $O thingy for bitmaps which cycle and are not the exit door.
18351 - *
18352 - * Revision 1.73  1995/01/02  12:39:13  mike
18353 - * fix secret level sequencing.
18354 - *
18355 - * Revision 1.72  1994/12/12  19:44:14  rob
18356 - * Added kill matrix to end of game sequence.
18357 - *
18358 - * Revision 1.71  1994/12/09  22:32:57  adam
18359 - * messed with text positioning
18360 - *
18361 - * Revision 1.70  1994/12/09  14:08:37  mike
18362 - * make briefing text work with hog files.
18363 - *
18364 - * Revision 1.69  1994/12/09  00:41:47  mike
18365 - * fix hang in automap print screen.
18366 - *
18367 - * Revision 1.68  1994/12/08  20:56:36  john
18368 - * More cfile stuff.
18369 - *
18370 - * Revision 1.67  1994/12/08  17:19:11  yuan
18371 - * Cfiling stuff.
18372 - *
18373 - * Revision 1.66  1994/12/07  11:28:00  matt
18374 - * Did a localization suppport
18375 - *
18376 - * Revision 1.65  1994/12/06  17:10:23  yuan
18377 - * Fixed missing )
18378 - *
18379 - * Revision 1.64  1994/12/06  17:00:45  rob
18380 - * Fixed problem with finishing the game in modem/serial mode.
18381 - *
18382 - * Revision 1.63  1994/12/06  16:58:37  matt
18383 - * Killed warnings
18384 - *
18385 - * Revision 1.62  1994/12/06  15:54:28  mike
18386 - * fix guy at end...
18387
18388 ------------------------------------------------------------------------
18389 main/titles.h:
18390
18391 - * Revision 2.0  1995/02/27  11:27:40  john
18392 - * New version 2.0, which has no anonymous unions, builds with
18393 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18394 - *
18395 - * Revision 1.12  1995/02/02  12:23:29  john
18396 - * Made between level saves have picture.
18397 - *
18398 - * Revision 1.11  1995/01/21  16:27:11  matt
18399 - * Made endlevel briefing work with missions
18400 - *
18401 - * Revision 1.10  1995/01/20  22:48:02  matt
18402 - * Mission system implemented, though imcompletely
18403 - *
18404 - * Revision 1.9  1994/12/07  19:14:07  matt
18405 - * Kill briefing screen disable switch for release version
18406 - *
18407 - * Revision 1.8  1994/11/21  16:40:24  matt
18408 - * Added prototype
18409 - *
18410 - * Revision 1.7  1994/11/05  14:05:54  john
18411 - * Fixed fade transitions between all screens by making gr_palette_fade_in and out keep
18412 - * track of whether the palette is faded in or not.  Then, wherever the code needs to fade out,
18413 - * it just calls gr_palette_fade_out and it will fade out if it isn't already.  The same with fade_in.
18414 - * This eliminates the need for all the flags like Menu_fade_out, game_fade_in palette, etc.
18415 - *
18416 - * Revision 1.6  1994/11/01  17:57:48  mike
18417 - * Briefing screens.
18418 - *
18419 - * Revision 1.5  1994/10/31  22:28:04  mike
18420 - * briefing screens
18421 - *
18422 - * Revision 1.4  1994/09/16  16:14:31  john
18423 - * Added acrade sequencing.
18424 - *
18425 - * Revision 1.3  1994/06/22  00:26:53  matt
18426 - * Added support for Interplay's animating title sequence
18427 - *
18428 - * Revision 1.2  1994/06/17  12:13:36  john
18429 - * More newdemo stuff; made editor->game transition start in slew mode.
18430 - *
18431 - * Revision 1.1  1994/06/17  10:50:12  john
18432 - * Initial revision
18433
18434 ------------------------------------------------------------------------
18435 main/vclip.c:
18436
18437 - * Revision 1.2  1995/09/14  14:14:31  allender
18438 - * return void in draw_vclip_object
18439 - *
18440 - * Revision 1.1  1995/05/16  15:32:00  allender
18441 - * Initial revision
18442 - *
18443 - * Revision 2.0  1995/02/27  11:32:41  john
18444 - * New version 2.0, which has no anonymous unions, builds with
18445 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18446 - *
18447 - * Revision 1.8  1994/09/25  23:40:52  matt
18448 - * Changed the object load & save code to read/write the structure fields one
18449 - * at a time (rather than the whole structure at once).  This mean that the
18450 - * object structure can be changed without breaking the load/save functions.
18451 - * As a result of this change, the local_object data can be and has been
18452 - * incorporated into the object array.  Also, timeleft is now a property
18453 - * of all objects, and the object structure has been otherwise cleaned up.
18454 - *
18455 - * Revision 1.7  1994/09/25  15:45:26  matt
18456 - * Added OBJ_LIGHT, a type of object that casts light
18457 - * Added generalized lifeleft, and moved it to local_object
18458 - *
18459 - * Revision 1.6  1994/09/09  20:05:57  mike
18460 - * Add vclips for weapons.
18461 - *
18462 - * Revision 1.5  1994/06/14  21:14:35  matt
18463 - * Made rod objects draw lighted or not depending on a parameter, so the
18464 - * materialization effect no longer darkens.
18465 - *
18466 - * Revision 1.4  1994/06/08  18:16:24  john
18467 - * Bunch of new stuff that basically takes constants out of the code
18468 - * and puts them into bitmaps.tbl.
18469 - *
18470 - * Revision 1.3  1994/06/03  10:47:17  matt
18471 - * Made vclips (used by explosions) which can be either rods or blobs, as
18472 - * specified in BITMAPS.TBL.  (This is for the materialization center effect).
18473 - *
18474 - * Revision 1.2  1994/05/11  09:25:25  john
18475 - * Abandoned new vclip system for now because each wallclip, vclip,
18476 - * etc, is different and it would be a huge pain to change all of them.
18477 - *
18478 - * Revision 1.1  1994/05/10  15:21:12  john
18479 - * Initial revision
18480
18481 ------------------------------------------------------------------------
18482 main/vclip.h:
18483
18484 - * Revision 1.2  1995/09/14  14:14:45  allender
18485 - * return void in draw_vclip_object
18486 - *
18487 - * Revision 1.1  1995/05/16  16:04:35  allender
18488 - * Initial revision
18489 - *
18490 - * Revision 2.0  1995/02/27  11:32:42  john
18491 - * New version 2.0, which has no anonymous unions, builds with
18492 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18493 - *
18494 - * Revision 1.33  1994/11/21  11:17:57  adam
18495 - * *** empty log message ***
18496 - *
18497 - * Revision 1.32  1994/10/12  13:07:07  mike
18498 - * Add VCLIP_POWERUP_DISAPPEARANCE.
18499 - *
18500 - * Revision 1.31  1994/10/12  10:23:54  adam
18501 - * *** empty log message ***
18502 - *
18503 - * Revision 1.30  1994/10/11  12:25:21  matt
18504 - * Added "hot rocks" that create badass explosion when hit by weapons
18505 - *
18506 - * Revision 1.29  1994/10/06  14:10:07  matt
18507 - * Added constant for player appearence effect
18508 - *
18509 - * Revision 1.28  1994/09/26  08:40:30  adam
18510 - * *** empty log message ***
18511 - *
18512 - * Revision 1.27  1994/09/10  17:30:57  mike
18513 - * move a prototype here, had been defined in object.c
18514 - *
18515 - * Revision 1.26  1994/09/09  20:04:25  mike
18516 - * Add weapon_vclip.
18517 - *
18518 - * Revision 1.25  1994/08/31  19:27:09  mike
18519 - * Increase max number of Vclips for new pile of weapon powerups.
18520 - *
18521 - * Revision 1.24  1994/08/14  23:14:43  matt
18522 - * Added animating bitmap hostages, and cleaned up vclips a bit
18523 - *
18524 - * Revision 1.23  1994/07/23  19:56:39  matt
18525 - * Took out unused constant
18526 - *
18527 - * Revision 1.22  1994/07/22  10:42:10  adam
18528 - * upped max no. of vclips
18529 - *
18530 - * Revision 1.21  1994/06/14  21:15:14  matt
18531 - * Made rod objects draw lighted or not depending on a parameter, so the
18532 - * materialization effect no longer darkens.
18533 - *
18534 - * Revision 1.20  1994/06/09  19:38:16  john
18535 - * Made each Vclip have its own sound... but only used in the
18536 - * materialization center.
18537 - *
18538 - * Revision 1.19  1994/06/09  11:46:26  john
18539 - * Took out unused vclip defines.
18540 - *
18541 - * Revision 1.18  1994/06/08  18:16:33  john
18542 - * Bunch of new stuff that basically takes constants out of the code
18543 - * and puts them into bitmaps.tbl.
18544 - *
18545 - * Revision 1.17  1994/06/08  12:49:01  mike
18546 - * Add light_value to vclip.
18547 - *
18548 - * Revision 1.16  1994/06/08  11:43:28  mike
18549 - * Allow 20 vclips, I think (anyway, more than it used to be, probably 12).
18550 - *
18551 - * Revision 1.15  1994/06/03  10:48:22  matt
18552 - * Made vclips (used by explosions) which can be either rods or blobs, as
18553 - * specified in BITMAPS.TBL.  (This is for the materialization center effect).
18554 - *
18555 - * Revision 1.14  1994/06/01  17:21:08  john
18556 - * Added muzzle flash
18557 - *
18558 - * Revision 1.13  1994/06/01  10:34:02  john
18559 - * Added robot morphing effect.
18560 - *
18561 - * Revision 1.12  1994/05/16  16:17:38  john
18562 - * Bunch of stuff on my Inferno Task list May16-23
18563 - *
18564 - * Revision 1.11  1994/05/10  18:32:50  john
18565 - * *** empty log message ***
18566 - *
18567 - * Revision 1.10  1994/04/29  14:35:52  matt
18568 - * Added second kind of fireball
18569 - *
18570 - * Revision 1.9  1994/04/11  10:36:31  yuan
18571 - * Started adding types for exploding hostages.
18572 - *
18573 - * Revision 1.8  1994/04/07  16:27:43  yuan
18574 - * Added SUPERPIG the robot with 200 hit points.
18575 - * Now robots can take multiple hits before blowing up.
18576 - *
18577 - * Revision 1.7  1994/04/07  13:45:58  yuan
18578 - * Defined Pclips... maybe shouldn't be in this file.
18579 - *
18580 - * Revision 1.6  1994/03/28  20:58:22  yuan
18581 - * Added blood vclip constant
18582 - *
18583 - * Revision 1.5  1994/03/15  16:31:56  yuan
18584 - * Cleaned up bm-loading code.
18585 - * (And structures)
18586 - *
18587 - * Revision 1.4  1994/03/04  17:09:43  yuan
18588 - * New wall stuff
18589 - *
18590 - * Revision 1.3  1994/01/11  10:59:01  yuan
18591 - * Added effects
18592 - *
18593 - * Revision 1.2  1994/01/06  17:13:15  john
18594 - * Added Video clip functionality
18595 - *
18596 - * Revision 1.1  1994/01/06  15:10:15  john
18597 - * Initial revision
18598
18599 ------------------------------------------------------------------------
18600 main/wall.c:
18601
18602 - * Revision 1.1  1995/05/16  15:32:08  allender
18603 - * Initial revision
18604 - *
18605 - * Revision 2.1  1995/03/21  14:39:04  john
18606 - * Ifdef'd out the NETWORK code.
18607 - *
18608 - * Revision 2.0  1995/02/27  11:28:32  john
18609 - * New version 2.0, which has no anonymous unions, builds with
18610 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18611 - *
18612 - * Revision 1.112  1995/02/22  13:53:07  allender
18613 - * remove anonymous unions from object structure
18614 - *
18615 - * Revision 1.111  1995/02/01  17:32:17  adam
18616 - * Took out a bogus int3.
18617 - *
18618 - * Revision 1.110  1995/02/01  17:20:24  john
18619 - * Lintized.
18620 - *
18621 - * Revision 1.109  1995/01/21  17:39:50  matt
18622 - * Cleaned up laser/player hit wall confusions
18623 - *
18624 - * Revision 1.108  1995/01/21  17:14:17  rob
18625 - * Fixed bug in multiplayer door-butting.
18626 - *
18627 - * Revision 1.107  1995/01/18  18:57:11  rob
18628 - * Added new hostage door hooks.
18629 - *
18630 - * Revision 1.106  1995/01/18  18:48:18  allender
18631 - * removed #ifdef newdemo's.  Added function call to record a door that
18632 - * starts to open. This fixes the rewind problem
18633 - *
18634 - * Revision 1.105  1995/01/16  11:55:39  mike
18635 - * make control center (and robots whose id == your playernum) not able to open doors.
18636 - *
18637 - * Revision 1.104  1994/12/11  23:07:21  matt
18638 - * Fixed stuck objects & blastable walls
18639 - *
18640 - * Revision 1.103  1994/12/10  16:44:34  matt
18641 - * Added debugging code to track down door that turns into rock
18642 - *
18643 - * Revision 1.102  1994/12/06  16:27:05  matt
18644 - * Added debugging
18645 - *
18646 - * Revision 1.101  1994/12/02  10:50:27  yuan
18647 - * Localization
18648 - *
18649 - * Revision 1.100  1994/11/30  19:41:22  rob
18650 - * Put in a fix so that door opening sounds travel through the door.
18651 - *
18652 - * Revision 1.99  1994/11/28  11:59:50  yuan
18653 - * *** empty log message ***
18654 - *
18655 - * Revision 1.98  1994/11/28  11:25:45  matt
18656 - * Cleaned up key hud messages
18657 - *
18658 - * Revision 1.97  1994/11/27  23:15:11  matt
18659 - * Made changes for new mprintf calling convention
18660 - *
18661 - * Revision 1.96  1994/11/19  15:18:29  mike
18662 - * rip out unused code and data.
18663 - *
18664 - * Revision 1.95  1994/11/17  14:57:12  mike
18665 - * moved segment validation functions from editor to main.
18666 - *
18667 - * Revision 1.94  1994/11/07  08:47:30  john
18668 - * Made wall state record.
18669 - *
18670 - * Revision 1.93  1994/11/04  16:06:37  rob
18671 - * Fixed network damage of blastable walls.
18672 - *
18673 - * Revision 1.92  1994/11/02  21:54:01  matt
18674 - * Don't let objects with zero size keep door from shutting
18675 - *
18676 - * Revision 1.91  1994/10/31  13:48:42  rob
18677 - * Fixed bug in opening doors over network/modem.  Added a new message
18678 - * type to multi.c that communicates door openings across the net.
18679 - * Changed includes in multi.c and wall.c to accomplish this.
18680 - *
18681 - * Revision 1.90  1994/10/28  14:42:41  john
18682 - * Added sound volumes to all sound calls.
18683 - *
18684 - * Revision 1.89  1994/10/23  19:16:55  matt
18685 - * Fixed bug with "no key" messages
18686
18687 ------------------------------------------------------------------------
18688 main/wall.h:
18689
18690 - * Revision 1.1  1995/05/16  16:05:14  allender
18691 - * Initial revision
18692 - *
18693 - * Revision 2.0  1995/02/27  11:31:36  john
18694 - * New version 2.0, which has no anonymous unions, builds with
18695 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18696 - *
18697 - * Revision 1.47  1994/11/19  15:20:35  mike
18698 - * rip out unused code and data
18699 - *
18700 - * Revision 1.46  1994/10/25  15:40:12  yuan
18701 - * MAX_WALLS pumped up
18702 - *
18703 - * Revision 1.45  1994/10/23  19:17:07  matt
18704 - * Fixed bug with "no key" messages
18705 - *
18706 - * Revision 1.44  1994/10/18  15:38:03  mike
18707 - * Define hidden walls.
18708 - *
18709 - * Revision 1.43  1994/10/04  13:32:26  adam
18710 - * commented out MAX_DOOR_ANIMS
18711 - *
18712 - * Revision 1.42  1994/10/04  13:31:21  adam
18713 - * upped MAX_WALL_ANIMS to 30
18714 - *
18715 - * Revision 1.41  1994/09/29  00:42:30  matt
18716 - * Made hitting a locked door play a sound
18717 - *
18718 - * Revision 1.40  1994/09/27  15:42:41  mike
18719 - * Prototype Wall_names.
18720 - *
18721 - * Revision 1.39  1994/09/23  22:15:32  matt
18722 - * Made doors not close on objects, made doors open again if shot while
18723 - * closing, and cleaned up walls/doors a bit.
18724 - *
18725 - * Revision 1.38  1994/09/22  15:31:33  matt
18726 - * Mucked with, and hopefully improved, exploding walls
18727 - *
18728 - * Revision 1.37  1994/09/21  17:17:05  mike
18729 - * Make objects stuck in doors go away when door opens.
18730 - *
18731 - * Revision 1.36  1994/09/13  21:10:46  matt
18732 - * Added wclips that use tmap1 instead of tmap2, saving lots of merging
18733 - *
18734 - * Revision 1.35  1994/09/13  20:11:08  yuan
18735 - * *** empty log message ***
18736 - *
18737 - * Revision 1.34  1994/09/10  13:31:53  matt
18738 - * Made exploding walls a type of blastable walls.
18739 - * Cleaned up blastable walls, making them tmap2 bitmaps.
18740 - *
18741 - * Revision 1.33  1994/08/17  12:55:34  matt
18742 - * Added external walls to wall_is_doorway
18743 - *
18744 - * Revision 1.32  1994/08/15  17:54:35  john
18745 - * *** empty log message ***
18746 - *
18747 - * Revision 1.31  1994/08/15  17:46:56  yuan
18748 - * Added external walls, fixed blastable walls.
18749 - *
18750 - * Revision 1.30  1994/08/05  21:17:21  matt
18751 - * Allow two doors to be linked together
18752 - *
18753 - * Revision 1.29  1994/08/01  10:39:10  matt
18754 - * Parenthesized parms to WID() macro
18755 - *
18756 - * Revision 1.28  1994/07/20  17:35:03  yuan
18757 - * Some minor bug fixes and new key gauges...
18758 - *
18759 - * Revision 1.27  1994/07/19  14:32:03  yuan
18760 - * Fixed keys bug... renumbered some constants.
18761 - *
18762 - * Revision 1.26  1994/07/14  22:38:29  matt
18763 - * Added exploding doors
18764 - *
18765 - * Revision 1.25  1994/07/11  15:08:43  yuan
18766 - * Wall anim file names stored in structure.
18767
18768 ------------------------------------------------------------------------
18769 main/weapon.c:
18770
18771 - * Revision 1.2  1995/10/31  10:17:39  allender
18772 - * new shareware stuff
18773 - *
18774 - * Revision 1.1  1995/05/16  15:32:16  allender
18775 - * Initial revision
18776 - *
18777 - * Revision 2.1  1995/03/21  14:38:43  john
18778 - * Ifdef'd out the NETWORK code.
18779 - *
18780 - * Revision 2.0  1995/02/27  11:27:25  john
18781 - * New version 2.0, which has no anonymous unions, builds with
18782 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18783 - *
18784 - * Revision 1.54  1995/02/15  15:21:48  mike
18785 - * make smart missile select if mega missiles used up.
18786 - *
18787 - *
18788 - * Revision 1.53  1995/02/12  02:12:30  john
18789 - * Fixed bug with state restore making weapon beeps.
18790 - *
18791 - * Revision 1.52  1995/02/09  20:42:15  mike
18792 - * change weapon autoselect, always autoselect smart, mega.
18793 - *
18794 - * Revision 1.51  1995/02/07  20:44:26  mike
18795 - * autoselect mega, smart when you pick them up.
18796 - *
18797 - * Revision 1.50  1995/02/07  13:32:25  rob
18798 - * Added include of multi.h
18799 - *
18800 - * Revision 1.49  1995/02/07  13:21:33  yuan
18801 - * Fixed 2nd typo
18802 - *
18803 - * Revision 1.48  1995/02/07  13:16:39  yuan
18804 - * Fixed typo.
18805 - *
18806 - * Revision 1.47  1995/02/07  12:53:12  rob
18807 - * Added network sound prop. to weapon switch.
18808 - *
18809 - * Revision 1.46  1995/02/06  15:53:17  mike
18810 - * don't autoselect smart or mega missile when you pick it up.
18811 - *
18812 - * Revision 1.45  1995/02/02  21:43:34  mike
18813 - * make autoselection better.
18814 - *
18815 - * Revision 1.44  1995/02/02  16:27:21  mike
18816 - * make concussion missiles trade up.
18817 - *
18818 - * Revision 1.43  1995/02/01  23:34:57  adam
18819 - * messed with weapon change sounds
18820 - *
18821 - * Revision 1.42  1995/02/01  17:12:47  mike
18822 - * Make smart missile, mega missile not auto-select.
18823 - *
18824 - * Revision 1.41  1995/02/01  15:50:54  mike
18825 - * fix bogus weapon selection sound code.
18826 - *
18827 - * Revision 1.40  1995/01/31  16:16:31  mike
18828 - * Separate smart blobs for robot and player.
18829 - *
18830 - * Revision 1.39  1995/01/30  21:12:11  mike
18831 - * Use new weapon selection sounds, different for primary and secondary.
18832 - *
18833 - * Revision 1.38  1995/01/29  13:46:52  mike
18834 - * Don't auto-select fusion cannon when you run out of energy.
18835 - *
18836 - * Revision 1.37  1995/01/20  11:11:13  allender
18837 - * record weapon changes again.  (John somehow lost my 1.35 changes).
18838 - *
18839 - * Revision 1.36  1995/01/19  17:00:46  john
18840 - * Made save game work between levels.
18841 - *
18842 - * Revision 1.34  1995/01/09  17:03:48  mike
18843 - * fix autoselection of weapons.
18844 - *
18845 - * Revision 1.33  1995/01/05  15:46:31  john
18846 - * Made weapons not rearm when starting a saved game.
18847 - *
18848 - * Revision 1.32  1995/01/03  12:34:23  mike
18849 - * autoselect next lower weapon if run out of smart or mega missile.
18850 - *
18851 - * Revision 1.31  1994/12/12  21:39:37  matt
18852 - * Changed vulcan ammo: 10K max, 5K w/weapon, 1250 per powerup
18853 - *
18854 - * Revision 1.30  1994/12/09  19:55:04  matt
18855 - * Added weapon name in "not available in shareware" message
18856 - *
18857 - * Revision 1.29  1994/12/06  13:50:24  adam
18858 - * added shareware msg. when choosing 4 top weapons
18859 - *
18860 - * Revision 1.28  1994/12/02  22:07:13  mike
18861 - * if you gots 19 concussion missiles and you runs over 4, say you picks up 1, not 4, we do the math, see?
18862 - *
18863 - * Revision 1.27  1994/12/02  20:06:24  matt
18864 - * Made vulcan ammo print at approx 25 times actual
18865 - *
18866 - * Revision 1.26  1994/12/02  15:05:03  matt
18867 - * Fixed bogus weapon constants and arrays
18868 - *
18869 - * Revision 1.25  1994/12/02  10:50:34  yuan
18870 - * Localization
18871 - *
18872 - * Revision 1.24  1994/11/29  15:48:28  matt
18873 - * selecting weapon now makes sound
18874 - *
18875 - * Revision 1.23  1994/11/28  11:26:58  matt
18876 - * Cleaned up hud message printing for picking up weapons
18877 - *
18878 - * Revision 1.22  1994/11/27  23:13:39  matt
18879 - * Made changes for new mprintf calling convention
18880 - *
18881 - * Revision 1.21  1994/11/12  16:38:34  mike
18882 - * clean up default ammo stuff.
18883 - *
18884 - * Revision 1.20  1994/11/07  17:41:18  mike
18885 - * messages for when you try to fire a weapon you don't have or don't have ammo for.
18886 - *
18887 - * Revision 1.19  1994/10/21  20:40:05  mike
18888 - * fix double vulcan ammo.
18889 - *
18890 - * Revision 1.18  1994/10/20  09:49:05  mike
18891 - * kill messages no one liked...*sniff* *sniff*
18892 - *
18893 - * Revision 1.17  1994/10/19  11:17:07  mike
18894 - * Limit amount of player ammo.
18895 - *
18896 - * Revision 1.16  1994/10/12  08:04:18  mike
18897 - * Fix proximity/homing confusion.
18898 - *
18899 - * Revision 1.15  1994/10/11  18:27:58  matt
18900 - * Changed auto selection of secondary weapons
18901 - *
18902 - * Revision 1.14  1994/10/08  23:37:54  matt
18903 - * Don't pick up weapons you already have; also fixed auto_select bug
18904 - * for seconary weapons
18905 - *
18906 - * Revision 1.13  1994/10/08  14:55:47  matt
18907 - * Fixed bug that selected vulcan cannon when picked up ammo, even though
18908 - * you didn't have the weapon.
18909 - *
18910 - * Revision 1.12  1994/10/08  12:50:32  matt
18911 - * Fixed bug that let you select weapons you don't have
18912 - *
18913 - * Revision 1.11  1994/10/07  23:37:56  matt
18914 - * Made weapons select when pick up better one
18915 - *
18916 - * Revision 1.10  1994/10/07  16:02:08  matt
18917 - * Fixed problem with weapon auto-select
18918 - *
18919 - * Revision 1.9  1994/10/05  17:00:20  matt
18920 - * Made player_has_weapon() public and moved constants to header file
18921 - *
18922 - * Revision 1.8  1994/09/26  11:27:13  mike
18923 - * Fix auto selection of weapon when you run out of ammo.
18924 - *
18925 - * Revision 1.7  1994/09/13  16:40:45  mike
18926 - * Add rearm delay and missile firing delay.
18927 - *
18928 - * Revision 1.6  1994/09/13  14:43:12  matt
18929 - * Added cockpit weapon displays
18930 - *
18931 - * Revision 1.5  1994/09/03  15:23:06  mike
18932 - * Auto select next weaker weapon when one runs out, clean up code.
18933 - *
18934 - * Revision 1.4  1994/09/02  16:38:19  mike
18935 - * Eliminate a pile of arrays, associate weapon data with Weapon_info.
18936 - *
18937 - * Revision 1.3  1994/09/02  11:57:10  mike
18938 - * Add a bunch of stuff, I forget what.
18939 - *
18940 - * Revision 1.2  1994/06/03  16:26:32  john
18941 - * Initial version.
18942 - *
18943 - * Revision 1.1  1994/06/03  14:40:43  john
18944 - * Initial revision
18945
18946 ------------------------------------------------------------------------
18947 main/weapon.h:
18948
18949 - * Revision 1.2  1995/09/14  14:07:10  allender
18950 - * fixed prototypes to have return value
18951 - *
18952 - * Revision 1.1  1995/05/16  16:05:22  allender
18953 - * Initial revision
18954 - *
18955 - * Revision 2.0  1995/02/27  11:31:10  john
18956 - * New version 2.0, which has no anonymous unions, builds with
18957 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
18958 - *
18959 - * Revision 1.44  1995/01/30  17:14:18  mike
18960 - * halve rate of vulcan ammo consumption.
18961 - *
18962 - * Revision 1.43  1995/01/19  17:45:04  mike
18963 - * damage_force removed, that information coming from strength field.
18964 - *
18965 - * Revision 1.42  1995/01/05  15:46:11  john
18966 - * Made weapons not rearm when starting a saved game.
18967 - *
18968 - * Revision 1.41  1995/01/04  12:20:27  john
18969 - * Declearations to work better with game state save.
18970 - *
18971 - *
18972 - * Revision 1.40  1994/12/13  12:54:16  mike
18973 - * fix proximity, homing flags, backwards!
18974 - *
18975 - * Revision 1.39  1994/12/11  16:17:57  mike
18976 - * change default weapon life so shots from ctrlcen on level 6 won't evaporate before they hit you.
18977 - *
18978 - * Revision 1.38  1994/12/09  19:55:26  matt
18979 - * Added weapon name in "not available in shareware" message
18980 - *
18981 - * Revision 1.37  1994/12/07  12:55:27  mike
18982 - * tweak vulcan amounts.
18983 - *
18984 - * Revision 1.36  1994/12/03  19:03:56  matt
18985 - * Fixed vulcan ammo HUD message
18986 - *
18987 - * Revision 1.35  1994/12/02  15:05:02  matt
18988 - * Fixed bogus weapon constants and arrays
18989 - *
18990 - * Revision 1.34  1994/11/29  14:26:05  john
18991 - * Again.
18992 - *
18993 - * Revision 1.33  1994/11/29  14:13:47  adam
18994 - * Changed the byte flash sound to short.
18995 - *
18996 - * Revision 1.32  1994/11/12  16:36:55  mike
18997 - * default ammo stuff.
18998 - *
18999 - * Revision 1.31  1994/10/21  10:55:24  adam
19000 - * upped MAX_WEAPON_TYPES to 30
19001 - *
19002 - * Revision 1.30  1994/10/19  11:16:37  mike
19003 - * Limit ammo amounts.
19004 - *
19005 - * Revision 1.29  1994/10/12  08:05:04  mike
19006 - * Clean up homing/proximity mess.
19007 - *
19008 - * Revision 1.28  1994/10/08  23:37:53  matt
19009 - * Don't pick up weapons you already have; also fixed auto_select bug
19010 - * for seconary weapons
19011 - *
19012 - * Revision 1.27  1994/10/07  23:37:56  matt
19013 - * Made weapons select when pick up better one
19014 - *
19015 - * Revision 1.26  1994/10/07  16:02:17  matt
19016 - * Fixed problem with weapon auto-select
19017 - *
19018 - * Revision 1.25  1994/10/05  17:07:44  matt
19019 - * Made player_has_weapon() public and moved constants to header file
19020 - *
19021 - * Revision 1.24  1994/09/30  21:50:49  mike
19022 - * Add homing_flag and 3 dummy bytes to weapon_info.
19023 - *
19024 - * Revision 1.23  1994/09/30  13:47:41  mike
19025 - * Make speed and strength be difficulty level based.
19026 - *
19027 - * Revision 1.22  1994/09/20  16:10:13  mike
19028 - * Prototype Primary_weapon_names and Secondary_weapon_names.
19029 - *
19030 - * Revision 1.21  1994/09/20  12:17:21  adam
19031 - * upped weapon types
19032 - *
19033 - * Revision 1.20  1994/09/13  16:40:29  mike
19034 - * Define REARM_TIME -- time it takes until you can fire a newly armed weapon.
19035 - *
19036 - * Revision 1.19  1994/09/13  14:43:03  matt
19037 - * Added cockpit weapon displays
19038 - *
19039 - * Revision 1.18  1994/09/11  15:50:34  mike
19040 - * Add matter and bounce to weapon_info.
19041 - *
19042 - * Revision 1.17  1994/09/10  17:32:17  mike
19043 - * Add thrust to weapon_info.
19044 - *
19045 - * Revision 1.16  1994/09/09  20:04:54  mike
19046 - * Add vclips for weapons.
19047 - *
19048 - * Revision 1.15  1994/09/07  15:59:14  mike
19049 - * Add default lifetimes to weapons, destroyable, lifetime, damage_radius, damage_force fields to weapons.
19050 - *
19051 - * Revision 1.14  1994/09/03  15:18:06  mike
19052 - * Add prototype for auto_select_weapon.
19053 - *
19054 - * Revision 1.13  1994/09/02  16:38:33  mike
19055 - * Move data from global arrays to Weapon_info.
19056 - *
19057 - * Revision 1.12  1994/09/02  11:54:59  mike
19058 - * Add a whole slew of constants for the whole slew of new weapons.
19059 - *
19060 - * Revision 1.11  1994/08/23  16:39:15  mike
19061 - * Add light to weapon struct
19062
19063 ------------------------------------------------------------------------
19064 maths/fixc.c:
19065
19066 - * Revision 1.7  1995/09/22  14:08:16  allender
19067 - * fixed fix_atan2 to work correctly with doubles
19068 - *
19069 - * Revision 1.6  1995/08/31  15:43:49  allender
19070 - * *** empty log message ***
19071 - *
19072 - * Revision 1.5  1995/07/05  16:15:15  allender
19073 - * make fixmuldiv use doubles for PPC implementation
19074 - *
19075 - * Revision 1.4  1995/05/15  13:57:36  allender
19076 - * make fixmuldiv compile when compiling under 68k
19077 - *
19078 - * Revision 1.3  1995/05/11  13:02:59  allender
19079 - * some routines are now in assembly
19080 - *
19081 - * Revision 1.2  1995/05/04  20:04:45  allender
19082 - * use MPW fixdiv if compiling with MPW (why did I do this?)
19083 - *
19084 - * Revision 1.1  1995/04/17  11:37:54  allender
19085 - * Initial revision
19086 - *
19087 - *
19088 - * --- PC RCS Info ---
19089 - * Revision 1.1  1995/03/08  18:55:09  matt
19090 - * Initial revision
19091
19092 ------------------------------------------------------------------------
19093 maths/tables.c:
19094
19095 - * Revision 1.2  1995/08/31  15:44:36  allender
19096 - * ..
19097 - *
19098 - * Revision 1.1  1995/04/17  11:38:04  allender
19099 - * Initial revision
19100
19101 ------------------------------------------------------------------------
19102 maths/vecmat.c:
19103
19104 - * Revision 1.5  1995/10/30  11:08:16  allender
19105 - * fix check_vec to return if vector is the NULL vector
19106 - *
19107 - * Revision 1.4  1995/09/23  09:38:14  allender
19108 - * removed calls for PPC that are now handled in asm
19109 - *
19110 - * Revision 1.3  1995/08/31  15:50:24  allender
19111 - * fixing up of functions for PPC
19112 - *
19113 - * Revision 1.2  1995/07/05  16:40:21  allender
19114 - * some vecmat stuff might be using isqrt -- commented out
19115 - * for now
19116 - *
19117 - * Revision 1.1  1995/04/17  16:18:02  allender
19118 - * Initial revision
19119 - *
19120 - *
19121 - * --- PC RCS Information ---
19122 - * Revision 1.1  1995/03/08  15:56:50  matt
19123 - * Initial revision
19124
19125 ------------------------------------------------------------------------
19126 maths/vecmata.asm:
19127
19128 ; Revision 1.54  1995/01/31  00:14:50  matt
19129 ; Took out int3 from dotprod overflow, since it saturates now
19130 ;
19131 ; Revision 1.53  1994/12/14  18:29:33  matt
19132 ; Made dotprod overflow check stay in, and return saturated value
19133 ;
19134 ; Revision 1.52  1994/12/14  12:34:13  matt
19135 ; Disabled now-unused vector_2_matrix_norm()
19136 ;
19137 ; Revision 1.51  1994/12/13  16:55:13  matt
19138 ; Ripped out optimization from last version, which was bogus
19139 ;
19140 ; Revision 1.50  1994/12/13  14:55:18  matt
19141 ; Use quick normalize in a couple of places where it was safe to do so
19142 ;
19143 ; Revision 1.49  1994/12/13  14:44:12  matt
19144 ; Added vm_vector_2_matrix_norm()
19145 ;
19146 ; Revision 1.48  1994/12/13  13:26:49  matt
19147 ; Fixed overflow check
19148 ;
19149 ; Revision 1.47  1994/12/03  15:39:54  matt
19150 ; Gracefully handle some vector_2_matrix problems
19151 ;
19152 ; Revision 1.46  1994/11/19  17:15:05  matt
19153 ; Assemble out some code not used in DESCENT
19154 ;
19155 ; Revision 1.45  1994/11/17  11:41:05  matt
19156 ; Put handling in extract_angles_from_matrix to deal with bad matrices
19157 ;
19158 ; Revision 1.44  1994/11/16  11:48:10  matt
19159 ; Added error checking to vm_extract_angles_matrix()
19160 ;
19161 ; Revision 1.43  1994/09/19  22:00:10  matt
19162 ; Fixed register trash
19163 ;
19164 ; Revision 1.42  1994/09/11  19:23:05  matt
19165 ; Added vm_vec_normalized_dir_quick()
19166 ;
19167 ; Revision 1.41  1994/08/14  13:28:38  matt
19168 ; Put in check for zero-length vector in extract angles
19169 ;
19170 ; Revision 1.40  1994/07/19  18:52:53  matt
19171 ; Added vm_vec_normalize_quick() and vm_vec_copy_normalize_quick()
19172 ;
19173 ; Revision 1.39  1994/06/16  18:24:22  matt
19174 ; Added vm_vec_mag_quick()
19175 ;
19176 ; Revision 1.38  1994/06/10  23:18:38  matt
19177 ; Added new code for vm_vec_ang_2_matrix() which may be better, but may
19178 ; not be.
19179 ;
19180 ; Revision 1.37  1994/05/22  18:17:29  mike
19181 ; Optimize vm_vec_dist_quick, using jns in place of abs_eax.
19182 ;
19183 ; Revision 1.36  1994/05/19  12:07:04  matt
19184 ; Fixed globals and macros and added a constant
19185 ;
19186 ; Revision 1.35  1994/05/19  09:19:00  matt
19187 ; Made vm_vec_normalized_dir() return mag of vector
19188 ;
19189 ; Revision 1.34  1994/05/18  22:28:01  matt
19190 ; Added function vm_vec_normalized_dir()
19191 ; Added C macros IS_ZERO_VEC(), vm_vec_zero(), and vm_set_identity()
19192 ; Added C global static vars vmd_zero_vector & vmd_identity_matrix
19193 ;
19194 ; Revision 1.33  1994/05/18  21:44:16  matt
19195 ; Added functions:
19196 ;   vm_extract_angles_vector()
19197 ;   vm_extract_angles_vector_normalized()
19198 ;   vm_vec_copy_normalize()
19199 ;
19200 ; Revision 1.32  1994/05/13  12:41:51  matt
19201 ; Added new function, vm_vec_dist_quick(), which does an approximation.
19202 ;
19203 ; Revision 1.31  1994/05/04  17:41:31  mike
19204 ; Comment out debug_brk on null vector.
19205 ;
19206 ; Revision 1.30  1994/04/15  21:41:31  matt
19207 ; Check for foward vector straigt up in extract angles routine
19208 ;
19209 ; Revision 1.29  1994/03/30  15:45:05  matt
19210 ; Added two functions, vm_vec_scale_add() & vm_vec_scale_add2()
19211 ;
19212 ; Revision 1.28  1994/02/26  19:23:35  matt
19213 ; Do an int3 when we get a null vector when computing surface normal
19214 ;
19215 ; Revision 1.27  1994/02/10  18:29:45  matt
19216 ; Changed 'if DEBUG_ON' to 'ifndef NDEBUG'
19217 ;
19218 ; Revision 1.26  1994/02/10  18:28:55  matt
19219 ; Fixed bugs in extract angles function
19220 ;
19221 ; Revision 1.25  1994/01/31  22:46:07  matt
19222 ; Added vm_extract_angles_matrix() function
19223 ;
19224 ; Revision 1.24  1994/01/30  19:29:55  matt
19225 ; Put in debug_brk when vm_vec_2_matrix got zero-length vector
19226 ;
19227 ; Revision 1.23  1994/01/25  15:27:59  matt
19228 ; Added debugging check for dotprod overflow
19229 ;
19230 ; Revision 1.22  1994/01/24  11:52:59  matt
19231 ; Added checking for dest==src for several functions where this is not allowed
19232 ;
19233 ; Revision 1.21  1994/01/19  23:13:02  matt
19234 ; Fixed bug in vm_vec_ang_2_matrix()
19235 ;
19236 ; Revision 1.20  1994/01/04  12:33:43  mike
19237 ; Prevent divide overflow in vm_vec_scale2
19238 ;
19239 ; Revision 1.19  1993/12/21  19:46:26  matt
19240 ; Added function vm_dist_to_plane()
19241 ;
19242 ; Revision 1.18  1993/12/13  17:26:23  matt
19243 ; Added vm_vec_dist()
19244 ;
19245 ; Revision 1.17  1993/12/02  12:43:39  matt
19246 ; New functions: vm_vec_copy_scale(), vm_vec_scale2()
19247 ;
19248 ; Revision 1.16  1993/10/29  22:39:29  matt
19249 ; Changed matrix order, making direction vectors the rows
19250 ;
19251 ; Revision 1.15  1993/10/29  18:06:01  matt
19252 ; Fixed vm_vector_2_matrix() bug when forward vector was straight down
19253 ;
19254 ; Revision 1.14  1993/10/26  18:51:26  matt
19255 ; Fixed some register trashes in vm_vec_ang_2_matrix()
19256 ;
19257 ; Revision 1.13  1993/10/25  11:49:37  matt
19258 ; Made vm_vec_delta_ang() take optional forward vector to return signed delta
19259 ;
19260 ; Revision 1.12  1993/10/20  01:09:42  matt
19261 ; Added vm_vec_delta_ang(), vm_vec_delta_ang_norm(), and vm_vec_ang_2_matrix()
19262 ;
19263 ; Revision 1.11  1993/10/17  17:03:08  matt
19264 ; vm_vector_2_matrix() now takes optional right vector
19265 ;
19266 ; Revision 1.10  1993/10/10  18:11:42  matt
19267 ; Changed angles_2_matrix so that heading & bank rotate in the
19268 ; correct directions.
19269 ;
19270 ; Revision 1.9  1993/09/30  16:17:59  matt
19271 ; Fixed bug in vector_2_matrix() by adding another normalize
19272 ;
19273 ; Revision 1.8  1993/09/29  10:51:58  matt
19274 ; Fixed bad register trashes in crossprod, perp, & normal
19275 ;
19276 ; Revision 1.7  1993/09/28  12:16:46  matt
19277 ; Fixed bugs in cross product
19278 ; Added func vm_vector_2_matrix()
19279 ;
19280 ; Revision 1.6  1993/09/24  21:19:37  matt
19281 ; Added vm_vec_avg() and vm_vec_avg4()
19282 ;
19283 ; Revision 1.5  1993/09/20  18:15:07  matt
19284 ; Trap zero-length vectors in vm_vec_normalize(), vm_vec_perp(), and vm_vec_normal()
19285 ;
19286 ; Revision 1.4  1993/09/20  14:56:43  matt
19287 ; Fixed bug in vm_vec_normal(), made that routine normalize the results,
19288 ; and added new function vm_vec_perp().
19289 ;
19290 ; Revision 1.3  1993/09/20  10:12:06  mike
19291 ; no changes
19292 ;
19293 ; Revision 1.2  1993/09/17  11:10:33  matt
19294 ; Added vm_vec_add2() and vm_vec_sub2(), which take 2 args (dest==src0)
19295 ;
19296 ; Revision 1.1  1993/09/16  20:10:24  matt
19297 ; Initial revision
19298
19299 ------------------------------------------------------------------------
19300 misc/args.c:
19301
19302 - * Revision 2.0  1995/02/27  11:31:22  john
19303 - * New version 2.0, which has no anonymous unions, builds with
19304 - * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
19305 - *
19306 - * Revision 1.9  1994/11/29  01:07:57  john
19307 - * Took out some unused vars.
19308 - *
19309 - * Revision 1.8  1994/11/29  01:04:30  john
19310 - * Took out descent.ini stuff.
19311 - *
19312 - * Revision 1.7  1994/09/20  19:29:15  matt
19313 - * Made args require exact (not substring), though still case insensitive.
19314 - *
19315 - * Revision 1.6  1994/07/25  12:33:11  john
19316 - * Network "pinging" in.
19317 - *
19318 - * Revision 1.5  1994/06/17  18:07:50  matt
19319 - * Took out printf
19320 - *
19321 - * Revision 1.4  1994/05/11  19:45:33  john
19322 - * *** empty log message ***
19323 - *
19324 - * Revision 1.3  1994/05/11  18:42:11  john
19325 - * Added Descent.ini config file.
19326 - *
19327 - * Revision 1.2  1994/05/09  17:03:30  john
19328 - * Split command line parameters into arg.c and arg.h.
19329 - * Also added /dma, /port, /irq to digi.c
19330 - *
19331 - * Revision 1.1  1994/05/09  16:49:11  john
19332 - * Initial revision
19333
19334 ------------------------------------------------------------------------
19335 misc/error.c:
19336
19337 - * Revision 1.12  1994/12/07  18:49:39  matt
19338 - * error_init() can now take NULL as parm
19339 - *
19340 - * Revision 1.11  1994/11/29  15:42:07  matt
19341 - * Added newline before error message
19342 - *
19343 - * Revision 1.10  1994/11/27  23:20:39  matt
19344 - * Made changes for new mprintf calling convention
19345 - *
19346 - * Revision 1.9  1994/06/20  21:20:56  matt
19347 - * Allow NULL for warn func, to kill warnings
19348 - *
19349 - * Revision 1.8  1994/05/20  15:11:35  mike
19350 - * mprintf Warning message so you can actually see it.
19351 - *
19352 - * Revision 1.7  1994/02/10  18:02:38  matt
19353 - * Changed 'if DEBUG_ON' to 'ifndef NDEBUG'
19354 - *
19355 - * Revision 1.6  1993/10/17  18:19:10  matt
19356 - * If error_init() not called, Error() now prints the error message before
19357 - * calling exit()
19358 - *
19359 - * Revision 1.5  1993/10/14  15:29:11  matt
19360 - * Added new function clear_warn_func()
19361 - *
19362 - * Revision 1.4  1993/10/08  16:17:19  matt
19363 - * Made Assert() call function _Assert(), rather to do 'if...' inline.
19364 - *
19365 - * Revision 1.3  1993/09/28  12:45:25  matt
19366 - * Fixed wrong print call, and made Warning() not append a CR to string
19367 - *
19368 - * Revision 1.2  1993/09/27  11:46:35  matt
19369 - * Added function set_warn_func()
19370 - *
19371 - * Revision 1.1  1993/09/23  20:17:33  matt
19372 - * Initial revision
19373
19374 ------------------------------------------------------------------------
19375 texmap/ntmap.c:
19376
19377  * Revision 1.52  1995/03/14  15:13:06  john
19378  * Increased MAX_Y_Pointers to 480.
19379  *
19380  * Revision 1.51  1995/02/23  14:25:09  john
19381  * Added editor tmap.
19382  *
19383  * Revision 1.50  1995/02/20  18:22:58  john
19384  * Put all the externs in the assembly modules into tmap_inc.asm.
19385  * Also, moved all the C versions of the inner loops into a new module,
19386  * scanline.c.
19387  *
19388  * Revision 1.49  1995/02/20  17:09:11  john
19389  * Added code so that you can build the tmapper with no assembly!
19390  *
19391  * Revision 1.48  1995/01/06  11:11:30  mike
19392  * even when not in editor, have 400 lines in texture map scanline table.
19393  *
19394  * Revision 1.47  1994/12/15  16:43:25  matt
19395  * Took out code only needed by editor
19396  *
19397  * Revision 1.46  1994/12/09  22:35:37  mike
19398  * fix bug in before call to asm_tmap_scanline_per causing write of pixel onto past right border onto left.
19399  *
19400  * Revision 1.45  1994/12/06  16:31:06  mike
19401  * fix bug in asm_tmap_scanline_matt interface.
19402  *
19403  * Revision 1.44  1994/12/04  20:37:18  mike
19404  * *** empty log message ***
19405  *
19406  * Revision 1.43  1994/12/02  23:30:04  mike
19407  * optimizations.
19408  *
19409  * Revision 1.42  1994/11/30  00:57:43  mike
19410  * optimizations.
19411  *
19412  * Revision 1.41  1994/11/28  13:34:27  mike
19413  * optimizations.
19414  *
19415  * Revision 1.40  1994/11/28  01:30:01  mike
19416  * kill warning.
19417  *
19418  * Revision 1.39  1994/11/28  01:28:59  mike
19419  * optimizations.
19420  *
19421  * Revision 1.38  1994/11/21  14:08:07  john
19422  * Took out all multiple instead of divide code.
19423  *
19424  * Revision 1.37  1994/11/19  15:21:52  mike
19425  * rip out unused code.
19426  *
19427  * Revision 1.36  1994/11/14  11:42:51  mike
19428  * optimization.
19429  *
19430  * Revision 1.35  1994/11/12  16:41:36  mike
19431  * *** empty log message ***
19432  *
19433  * Revision 1.34  1994/11/10  21:28:41  mike
19434  * remove call to init_interface_vars_to_assembler.
19435  *
19436  * Revision 1.33  1994/11/10  11:08:59  mike
19437  * detail level stuff.
19438  *
19439  * Revision 1.32  1994/11/09  22:55:52  matt
19440  * Added variable Current_seg_depth for detail level optimization
19441  *
19442  * Revision 1.31  1994/11/09  19:57:31  john
19443  * Added texture rle caching.
19444  *
19445  * Revision 1.30  1994/11/09  19:54:48  mike
19446  * Call flat shader if Tmap_flat_flag set.
19447  *
19448  * Revision 1.29  1994/11/02  21:33:31  john
19449  * Added Burger Bill's optimization, ie.. 2 muls per 8 pixels.
19450  *
19451  * Revision 1.28  1994/11/02  11:32:16  john
19452  * Added code for c callable inner loop and code to
19453  * test dividing out z0.
19454  *
19455  * Revision 1.27  1994/10/28  20:54:32  matt
19456  * Added error checking
19457  *
19458  * Revision 1.26  1994/10/25  11:20:20  mike
19459  * fix bug in lighting overflow checking for one scanline tall linear texture maps.
19460  *
19461  * Revision 1.25  1994/08/03  15:40:33  mike
19462  * Prevent divide overflows, decrease occurrence of precision-caused glitches.
19463  *
19464  * Revision 1.24  1994/07/27  09:31:16  mike
19465  * Fix concave texture map problem, decrease occurrence of unimportant int 3.
19466  *
19467  * Revision 1.23  1994/06/17  12:23:31  mike
19468  * Support non-lighted texture maps.
19469  *
19470  * Revision 1.22  1994/06/11  08:10:24  mike
19471  * Fix mysterious hang bug, lighting value was out of range.
19472  *
19473  * Revision 1.21  1994/06/09  16:10:16  mike
19474  * Change SC2000 from constant to variable.
19475
19476 ------------------------------------------------------------------------
19477 texmap/scanline.c:
19478
19479 - * Revision 1.2  1995/02/20  18:23:39  john
19480 - * Added new module for C versions of inner loops.
19481 - *
19482 - * Revision 1.1  1995/02/20  17:42:27  john
19483 - * Initial revision
19484
19485 ------------------------------------------------------------------------
19486 texmap/scanline.h:
19487
19488 - * Revision 1.2  1995/02/20  18:23:40  john
19489 - * Added new module for C versions of inner loops.
19490 - *
19491 - * Revision 1.1  1995/02/20  17:44:16  john
19492 - * Initial revision
19493
19494 ------------------------------------------------------------------------
19495 texmap/texmapl.h:
19496
19497 - * Revision 1.14  1995/02/20  18:23:02  john
19498 - * Put all the externs in the assembly modules into tmap_inc.asm.
19499 - * Also, moved all the C versions of the inner loops into a new module,
19500 - * scanline.c.
19501 - *
19502 - * Revision 1.13  1995/02/20  17:09:16  john
19503 - * Added code so that you can build the tmapper with no assembly!
19504 - *
19505 - * Revision 1.12  1994/11/28  13:34:34  mike
19506 - * optimizations.
19507 - *
19508 - * Revision 1.11  1994/11/12  16:41:27  mike
19509 - * function prototype.
19510 - *
19511 - * Revision 1.10  1994/05/24  17:30:00  mike
19512 - * Prototype fix_recip, asm_tmap_scanline_lin_v.
19513 - *
19514 - * Revision 1.9  1994/04/21  15:04:26  mike
19515 - * Add prototype for texmapl.h
19516 - *
19517 - * Revision 1.8  1994/03/31  08:34:53  mike
19518 - * *** empty log message ***
19519 - *
19520 - * Revision 1.7  1994/03/22  20:37:04  mike
19521 - * *** empty log message ***
19522 - *
19523 - * Revision 1.6  1994/03/14  15:43:03  mike
19524 - * streamline code.
19525 - *
19526 - * Revision 1.5  1994/01/31  15:43:18  mike
19527 - * window_height, asm_tmap_scanline_lin_sky_v
19528 - *
19529 - * Revision 1.4  1994/01/21  21:12:27  mike
19530 - * Prototype asm_tmap_scanline_lin_sky
19531 - *
19532 - * Revision 1.3  1994/01/14  14:01:45  mike
19533 - * Add a bunch of variables.
19534 - *
19535 - * Revision 1.2  1993/11/22  10:25:11  mike
19536 - * *** empty log message ***
19537 - *
19538 - * Revision 1.1  1993/09/08  17:29:13  mike
19539 - * Initial revision
19540
19541 ------------------------------------------------------------------------
19542 texmap/tmap_flt.asm:
19543
19544 ; Revision 1.10  1995/02/20  18:22:53  john
19545 ; Put all the externs in the assembly modules into tmap_inc.asm.
19546 ; Also, moved all the C versions of the inner loops into a new module,
19547 ; scanline.c.
19548 ;
19549 ; Revision 1.9  1995/02/20  17:08:51  john
19550 ; Added code so that you can build the tmapper with no assembly!
19551 ;
19552 ; Revision 1.8  1994/12/02  23:29:21  mike
19553 ; change jb/ja to jl/jg.
19554 ;
19555 ; Revision 1.7  1994/11/12  16:39:35  mike
19556 ; jae to ja.
19557 ;
19558 ; Revision 1.6  1994/08/09  11:27:53  john
19559 ; Added cthru mode.
19560 ;
19561 ; Revision 1.5  1994/07/08  17:43:11  john
19562 ; Added flat-shaded-zbuffered polygon.
19563 ;
19564 ; Revision 1.4  1994/04/08  16:25:43  mike
19565 ; optimize inner loop of flat shader.
19566 ;
19567 ; Revision 1.3  1994/03/31  08:34:20  mike
19568 ; Optimized (well, speeded-up) inner loop for tmap-based flat shader.
19569 ;
19570 ; Revision 1.2  1993/11/22  10:24:57  mike
19571 ; *** empty log message ***
19572 ;
19573 ; Revision 1.1  1993/09/08  17:29:46  mike
19574 ; Initial revision
19575
19576 ------------------------------------------------------------------------
19577 texmap/tmap_inc.asm:
19578
19579 ; Revision 1.10  1995/02/20  18:22:52  john
19580 ; Put all the externs in the assembly modules into tmap_inc.asm.
19581 ; Also, moved all the C versions of the inner loops into a new module,
19582 ; scanline.c.
19583 ;
19584 ; Revision 1.9  1994/12/02  23:29:45  mike
19585 ; Add y_pointers.
19586 ;
19587 ; Revision 1.8  1994/11/12  16:39:36  mike
19588 ; jae to ja.
19589 ;
19590 ; Revision 1.7  1994/10/26  23:27:39  john
19591 ; Took out references to gr_inverse_table.
19592 ;
19593 ; Revision 1.6  1994/10/26  23:21:55  mike
19594 ; kill unused stuff.
19595 ;
19596 ; Revision 1.5  1994/07/27  18:39:20  john
19597 ; Took out references to blend table
19598 ;
19599 ; Revision 1.4  1994/01/31  15:40:17  mike
19600 ; Add window_height.
19601 ;
19602 ; Revision 1.3  1993/12/07  12:27:48  john
19603 ; Moved bmd_palette to gr_palette
19604 ;
19605 ; Revision 1.2  1993/11/22  10:24:10  mike
19606 ; *** empty log message ***
19607 ;
19608 ; Revision 1.1  1993/09/08  17:29:47  mike
19609 ; Initial revision
19610
19611 ------------------------------------------------------------------------
19612 texmap/tmap_lin.asm:
19613
19614 ; Revision 1.3  1995/02/20  18:22:57  john
19615 ; Put all the externs in the assembly modules into tmap_inc.asm.
19616 ; Also, moved all the C versions of the inner loops into a new module,
19617 ; scanline.c.
19618 ;
19619 ; Revision 1.2  1995/02/20  17:09:10  john
19620 ; Added code so that you can build the tmapper with no assembly!
19621 ;
19622 ; Revision 1.1  1994/11/30  12:24:04  mike
19623 ; Initial revision
19624 ;
19625 ; Revision 1.6  1994/11/12  16:39:40  mike
19626 ; jae to ja.
19627 ;
19628 ; Revision 1.5  1994/02/10  21:24:43  matt
19629 ; Got rid of debug_on set
19630 ;
19631 ; Revision 1.4  1994/01/31  15:39:53  mike
19632 ; Write additional inner loop for transparency.
19633 ;
19634 ; Revision 1.3  1994/01/26  11:50:04  john
19635 ; Added transparency to linear unlighted texture mapper.
19636 ;
19637 ; Revision 1.2  1993/11/22  10:24:36  mike
19638 ; *** empty log message ***
19639 ;
19640 ; Revision 1.1  1993/09/08  17:29:50  mike
19641 ; Initial revision
19642
19643 ------------------------------------------------------------------------
19644 texmap/tmap_ll.asm:
19645
19646 ; Revision 1.10  1995/02/20  18:22:54  john
19647 ; Put all the externs in the assembly modules into tmap_inc.asm.
19648 ; Also, moved all the C versions of the inner loops into a new module,
19649 ; scanline.c.
19650 ;
19651 ; Revision 1.9  1995/02/20  17:09:06  john
19652 ; Added code so that you can build the tmapper with no assembly!
19653 ;
19654 ; Revision 1.8  1994/11/19  23:52:56  mike
19655 ; rip out big unrolled loop to save 25K....remember when we cared more about speed?
19656 ;
19657 ; Revision 1.7  1994/11/12  16:39:41  mike
19658 ; jae to ja.
19659 ;
19660 ; Revision 1.6  1994/03/14  15:45:08  mike
19661 ; streamline code.
19662 ;
19663 ; Revision 1.5  1994/01/24  13:13:12  mike
19664 ; dithering.
19665 ;
19666 ; Revision 1.4  1994/01/14  14:02:47  mike
19667 ; *** empty log message ***
19668 ;
19669 ; Revision 1.3  1993/12/17  20:00:16  mike
19670 ; Change default setting of dither_intensity_lighting from 1 to 0
19671 ;
19672 ; Revision 1.2  1993/11/22  10:24:50  mike
19673 ; *** empty log message ***
19674 ;
19675 ; Revision 1.1  1993/09/08  17:29:52  mike
19676 ; Initial revision
19677
19678 ------------------------------------------------------------------------
19679 texmap/tmap_per.asm:
19680
19681 ; Revision 1.26  1995/02/20  18:22:55  john
19682 ; Put all the externs in the assembly modules into tmap_inc.asm.
19683 ; Also, moved all the C versions of the inner loops into a new module,
19684 ; scanline.c.
19685 ;
19686 ; Revision 1.25  1995/02/20  17:09:08  john
19687 ; Added code so that you can build the tmapper with no assembly!
19688 ;
19689 ; Revision 1.24  1995/01/10  09:32:07  mike
19690 ; mostly fix garbage at end of scanline, but slow down by 1-4%.
19691 ;
19692 ; Revision 1.23  1994/12/02  23:29:57  mike
19693 ; optimizations.
19694 ;
19695 ; Revision 1.22  1994/11/30  00:57:00  mike
19696 ; optimization.
19697 ;
19698 ; Revision 1.21  1994/11/21  13:57:42  mike
19699 ; fix right side shear bug
19700 ;
19701 ; Revision 1.20  1994/11/12  16:41:09  mike
19702 ; jae -> ja.
19703 ;
19704 ; Revision 1.19  1994/10/27  19:40:00  john
19705 ; Made lighting table lookup be _gr_fade_table[eax] instead
19706 ; of fs:[eax], which gets rig of a segment override that
19707 ; supposedly costs 1 clock on a 486.  Mainly, I wanted to verify
19708 ; that the only reason we need selectors is for the source texture
19709 ; data .
19710 ;
19711 ; Revision 1.18  1994/05/03  11:08:32  mike
19712 ; Trap divide overflows.
19713 ;
19714 ; Revision 1.17  1994/04/21  15:03:41  mike
19715 ; make faster.
19716 ;
19717 ; Revision 1.16  1994/04/08  16:46:57  john
19718 ; Made 32 fade levels. Hacked.
19719 ;
19720 ; Revision 1.15  1994/03/31  08:35:18  mike
19721 ; Fix quantized-by-4 bug in inner loop.
19722 ;
19723 ; Revision 1.14  1994/03/14  17:41:14  mike
19724 ; Fix bug in unlighted version.
19725 ;
19726 ; Revision 1.13  1994/03/14  15:45:14  mike
19727 ; streamline code.
19728 ;
19729 ; Revision 1.12  1994/01/14  14:01:58  mike
19730 ; *** empty log message ***
19731 ;
19732 ; Revision 1.11  1993/12/18  14:43:44  john
19733 ; Messed around with doing 1/z, the u*(1/z) and v*(1/z)
19734 ; (Went from 23 fps to 21 fps... not good! )
19735 ;
19736 ; Revision 1.10  1993/12/17  16:14:17  john
19737 ; Split lighted/nonlighted, so there is no cmp lighting
19738 ; in the inner loop.
19739 ;
19740 ; Revision 1.9  1993/12/17  12:34:29  john
19741 ; Made leftover bytes use linear approx instead of correct...
19742 ; should save about 8 divides per scanline on average.
19743 ; Also, took out anti-aliasing code and rearranged to
19744 ; order of some instructions to help on 486 pipelining.
19745 ; (The anti-aliasing code did *not* look good, so I
19746 ; figure there was no reason to keep it in. )
19747 ;
19748 ; Revision 1.8  1993/12/16  18:37:52  mike
19749 ; Align some stuff on 4 byte boundaries.
19750 ;
19751 ; Revision 1.7  1993/11/30  08:44:18  john
19752 ; Made selector set check for < 64*64 bitmaps.
19753 ;
19754 ; Revision 1.6  1993/11/23  17:25:26  john
19755 ; Added safety "and eax, 0fffh" in lighting lookup.
19756 ;
19757 ; Revision 1.5  1993/11/23  15:08:52  mike
19758 ; Fixed lighting bug.
19759 ;
19760 ; Revision 1.4  1993/11/23  14:38:50  john
19761 ; optimized NORMAL code by switching EBX and ESI, so BH can be used in
19762 ; the lighting process.
19763 ;
19764 ; Revision 1.3  1993/11/23  14:30:53  john
19765 ; Made the perspective tmapper do 1/8 divides; added lighting.
19766 ;
19767 ; Revision 1.2  1993/11/22  10:24:59  mike
19768 ; *** empty log message ***
19769 ;
19770 ; Revision 1.1  1993/09/08  17:29:53  mike
19771 ; Initial revision
19772
19773 ------------------------------------------------------------------------
19774 texmap/tmapfade.asm:
19775
19776 ; Revision 1.6  1995/02/20  18:23:01  john
19777 ; Put all the externs in the assembly modules into tmap_inc.asm.
19778 ; Also, moved all the C versions of the inner loops into a new module,
19779 ; scanline.c.
19780 ;
19781 ; Revision 1.5  1995/02/20  17:09:15  john
19782 ; Added code so that you can build the tmapper with no assembly!
19783 ;
19784 ; Revision 1.4  1994/12/02  23:29:36  mike
19785 ; change jb/ja to jl/jg.
19786 ;
19787 ; Revision 1.3  1994/11/30  00:57:36  mike
19788 ; *** empty log message ***
19789 ;
19790 ; Revision 1.2  1994/10/06  18:38:49  john
19791 ; Added the ability to fade a scanline by calling gr_upoly_tmap
19792 ; with Gr_scanline_darkening_level with a value < MAX_FADE_LEVELS.
19793 ;
19794 ; Revision 1.1  1994/10/06  18:04:42  john
19795 ; Initial revision
19796
19797 ------------------------------------------------------------------------
19798 texmap/tmapflat.c:
19799
19800 - * Revision 1.13  1995/02/20  18:23:24  john
19801 - * Added new module for C versions of inner loops.
19802 - *
19803 - * Revision 1.12  1995/02/20  17:09:17  john
19804 - * Added code so that you can build the tmapper with no assembly!
19805 - *
19806 - * Revision 1.11  1994/11/30  00:58:01  mike
19807 - * optimizations.
19808 - *
19809 - * Revision 1.10  1994/11/28  13:34:32  mike
19810 - * optimizations.
19811 - *
19812 - * Revision 1.9  1994/11/19  15:21:46  mike
19813 - * rip out unused code.
19814 - *
19815 - * Revision 1.8  1994/11/12  16:41:41  mike
19816 - * *** empty log message ***
19817 - *
19818 - * Revision 1.7  1994/11/09  23:05:12  mike
19819 - * do lighting on texture maps which get flat shaded instead.
19820 - *
19821 - * Revision 1.6  1994/10/06  19:53:07  matt
19822 - * Added function that takes same parms as draw_tmap(), but renders flat
19823 - *
19824 - * Revision 1.5  1994/10/06  18:38:12  john
19825 - * Added the ability to fade a scanline by calling gr_upoly_tmap
19826 - * with Gr_scanline_darkening_level with a value < MAX_FADE_LEVELS.
19827 - *
19828 - * Revision 1.4  1994/05/25  18:46:32  matt
19829 - * Added gr_upoly_tmap_ylr(), which generates ylr's for a polygon
19830 - *
19831 - * Revision 1.3  1994/04/08  16:25:58  mike
19832 - * Comment out some includes (of header files)
19833 - * call init_interface_vars_to_assembler.
19834 - *
19835 - * Revision 1.2  1994/03/31  08:33:44  mike
19836 - * Fixup flat shading version of texture mapper (get it?)
19837 - * (Or maybe not, I admit to not testing my code...hahahah!)
19838 - *
19839 - * Revision 1.1  1993/09/08  17:29:10  mike
19840 - * Initial revision
19841 ------------------------------------------------------------------------