Codebase list overgod / upstream/1.0+git20191016.1.af2b17e config.h
upstream/1.0+git20191016.1.af2b17e

Tree @upstream/1.0+git20191016.1.af2b17e (Download .tar.gz)

config.h @upstream/1.0+git20191016.1.af2b17eraw · history · blame

   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
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
//Platform:

//#define OVERGOD_DOS

#ifdef ALLEGRO_WINDOWS
#define OVERGOD_WINDOWS
#endif

#if defined (ALLEGRO_LINUX) || defined(ALLEGRO_UNIX)
#define OVERGOD_LINUX
#endif

#ifdef ALLEGRO_MACOSX
#define OVERGOD_MAC
#endif


//#define SANITY_CHECK


#define NO_CLOUDS 1000
#define NO_ACTORS 25
#define NO_BULLETS 1000
#define NO_PLAYERS 2
#define GRAIN 1000
//#define NO_CMDS 12
#define NO_STARS 100
#define NO_PICKUPS 20

#define MAX_SCORE 9999999
#define GRID_WIDTH 50

#define NO_WEAPONS 2
#define NO_SHIP_TYPES 17

#define NO_SYSTEM_TYPES 3

#define NO_UPGRADES 9

#define FULL_UPGRADE 5

#define NO_ENEMY_ATTRIBUTES 10
#define NO_ENEMIES 40
#define MAX_TURRETS 4
//#define NO_ENEMY_TYPES 50

#define ANGLE_FULL_HEX 0x400
#define ANGLE_FULL 1024
#define ANGLE_HALF 512
#define ANGLE_QUARTER 256
#define ANGLE_1_EIGHTH 128
#define ANGLE_1_SIXTEENTH 64
#define ANGLE_3_EIGHTHS 384
#define ANGLE_3_SIXTEENTHS 192
#define ANGLE_1_32 32
#define ANGLE_TO_FIXED 4

#define OWNER_ENEMY -1

#define ATTACK_NONE -1

#define MAX_EYES 8

#ifndef PI
#define PI 3.141592
#endif

#define ARMOUR_UPGRADE 200


struct armoury
{
 char *name;
 int type;
 int speed;
 int timeout;
 int damage;
 int mass;

};

enum
{
TARGET_PRIMARY, // need to kill to advance
TARGET_NO, // turrets etc
TARGET_EXTRA,
TARGET_CRAWLY // crawlies...
};

enum
{
CMD_THRUST,
CMD_LEFT,
CMD_RIGHT,
CMD_FIRE1,
CMD_FIRE2,
CMD_BRAKE,
CMD_LEFT1,
CMD_RIGHT1,
CMD_UPGRADE,
CMD_LINK,
NO_CMDS
};

enum
{
GAME_SINGLE,
GAME_COOP,
GAME_DUEL,
GAME_TIME_ATTACK,
GAME_TIME_ATTACK_COOP
};

enum
{
SECONDARY_NONE,
SECONDARY_MISSILE,
SECONDARY_BOMB
};

enum
{
ACTORTYPE_NONE,
ACTORTYPE_SHIP,
ACTORTYPE_REDSHIP

};

/*
SHIPS:

Pointy: extra-damage darts
Horseshoe: Fast secondary recycle
round: armour self-repairs
Retro: retro-rocket instead of drag field
small: smaller collision radius
fins: backfire
large rear wings: orbital
curve: bounces off enemies (ram)
*/

enum
{
SHIP_POINTY,
SHIP_HORSESHOE,
SHIP_ROUND,
SHIP_RETRO,
SHIP_SMALL,
SHIP_FINS,
SHIP_ORBITAL,
SHIP_CURVE

/*SHIP_LACEWING,
SHIP_CAPYBARA,
SHIP_DESPOT,
SHIP_HOOKWORM,
SHIP_LENTIL,
SHIP_PORKUPINE,
SHIP_PRONG,
SHIP_SCORPION,
SHIP_TORTFEASOR,
SHIP_AETHER,
SHIP_RUMSFELD,
SHIP_GODBOTHERER,
SHIP_BOTULUS,
SHIP_SLIDEWINDER,
SHIP_DOOM*/

};

