-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwl_def.h
2077 lines (1639 loc) · 52.2 KB
/
wl_def.h
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
#ifndef WL_DEF_H
#define WL_DEF_H
// Defines which version shall be built and configures supported extra features
#include "version.h"
#include <assert.h>
#include <fcntl.h>
#include <math.h>
#ifdef USE_REAL_RAND
#include <time.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(_arch_dreamcast)
# include <string.h>
# include "dc/dc_main.h"
#elif !defined(_WIN32)
# include <stdint.h>
# include <string.h>
# include <stdarg.h>
#endif
#include <SDL.h>
#if !defined O_BINARY
# define O_BINARY 0
#endif
#pragma pack(1)
#if defined(_arch_dreamcast)
#define YESBUTTONNAME "A"
#define NOBUTTONNAME "B"
#elif defined(GP2X)
#define YESBUTTONNAME "Y"
#define NOBUTTONNAME "B"
#else
#define YESBUTTONNAME "Y"
#define NOBUTTONNAME "N"
#endif
#include "foreign.h"
#ifndef SPEAR
#include "audiowl6.h"
#ifdef UPLOAD
#include "gfxv_apo.h"
#else
#ifdef JAPAN
#include "gfxv_jap.h"
#else
#ifdef GOODTIMES
#include "gfxv_wl6.h"
#else
#include "gfxv_apo.h"
#endif
#endif
#endif
#else
#include "audiosod.h"
#include "gfxv_sod.h"
#include "f_spear.h"
#endif
#ifdef _arch_dreamcast
typedef uint8 uint8_t;
typedef uint16 uint16_t;
typedef uint32 uint32_t;
typedef int8 int8_t;
typedef int16 int16_t;
typedef int32 int32_t;
typedef int64 int64_t;
typedef ptr_t uintptr_t;
#endif
typedef uint8_t byte;
typedef uint16_t word;
typedef int32_t fixed;
typedef uint32_t longword;
typedef int8_t boolean;
typedef void * memptr;
typedef struct
{
int x,y;
} Point;
typedef struct
{
Point ul,lr;
} Rect;
void Quit(const char *errorStr, ...);
#include "id_pm.h"
#include "id_sd.h"
#include "id_in.h"
#include "id_vl.h"
#include "id_vh.h"
#include "id_us.h"
#include "id_ca.h"
#include "wl_menu.h"
#ifdef SPEAR
#include "f_spear.h"
#endif
#define MAPSPOT(x,y,plane) (mapsegs[plane][((y)<<mapshift)+(x)])
#define SIGN(x) ((x)>0?1:-1)
#define ABS(x) ((int)(x)>0?(x):-(x))
#define LABS(x) ((int32_t)(x)>0?(x):-(x))
// causes conflict compiling with VS 2015 community
//#define abs(x) ABS(x)
/*
=============================================================================
GLOBAL CONSTANTS
=============================================================================
*/
#define MAXTICS 10
#define DEMOTICS 4
#define WALLSHIFT 10
#define BIT_WALL (1<<WALLSHIFT)
#define BIT_DOOR (1<<(WALLSHIFT+1))
#define BIT_ALLTILES (1<<(WALLSHIFT+2))
#define LAST_WALLNUM BIT_WALL-5
#define LAST_DOORNUM BIT_DOOR-1
#define MOVINGIN_N BIT_WALL-1
#define MOVINGIN_S BIT_WALL-2
#define MOVINGIN_E BIT_WALL-3
#define MOVINGIN_W BIT_WALL-4
#define MAXACTORS 1000 // max number of nazis, etc / map
#define MAXSTATS 2000 // max number of lamps, bonus, etc
#define MAXDOORS BIT_DOOR // max number of sliding doors
#define MAXWALLTILES BIT_WALL // max number of wall tiles
//
// tile constants
//
#define ICONARROWS 90
#define PUSHABLETILE 98
#define EXITTILE 99 // at end of castle
#define AREATILE 107 // first of NUMAREAS floor tiles
#define NUMAREAS 37
#define ELEVATORTILE 21
#define AMBUSHTILE 106
#define ALTELEVATORTILE 107
// -- EOD tile stuff --
#define HELLTILE 87
#define FIREPLACETILE 78
// --- Teleporter tile stuff
#define WARPEASTTILE 100
#define WARPWESTTILE 102
#define INVISWARPTILE 160
#define WESTINSTANT 0
// --- Special triggers
#define ENDLEVELTILE 225
#define ENEMYBLOCKTILE 261
// --- Stat obj stuff
#define ARMORTILE 39
#define TOILETTILE 35
#define CLONETOILETTILE 267 // used for easy clipping
#define RADIOTILE 328
#define REGENTILE 322
#define TURRETTILE 106 // used for easy clipping
// --- Secret tile stuff
#define SECRETTILE 380
#define SUPERSECRETTILE 381
// --- Wall switch tile stuff
#define SHOOTERTILE 65
#define SWITCHOFFTILE 57
#define SWITCHONTILE 58
#define SW_LIGHTS 388
#define SW_FIREWALL_1 408
#define SW_FIREWALL_2 409
#define SW_FIREWALL_3 410
#define SW_FIREWALL_4 411
#define SW_FIREWALL_5 412
#define SW_FIREWALL_6 413
#define SW_FIREWALL_7 414
#define SW_FIREWALL_8 415
#define SW_PUSHWALL_1 416
#define SW_PUSHWALL_2 417
#define SW_PUSHWALL_3 418
#define SW_PUSHWALL_4 419
#define PUSHWALL_1_N 420
#define PUSHWALL_1_E 421
#define PUSHWALL_1_S 422
#define PUSHWALL_1_W 423
#define PUSHWALL_2_N 424
#define PUSHWALL_2_E 425
#define PUSHWALL_2_S 426
#define PUSHWALL_2_W 427
#define PUSHWALL_3_N 428
#define PUSHWALL_3_E 429
#define PUSHWALL_3_S 430
#define PUSHWALL_3_W 431
#define PUSHWALL_4_N 432
#define PUSHWALL_4_E 433
#define PUSHWALL_4_S 434
#define PUSHWALL_4_W 435
// --- Spawn trigger tile stuff
#define SPN_TRG_OFC_1 512
#define SPN_TRG_OFC_2 513
#define SPN_TRG_SS_1 514
#define SPN_TRG_SS_2 515
#define SPN_TRG_GRD_1 516
#define SPN_TRG_GRD_2 517
#define SPN_TAR_OFC_1 518
#define SPN_TAR_OFC_2 519
#define SPN_TAR_SS_1 520
#define SPN_TAR_SS_2 521
#define SPN_TAR_GRD_1 522
#define SPN_TAR_GRD_2 523
// --- Flags for handling the timer
#define MAXTIMERS 4
#define T_LEVEL 1
#define T_GOD 2
#define T_FURY 4
// ----------------------------------
#define NUMBERCHARS 9
//----------------
#define EXTRAPOINTS 40000
#define PLAYERSPEED 3000
#define RUNSPEED 6000
#define SCREENSEG 0xa000
#define SCREENBWIDE 80
#define HEIGHTRATIO 0.5 // also defined in id_mm.c
#define BORDERCOLOR 3
#define FLASHCOLOR 5
#define FLASHTICS 4
#ifndef SPEAR
#define LRpack 8 // # of levels to store in endgame
#else
#define LRpack 60
#endif
#define PLAYERSIZE MINDIST // player radius
#define MINACTORDIST 0x10000l // minimum dist from player center
// to any actor center
#define MINPLAYERDIST 0xD800l
#define NUMLATCHPICS 100
#undef M_PI
#define PI 3.1415926535897932384626433832795 //3.14159265358979323846264338327950288419716939937510 //3.141592657
#define M_PI PI
#define GLOBAL1 (1l<<16)
#define TILEGLOBAL GLOBAL1
#define PIXGLOBAL (GLOBAL1/64)
#define TILESHIFT 16l
#define UNSIGNEDSHIFT 8
#define ANGLES 360 // must be divisable by 4
#define ANGLEQUAD (ANGLES/4)
#define FINEANGLES 3600
#define ANG90 (FINEANGLES/4)
#define ANG180 (ANG90*2)
#define ANG270 (ANG90*3)
#define ANG360 (ANG90*4)
#define VANG90 (ANGLES/4)
#define VANG180 (VANG90*2)
#define VANG270 (VANG90*3)
#define VANG360 (VANG90*4)
#define MINDIST (0x5800l)
#define mapshift 7
#define MAPSIZE (1<<mapshift)
#define maparea MAPSIZE*MAPSIZE
#define MAPSIZE_M1 MAPSIZE-1
#define mapheight MAPSIZE
#define mapwidth MAPSIZE
#ifdef USE_HIRES
#define TEXTURESHIFT 7
#define TEXTURESIZE (1<<TEXTURESHIFT)
#define TEXTUREFROMFIXEDSHIFT 2
#define TEXTUREMASK (TEXTURESIZE*(TEXTURESIZE-1))
#define SPRITESCALEFACTOR 1
#else
#define TEXTURESHIFT 6 // 6 (64) 7 (128)
#define TEXTURESIZE (1<<TEXTURESHIFT)
#define TEXTUREFROMFIXEDSHIFT 4
#define TEXTUREMASK (TEXTURESIZE*(TEXTURESIZE-1))
#define SPRITESCALEFACTOR 2
#endif
#define NORTH 0
#define EAST 1
#define SOUTH 2
#define WEST 3
#define NORTHANGLE 112
#define NORTHEASTANGLE 67
#define EASTANGLE 22
#define SOUTHEASTANGLE 337
#define SOUTHANGLE 292
#define SOUTHWESTANGLE 247
#define WESTANGLE 202
#define NORTHWESTANGLE 157
#define STATUSLINES 40
#define SCREENSIZE (SCREENBWIDE*208)
#define PAGE1START 0
#define PAGE2START (SCREENSIZE)
#define PAGE3START (SCREENSIZE*2u)
#define FREESTART (SCREENSIZE*3u)
#define PIXRADIUS 512
#define STARTAMMO 8
// object flag values
typedef enum
{
FL_SHOOTABLE = 0x00000001,
FL_BONUS = 0x00000002,
FL_NEVERMARK = 0x00000004,
FL_VISABLE = 0x00000008,
FL_ATTACKMODE = 0x00000010,
FL_FIRSTATTACK = 0x00000020,
FL_AMBUSH = 0x00000040,
FL_NONMARK = 0x00000080,
FL_FULLBRIGHT = 0x00000100,
#ifdef USE_DIR3DSPR
// you can choose one of the following values in wl_act1.cpp
// to make a static sprite a directional 3d sprite
// (see example at the end of the statinfo array)
FL_DIR_HORIZ_MID = 0x00000200,
FL_DIR_HORIZ_FW = 0x00000400,
FL_DIR_HORIZ_BW = 0x00000600,
FL_DIR_VERT_MID = 0x00000a00,
FL_DIR_VERT_FW = 0x00000c00,
FL_DIR_VERT_BW = 0x00000e00,
// these values are just used to improve readability of code
FL_DIR_NONE = 0x00000000,
FL_DIR_POS_MID = 0x00000200,
FL_DIR_POS_FW = 0x00000400,
FL_DIR_POS_BW = 0x00000600,
FL_DIR_POS_MASK = 0x00000600,
FL_DIR_VERT_FLAG = 0x00000800,
FL_DIR_MASK = 0x00000e00,
#endif
FL_STEALTH = 0x00001000,
FL_GIB = 0x00002000,
FL_BOSS = 0x00004000,
FL_IMMUNE = 0x00008000,
FL_INVISIBLE = 0x00010000
// next free bit is 0x00001000
} objflag_t;
//
// sprite constants
//
enum
{
SPR_DEMO,
#ifndef APOGEE_1_0
SPR_DEATHCAM,
#endif
//
// static sprites
//
SPR_STAT_0,SPR_STAT_1,SPR_STAT_2,SPR_STAT_3,
SPR_STAT_4,SPR_STAT_5,SPR_STAT_6,SPR_STAT_7,
SPR_STAT_8,SPR_STAT_9,SPR_STAT_10,SPR_STAT_11,
SPR_STAT_12,SPR_STAT_13,SPR_STAT_14,SPR_STAT_15,
SPR_STAT_16,SPR_STAT_17,SPR_STAT_18,SPR_STAT_19,
SPR_STAT_20,SPR_STAT_21,SPR_STAT_22,SPR_STAT_23,
SPR_STAT_24,SPR_STAT_25,SPR_STAT_26,SPR_STAT_27,
SPR_STAT_28,SPR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SPR_FAKE_DIE2,SPR_FAKE_DIE3,SPR_FAKE_DIE4,
SPR_FAKE_DIE5,SPR_FAKE_DEAD,
//
// hitler
//
SPR_MECHA_W1,SPR_MECHA_W2,SPR_MECHA_W3,SPR_MECHA_W4,
SPR_MECHA_SHOOT1,SPR_MECHA_SHOOT2,SPR_MECHA_SHOOT3,SPR_MECHA_DEAD,
SPR_MECHA_DIE1,SPR_MECHA_DIE2,SPR_MECHA_DIE3,
SPR_HITLER_W1,SPR_HITLER_W2,SPR_HITLER_W3,SPR_HITLER_W4,
SPR_HITLER_SHOOT1,SPR_HITLER_SHOOT2,SPR_HITLER_SHOOT3,SPR_HITLER_DEAD,
SPR_HITLER_DIE1,SPR_HITLER_DIE2,SPR_HITLER_DIE3,SPR_HITLER_DIE4,
SPR_HITLER_DIE5,SPR_HITLER_DIE6,SPR_HITLER_DIE7,
//
// giftmacher
//
SPR_GIFT_W1,SPR_GIFT_W2,SPR_GIFT_W3,SPR_GIFT_W4,
SPR_GIFT_SHOOT1,SPR_GIFT_SHOOT2,
SPR_GIFT_DIE1,SPR_GIFT_DIE2,SPR_GIFT_DIE3,SPR_GIFT_DEAD,
#endif
//
// Rocket, smoke and small explosion
//
SPR_ROCKET_1,SPR_ROCKET_2,SPR_ROCKET_3,SPR_ROCKET_4,
SPR_ROCKET_5,SPR_ROCKET_6,SPR_ROCKET_7,SPR_ROCKET_8,
SPR_SMOKE_1,SPR_SMOKE_2,SPR_SMOKE_3,SPR_SMOKE_4,
SPR_BOOM_1,SPR_BOOM_2,SPR_BOOM_3,
//
// Angel of Death's DeathSparks(tm)
//
#ifdef SPEAR
SPR_HROCKET_1,SPR_HROCKET_2,SPR_HROCKET_3,SPR_HROCKET_4,
SPR_HROCKET_5,SPR_HROCKET_6,SPR_HROCKET_7,SPR_HROCKET_8,
SPR_HSMOKE_1,SPR_HSMOKE_2,SPR_HSMOKE_3,SPR_HSMOKE_4,
SPR_HBOOM_1,SPR_HBOOM_2,SPR_HBOOM_3,
SPR_STAT_SNOWYWELL,SPR_STAT_SPEARRACK_3D,SPR_STAT_WOODBARRIER_3D,SPR_STAT_RADIO,
#endif
#ifndef SPEAR
//
// gretel
//
SPR_GRETEL_W1,SPR_GRETEL_W2,SPR_GRETEL_W3,SPR_GRETEL_W4,
SPR_GRETEL_SHOOT1,SPR_GRETEL_SHOOT2,SPR_GRETEL_SHOOT3,SPR_GRETEL_DEAD,
SPR_GRETEL_DIE1,SPR_GRETEL_DIE2,SPR_GRETEL_DIE3,
//
// fat face
//
SPR_FAT_W1,SPR_FAT_W2,SPR_FAT_W3,SPR_FAT_W4,
SPR_FAT_SHOOT1,SPR_FAT_SHOOT2,SPR_FAT_SHOOT3,SPR_FAT_SHOOT4,
SPR_FAT_DIE1,SPR_FAT_DIE2,SPR_FAT_DIE3,SPR_FAT_DEAD,
//
// bj
//
#ifdef APOGEE_1_0
SPR_BJ_W1=360,
#elif defined(APOGEE_1_1) && defined(UPLOAD)
SPR_BJ_W1=406,
#else
SPR_BJ_W1,
#endif
SPR_BJ_W2,SPR_BJ_W3,SPR_BJ_W4,
SPR_BJ_JUMP1,SPR_BJ_JUMP2,SPR_BJ_JUMP3,SPR_BJ_JUMP4,
#else
//
// THESE ARE FOR 'SPEAR OF DESTINY'
//
//
// Trans Grosse
//
SPR_GRAU_W1,SPR_GRAU_W2,SPR_GRAU_W3,SPR_GRAU_W4,
SPR_GRAU_SHOOT1,SPR_GRAU_SHOOT2,SPR_GRAU_SHOOT3,SPR_GRAU_DEAD,
SPR_GRAU_DIE1,SPR_GRAU_DIE2,SPR_GRAU_DIE3,
//
// Wilhelm
//
SPR_OTTO_W1,SPR_OTTO_W2,SPR_OTTO_W3,SPR_OTTO_W4,
SPR_OTTO_SHOOT1,SPR_OTTO_SHOOT2,SPR_OTTO_SHOOT3,SPR_OTTO_SHOOT4,
SPR_OTTO_DIE1,SPR_OTTO_DIE2,SPR_OTTO_DIE3,SPR_OTTO_DEAD,
//
// UberMutant
//
SPR_SUPERCLONE_W1,SPR_SUPERCLONE_W2,SPR_SUPERCLONE_W3,SPR_SUPERCLONE_W4,
SPR_SUPERCLONE_SHOOT1,SPR_SUPERCLONE_SHOOT2,SPR_SUPERCLONE_SHOOT3,SPR_SUPERCLONE_SHOOT4,
SPR_SUPERCLONE_DIE1,SPR_SUPERCLONE_DIE2,SPR_SUPERCLONE_DIE3,SPR_SUPERCLONE_DIE4,
SPR_SUPERCLONE_DEAD,
//
// Death Knight
//
SPR_BARON_W1,SPR_BARON_W2,SPR_BARON_W3,SPR_BARON_W4,
SPR_BARON_SHOOT1,SPR_BARON_SHOOT2,SPR_BARON_SHOOT3,SPR_BARON_SHOOT4,
SPR_BARON_DIE1,SPR_BARON_DIE2,SPR_BARON_DIE3,SPR_BARON_DIE4,
SPR_BARON_DIE5,SPR_BARON_DIE6,SPR_BARON_DEAD,
//
// Ghost
//
SPR_STAT_BARBF_3D,SPR_STAT_BARBS_3D,SPR_STAT_IRONGATE_3D,SPR_STAT_METALGRATE_3D,
SPR_STAT_GOODBERRY,SPR_STAT_BADBERRY,SPR_STAT_BRNBRKA_3DNS,SPR_STAT_BRNBRKA_3DEW,
//
// Angel of Death
//
SPR_ANGEL_W1,SPR_ANGEL_W2,SPR_ANGEL_W3,SPR_ANGEL_W4,
SPR_ANGEL_SHOOT1,SPR_ANGEL_SHOOT2,SPR_ANGEL_TIRED1,SPR_ANGEL_TIRED2,
SPR_ANGEL_DIE1,SPR_ANGEL_DIE2,SPR_ANGEL_DIE3,SPR_ANGEL_DIE4,
SPR_ANGEL_DIE5,SPR_ANGEL_DIE6,SPR_ANGEL_DIE7,SPR_ANGEL_DEAD,
#endif
//
// player attack frames
//
SPR_KNIFEREADY,SPR_KNIFEATK1,SPR_KNIFEATK2,SPR_KNIFEATK3,
SPR_KNIFEATK4,
SPR_PISTOLREADY,SPR_PISTOLATK1,SPR_PISTOLATK2,SPR_PISTOLATK3,
SPR_PISTOLATK4,
SPR_MACHINEGUNREADY,SPR_MACHINEGUNATK1,SPR_MACHINEGUNATK2,MACHINEGUNATK3,
SPR_MACHINEGUNATK4,
SPR_CHAINREADY,SPR_CHAINATK1,SPR_CHAINATK2,SPR_CHAINATK3,
SPR_CHAINATK4,
// BEGIN EXTRA
SPR_MK4READY,SPR_MK4ATK1,SPR_MK4ATK2,SPR_MK4ATK3,SPR_MK4ATK4,
SPR_STAT_MK4,SPR_STAT_BLOODKEY,SPR_STAT_ELEKEY,SPR_STAT_LANDMINE,
SPR_STAT_COLUMNDEAD,SPR_STAT_SECAMMOCLIP,SPR_STAT_BLACKCOLUMN,SPR_STAT_BUTCHERTABLE,
SPR_STAT_BLACKDIAMOND,SPR_STAT_ROCKS1,SPR_STAT_ROCKS2,SPR_STAT_BLOODYSKELE,
SPR_STAT_HANGBLOODSKULL,
// Directional sprites
SPR_STAT_SOF_3DNS,SPR_STAT_SOF_3DEW,
SPR_STAT_LIGHTDEAD,
// Directional sprites
SPR_STAT_BRNBRKW_3DNS, SPR_STAT_BRNBRKW_3DEW,
SPR_STAT_HANGPLANT,SPR_STAT_HITLERSTATUE,SPR_STAT_REDBARREL,
SPR_BARRELEXP1,SPR_BARRELEXP2,SPR_BARRELEXP3,SPR_BARRELDEAD,
// Animated outdoor torch
SPR_STAT_OTORCH1,SPR_STAT_OTORCH2,SPR_STAT_OTORCH3,SPR_STAT_OTORCH4,
SPR_STAT_HANGCLEANSKULL,SPR_STAT_SKULLPOLE1,SPR_STAT_SKULLPOLE2,
//Animated indoor torch
SPR_STAT_ITORCH1,SPR_STAT_ITORCH2,SPR_STAT_ITORCH3,SPR_STAT_ITORCH4,
SPR_STAT_SECAMMOBOX,
// Column breaking animation
SPR_COLUMNBREAK1,SPR_COLUMNBREAK2,SPR_COLUMNBREAK3,SPR_COLUMNBREAK4,
// Silenced rifle
SPR_RIFLEREADY,SPR_RIFLEATK1,SPR_RIFLEATK2,SPR_RIFLEATK3,SPR_RIFLEATK4,
// Launcher
SPR_LAUNCHERREADY,SPR_LAUNCHERATK1,SPR_LAUNCHERATK2,SPR_LAUNCHERATK3,SPR_LAUNCHERATK4,
// Directional stuff
SPR_STAT_FLAG_3D,SPR_STAT_RAIL_3D,
SPR_STAT_SNOWYPINE,SPR_STAT_PEDVASE,SPR_STAT_DESK1,SPR_STAT_FLAG1,
SPR_STAT_BARETREE,SPR_STAT_WELLFULL,SPR_STAT_ROCKS3,SPR_STAT_BONES1,
SPR_STAT_CLEANSKULL,SPR_STAT_BLOODYSKULL,SPR_STAT_POISON,SPR_STAT_TELE,
// Animated newlife
SPR_STAT_NEWLIFE1,SPR_STAT_NEWLIFE2,SPR_STAT_NEWLIFE3,SPR_STAT_NEWLIFE4,
SPR_STAT_BACKPACK,
SPR_STAT_STEEL_3DNS,SPR_STAT_STEEL_3DEW,
SPR_STAT_UNIPOLE,SPR_STAT_SKULLS,SPR_STAT_SKELE2,SPR_STAT_RIFLE,
SPR_STAT_LAUNCHER,SPR_STAT_WELLEMPTY,SPR_STAT_RUSTBARREL,SPR_STAT_SPENTBOX,
SPR_STAT_VINES,SPR_STAT_RIFLEAMMO,SPR_STAT_LAUNCHERAMMOBOX,SPR_STAT_PISTOL,
// TURRET
SPR_TURRET_S1,SPR_TURRET_S2,SPR_TURRET_S3,SPR_TURRET_S4,
SPR_TURRET_S5,SPR_TURRET_S6,SPR_TURRET_S7,SPR_TURRET_S8,
SPR_TURRET_FIRE,
SPR_STAT_HATPOLE,SPR_STAT_CANDLES,
SPR_TURRET_DIE1,SPR_TURRET_DIE2,SPR_TURRET_DIE3,SPR_TURRET_DIE4,
SPR_STAT_WEB1_3D,
// Animated bonus objects
SPR_STAT_SAVEGAME1,SPR_STAT_STAT_SAVEGAME2,SPR_STAT_SAVEGAME3,
SPR_STAT_SAVEGAME4,
SPR_STAT_FURY1,SPR_STAT_FURY2,SPR_STAT_FURY3,SPR_STAT_FURY4,
SPR_STAT_DEATH1,SPR_STAT_DEATH2,SPR_STAT_DEATH3,SPR_STAT_DEATH4,
SPR_STAT_TELE1,SPR_STAT_TELE2,SPR_STAT_TELE3,SPR_STAT_TELE4,
SPR_STAT_GOD1,SPR_STAT_GOD2,SPR_STAT_GOD3,SPR_STAT_GOD4,
// Flame enemy?
SPR_FLAME1,SPR_FLAME2,SPR_FLAME3,SPR_FLAME4,
SPR_FLAME_DIE1,SPR_FLAME_DIE2,SPR_FLAME_DIE3,SPR_FLAME_DIE4,
SPR_STAT_WEB2_3D,SPR_STAT_MINESIGN_3D,SPR_STAT_CONCRETE_3DNS,SPR_STAT_CONCRETE_3DEW,
SPR_FLAME2_DIE1,SPR_FLAME2_DIE2,SPR_FLAME2_DIE3,SPR_FLAME2_DIE4,
SPR_STAT_REGEN1,SPR_STAT_REGEN2,SPR_STAT_REGEN3,SPR_STAT_REGEN4,
SPR_STAT_FLAME1,SPR_STAT_FLAME2,SPR_STAT_FLAME3,SPR_STAT_FLAME4,
// Ultra clone
SPR_ULTRACLONE_W1,SPR_ULTRACLONE_W2,SPR_ULTRACLONE_W3,SPR_ULTRACLONE_W4,
SPR_ULTRACLONE_AIM,SPR_ULTRACLONE_SHOOT1,SPR_ULTRACLONE_SHOOT2,
SPR_ULTRACLONE_DIE1,SPR_ULTRACLONE_DIE2,SPR_ULTRACLONE_DIE3,SPR_ULTRACLONE_DIE4,
SPR_ULTRACLONE_DEAD,
// Heinrich
SPR_HEINRICH_W1,SPR_HEINRICH_W2,SPR_HEINRICH_W3,SPR_HEINRICH_W4,
SPR_HEINRICH_AIM,SPR_HEINRICH_SHOOT1,SPR_HEINRICH_SHOOT2,SPR_HEINRICH_SHOOT3,
SPR_HEINRICH_DIE1,SPR_HEINRICH_DIE2,SPR_HEINRICH_DIE3,SPR_HEINRICH_DIE4,
SPR_HEINRICH_DIE5,SPR_HEINRICH_DEAD,
// Spear weapon
SPR_SPEARREADY,SPR_SPEARATK1,SPR_SPEARATK2,SPR_SPEARATK3,SPR_SPEARATK4,
// Fireball
SPR_FIREBALL_1,SPR_FIREBALL_2,SPR_FIREBALL_3,SPR_FIREBALL_4,
SPR_FIREBALL_5,SPR_FIREBALL_6,SPR_FIREBALL_7,SPR_FIREBALL_8,
SPR_FIREBALL_TRAIL1,SPR_FIREBALL_TRAIL2,SPR_FIREBALL_TRAIL3,SPR_FIREBALL_TRAIL4,
SPR_FIREBALL_EXP1,SPR_FIREBALL_EXP2,SPR_FIREBALL_EXP3,
SPR_EXPLOSIVEDEATH1,SPR_EXPLOSIVEDEATH2,SPR_EXPLOSIVEDEATH3,SPR_EXPLOSIVEDEATH4,
SPR_FIREYDEATH1,SPR_FIREYDEATH2,SPR_FIREYDEATH3,
SPR_STAT_PORTMED,SPR_TOILETCLONE,
SPR_ROBOT_W1,SPR_ROBOT_W2,SPR_ROBOT_W3,SPR_ROBOT_W4,
SPR_ROBOT_AIM,SPR_ROBOT_SHOOT1,SPR_ROBOT_SHOOT2,
SPR_ROBOT_DIE1,SPR_ROBOT_DIE2,SPR_ROBOT_DIE3,SPR_ROBOT_DIE4,
SPR_ROBOT_DEAD,
SPR_STAT_SNOWBRICK_3DNS,SPR_STAT_SNOWBRICK_3DEW,
SPR_STAT_GREYBRICK_3DNS,SPR_STAT_GREYBRICK_3DEW,
// SNOWMAN!!
SPR_SNOWMAN_W1,SPR_SNOWMAN_W2,
SPR_SNOWMAN_DIE1,SPR_SNOWMAN_DIE2,SPR_SNOWMAN_DIE3,SPR_SNOWMAN_DEAD,
// Spear weapon projectile
SPR_SPEARPROJ_1,SPR_SPEARPROJ_2,SPR_SPEARPROJ_3,SPR_SPEARPROJ_4,
SPR_SPEARPROJ_5,SPR_SPEARPROJ_6,SPR_SPEARPROJ_7,SPR_SPEARPROJ_8,
SPR_SPEARPROJ_TRAIL1,SPR_SPEARPROJ_TRAIL2,SPR_SPEARPROJ_TRAIL3,SPR_SPEARPROJ_TRAIL4,
SPR_SPEARPROJ_EXP1,SPR_SPEARPROJ_EXP2,SPR_SPEARPROJ_EXP3,
SPR_STAT_XMASPINE
};
/*
=============================================================================
GLOBAL TYPES
=============================================================================
*/
typedef enum {
di_north,
di_east,
di_south,
di_west
} controldir_t;
typedef enum {
dr_normal,
dr_lock1,
dr_lock2,
dr_lock3,
dr_lock4,
dr_elevator,
dr_rust,
dr_wood,
dr_auto
} door_t;
typedef enum {
ac_badobject = -1,
ac_no,
ac_yes,
ac_allways
} activetype;
typedef enum {
nothing,
playerobj,
inertobj,
guardobj,
officerobj,
ssobj,
suicideobj,
mutantobj,
ghostobj,
rocketobj,
spectreobj,
angelobj,
grauobj,
supercloneobj,
ottoobj,
baronobj,
hrocketobj,
sparkobj,
ultracloneobj,
robotobj,
heinrichobj,
turretobj,
barrelobj,
columnobj,
snowmanobj,
fireballobj,
spearprojobj,
toiletobj
} classtype;
typedef enum {
none,
block,
bo_gibs,
bo_alpo,
bo_firstaid,
bo_key1,
bo_key2,
bo_key3,
bo_key4,
bo_cross,
bo_chalice,
bo_bible,
bo_crown,
bo_clip,
bo_clip2,
bo_machinegun,
bo_mk3,
bo_food,
bo_fullheal,
bo_25clip,
bo_spear,
bo_sclip,
bo_diamond,
bo_s25clip,
bo_mk4,
bo_landmine,
bo_backpack,
bo_goodberry,
bo_badberry,
bo_poison,
bo_pistol,
bo_rifle,
bo_launcher,
bo_rifleclip,
bo_rocketbox,
bo_save,
bo_fury,
bo_death,
bo_god,
bo_portmed,
bo_secret,
bo_supersecret,
bo_grdspn1,
bo_grdspn2,
bo_ssspn1,
bo_ssspn2,
bo_ofcspn1,
bo_ofcspn2
// TODO: add drop clips for ustom ammo?
} wl_stat_t;
typedef enum {
east,
northeast,
north,
northwest,
west,
southwest,
south,
southeast,
nodir
} dirtype;
#define NUMENEMIES 29