1 #ifndef SHAPE_INCLUDED
2 #define SHAPE_INCLUDED
3 
4 #include "aw.h" // AW_BACKUPTEXTUREHANDLE
5 
6 /*
7 
8  Header File for Shape Data
9 
10 */
11 
12 #include "shpanim.h"
13 
14 
15 #ifdef __cplusplus
16 
17 	extern "C" {
18 
19 #endif
20 
21 
22 /*
23 
24  Macros for Defining Colours
25 
26 */
27 
28 #define col6(r, g, b) ((r << 4) + (g << 2) + b)
29 #define col8T(r, g, b) ((r << 5) + (g << 2) + b)
30 #define col15(r, g, b) ((r << 10) + (g << 5) + b)
31 #define col24(r, g, b) ((r << 16) + (g << 8) + b)
32 
33 
34 /*
35 
36  Shape Item Function Array Indices
37 
38 */
39 
40 typedef enum {
41 
42 	I_Pixel,
43 	I_Line,
44 
45 	I_Polygon,
46 	I_GouraudPolygon,
47 	I_PhongPolygon,
48 	I_2dTexturedPolygon,
49 	I_Gouraud2dTexturedPolygon,
50 	I_3dTexturedPolygon,
51 
52 	I_UnscaledSprite,
53 	I_ScaledSprite,
54 	I_SimpleShadedSphere,
55 	I_ShadedSphere,
56 
57 	I_CloakedPolygon,
58 	I_Pad2,
59 
60 	I_Polyline,
61 	I_FilledPolyline,
62 	I_Wireframe,
63 
64 	I_Pad3,
65 
66 	/* Z-Buffered */
67 
68 	I_ZB_Polygon,
69 	I_ZB_GouraudPolygon,
70 	I_ZB_PhongPolygon,
71 	I_ZB_2dTexturedPolygon,
72 	I_ZB_Gouraud2dTexturedPolygon,
73 	I_ZB_3dTexturedPolygon,
74 
75 	/* Others */
76 
77 	I_Gouraud3dTexturedPolygon,
78 	I_ZB_Gouraud3dTexturedPolygon,
79 
80 	I_Last
81 
82 } ShapeItems;
83 
84 
85 /*
86 
87  "shape.c" has been updated so that shapes without normals are outcoded
88  using the "scaled sprite" outcoding function, which looks at clip outcodes
89  but does not perform a back face cull.
90 
91 */
92 
93 #define I_ZB_ScaledSprite I_ZB_2dTexturedPolygon
94 
95 
96 
97 /*
98 
99  Structs for Shape Data
100 
101 */
102 
103 
104 /*
105 
106  BSP Block
107 
108 */
109 
110 #define bsp_mid_block 0
111 
112 /*
113 
114  This struct is the one that ends up being walked.
115  It is also used by z-trees, hence its unconditional inclusion.
116 
117 */
118 
119 typedef struct bsp_block {
120 
121 	void *frontblock;		/* +ve side of normal */
122 	void *backblock;		/* -ve side of normal */
123 
124 	#if bsp_mid_block
125 	void *middleblock;	/* For inclusion of another tree */
126 	#endif
127 
128 	int bsp_block_z;						/* For inclusion of z sorted data */
129 
130 	int bsp_block_flags;
131 
132 	int *bsp_block_data;					/* Polygon or other */
133 
134 } BSP_BLOCK;
135 
136 
137 
138 /*
139 
140  This struct is the form that Static BSP Tree blocks are allocated in
141 
142 */
143 
144 typedef struct static_bsp_block {
145 
146 	void *frontblock;		/* +ve side of normal */
147 	void *backblock;		/* -ve side of normal */
148 
149 	#if bsp_mid_block
150 	void *middleblock;	/* For inclusion of another tree */
151 	#endif
152 
153 	int bsp_numitems;						/* # items in array */
154 
155 	int bsp_block_flags;
156 
157 	int **bsp_block_data;				/* Pointer to item pointer array */
158 
159 } STATIC_BSP_BLOCK;
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 /*
172 
173  Shape Instruction Block
174 
175 */
176 
177 typedef struct shapeinstr {
178 
179 	int sh_instr;								/* int data */
180 	int sh_numitems;
181 	int **sh_instr_data;						/* ptr to int data */
182 
183 } SHAPEINSTR;
184 
185 
186 
187 
188 
189 
190 /*
191 
192  ZSP Header Block
193 
194 */
195 
196 typedef struct zspheader {
197 
198 	int zsp_x;						/* ZSP Array dimensions */
199 	int zsp_y;
200 	int zsp_z;
201 
202 	int zsp_edge;					/* Cube edge extent */
203 	int zsp_diagonal;				/* Cube diagonal extent */
204 
205 	struct zspzone *zsp_zone_array;
206 
207 } ZSPHEADER;
208 
209 
210 
211 /*
212 
213  ZSP Zone Structure
214 
215 */
216 
217 typedef struct zspzone {
218 
219 	int zsp_numitems;
220 	int **zsp_item_array_ptr;
221 
222 	int zsp_numpoints;
223 	int *zsp_vertex_array_ptr;
224 
225 } ZSPZONE;
226 
227 
228 /*
229 
230  RSP plane outcode flags
231 
232 */
233 
234 #define rsp_oc_x0 0x00000001
235 #define rsp_oc_x1 0x00000002
236 #define rsp_oc_y0 0x00000004
237 #define rsp_oc_y1 0x00000008
238 #define rsp_oc_z0 0x00000010
239 #define rsp_oc_z1 0x00000020
240 
241 
242 
243 
244 
245 /*
246 
247  Shape Header Block
248 
249 */
250 
251 
252 #if StandardShapeLanguage
253 
254 
255 /*
256 
257  Extra Item Data.
258 
259  As well as item extensions, items can have extra data in a parallel array.
260  This data can be accessed using the normal index.
261 
262 */
263 
264 typedef struct extraitemdata {
265 
266 	int EID_VertexI;				/* Prelighting Intensity for each Vertex */
267 
268 } EXTRAITEMDATA;
269 
270 
271 /* it might be a good idea to put in an instruction field here
272    so that each fragment can have an instruction telling it what
273    to do e.g. a remain around instruction */
274 
275 typedef struct shapefragment
276 {
277 
278 	int ShapeIndex;
279 	int NumFrags;
280 
281 	int x_offset;
282 	int y_offset;
283 	int z_offset;
284 
285 } SHAPEFRAGMENT;
286 
287 struct loaded_sound;
288 
289 typedef struct shapefragmentsound
290 {
291 	unsigned long inner_range;
292 	unsigned long outer_range;
293 	int max_volume;
294 	int	pitch;
295 	struct loaded_sound const * sound_loaded;
296 
297 } SHAPEFRAGMENTSOUND;
298 
299 typedef struct shapefragmentdesc
300 {
301   /* array of shape fragment indices terminated with
302      ShapeIndex = NumFrags = -1 */
303 	SHAPEFRAGMENT* sh_frags;
304 	SHAPEFRAGMENTSOUND* sh_fragsound;
305 } SHAPEFRAGMENTDESC;
306 
307 typedef struct	Adaptive_Degradation_Desc
308 {
309 	struct shapeheader* shape;
310 	int distance;/*The shape should be used if the distance is greater than or equal to this distance*/
311 
312 	/* KJL - some models are extremely low poly, and *only* work if they are drawn small on screen. */
313 	int shapeCanBeUsedCloseUp;
314 
315 }ADAPTIVE_DEGRADATION_DESC;
316 
317 typedef struct shapeheader {
318 
319 	int numpoints;								/* Total #points in shape */
320 	int numitems;								/* Total #items in shape */
321 
322 	int shapeflags;							/* Various Display Options */
323 
324 	int **points;
325 	int **items;
326 
327 	int **sh_normals;
328 	int **sh_vnormals;
329 
330 	int **sh_textures;						/* Polygon u,v definitions */
331 	char **sh_localtextures;				/* Array of ptrs to filenames */
332 
333 	SHAPEFRAGMENTDESC * sh_fragdesc;
334 
335 	EXTRAITEMDATA *sh_extraitemdata;
336 
337 	int sh_num_subshapes;					/* General use - NEVER use as test for
338 														the data being present */
339 	int shaperadius;							/* max(sqr(x^2+y^2+z^2)) */
340 	int shapemaxx;
341 	int shapeminx;
342 	int shapemaxy;
343 	int shapeminy;
344 	int shapemaxz;
345 	int shapeminz;
346 
347 	SHAPEINSTR *sh_instruction;			/* ptr to shape instr struct */
348 
349 	char * sh_name;
350 
351 	ZSPHEADER *sh_zsp_header;				/* ptr to zsp header structure */
352 
353 	SHAPEANIMATIONHEADER * animation_header;
354 
355 	/*if shape_degradation_array is not null then it is terminated with an entry whose distance is 0
356 	 and whose shape is this shapeheader*/
357 	 /*the shapes are listed in ascending order of complexity*/
358 	ADAPTIVE_DEGRADATION_DESC* shape_degradation_array;
359 
360 } SHAPEHEADER;
361 
362 
363 /* Shape Flags */
364 
365 #define ShapeFlag_3DS_AxisFlip	0x00000001
366 #define ShapeFlag_RSP				0x00000002		/* Run time creation */
367 #define ShapeFlag_Detail			0x00000004		/* Run time creation */
368 
369 
370 #define ShapeFlag_AugZ				0x00000010		/* For the Preprocessor */
371 #define ShapeFlag_AugZ_Lite		0x00000020		/* No points array */
372 
373 #define ShapeFlag_Free1				0x00000040
374 
375 #define ShapeFlag_SizeSortItems	0x00000080		/* For PP, AugZ only */
376 #define ShapeFlag_VSC_tx3d			0x00000100		/* Test for VSC usage */
377 #define ShapeFlag_ZSP				0x00000200		/* Run time creation */
378 #define ShapeFlag_Sprite			0x00000400		/* Object is a sprite */
379 #define ShapeFlag_SpriteR			0x00000800		/* It's a rotated sprite */
380 #define ShapeFlag_PreLit			0x00001000		/* Use EID prelighting data */
381 #define ShapeFlag_Cylinder			0x00002000		/* For binary loaders */
382 
383 
384 #define ShapeFlag_SpriteResizing		0x00008000		/* Resize polygon */
385 
386 #define ShapeFlag_MultiViewSprite	0x00010000		/* See "c7.doc" */
387 
388 #define ShapeFlag_UnrotatedPoints	0x00020000		/* Ignores "ObMat" */
389 #define ShapeFlag_HasTextureAnimation 0x00040000 /*at least one of the polygons has texture animation*/
390 
391 
392 
393 #else		/* StandardShapeLanguage */
394 
395 
396 	/*
397 
398 	If not using the standard shape language, place your own version of the
399 	shape header in the following include file.
400 
401 	*/
402 
403 	#include "sheader.h"
404 
405 
406 #endif	/* StandardShapeLanguage */
407 
408 
409 
410 /*
411 
412  Outcode Return Structure
413 
414 */
415 
416 typedef struct ocs_block {
417 
418 	int ocs_flags;			/* For general flagged messages */
419 	int ocs_viewdot;
420 	int ocs_clip_or;
421 	int ocs_clip_and;
422 	int ocs_clipstate;
423 	int ocs_ptsoutstate;
424 
425 } OCS_BLOCK;
426 
427 #define ocs_flag_outcoded		0x00000001
428 #define ocs_flag_nobfc			0x00000002
429 #define ocs_flag_noclipoc		0x00000004
430 #define ocs_flag_hazed			0x00000008
431 #define ocs_flag_hazehue_n0	0x00000010
432 #define ocs_flag_cwise			0x00000020
433 
434 
435 typedef enum {
436 
437 	ocs_cs_totally_off,		/* Item will be flagged as outcoded */
438 	ocs_cs_partially_on,
439 	ocs_cs_totally_on,
440 
441 } OCS_CLIPSTATES;
442 
443 
444 typedef enum {
445 
446 	ocs_pout_2d,			/* "ocs_cs_partially_on" or "ocs_cs_totally_on" */
447 	ocs_pout_3d				/* "ocs_cs_partially_on" */
448 
449 } OCS_PTSOUTSTATES;
450 
451 
452 /*
453 
454  Polygon Header Block
455 
456  Polygon Data is as generic as any item. However it might be useful to cast
457  the initial fixed part of its data to the following struct.
458 
459 */
460 
461 
462 #if StandardShapeLanguage
463 
464 
465 #define IHdrSize 4
466 #define ITrmSize 1
467 
468 typedef struct polyheader {
469 
470 	int PolyItemType;
471 	int PolyNormalIndex;
472 	int PolyFlags;
473 	int PolyColour;
474 	int Poly1stPt;
475 
476 } POLYHEADER;
477 
478 
479 /*
480 
481  Item Flags
482 
483  Some Item Flags can be shared, others are unique to a group of one or
484  more items.
485 
486 */
487 
488 #define iflag_notvis				0x00000001	/* Don't draw this item */
489 #define iflag_nolight			0x00000002	/* Take colour as is */
490 #define iflag_ignore0			0x00000004	/* Don't draw colour 0 - textures */
491 
492 #if (SupportViewports && SupportViewportClipping && 0)
493 #define iflag_noviewportclip	0x00000008	/* See object level option too */
494 #endif
495 
496 #define iflag_nosubdiv	0x00000008	// polygon too small to need sub dividing
497 
498 #define iflag_transparent		0x00000010	/* Function depends on Video Mode */
499 #define iflag_no_bfc				0x00000020	/* No Back Face Cull */
500 #define iflag_hazing				0x00000040	/* Haze / Depth Cue colour */
501 
502 #define iflag_zbuffer_w		0x00000080	/* Z-Buffer, Write-Only */
503 
504 #define iflag_shadingtable		0x00000100	/* Hue is a table index */
505 #define iflag_tab_gour_8		0x00000200	/* Gour. for 8-bit modes uses tab. */
506 #define iflag_extended			0x00000400	/* N. Index ptr to item ext. blk */
507 
508 #define iflag_verticaledges	0x00000800	/* A collision option whereby the
509 															item is treated as if it is a
510 															prism of infinite extent formed
511 															by extrusion of its world xz
512 															projection in the y-axis */
513 
514 #define iflag_mirror			0x00001000	/* polygon is a mirror polygon. Now there's a suprise*/
515 #define iflag_viewdotpos		0x00002000	/* Used by BFCRO */
516 
517 #define iflag_hue_per_vertex	0x00004000	/* INTERNAL USE ONLY! */
518 
519 #define iflag_no_mip				0x00008000	/* Use Index #0 */
520 
521 #define iflag_zbuffer_r			0x00010000	/* Z-Buffer, Read-Only */
522 
523 #define iflag_linear				0x00020000	/* Linear Interpolation */
524 
525 #define iflag_sortnearz			0x00040000	/* Use minz for depth value */
526 
527 #define iflag_detail				0x00080000	/* Item can be range outcoded */
528 #define iflag_dtest_not_done	0x00100000	/* Ensure just one range test */
529 
530 #define iflag_augz_planetest	0x00200000	/* Plane Test to help build tree */
531 
532 #define iflag_tx2dor3d			0x00400000	/* Decide each frame which it is */
533 
534 #define iflag_linear_s			0x00800000	/* Subdivided linear scans for
535 															3d textured polygons */
536 
537 #define iflag_gsort_ptest		0x01000000	/* Global sort, use plane test */
538 
539 #define iflag_drawtx3das2d		0x02000000	/* 3d until SC, draw as 2d */
540 
541 #define iflag_sortfarz			0x04000000	/* Use maxz for depth value */
542 
543 
544 #define iflag_light_corona		0x20000000 /* For use by the placed light strategy */
545 
546 #define iflag_txanim				0x40000000	/* UV array has animation data */
547 
548 // Taken this flag
549 #if SupportViewports && 0
550 #define iflag_viewport			0x80000000
551 #endif
552 
553 #define iflag_cwise				0x80000000	/* Polygon is clockwise */
554 
555 /*
556 
557  Item Extension
558 
559 */
560 
561 typedef struct itemextension {
562 
563 	int ie_nindex;
564 
565 	int ie_nx;		/* view space normal */
566 	int ie_ny;
567 	int ie_nz;
568 
569 	int ie_popx;	/* view space pop */
570 	int ie_popy;
571 	int ie_popz;
572 
573 	int ie_d;		/* distance of plane from view */
574 
575 	int ie_bigz;
576 	int ie_smallz;
577 	int ie_midz;
578 
579 	int ie_axis_state;
580 
581 	int ie_numpoints;
582 	int *ie_points_array;
583 
584 } ITEMEXTENSION;
585 
586 
587 /*
588 
589  Poly Header for Extended Items
590 
591 */
592 
593 typedef struct polyheader_ie {
594 
595 	int PolyItemType;
596 	ITEMEXTENSION *PolyItemExtension;
597 	int PolyFlags;
598 	int PolyColour;
599 	int Poly1stPt;
600 
601 } POLYHEADER_IE;
602 
603 
604 
605 #if SupportViewports
606 
607 
608 /*
609 
610  Poly Header for Viewport Polygons
611 
612  Viewport polygons have "iflag_viewport" set. They can only be accessed
613  through the structure below when they have had their Clip Window structure
614  allocated.
615 
616 */
617 
618 typedef struct polyheader_vp {
619 
620 	int PolyItemType;
621 	int PolyNormalIndex;
622 	int PolyFlags;
623 	struct viewportclipwindow *PolyViewportClipWindow;
624 	int Poly1stPt;
625 
626 } POLYHEADER_VP;
627 
628 
629 #endif	/* SupportViewports */
630 
631 
632 
633 
634 
635 #else		/* StandardShapeLanguage */
636 
637 
638 	/*
639 
640 	If not using the standard shape language, place your own version of the
641 	item/polygon header in the following include file.
642 
643 	*/
644 
645 	#include "pheader.h"
646 
647 
648 #endif	/* StandardShapeLanguage */
649 
650 
651 typedef enum {
652 
653 	axis_yz,		/* x axis plane - normal x biggest */
654 	axis_xz,		/* y axis plane - normal y biggest */
655 	axis_xy		/* z axis plane - normal z biggest */
656 
657 } AXISSTATES;
658 
659 
660 /*
661 
662  Structure for Item Size Sort
663 
664 */
665 
666 typedef struct itemsizeblock {
667 
668 	struct itemsizeblock *isb_lower;
669 	struct itemsizeblock *isb_higher;
670 	int *isb_itemptr;
671 	int isb_itemsize;
672 
673 } ITEMSIZEBLOCK;
674 
675 
676 
677 
678 /*
679 
680  Texels
681 
682 */
683 
684 typedef struct texel {
685 
686 	int uuu;
687 	int vee;
688 
689 } TEXEL;
690 
691 
692 #if support3dtextures
693 
694 #if int3dtextures
695 
696 typedef struct texelf {
697 
698 	int uuuf;
699 	int veef;
700 
701 } TEXELF;
702 
703 #else
704 
705 typedef struct texelf {
706 
707 	float uuuf;
708 	float veef;
709 
710 } TEXELF;
711 
712 #endif
713 
714 #endif
715 
716 
717 #if SupportGouraud3dTextures
718 
719 typedef struct texelgtx3d {
720 
721 	float uuuf;
722 	float veef;
723 
724 } TEXELGTX3D;
725 
726 #endif
727 
728 
729 /*
730 
731  Internal Image Structure
732 
733 */
734 
735 
736 #if StandardShapeLanguage
737 
738 
739 typedef unsigned char TEXTURE;
740 
741 #define ImageNameSize 128+1
742 
743 
744 typedef struct imageheader {
745 
746 	int ImageWidth;
747 
748 	int ImageWidthShift;				/* Image Width as a power of 2 */
749 
750 	TEXTURE *ImagePtr;					/* Pointer to texture in memory */
751 
752 	LPDIRECTDRAWSURFACE DDSurface;
753 	LPDIRECT3DTEXTURE D3DTexture;
754 	D3DTEXTUREHANDLE D3DHandle;
755 	AW_BACKUPTEXTUREHANDLE hBackup;
756 
757 	int ImageNum;							/* # MIP images */
758 	char ImageName[ImageNameSize];	/* Filename */
759 
760 	int ImageHeight;						/* Height, Pixels */
761 
762 	int ImageSize;							/* Size of Image Data in bytes */
763 	int ImageFlags;						/* Load / Display Options */
764 
765 
766 } IMAGEHEADER;
767 
768 
769 /* Image Header Flags */
770 
771 #define ih_flag_mip         0x00000001 /* MIP map data is available */
772 #define ih_flag_nochromakey 0x00000002 /* internal load flag indicating that d3_func should NOT set chroma keying for this image */
773 #define ih_flag_tlt         0x00000004 /* image pixels must be remapped through the tlt to get the screen palette entry */
774 #define ih_flag_16bit       0x00000008 /* in conjunction with ih_flag_tlt, the image is 16bit and the tlt has more entries to correspond */
775 
776 
777 #else		/* StandardShapeLanguage */
778 
779 
780 	/*
781 
782 	If not using the standard shape language, place your own version of the
783 	image header in the following include file.
784 
785 	*/
786 
787 	#include "iheader.h"
788 
789 
790 #endif	/* StandardShapeLanguage */
791 
792 
793 typedef struct imageextents {
794 
795 	int u_low;
796 	int v_low;
797 
798 	int u_high;
799 	int v_high;
800 
801 } IMAGEEXTENTS;
802 
803 
804 typedef struct imagepolyextents {
805 
806 	int x_low;
807 	int y_low;
808 
809 	int x_high;
810 	int y_high;
811 
812 } IMAGEPOLYEXTENTS;
813 
814 
815 /*
816 
817  Structure for accessing 24-bit images
818 
819 */
820 
821 typedef struct texture24 {
822 
823 	unsigned char r24;
824 	unsigned char g24;
825 	unsigned char b24;
826 
827 } TEXTURE24;
828 
829 
830 /*
831 
832  Texture and Sprite Animation
833 
834 */
835 
836 
837 #if StandardShapeLanguage
838 
839 
840 /*
841 
842  Texture Animation Header Structure
843 
844  The data is stored as an array of ints and so the pointer must be recast
845  to this structure for access, just as item pointers must be.
846 
847 */
848 
849 typedef struct txanimheader {
850 
851 	int txa_flags;
852 	int txa_state;
853 	int txa_numframes;
854 	struct txanimframe *txa_framedata;
855 	int txa_currentframe;
856 	int txa_maxframe;
857 	int txa_speed;
858 	int txa_anim_id;	  //this will be the same for all sequences on a given polygon
859 
860 	int txa_num_mvs_images;	/* Multi-View Sprites - TOTAL number of images */
861 	int txa_eulerxshift;		/* Multi-View Sprites, scale Euler X for index */
862 	int txa_euleryshift;		/* As above, for Euler Y */
863 
864 } TXANIMHEADER;
865 
866 #define txa_flag_play					0x00000001
867 #define txa_flag_reverse				0x00000002
868 #define txa_flag_noloop	 				0x00000004
869 #define txa_flag_interpolate_uvs		0x00000008
870 #define txa_flag_quantiseframetime	0x00000010
871 
872 
873 /*
874 
875  Texture Animation Frame Structure
876 
877  The header has a pointer to an array of these structures
878  UV data for each frame is held in a separate int array
879 
880 */
881 
882 typedef struct txanimframe {
883 
884 	int txf_flags;
885 	int txf_scale;
886 	int txf_scalex;
887 	int txf_scaley;
888 	int txf_orient;
889 	int txf_orientx;
890 	int txf_orienty;
891 	int txf_numuvs;
892 	int *txf_uvdata;
893 	intptr_t txf_image; // SBF: 64HACK - needed to match TXANIMFRAME_MVS
894 
895 } TXANIMFRAME;
896 
897 
898 /* For a multi-view sprite use this structure instead */
899 
900 typedef struct txanimframe_mvs {
901 
902 	int txf_flags;
903 	int txf_scale;
904 	int txf_scalex;
905 	int txf_scaley;
906 	int txf_orient;
907 	int txf_orientx;
908 	int txf_orienty;
909 	int txf_numuvs;
910 
911 	int **txf_uvdata;	/* Pointer to array of pointers to UV array per image */
912 
913 	int *txf_images;	/* Pointer to a 2d array of image indices */
914 
915 } TXANIMFRAME_MVS;
916 
917 
918 /*
919 
920  Display Block Texture Animation Control Block
921 
922  An arbitrary number of these can be attached through a linked list to the
923  display block.
924 
925 */
926 
927 typedef struct txactrlblk {
928 
929 	int tac_flags;
930 	int tac_item;
931 	int tac_sequence;
932 	int tac_node;
933 	int *tac_txarray;
934 	TXANIMHEADER tac_txah;
935 	TXANIMHEADER *tac_txah_s;
936 	struct txactrlblk *tac_next;
937 	int tac_anim_id;
938 
939 } TXACTRLBLK;
940 
941 
942 
943 
944 /*
945 
946  Shape Instruction Function Array Indices
947 
948 */
949 
950 typedef enum {
951 
952 	I_ShapePoints,
953 	I_ShapeProject,
954 	I_ShapeNormals,
955 	I_ShapeVNormals,
956 	I_ShapeItems,
957 
958 	I_ShapeFree5,
959 	I_ShapeFree6,
960 
961 	I_ShapeEnd,
962 
963 	I_ShapeAugZItems,
964 
965 	I_ShapeFree1,
966 	I_ShapeFree2,
967 	I_ShapeFree3,
968 	I_ShapeFree4,
969 
970 	I_ShapeSpritePoints,
971 	I_ShapeSpriteRPoints,
972 
973 	I_Shape_ZSP_Points,
974 	I_Shape_ZSP_Project,
975 	I_Shape_ZSP_VNormals,
976 	I_Shape_ZSP_Items,
977 
978 	I_ShapeCylinder,
979 
980 	I_ShapeTransformLightRender,
981 
982 	I_ShapeViewFacingPolys,
983 
984 	I_ShapeUnrotatedPoints,
985 
986     I_ShapeBackdropPoints,
987 
988 	I_Shape_LastInstr
989 
990 } SHAPEFUNCTION;
991 
992 
993 #else		/* StandardShapeLanguage */
994 
995 
996 	/*
997 
998 	If not using the standard shape language, place your own version of the
999 	texture animation control block in the following include file.
1000 
1001 	*/
1002 
1003 	#include "theader.h"
1004 
1005 
1006 #endif	/* StandardShapeLanguage */
1007 
1008 
1009 #ifdef __cplusplus
1010 
1011 	};
1012 
1013 #endif
1014 
1015 
1016 #endif
1017