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