/*

Ships:

Lacewing - pointy: fighter
Aether Squid - spiny: multifire
Lentil - rounded: heavy bomber
Rumsfeld's Delight - triangle: silly
Hookworm - small round wing: many homing missiles
Tortfeasor - 2 prongs: light bomber (+ slide)
False Scorpion: - bracketed: agile
Porkupine - large round wing: multi missiles

Despot - wide lacewing - just 2 homing missiles
Capybara - blobby - medium bomber
Prong - pointy2 - super cannons

Godbotherer - fat triangle - heavy fighter - multi, autof, heavy cannons, tubes?
Botulus - backwards curve - fast rocketed missiles - rocket, loader, multi, power,
Slidewinder - three triangles - fast seeker missiles - seek, loader, auto, slide
Doom Fork - two prongs forwards - drifter - auto, power, rocket, whead
 
*/

/*
Aether Squid
Lentil
*/

enum
{
PICKUP_NONE,
PICKUP_REPAIR,
PICKUP_GRACE,
PICKUP_SHIP,
PICKUP_SQUARE,
PICKUP_CIRCLE,
PICKUP_TRIANGLE,
PICKUP_PRESYMBOL,
PICKUP_SECONDARY,
PICKUP_PRESECONDARY
};

enum
{
SYMBOL_SQUARE,
SYMBOL_CIRCLE,
SYMBOL_TRIANGLE,
SYMBOL_CROSS
};

#define SYMBOL_TIMEOUT 64

enum
{
ABILITY_PRIMARY,
ABILITY_DRIVE,
ABILITY_SECONDARY,
ABILITY_DEFENCE
};

enum
{
SUBTYPE_NONE, // for creepy-crawlies
SUBTYPE_GREEN,
SUBTYPE_YELLOW,
SUBTYPE_ORANGE,
SUBTYPE_RED,
SUBTYPE_BLUE,
SUBTYPE_PURPLE,
SUBTYPE_WHITE
};


enum
{
FIGHTER_ATTACK,
FIGHTER_MOVE,
BEE_RESTING
};

