forked from LostArtefacts/TRX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsymbols.txt
4890 lines (4663 loc) · 205 KB
/
symbols.txt
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
# TYPES
typedef IDirect3DDevice2 *LPDIRECT3DDEVICE2;
typedef IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
typedef IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
typedef IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
typedef DDSURFACEDESC DDSDESC, *LPDDSDESC;
typedef LPDIRECTDRAWSURFACE3 LPDDS;
typedef LPDIRECTDRAW3 LPDD;
typedef D3DTEXTUREHANDLE HWR_TEXTURE_HANDLE;
typedef struct __unaligned {
int32_t x;
int32_t y;
int32_t z;
} XYZ_32;
typedef struct __unaligned {
int16_t x;
int16_t y;
int16_t z;
} XYZ_16;
typedef struct __unaligned {
int32_t _00;
int32_t _01;
int32_t _02;
int32_t _03;
int32_t _10;
int32_t _11;
int32_t _12;
int32_t _13;
int32_t _20;
int32_t _21;
int32_t _22;
int32_t _23;
} MATRIX;
typedef enum {
VGA_NO_VGA = 0,
VGA_256_COLOR = 1,
VGA_MODEX = 2,
VGA_STANDARD = 3,
} VGA_MODE;
typedef struct __unaligned {
LPBITMAPINFO bmp_info;
void *bmp_data;
HPALETTE hPalette;
DWORD flags;
} BITMAP_RESOURCE;
typedef struct __unaligned {
int32_t width;
int32_t height;
int32_t bpp;
VGA_MODE vga;
} DISPLAY_MODE;
typedef struct __unaligned DISPLAY_MODE_NODE {
struct DISPLAY_MODE_NODE *next;
struct DISPLAY_MODE_NODE *previous;
DISPLAY_MODE body;
} DISPLAY_MODE_NODE;
typedef struct __unaligned {
DISPLAY_MODE_NODE *head;
DISPLAY_MODE_NODE *tail;
DWORD count;
} DISPLAY_MODE_LIST;
typedef struct __unaligned {
char *content;
bool is_valid;
} STRING_FLAGGED;
typedef struct __unaligned {
LPGUID adapter_guid_ptr;
GUID adapter_guid;
STRING_FLAGGED driver_desc;
STRING_FLAGGED driver_name;
DDCAPS_DX5 driver_caps;
DDCAPS_DX5 hel_caps;
GUID device_guid;
D3DDEVICEDESC_V2 hw_device_desc;
DISPLAY_MODE_LIST hw_disp_mode_list;
DISPLAY_MODE_LIST sw_disp_mode_list;
DISPLAY_MODE vga_mode1;
DISPLAY_MODE vga_mode2;
uint32_t screen_width;
bool hw_render_supported;
bool sw_windowed_supported;
bool hw_windowed_supported;
bool is_vga_mode1_presented;
bool is_vga_mode2_presented;
bool perspective_correct_supported;
bool dither_supported;
bool zbuffer_supported;
bool linear_filter_supported;
bool shade_restricted;
} DISPLAY_ADAPTER;
typedef struct __unaligned DISPLAY_ADAPTER_NODE {
struct DISPLAY_ADAPTER_NODE *next;
struct DISPLAY_ADAPTER_NODE *previous;
DISPLAY_ADAPTER body;
} DISPLAY_ADAPTER_NODE;
typedef struct __unaligned {
DISPLAY_ADAPTER_NODE *head;
DISPLAY_ADAPTER_NODE *tail;
DWORD count;
} DISPLAY_ADAPTER_LIST;
typedef struct __unaligned {
GUID *adapter_guid_ptr;
GUID adapter_guid;
STRING_FLAGGED description;
STRING_FLAGGED module;
} SOUND_ADAPTER;
typedef struct __unaligned SOUND_ADAPTER_NODE {
struct SOUND_ADAPTER_NODE *next;
struct SOUND_ADAPTER_NODE *previous;
SOUND_ADAPTER body;
} SOUND_ADAPTER_NODE;
typedef struct __unaligned {
SOUND_ADAPTER_NODE *head;
SOUND_ADAPTER_NODE *tail;
DWORD count;
} SOUND_ADAPTER_LIST;
typedef struct __unaligned {
GUID *lpJoystickGuid;
GUID joystickGuid;
STRING_FLAGGED productName;
STRING_FLAGGED instanceName;
} JOYSTICK;
typedef struct __unaligned JOYSTICK_NODE {
struct JOYSTICK_NODE *next;
struct JOYSTICK_NODE *previous;
JOYSTICK body;
} JOYSTICK_NODE;
typedef struct __unaligned JOYSTICK_LIST {
struct JOYSTICK_LIST *head;
struct JOYSTICK_LIST *tail;
DWORD count;
} JOYSTICK_LIST;
typedef enum {
RM_UNKNOWN = 0,
RM_SOFTWARE = 1,
RM_HARDWARE = 2,
} RENDER_MODE;
typedef enum {
AM_4_3 = 0,
AM_16_9 = 1,
AM_ANY = 2,
} ASPECT_MODE;
typedef enum {
TAM_DISABLED = 0,
TAM_BILINEAR_ONLY = 1,
TAM_ALWAYS = 2,
} TEXEL_ADJUST_MODE;
typedef struct __unaligned {
DISPLAY_ADAPTER_NODE *preferred_display_adapter;
SOUND_ADAPTER_NODE *preferred_sound_adapter;
JOYSTICK_NODE *preferred_joystick;
const DISPLAY_MODE_NODE *video_mode;
RENDER_MODE render_mode;
int32_t window_width;
int32_t window_height;
ASPECT_MODE aspect_mode;
bool perspective_correct;
bool dither;
bool zbuffer;
bool bilinear_filtering;
bool triple_buffering; // TODO: remove this option
bool fullscreen;
bool sound_enabled;
bool lara_mic; // TODO: remove this option
bool joystick_enabled;
bool disable_16bit_textures;
bool dont_sort_primitives;
bool flip_broken;
TEXEL_ADJUST_MODE texel_adjust_mode;
int32_t nearest_adjustment;
int32_t linear_adjustment;
} APP_SETTINGS;
typedef struct __unaligned {
LPDDS sys_mem_surface;
LPDDS vid_mem_surface;
LPDIRECTDRAWPALETTE palette;
LPDIRECT3DTEXTURE2 texture_3d;
HWR_TEXTURE_HANDLE tex_handle;
int32_t width;
int32_t height;
int32_t status;
} TEXPAGE_DESC;
typedef struct __unaligned {
union {
uint8_t red;
uint8_t r;
};
union {
uint8_t green;
uint8_t g;
};
union {
uint8_t blue;
uint8_t b;
};
} RGB_888;
typedef struct __unaligned {
union {
uint8_t red;
uint8_t r;
};
union {
uint8_t green;
uint8_t g;
};
union {
uint8_t blue;
uint8_t b;
};
union {
uint8_t alpha;
uint8_t a;
};
} RGBA_8888;
typedef struct {
struct {
uint32_t r;
uint32_t g;
uint32_t b;
uint32_t a;
} mask, depth, offset;
} COLOR_BIT_MASKS;
typedef struct __unaligned {
D3DCOLOR clr[4][4];
} GOURAUD_FILL;
typedef struct __unaligned {
D3DCOLOR clr[9];
} GOURAUD_OUTLINE;
typedef struct __unaligned {
uint8_t index[256];
} DEPTHQ_ENTRY;
typedef struct __unaligned {
uint8_t index[32];
} GOURAUD_ENTRY;
typedef struct __unaligned {
XYZ_32 pos;
XYZ_16 rot;
} PHD_3DPOS;
typedef struct __unaligned {
int32_t x;
int32_t y;
int32_t z;
int32_t r;
} SPHERE;
typedef struct __unaligned {
union {
uint32_t all;
struct {
uint32_t active: 1;
uint32_t flash: 1;
uint32_t rotate_h: 1;
uint32_t rotate_v: 1;
uint32_t centre_h: 1;
uint32_t centre_v: 1;
uint32_t hide: 1;
uint32_t right: 1;
uint32_t bottom: 1;
uint32_t background: 1;
uint32_t outline: 1;
uint32_t multiline: 1;
uint32_t manual_draw: 1; // not present in the OG
};
} flags;
uint16_t text_flags;
uint16_t bgnd_flags;
uint16_t outl_flags;
XYZ_16 pos;
int16_t letter_spacing;
int16_t word_spacing;
struct {
int16_t rate;
int16_t count;
} flash;
int16_t bgnd_color;
const uint16_t *bgnd_gour;
int16_t outl_color;
const uint16_t *outl_gour;
struct {
int16_t x;
int16_t y;
} bgnd_size;
XYZ_16 bgnd_off;
struct {
int32_t h;
int32_t v;
} scale;
char *content;
} TEXTSTRING;
typedef struct __unaligned {
float xv;
float yv;
float zv;
float rhw;
float xs;
float ys;
int16_t clip;
int16_t g;
int16_t u;
int16_t v;
} PHD_VBUF;
typedef struct __unaligned {
uint16_t u;
uint16_t v;
} PHD_UV;
typedef struct __unaligned {
uint16_t draw_type;
uint16_t tex_page;
PHD_UV uv[4];
} PHD_TEXTURE;
typedef struct __unaligned {
uint16_t tex_page;
uint16_t offset;
uint16_t width;
uint16_t height;
int16_t x0;
int16_t y0;
int16_t x1;
int16_t y1;
} PHD_SPRITE;
typedef enum {
SHAPE_SPRITE = 1,
SHAPE_LINE = 2,
SHAPE_BOX = 3,
SHAPE_FBOX = 4,
} SHAPE;
typedef enum {
SPRF_RGB = 0x00FFFFFF,
SPRF_ABS = 0x01000000,
SPRF_SEMITRANS = 0x02000000,
SPRF_SCALE = 0x04000000,
SPRF_SHADE = 0x08000000,
} SPRITE_FLAG;
typedef struct __unaligned {
float xv;
float yv;
float zv;
float rhw;
float xs;
float ys;
float u;
float v;
float g;
} POINT_INFO;
typedef struct __unaligned {
float x;
float y;
float rhw;
float u;
float v;
float g;
} VERTEX_INFO;
typedef enum {
INPUT_ROLE_FORWARD = 0,
INPUT_ROLE_BACK = 1,
INPUT_ROLE_LEFT = 2,
INPUT_ROLE_RIGHT = 3,
INPUT_ROLE_STEP_L = 4,
INPUT_ROLE_STEP_R = 5,
INPUT_ROLE_SLOW = 6,
INPUT_ROLE_JUMP = 7,
INPUT_ROLE_ACTION = 8,
INPUT_ROLE_DRAW = 9,
INPUT_ROLE_USE_FLARE = 10,
INPUT_ROLE_LOOK = 11,
INPUT_ROLE_ROLL = 12,
INPUT_ROLE_OPTION = 13,
} INPUT_ROLE;
typedef struct __unaligned {
uint16_t no_selector : 1;
uint16_t ready : 1; // not present in the OG
uint16_t pad : 14;
uint16_t items_count;
uint16_t selected;
uint16_t visible_count;
uint16_t line_offset;
uint16_t line_old_offset;
uint16_t pix_width;
uint16_t line_height;
int16_t x_pos;
int16_t y_pos;
int16_t z_pos;
uint16_t item_string_len;
char *pitem_strings1;
char *pitem_strings2;
uint32_t *pitem_flags1;
uint32_t *pitem_flags2;
uint32_t heading_flags1;
uint32_t heading_flags2;
uint32_t background_flags;
uint32_t moreup_flags;
uint32_t moredown_flags;
uint32_t item_flags1[24]; // MAX_REQUESTER_ITEMS
uint32_t item_flags2[24]; // MAX_REQUESTER_ITEMS
TEXTSTRING *heading_text1;
TEXTSTRING *heading_text2;
TEXTSTRING *background_text;
TEXTSTRING *moreup_text;
TEXTSTRING *moredown_text;
TEXTSTRING *item_texts1[24]; // MAX_REQUESTER_ITEMS
TEXTSTRING *item_texts2[24]; // MAX_REQUESTER_ITEMS
char heading_string1[32];
char heading_string2[32];
uint32_t render_width;
uint32_t render_height;
} REQUEST_INFO;
typedef enum {
POLY_GTMAP = 0,
POLY_WGTMAP = 1,
POLY_GTMAP_PERSP = 2,
POLY_WGTMAP_PERSP = 3,
POLY_LINE = 4,
POLY_FLAT = 5,
POLY_GOURAUD = 6,
POLY_TRANS = 7,
POLY_SPRITE = 8,
POLY_HWR_GTMAP = 9,
POLY_HWR_WGTMAP = 10,
POLY_HWR_GOURAUD = 11,
POLY_HWR_LINE = 12,
POLY_HWR_TRANS = 13,
} POLY_TYPE;
typedef struct __unaligned {
uint32_t best_time[10];
uint32_t best_finish[10];
uint32_t finish_count;
} ASSAULT_STATS;
typedef struct __unaligned {
int32_t _0;
int32_t _1;
} SORT_ITEM;
typedef enum {
ST_AVG_Z = 0,
ST_MAX_Z = 1,
ST_FAR_Z = 2,
} SORT_TYPE;
typedef enum {
DRAW_OPAQUE = 0,
DRAW_COLOR_KEY = 1,
} DRAW_TYPE;
typedef struct __unaligned {
int32_t floor;
int32_t ceiling;
int32_t type;
} COLL_SIDE;
typedef struct __unaligned {
COLL_SIDE side_mid;
COLL_SIDE side_front;
COLL_SIDE side_left;
COLL_SIDE side_right;
int32_t radius;
int32_t bad_pos;
int32_t bad_neg;
int32_t bad_ceiling;
XYZ_32 shift;
XYZ_32 old;
int16_t old_anim_state;
int16_t old_anim_num;
int16_t old_frame_num;
int16_t facing;
int16_t quadrant;
int16_t coll_type;
int16_t *trigger;
int8_t x_tilt;
int8_t z_tilt;
int8_t hit_by_baddie;
int8_t hit_static;
uint16_t slopes_are_walls: 1; // 0x01 1
uint16_t slopes_are_pits: 1; // 0x02 2
uint16_t lava_is_pit: 1; // 0x04 4
uint16_t enable_baddie_push: 1; // 0x08 8
uint16_t enable_spaz: 1; // 0x10 16
uint16_t hit_ceiling: 1; // 0x20 32
uint16_t pad: 10;
} COLL_INFO;
typedef struct __unaligned {
int16_t min_x;
int16_t max_x;
int16_t min_y;
int16_t max_y;
int16_t min_z;
int16_t max_z;
} BOUNDS_16;
typedef struct __unaligned {
int16_t mesh_idx;
uint16_t flags;
BOUNDS_16 draw_bounds;
BOUNDS_16 collision_bounds;
} STATIC_INFO;
typedef struct __unaligned {
int32_t floor;
uint32_t touch_bits;
uint32_t mesh_bits;
int16_t object_id;
int16_t current_anim_state;
int16_t goal_anim_state;
int16_t required_anim_state;
int16_t anim_num;
int16_t frame_num;
int16_t room_num;
int16_t next_item;
int16_t next_active;
int16_t speed;
int16_t fall_speed;
int16_t hit_points;
int16_t box_num;
int16_t timer;
uint16_t flags;
int16_t shade_1;
int16_t shade_2;
int16_t carried_item;
void *data;
union {
struct {
XYZ_32 pos;
XYZ_16 rot;
};
PHD_3DPOS pos_full; // TODO: stick to pos and rot
};
uint16_t active: 1; // 0x0001
uint16_t status: 2; // 0x0002…0x0004
uint16_t gravity: 1; // 0x0008
uint16_t hit_status: 1; // 0x0010
uint16_t collidable: 1; // 0x0020
uint16_t looked_at: 1; // 0x0040
uint16_t dynamic_light: 1; // 0x0080
uint16_t killed: 1; // 0x0100
uint16_t pad: 7; // 0x0200…0x8000
} ITEM;
typedef struct __unaligned {
uint32_t timer;
uint32_t shots;
uint32_t hits;
uint32_t distance;
uint16_t kills;
uint8_t secrets_flags;
uint8_t medipacks;
} STATISTICS_INFO;
typedef struct __unaligned {
uint16_t pistol_ammo;
uint16_t magnum_ammo;
uint16_t uzi_ammo;
uint16_t shotgun_ammo;
uint16_t m16_ammo;
uint16_t grenade_ammo;
uint16_t harpoon_ammo;
uint8_t small_medipacks;
uint8_t large_medipacks;
uint8_t reserved1;
uint8_t flares;
uint8_t gun_status;
uint8_t gun_type;
uint16_t available: 1; // 0x01 1
uint16_t has_pistols: 1; // 0x02 2
uint16_t has_magnums: 1; // 0x04 4
uint16_t has_uzis: 1; // 0x08 8
uint16_t has_shotgun: 1; // 0x10 16
uint16_t has_m16: 1; // 0x20 32
uint16_t has_grenade: 1; // 0x40 64
uint16_t has_harpoon: 1; // 0x80 128
uint16_t pad : 8;
uint16_t reserved2;
STATISTICS_INFO statistics;
} START_INFO;
typedef struct __unaligned {
START_INFO start[24];
STATISTICS_INFO statistics;
int16_t current_level;
bool bonus_flag;
uint8_t num_pickup[2];
uint8_t num_puzzle[4];
uint8_t num_key[4];
uint16_t reserved;
char buffer[6272]; // MAX_SG_BUFFER_SIZE
} SAVEGAME_INFO;
typedef struct __unaligned {
uint16_t idx;
int16_t box;
uint8_t pit_room;
int8_t floor;
uint8_t sky_room;
int8_t ceiling;
} SECTOR;
typedef struct __unaligned {
int16_t lock_angles[4];
int16_t left_angles[4];
int16_t right_angles[4];
int16_t aim_speed;
int16_t shot_accuracy;
int32_t gun_height;
int32_t damage;
int32_t target_dist;
int16_t recoil_frame;
int16_t flash_time;
int16_t sample_num;
} WEAPON_INFO;
typedef struct __unaligned {
XYZ_32 pos;
XYZ_16 rot;
int16_t room_num;
int16_t object_id;
int16_t next_free;
int16_t next_active;
int16_t speed;
int16_t fall_speed;
int16_t frame_num;
int16_t counter;
int16_t shade;
} EFFECT;
typedef struct __unaligned {
int16_t zone_num;
int16_t enemy_zone_num;
int32_t distance;
int32_t ahead;
int32_t bite;
int16_t angle;
int16_t enemy_facing;
} AI_INFO;
typedef struct __unaligned {
int16_t exit_box;
uint16_t search_num;
int16_t next_expansion;
int16_t box_num;
} BOX_NODE;
typedef struct __unaligned {
BOX_NODE *node;
int16_t head;
int16_t tail;
uint16_t search_num;
uint16_t block_mask;
int16_t step;
int16_t drop;
int16_t fly;
int16_t zone_count;
int16_t target_box;
int16_t required_box;
XYZ_32 target;
} LOT_INFO;
typedef enum {
GFL_NO_LEVEL = -1,
GFL_TITLE = 0,
GFL_NORMAL = 1,
GFL_SAVED = 2,
GFL_DEMO = 3,
GFL_CUTSCENE = 4,
GFL_STORY = 5,
GFL_QUIET = 6,
GFL_MID_STORY = 7,
} GAME_FLOW_LEVEL_TYPE;
typedef struct __unaligned {
int16_t timer;
int16_t sprite;
} PICKUP_INFO;
typedef struct __unaligned {
int16_t shape;
XYZ_16 pos;
int32_t param1;
int32_t param2;
void *grdptr;
int16_t sprite_num;
} INVENTORY_SPRITE;
typedef struct __unaligned {
char *string;
int16_t object_id;
int16_t frames_total;
int16_t current_frame;
int16_t goal_frame;
int16_t open_frame;
int16_t anim_direction;
int16_t anim_speed;
int16_t anim_count;
int16_t x_rot_pt_sel;
int16_t x_rot_pt;
int16_t x_rot_sel;
int16_t x_rot_nosel;
int16_t x_rot;
int16_t y_rot_sel;
int16_t y_rot;
int32_t y_trans_sel;
int32_t y_trans;
int32_t z_trans_sel;
int32_t z_trans;
uint32_t meshes_sel;
uint32_t meshes_drawn;
int16_t inv_pos;
INVENTORY_SPRITE **sprite_list;
int32_t reserved[4];
} INVENTORY_ITEM;
typedef enum {
RNG_OPENING = 0,
RNG_OPEN = 1,
RNG_CLOSING = 2,
RNG_MAIN2OPTION = 3,
RNG_MAIN2KEYS = 4,
RNG_KEYS2MAIN = 5,
RNG_OPTION2MAIN = 6,
RNG_SELECTING = 7,
RNG_SELECTED = 8,
RNG_DESELECTING = 9,
RNG_DESELECT = 10,
RNG_CLOSING_ITEM = 11,
RNG_EXITING_INVENTORY = 12,
RNG_DONE = 13,
} RING_STATUS;
typedef struct __unaligned {
int16_t count;
int16_t status;
int16_t status_target;
int16_t radius_target;
int16_t radius_rate;
int16_t camera_y_target;
int16_t camera_y_rate;
int16_t camera_pitch_target;
int16_t camera_pitch_rate;
int16_t rotate_target;
int16_t rotate_rate;
int16_t item_pt_x_rot_target;
int16_t item_pt_x_rot_rate;
int16_t item_x_rot_target;
int16_t item_x_rot_rate;
int32_t item_y_trans_target;
int32_t item_y_trans_rate;
int32_t item_z_trans_target;
int32_t item_z_trans_rate;
int32_t misc;
} IMOTION_INFO;
typedef enum {
PM_SPINE = 1,
PM_FRONT = 2,
PM_IN_FRONT = 4,
PM_PAGE_2 = 8,
PM_BACK = 16,
PM_IN_BACK = 32,
PM_PAGE_1 = 64,
PM_COMMON = PM_SPINE | PM_BACK | PM_FRONT,
} PASS_MESH;
typedef struct __unaligned {
INVENTORY_ITEM **list;
int16_t type;
int16_t radius;
int16_t camera_pitch;
int16_t rotating;
int16_t rot_count;
int16_t current_object;
int16_t target_object;
int16_t number_of_objects;
int16_t angle_adder;
int16_t rot_adder;
int16_t rot_adder_l;
int16_t rot_adder_r;
PHD_3DPOS ring_pos;
PHD_3DPOS camera;
XYZ_32 light;
IMOTION_INFO *imo;
} RING_INFO;
typedef enum {
GFE_PICTURE = 0,
GFE_LIST_START = 1,
GFE_LIST_END = 2,
GFE_PLAY_FMV = 3,
GFE_START_LEVEL = 4,
GFE_CUTSCENE = 5,
GFE_LEVEL_COMPLETE = 6,
GFE_DEMO_PLAY = 7,
GFE_JUMP_TO_SEQ = 8,
GFE_END_SEQ = 9,
GFE_SET_TRACK = 10,
GFE_SUNSET = 11,
GFE_LOADING_PIC = 12,
GFE_DEADLY_WATER = 13,
GFE_REMOVE_WEAPONS = 14,
GFE_GAME_COMPLETE = 15,
GFE_CUT_ANGLE = 16,
GFE_NO_FLOOR = 17,
GFE_ADD_TO_INV = 18,
GFE_START_ANIM = 19,
GFE_NUM_SECRETS = 20,
GFE_KILL_TO_COMPLETE = 21,
GFE_REMOVE_AMMO = 22,
} GF_EVENTS;
typedef enum {
MOOD_BORED = 0,
MOOD_ATTACK = 1,
MOOD_ESCAPE = 2,
MOOD_STALK = 3,
} MOOD_TYPE;
typedef enum {
TARGET_NONE = 0,
TARGET_PRIMARY = 1,
TARGET_SECONDARY = 2,
} TARGET_TYPE;
typedef struct __unaligned {
XYZ_32 pos;
int32_t mesh_num;
} BITE;
typedef struct __unaligned {
int16_t *frame_ptr;
int16_t interpolation;
int16_t current_anim_state;
int32_t velocity;
int32_t acceleration;
int16_t frame_base;
int16_t frame_end;
int16_t jump_anim_num;
int16_t jump_frame_num;
int16_t num_changes;
int16_t change_idx;
int16_t num_commands;
int16_t command_idx;
} ANIM;
typedef struct {
int16_t goal_anim_state;
int16_t num_ranges;
int16_t range_idx;
} ANIM_CHANGE;
typedef struct {
int16_t start_frame;
int16_t end_frame;
int16_t link_anim_num;
int16_t link_frame_num;
} ANIM_RANGE;
typedef struct __unaligned {
int16_t room;
XYZ_16 normal;
XYZ_16 vertex[4];
} PORTAL;
typedef struct __unaligned {
int16_t count;
PORTAL portal[];
} PORTALS;
typedef struct __unaligned {
int32_t x;
int32_t y;
int32_t z;
int16_t intensity_1;
int16_t intensity_2;
int32_t falloff_1;
int32_t falloff_2;
} LIGHT;
typedef struct __unaligned {
XYZ_16 pos;
struct __unaligned {
int16_t y;
} rot;
int16_t shade_1;
int16_t shade_2;
int16_t static_num;
} MESH;
typedef enum {
RF_UNDERWATER = 0x01,
RF_OUTSIDE = 0x08,
RF_DYNAMIC_LIT = 0x10,
RF_NOT_INSIDE = 0x20,
RF_INSIDE = 0x40,
} ROOM_FLAG;
typedef struct __unaligned {
SECTOR *sector;
SECTOR old_sector;
int16_t block;
} DOORPOS_DATA;
typedef struct __unaligned {
DOORPOS_DATA d1;
DOORPOS_DATA d1flip;
DOORPOS_DATA d2;
DOORPOS_DATA d2flip;
} DOOR_DATA;
typedef struct __unaligned {
int16_t *data;
PORTALS *portals;
SECTOR *sectors;
LIGHT *lights;
MESH *meshes;
XYZ_32 pos;
int32_t min_floor;
int32_t max_ceiling;
struct __unaligned {
int16_t z;
int16_t x;
} size;
int16_t ambient_1;
int16_t ambient_2;
int16_t light_mode;
int16_t num_lights;
int16_t num_meshes;
int16_t bound_left;
int16_t bound_right;
int16_t bound_top;
int16_t bound_bottom;
uint16_t bound_active;
int16_t test_left;
int16_t test_right;
int16_t test_top;
int16_t test_bottom;
int16_t item_num;
int16_t effect_num;
int16_t flipped_room;
uint16_t flags;
} ROOM;
typedef struct __unaligned {
int16_t head_rotation;
int16_t neck_rotation;
int16_t maximum_turn;
int16_t flags;
int16_t item_num;
MOOD_TYPE mood;
LOT_INFO lot;
XYZ_32 target;
ITEM *enemy;
} CREATURE;
typedef enum {
CAM_CHASE = 0,
CAM_FIXED = 1,
CAM_LOOK = 2,
CAM_COMBAT = 3,