enum
{
BULLET_NONE,
BULLET_ZAP,
BULLET_POWERED,
BULLET_MISSILE,
BULLET_MISSILE_MINI,
BULLET_BOMB,
BULLET_BOMB_SIDE,
BULLET_BOMBLET, // also used for cluster missiles
BULLET_STING,
BULLET_HOSTILE,
BULLET_PREMINE,
BULLET_MINE,
BULLET_BLUE_BLOB,
BULLET_RED_BLOB,
BULLET_YELLOW_BLOB,
BULLET_ORANGE_BLOB,
BULLET_SEEKER_BLOB,
BULLET_PLASMA,
BULLET_PRESEEKMINE,
BULLET_SEEKMINE,
BULLET_SEEKER_BLOB2,
BULLET_LINES,
BULLET_CURVE,
BULLET_PRONG,
BULLET_ORBITAL,
BULLET_FLAK,
BULLET_SEEKER_BLOB3,
BULLET_ZZZ_BOLT,
BULLET_TORPEDO,
BULLET_SUPERSTING,
BULLET_NICE_ORBITAL,
BULLET_STING2,
BULLET_PURPLE_BLOB,
BULLET_BOSS4,
BULLET_TORPEDO2,

BULLET_BALL1,
BULLET_BALL2,

BULLET_WOODEN_DART,
BULLET_ICE_DART,
BULLET_SILVER_TOOTH,
BULLET_SNOW_DART,
BULLET_FROZEN_BREATH,
BULLET_SHOCK_PATH,
BULLET_BRASS_TOOTH,
BULLET_CRYSTAL_TOOTH,
BULLET_GOLDEN_NEEDLE,
BULLET_PARTICLE_SPITTER,
BULLET_CRYSTAL_SPINE,
BULLET_GOLDEN_PATH,
BULLET_NUMEROUS_DART,
BULLET_NUMEROUS_BLADE,
BULLET_FAR_SPITTER,
//BULLET_ICE_TOOTH,
BULLET_BURNING_SPIRIT,

BULLET_WOODEN_DART_SMALL,
BULLET_ICE_DART_SMALL,
BULLET_SILVER_TOOTH_SMALL,
BULLET_SNOW_DART_SMALL,
BULLET_BRASS_TOOTH_SMALL,
BULLET_SHOCK_PATH_SMALL,
BULLET_GOLDEN_PATH_SMALL,
BULLET_GOLDEN_NEEDLE_SMALL,

BULLET_FURIOUS_ORB,
BULLET_BURNING_EYE,
BULLET_LARVA_NEST,
BULLET_MANIFOLD_ORB,
BULLET_EYE_DESOLATION,
BULLET_TERROR_EEL,
BULLET_PANIC_EEL,
BULLET_WORM_SORROW,
BULLET_WORM_AGONY,
BULLET_FROZEN_STAR,
BULLET_FROZEN_TOOTH,
BULLET_ORB_RECTIFICATION,

BULLET_FURIOUS_ORB_SMALL,
BULLET_BURNING_EYE_SMALL,
BULLET_EYE_DESOLATION_SMALL,
BULLET_LARVA_NEST_SMALL,
BULLET_MANIFOLD_ORB_SMALL,

BULLET_GREEN_BLAT,
BULLET_EVIL_EEL,
BULLET_YELLOW_PULSE,
BULLET_CIRCLES,
BULLET_SHOCK,
BULLET_SQUIRMY,
BULLET_BURST,
BULLET_BURNING_DRAGGED,
BULLET_SEEKER1,
BULLET_SEEKER2,
BULLET_SEEKER3,
BULLET_SEEKER4,
BULLET_BLUE_BLAT,
BULLET_BLAST,
BULLET_E_BOMB,
BULLET_E_BOMB2,
BULLET_TWIRLY1,
BULLET_TWIRLY2,
BULLET_WINGS1,
BULLET_WINGS2,
BULLET_WINGS3,
BULLET_BLOCKS,
BULLET_THICK_SHOCK,
BULLET_WORM_BOMB,
BULLET_CIRCLES2,
BULLET_EVIL_WORM,
BULLET_FORK1,
BULLET_FORK2,
BULLET_FORK3,
BULLET_MINE1,
BULLET_MINE2,
BULLET_MINE3,
BULLET_MINE4,
BULLET_BOLT,
BULLET_CIRCLER,
BULLET_YELLOW_BLAT,
BULLET_BFLAK,
BULLET_YELLOW_FLAK,
BULLET_PUFFY3,
BULLET_PUFFY4,
BULLET_EVIL_STAR,
BULLET_PULSE1,
BULLET_PULSE2,
BULLET_TOXIC_SUN,
BULLET_TOXIC_FLARE,

BULLET_FLOWER,
BULLET_PETAL1,
BULLET_PETAL2,
BULLET_BIGBALL1,
BULLET_BIGSEEKER,
BULLET_BIGWINGS1,
BULLET_BIGWINGS2,
BULLET_BIGWINGS3,
BULLET_BIGCIRCLES,
BULLET_ORBIT,
BULLET_ATTRACTOR_LINE,
BULLET_DISRUPT1,
BULLET_DISRUPT1_DROP,
BULLET_DISRUPT2,
BULLET_DISRUPT3,
BULLET_SPORE,
BULLET_FLOWER2,
BULLET_TRI1,
BULLET_TRI2,
BULLET_TRI3,
BULLET_OVERTRI,
BULLET_CLAW,
BULLET_TURN_WORM,
BULLET_ZAP_DRAG,
BULLET_JET,
BULLET_TWISTY,
BULLET_TWIRLY3,
BULLET_CHARGE_LINE,
BULLET_CHARGE,
BULLET_OVERPULSE,
BULLET_SLIVER,
BULLET_NOVA,
BULLET_HOLE,
BULLET_HOLE_LINE,
BULLET_ZIGZAG1,
BULLET_MBOMB,
BULLET_CRYSTAL1,
BULLET_CRYSTAL2,
BULLET_SWIRL1,
BULLET_SWIRL2,
BULLET_BFLAK2,
BULLET_CURVEY,
BULLET_LINE_PULSE,
BULLET_OVERBLOCKS,
BULLET_ZIGZAG2,
BULLET_FLAME
};

enum
{
WEAPON_WOODEN_DARTS,
WEAPON_SNOW_DARTS,
WEAPON_SILVER_TEETH,
WEAPON_ICE_DARTS,
WEAPON_FROZEN_BREATH,
WEAPON_BRASS_TEETH,
WEAPON_SHOCK_PATH,
WEAPON_CRYSTAL_TEETH,
WEAPON_GOLDEN_NEEDLES,
WEAPON_PARTICLE_SPITTER,
WEAPON_CRYSTAL_SPINES,
WEAPON_GOLDEN_PATH,
WEAPON_NUMEROUS_DARTS,
WEAPON_NUMEROUS_BLADES,
WEAPON_FAR_SPITTER,
WEAPON_BURNING_SPIRIT
};

enum
{
WPN_DARTS, // like wooden darts
WPN_BURST, // like numerous darts (all equal)
WPN_SPINES, // high-speed
WPN_TEETH // long-range

};

enum
{
SECOND_NONE,
SECOND_FURIOUS_ORB,
SECOND_BURNING_EYE,
SECOND_LARVA_NEST,
SECOND_MANIFOLD_ORB,
SECOND_EYE_DESOLATION,
SECOND_TERROR_EELS,
SECOND_PANIC_EELS,
SECOND_WORMS_SORROW,
SECOND_WORMS_AGONY,
SECOND_FROZEN_STARS,
SECOND_FROZEN_TEETH,
SECOND_TOXIC_SUN,
SECOND_FLOWER,
SECOND_SPORES,
SECOND_CLAWS,
TOTAL_SECONDS
};


enum
{
ENEMY_NONE,
ENEMY_GUARDIAN1,
ENEMY_PUFFER1,
ENEMY_BRACKET1,
ENEMY_WORMER1,
ENEMY_HEAD1,
ENEMY_HEAD1_EYE1,
ENEMY_HEAD1_EYE2,
ENEMY_HEAD1_EYE3,
ENEMY_PUFFER2,
ENEMY_SPINNER1,
ENEMY_SPINNER2,
ENEMY_SPINNER3,
ENEMY_SPINNER4,
ENEMY_SPINNER5,
ENEMY_BRACKET2,
ENEMY_BRACKET3,
ENEMY_BRACKET4,
ENEMY_BRACKET4_TURRET,
ENEMY_FIGHTER1,
ENEMY_FIGHTER2,
ENEMY_FIGHTER3,
ENEMY_FIGHTER4,
ENEMY_FIGHTER5,
ENEMY_BOMBER1,
ENEMY_BOMBER2,
ENEMY_BOMBER3,
ENEMY_CRUISER1,
ENEMY_CRUISER1_TURRET,
ENEMY_GUARDIAN2,
ENEMY_GUARDIAN3,
ENEMY_SPIKEY1,
ENEMY_SPIKEY2,
ENEMY_SPIKEY3,
ENEMY_SPIKEY4,
ENEMY_SPIKEY5,
ENEMY_WORMER2,
ENEMY_WORMER3,
ENEMY_FORKER1,
ENEMY_FORKER2,
ENEMY_MINER1,
ENEMY_MINER2,
ENEMY_MINER3,
ENEMY_MINER3_TURRET,
ENEMY_CRUISER2,
ENEMY_CRUISER2_TURRET,
ENEMY_CRUISER3,
ENEMY_CRUISER3_TURRET,
ENEMY_CRUISER4,
ENEMY_CRUISER4_TURRET,
ENEMY_BOSS1_1,
ENEMY_BOSS1_2,
ENEMY_BOSS1_3,
ENEMY_BOSS1_TURRET1,
ENEMY_BOSS1_TURRET2,
ENEMY_BOSS1_TURRET3,
ENEMY_CIRCLER1,
ENEMY_BLATTER1,
ENEMY_BLATTER2,
ENEMY_BLATTER3,
ENEMY_BLATTER4,
ENEMY_BLATTER5,
ENEMY_MINEFIELDER1,
ENEMY_BLOATER1,
ENEMY_BLOATER2,
ENEMY_BOSS2,
ENEMY_BOSS2_TURRET1,
ENEMY_BOSS2_TURRET2,
ENEMY_BOSS2_TURRET3,
ENEMY_BOSS2_TURRET4,
ENEMY_SHIELDER1,
ENEMY_PUFFER3,
ENEMY_PUFFER4,
ENEMY_PULSER1,
ENEMY_PULSER2,
ENEMY_ZAPPER1,
ENEMY_MULTI1,
ENEMY_MULTI2,
ENEMY_MULTI3,
ENEMY_DEFENDER1,
ENEMY_DEFENDER1_TURRET1,
ENEMY_DEFENDER1_TURRET2,
ENEMY_DEFENDER1_TURRET3,
ENEMY_OVERSPINNER,
ENEMY_OVERSPIKEY,
ENEMY_UNDERSPIKEY,
ENEMY_OVERBLATTER,
ENEMY_DEFENDER2,
ENEMY_DEFENDER2_TURRET1,
ENEMY_DEFENDER2_TURRET2,
ENEMY_DEFENDER2_TURRET3,
ENEMY_DEFENDER3,
ENEMY_DEFENDER3_TURRET1,
ENEMY_DEFENDER3_TURRET2,
ENEMY_DEFENDER3_TURRET3,
ENEMY_DEFENDER3_TURRET4,
ENEMY_DEFENDER3_TURRET5,
ENEMY_DEFENDER3_TURRET6,
ENEMY_ORBITER1,
ENEMY_ORBITER2,
ENEMY_ORBITER3,
ENEMY_ATTRACTOR,
ENEMY_DISRUPTER1,
ENEMY_DISRUPTER2,
ENEMY_DISRUPTER3,
ENEMY_TRIANGLER1,
ENEMY_TRIANGLER2,
ENEMY_TRIANGLER3,
ENEMY_OVERTRIANGLER,
ENEMY_OVERTRIANGLER_TURRET,
ENEMY_LEAPER1,
ENEMY_LEAPER2,
ENEMY_WORMER4,
ENEMY_BEAMER1,
ENEMY_BEAMER2,
ENEMY_OVERBLATTER2,
ENEMY_OVERDISRUPTER,
ENEMY_GUARDIAN4,
ENEMY_GUARDIAN5,
ENEMY_OVERZAPPER,
ENEMY_BRACKET5,
ENEMY_BOSS2_2,
ENEMY_BOSS2_3,
ENEMY_BOSS3_1,
ENEMY_BOSS3_2,
ENEMY_BOSS3_3,
ENEMY_MESSENGER,
ENEMY_SHADOW1,
ENEMY_SHADOW2,
ENEMY_BOSS3_TURRET1,
ENEMY_BOSS3_TURRET2,
ENEMY_BOSS3_TURRET3,
ENEMY_WAVER1,
ENEMY_WAVER2,
ENEMY_CURVE1,
ENEMY_CURVE2,
ENEMY_CURVE3,
ENEMY_UNDERSPIKEY2,
ENEMY_UNDERSPIKEY3,
ENEMY_OVERSPIKEY2,
ENEMY_DEAD_TRI1,
ENEMY_DEAD_TRI2,
ENEMY_DEAD_TRI3,
/*
ENEMY_BOSS3,
ENEMY_BOSS3_TURRET1,
ENEMY_BOSS3_TURRET2,
ENEMY_BOSS3_TURRET3,
ENEMY_BOSS3_TURRET4,*/
NO_ENEMY_TYPES
};
// can't have entries above without eclass entries or the whole world will collapse

enum
{
AI_NONE,
AI_DRIFTER, // chooses a random location and goes there, then chooses another. etc
AI_STINGER, // darts randomly around
AI_PERIODIC_STINGER, // darts around at specified intervals
AI_TURRET, // just sits there and rotates
AI_FIGHTER, // turns to face target and flies by, then chooses a random dest, then returns
AI_BOMBER, // a lot like fighter
AI_CRUISER, // like drifter, but turns to face direction moved
AI_AUTO, // orbitals
AI_LEAPER, // cross between fighter and periodic stinger
AI_FOLLOWER, // like drifter, but destination is player's location at the time
AI_BEAMER // drifter, but special firing code
};

enum
{
ROLE_TARGET,
ROLE_TURRET,
ROLE_EXTRA,
ROLE_DEAD,
ROLE_BOSS,
ROLE_MINIBOSS,
};

enum
{
WPN_NONE,
WPN_ZAPPER
};

enum
{
SYST_NONE,
SYST_WPN_ZAPPER
};

enum
{
BRAKES_NONE,
BRAKES_RETRO,
BRAKES_DRAG
};

enum
{
SHIELD_NONE,
SHIELD_LOWFREQ,
SHIELD_MEDIUMFREQ,
SHIELD_HIGHFREQ
};

enum
{
SLIDE_NO,
SLIDE_YES
};

enum
{
CLOUD_NONE,
CLOUD_SPECK,
CLOUD_TRAIL1,
CLOUD_SMALL_CIRCLE,
CLOUD_SMALL_TRANS_CIRCLE,
CLOUD_MED_CIRCLE,
CLOUD_MED_TRANS_CIRCLE,
CLOUD_LARGE_CIRCLE,
CLOUD_LARGE_TRANS_CIRCLE,
CLOUD_FADING_LINE,
CLOUD_SHRINKING_LINE,
CLOUD_SHOCKWAVE,
CLOUD_BURSTLET,
CLOUD_GROWING_CIRCLE,
CLOUD_LINE_SHADOW,
CLOUD_SHRINKING_CIRCLE,
CLOUD_SPAWNER,
CLOUD_LIGHT,
CLOUD_BANG,
CLOUD_BLUE_BLOB,
CLOUD_BLUE_BLOB2,
CLOUD_FLECK,
CLOUD_SMALL_FADING_CIRCLE,
CLOUD_ORANGE_BLOB,
CLOUD_ORANGE_BLOB2,
CLOUD_GREEN_BLOB,
CLOUD_GREEN_BLOB2,
CLOUD_LARGE_FADING_CIRCLE,
CLOUD_TRANS_FADING_CIRCLE,
CLOUD_BLAST_CIRCLE,
CLOUD_MED_TRANS_FADING_CIRCLE,
CLOUD_SMALL_SHRINKING_CIRCLE,
CLOUD_BLOCK1,
CLOUD_BLOCK2,
CLOUD_BLOCK3,
CLOUD_BLOCK4,
CLOUD_THICK_SHOCK_CIRCLE,
CLOUD_CIRCLER_IN,
CLOUD_FLAK_BURST,
CLOUD_SHIELD_LINE,
CLOUD_SQUAREY,
CLOUD_PULSER1_V,
CLOUD_PULSER1_H,
CLOUD_PULSER2_V,
CLOUD_PULSER2_H,
CLOUD_SEEKER_CIRCLE,
CLOUD_ATTRACT,
CLOUD_TRANS_FADING_LINE,
CLOUD_DRIVE_CIRCLE,
CLOUD_LARGE_TRANS_FADING_CIRCLE,
CLOUD_BIG_BLAST_CIRCLE,
CLOUD_DISTORT,
CLOUD_JET_CIRCLE1,
CLOUD_JET_CIRCLE2,
CLOUD_TWISTY_CIRCLE,
CLOUD_TWIRLY_CIRCLE,
CLOUD_SHATTER1,
CLOUD_SHATTER2,
CLOUD_BLOCK5,
CLOUD_TRI1, // not used
CLOUD_TRI2,
CLOUD_TRI3,
CLOUD_OVERTRI, // to here.
CLOUD_FLAME_CIRCLE,
CLOUD_SHRINKING_FADING_CIRCLE


//CLOUD_BLUE_BLOB,
//CLOUD_BLUE_BLOB2



};

enum
{
BANG_NONE,
BANG_RED,
BANG_ORANGE,
BANG_YELLOW,
BANG_BLUE,
BANG_GREEN,
BANG_GREY
};

enum
{
UPG_NONE,
UPG_SPEED,
// increases speed + turning
// special: aerodynamics (may not be a benefit, really)
UPG_ARMOUR,
// increases armour
// special: shield, then increase shield
UPG_POWER,
// increases cannon damage
// special: plasma bolt
UPG_AUTOFIRE,
// increases cannon fire rate + scatter
// special: sidekick
UPG_MULTIFIRE,
// increases: cannon shot spread
// special: backwards fire
UPG_PROJECT,
// increases cannon speed + range
// special: lightning bolt
UPG_WARHEAD,
// increases missile damage
// special: cluster warhead
UPG_SEEKER,
// makes missiles track nearest target, then increases turn rate
// special:
//  1. Dauntless (seekers don't explode when target does; acquire new one)
//  2. Smart guidance - go for most important target
//  3. Target Analysis - send only enough missiles to destroy; prefer weaker
//      targets if they'll be destroyed
UPG_ROCKET,
// increases missile acceleration, but not range by much
// special: long range
UPG_TUBES,
// increases number of missiles
// special: extra mini-missiles, ?random directions, not seeking
UPG_SLIDE,
// gives, then increases, slide rockets
// special: retro rockets (replaces drag field)
UPG_BOMB,
// increases bomb damage
// special: dispersion (explosion size)
UPG_LAUNCHER,
// adds more bombs (side-bombs are smaller)
// special: cluster bombs (main one only?)
UPG_LOADER,
// increases missile firing rate

UPG_SPECIAL,

UPG_TURRET,

UPG_SIDEKICK,

UPG_HEAVY,

UPG_ORBITAL,

UPG_BACKFIRE,

UPG_SHIELD,

UPG_RETRO,

UPG_ROAMER,

UPG_MINIMISSILES,

UPG_DRIFT,

/*
REMEMBER: When adding something which upgrades a secondary weapon,
must make sure that the secondary weapon is switched on when the upgrade
is gained.
*/

MAX_UPGRADES
};


enum
{
DRIVE_THRUST,
DRIVE_SLIDE,
DRIVE_RETRO

};

enum
{
DUEL_10_POINTS,
DUEL_30_POINTS,
DUEL_3_MINUTES,
DUEL_10_MINUTES
};

#define LOCK_ACTOR0 -3
#define LOCK_ACTOR1 -2

/*
enum
{
SPECIAL_SHIELD,
SPECIAL_
};
*/
struct optionstruct
{
 int sound_init; // if 0, sound isn't initialised at all. Changed in config file only.
 int sound_mode; // mono, stereo, reversed, off
 int run_vsync; // on or off
 int sound_volume; // sound fx volume; if 0 sound effects not played
 int ambience_volume; // if 0 ambience not played
 int resolution;
 int unlock_purple;
 int unlock_void;
 int unlock_god;
 int colour_text;
};

struct starstruct
{
 int colour [2];
 int x [2];
 int y [2];
 char distance [2];

};

struct gamestruct
{
 int users;
 int type;
 int duel_mode;
 int duel_crawlies;
 int duel_handicap [2];
 int duel_level;
 int duel_leader_handicap;
 int duel_winner;
 int symbols_given; // ta and duel
 int ta_enemies [15];
 int ta_extra_list [15];
 int ta_symbol_count;
 long ta_total_time; // probably doesn't need to be long
 int ta_level;
 int ta_enemy_index;
 int single_player;
 int ships_left;
 float drag;
 int mode_purple;
 int mode_void;
 int mode_god;
};

struct arenastruct
{
  int max_x;
  int max_y;
  int level;
  int colour1;
  int colour2;
  int colour3;
  int next_target;
//  int target [3];
//  int targets_left [3];
  
  int enemy_list [50];
  int symbol_list [50];
  int list_index;
  int symbol_index;
  int total_targets;
  int targets_left_total;
  int next_target_upgrade;
  int max_targets_in_level;
  int battle_type;

  int next_non_target;
  int max_non_targets_in_level;

  int time_left;
  int level_finished;
  int seconds_left_when_finished;
  int time_bonus;
  int game_over;
  int new_level_sign;
  
  int max_crawlies_in_level;
  int next_crawly;
  int next_crawly_upgrade;
  int crawlies_created;

  int between_target_upgrades;
  int between_crawly_upgrades;

  int hostile;
  
  int eye_x [MAX_EYES];
  int eye_y [MAX_EYES];
  int eye_recycle [MAX_EYES];
  int eye_angle [MAX_EYES];
  int eye_colour1;
  int eye_colour2;
  int eye_colour3;
  int eyes_on_level;
  
  int waver_on_level;
};

#define ENEMY_LIST_END -1
#define ENEMY_LIST_WAIT -2
#define ENEMY_LIST_EMPTY -3

enum
{
BATTLE_NORMAL,
BATTLE_BOSS,
BATTLE_VARIOUS
};

struct playerstruct
{
 int actor_controlled;
 int user;
// int ships_left;
 char player_cmd [NO_CMDS];
 char link_fire;
 int link_toggle_delay;

 int ship;
 int score;

 int duel_score;

 int keys [NO_CMDS];
 
 int screen_shake_x;
 int screen_shake_y;
// _time is in actor 
};


struct actorstruct
{
 int x, y, x_speed, y_speed, angle, base_angle;
 int moving_angle; // the angle at which it's moving. Set in drag_actor,
 // so may not be very reliable but is good enough for friction burn and
 // ai routines etc.

 int type;
 int ship;
 int controller;
 char actor_cmd [NO_CMDS];
 int drag_amount; // amount that actor is accelerated by drag
 int radius;
 int edge_radius;
 char in_play;

 int turning;
 int thrust;
 int slide;
 int mass;
 int recharge;

 int armour;
 int max_armour;

 int upgrade_slot;
 int upgrades [NO_UPGRADES]; // referred to by slot
 int upgrade_specials [NO_UPGRADES];
 int upgrade_structure [NO_UPGRADES];
 int upgraded_system [MAX_UPGRADES]; // referred to by UPG_ index
 int just_upgraded;
 int just_upgraded_timeout;
 int shield_pulse;
 int recycle1;
 int recycle2;
 int cannon_status;
 int bomb_status;
 int shield;
 int max_shield;
 int shield_recharge;
/* int shield_type;
 int shield_strength1;
 int shield_strength2;
 int shield_pulse;
 int shield_angle;
 int system [3];
 int system_status1 [3];
 int system_status2 [3];
 int max_energy;
 int energy;*/
 int brakes;
 int brake_strength;
 char dragging; // is 1 if drag field active
 int just_collided;
 int spawn_delay;
 int grace_period;
 int repairing;
 int secondary_weapon;

 int seek_x;
 int seek_y;
 int lock;
 int new_lock;
 
 int sidekick_x [5];
 int sidekick_y [5];
 int sidekick_x_speed [5];
 int sidekick_y_speed [5];
 int sidekick_angle [5];
 int sidekick_recycle;
 int sidekicks;

 int turret_lock;
 int turret_recycle;

 int heavy_recycle;

 int backfire_recycle;

 int exhaust_distance_x;
 int exhaust_distance_y;
// int exhaust_displacement;
 int retro_distance_x;
 int retro_distance_y;
// int retro_displacement;
 int slide_distance_x;
 int slide_distance_y;
// int slide_displacement;
 int flash_distance;

 int engine_demand;

 int orbital_angle;
 int orbital_spin;

 int hurt_pulse;

 int drive_sound [3];
 
 int ability [4] [4];
 
 int primary;
 int secondary;
 
 int secondary_burst;
 int secondary_burst_recycle;
 
 int screen_shake_time; 
// shake_x/_y are in player

 int total_power;
 int next_spawn_x;
 int next_spawn_y;
};

enum
{
PRIMARY_WOODEN_DARTS,
PRIMARY_ICE_DARTS,
PRIMARY_SILVER_TEETH,
PRIMARY_SNOW_DARTS,
PRIMARY_FROZEN_BREATH,
PRIMARY_BRONZE_DARTS,
PRIMARY_BRASS_TEETH,
PRIMARY_CRYSTAL_TEETH,
PRIMARY_GOLDEN_NEEDLES,
PRIMARY_PARTICLE_SPIT,
PRIMARY_CRYSTAL_SPINES,
PRIMARY_GOLDEN_TEETH
};

struct bulletstruct
{
 int x, y, x_speed, y_speed;
 int x2, y2;
 int type;
 int owner;
 int timeout;
 int size;
 int damage;
 int left_owner;
 int mass;
 int angle;
 int colours [4];
 int special1;
 // missiles: acceleration
 // bombs: explosion size
 // enemy seeker blobs: actor target
 // enemy prong: spin direction (applied in display.c)
 int special2;
 // missiles: number of clusters
 // bombs: number of clusters
 int special3;
 // missiles: seeker target
 int special4;
 // missiles: seeker turn rate
 int special5;
 // missiles: seeker guidance system

};


struct cloudstruct
{
 int x, y, x_speed, y_speed;
 int x2, y2;
 int type;
 unsigned char seed;
 int angle;
 int timeout;
 int tickrate;
 int delta_tickrate;
 int status;
 int colour [5];
};

struct pickupstruct
{
 int x, y, x_speed, y_speed;
 int counter;
 int type;
 int subtype;
 int timeout;
 int radius;
};

struct enemystruct
{

 int x, y, x_speed, y_speed, angle, base_angle;
 int moving_angle;
 int type;
 int subtype;
 int attacking; // which actor is it attacking (-1 for none)
 int drag_amount; // amount that enemy is accelerated by drag
 char drag_affected; // is it affected by drag?
 int radius;
 int edge_radius;
 int recycle;
// char in_play;
 int armour;
 int hurt_pulse;
 int shield;
 int max_shield;
 int attribute [NO_ENEMY_ATTRIBUTES];
 int colours [3];
 int hurt_pulse_colour1;
 int hurt_pulse_colour2;
 unsigned char counter;
 int just_collided;
 int mass;
 int carrying_pickup;
 int burst_fire;
 int target;
 int turret [MAX_TURRETS];
 int turret_main; // whose turret it it?
 int turret_index; // which turret is it?
 int x_dest;
 int y_dest;
 int slew_dir;
 int next_impulse;
 int ta_time_left; // time attack - time before it warps out
};

struct enemy_classification
{
 int max_armour;
 int level;
 int common;
 int score;
 int radius; // for hit calculation
 int edge_radius; // for edge-of-map collision
 float drag_amount;
 int mass;
// int default_attributes [NO_ENEMY_ATTRIBUTES];
 int ai_type;
 int generous;
 int colour1;
 int colour2;
 int turrets;
 int pitch; // sound effects - hit and explodes
 int acceleration;
 int impulse_delay;
 int range;
 int slew;
 int role;
};



enum
{
PITCH_GUARDIAN,
PITCH_FIGHTER,
PITCH_SMALL_SPINNER,
PITCH_LARGE_SPINNER,
PITCH_HEAVY_SPINNER,
PITCH_BOSS1,
PITCH_BOSS2,
PITCH_BOSS3,
PITCH_MINIBOSS1,
PITCH_MINIBOSS2,
PITCH_TURRET1,
PITCH_TURRET2,
PITCH_BRACKET,
PITCH_MEDIUM,
PITCH_HEAVY
};