This repository was archived by the owner on Feb 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 511
/
Copy pathDEFINES.H
2771 lines (2445 loc) · 85.4 KB
/
DEFINES.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
/*
** Command & Conquer(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* $Header: F:\projects\c&c\vcs\code\defines.h_v 2.19 16 Oct 1995 16:44:54 JOE_BOSTIC $ */
/***********************************************************************************************
*** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
***********************************************************************************************
* *
* Project Name : Command & Conquer *
* *
* File Name : DEFINES.H *
* *
* Programmer : Joe L. Bostic *
* *
* Start Date : September 10, 1993 *
* *
* Last Update : September 10, 1993 [JLB] *
* *
*---------------------------------------------------------------------------------------------*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#ifndef DEFINES_H
#define DEFINES_H
/**********************************************************************
** If defined, then the advanced balancing features will be enabled
** for this version.
*/
//#define ADVANCED
#define PATCH // Super patch (1.17?)
/**********************************************************************
** The demo version of C&C will be built if the following define
** is active.
*/
//#define DEMO
/**********************************************************************
** Define this to allow play of the bonus missions for the Gateway
** bundle deal.
*/
#define BONUS_MISSIONS
/**********************************************************************
** Handle expansion scnearios as a set of single missions with all
** necessary information self contained within the mission file.
*/
#ifndef DEMO
#define NEWMENU
#endif
/**********************************************************************
** If the scenario editor to to be active in this build then uncomment
** the following #define line.
*/
//#define SCENARIO_EDITOR
/**********************************************************************
** This define enables the full set of cheat keys and special
** command line options.
*/
#define CHEAT_KEYS
/**********************************************************************
** If this is defined, the special Virgin limited cheat keys
** are enabled. This allows the "cheat" parameter and then only
** allows the ALT-W to win the mission.
*/
//#define VIRGIN_CHEAT_KEYS
/**********************************************************************
** Optional parameter control for special options.
*/
//#define PARM_6PLAYER 0x5D9F6F24 // "6"
#define PARM_6PLAYER 0x9CAFC93B // Alternate 6 player keyphrase.
/*
** Enable the set of limited cheat key options.
*/
#ifdef VIRGIN_CHEAT_KEYS
#define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST"
#endif
/*
** Enable the full set of cheat key options.
*/
#ifdef CHEAT_KEYS
#ifndef PARM_PLAYTEST
#define PARM_PLAYTEST 0xF7DDC227 // "PLAYTEST"
#endif
#define PARM_CHEATDAVID 0xBE79088C // Cheat keys for David Dettmer
#define PARM_CHEATERIK 0x9F38A19D // Cheat keys for Erik Yeo
#define PARM_EDITORERIK 0xC2AA509B // Map editor for Erik Yeo
#define PARM_CHEATPHIL 0x39D01821 // Cheat keys for Phil Gorrow
#define PARM_CHEATJOE 0xABDD0362 // Cheat keys for Joe Bostic
#define PARM_CHEATBILL 0xB5B63531 // Cheat keys for Bill Randolph
#define PARM_CHEAT_STEVET 0x2E7FE493 // Cheat keys for Steve Tall
#define PARM_EDITORBILL 0x7E7C4CCA // "-EDITOR"
#define PARM_CHEATMIKE 0x00532693 // Mike Lightner
#define PARM_CHEATADAM 0xDFABC23A // Adam Isgreen
#endif
//#define PARM_CHEAT 0x6F4BE7CA // "CHEAT"
//#define PARM_EDITOR 0x7E7C4CCA // "-EDITOR"
#define PARM_EASY 0x59E975CE // "EASY" Enables easy mode.
#define PARM_HARD 0xACFE9D13 // "HARD" Enables hard mode.
#define PARM_INSTALL 0xD95C68A2 // "FROMINSTALL"
#define PARM_TRUENAME 0xB1A34435 // Enables true object names.
#define PARM_3POINT 0x03552894 // Enable three point turns.
#define PARM_SCORE 0x7FDE2C33 // Enables alternate themes.
#define PARM_COMBAT 0xDC57C4B2 // Gives combat advantage to attacker.
#define PARM_TREETARGET 0x00AB6BEF // Allows targeting of trees without <CTRL> key.
#define PARM_BIB 0xF7867BF0 // Disables building bibs.
#define PARM_MCV 0x104DF10F // MCV undeploys rather than sells.
#define PARM_HELIPAD 0x53EBECBC // Helipad can be purchased separately from helicopter.
#define PARM_IQ 0x9E3881B8 // Smart self defense logic enable.
#define PARM_SQUISH 0x4EA2FBDF // Squish images for infantry bodies.
#define PARM_HUMAN 0xACB58F61 // Human generated sound effects.
#define PARM_SCROLLING 0xC084AE82 // Restricts scrolling over the tabs.
//#define PARM_SPECIAL 0xD18129F6 // Enables special mode.
//#define PARM_SPECIAL 0x2E84E394 // #1
//#define PARM_SPECIAL 0x63CE7584 // #2
//#define PARM_SPECIAL 0x85F110A5 // #3
///#define PARM_SPECIAL 0x7F65F13C // #4
//#define PARM_SPECIAL 0x431F5F61 // #5
#define PARM_SPECIAL 0x11CA05BB // #6 funpark
//#define PARM_SPECIAL 0xE0F651B9 // #7
//#define PARM_SPECIAL 0x10B9683D // #8
//#define PARM_SPECIAL 0xEE1CD37D // #9
/**********************************************************************
** Defines for verifying free disk space
*/
#define INIT_FREE_DISK_SPACE 1024*4096 //8388608
#define SAVE_GAME_DISK_SPACE INIT_FREE_DISK_SPACE // (INIT_FREE_DISK_SPACE - (1024*4096))
//#define SAVE_GAME_DISK_SPACE 100000
/**********************************************************************
** This is the credit threshold that the computer's money must exceed
** in order for structure repair to commence.
*/
#define REPAIR_THRESHHOLD 1000
//#define GERMAN 1
//#define FRENCH 1
//#define JAPANESE 1
#define FOREIGN_VERSION_NUMBER 6
/**********************************************************************
** These enumerations are used to implement RTTI.
*/
typedef enum RTTIType {
RTTI_NONE=0,
RTTI_INFANTRY,
RTTI_INFANTRYTYPE,
RTTI_UNIT,
RTTI_UNITTYPE,
RTTI_AIRCRAFT,
RTTI_AIRCRAFTTYPE,
RTTI_BUILDING,
RTTI_BUILDINGTYPE,
RTTI_TERRAIN,
RTTI_ABSTRACTTYPE,
RTTI_ANIM,
RTTI_ANIMTYPE,
RTTI_BULLET,
RTTI_BULLETTYPE,
RTTI_OVERLAY,
RTTI_OVERLAYTYPE,
RTTI_SMUDGE,
RTTI_SMUDGETYPE,
RTTI_TEAM,
RTTI_TEMPLATE,
RTTI_TEMPLATETYPE,
RTTI_TERRAINTYPE,
RTTI_OBJECT,
RTTI_SPECIAL
} RTTIType;
/**********************************************************************
** This is the size of the speech buffer. This value should be as large
** as the largest speech sample, plus a few bytes for overhead
** (16 bytes is sufficient).
*/
#define SPEECH_BUFFER_SIZE 50000L
/**********************************************************************
** This is the size of the shape buffer. This buffer is used as a staging
** buffer for the shape drawing technology. It MUST be as big as the
** largest shape (uncompressed) that will be drawn. If this value is
** changed, be sure to update the makefile and rebuild all of the shape
** data files.
*/
#define SHAPE_BUFFER_SIZE 40000L
// Use this to allow keep track of versions as they affect saved games.
#define VERSION_NUMBER 1
#define RELEASE_NUMBER 01
#define FAME_FILE_NAME "HALLFAME.DAT"
/**********************************************************************
** Map controls. The map is composed of square elements called 'cells'.
** All larger elements are build upon these.
*/
// Size of the map in cells. The width of the map must be a power
// of two. This is accomplished by setting the width by the number of
// bits it occupies. The number of meta-cells will be a subset of the
// cell width.
#define MAP_CELL_MAX_X_BITS 6
#define MAP_CELL_MAX_Y_BITS 6
#define MAP_CELL_X_MASK (~(~0 << MAP_CELL_MAX_X_BITS))
//#define MAP_CELL_Y_MASK ((~(~0 << MAP_CELL_MAX_Y_BITS)) << MAP_CELL_MAX_Y_BITS)
// Size of the map in cells.
#define MAP_CELL_W (1<<MAP_CELL_MAX_X_BITS)
#define MAP_CELL_H (1<<MAP_CELL_MAX_Y_BITS)
#define MAP_CELL_TOTAL (MAP_CELL_W*MAP_CELL_H)
#define REFRESH_EOL 32767 // This number ends a refresh/occupy offset list.
#define REFRESH_SIDEBAR 32766 // This number flags that sidebar needs refreshing.
/*
** The map is broken down into regions of this specified dimensions.
*/
#define REGION_WIDTH 4
#define REGION_HEIGHT 4
#define MAP_REGION_WIDTH (((MAP_CELL_W + (REGION_WIDTH -1)) / REGION_WIDTH)+2)
#define MAP_REGION_HEIGHT (((MAP_CELL_H + (REGION_WIDTH -1)) / REGION_HEIGHT)+2)
#define MAP_TOTAL_REGIONS (MAP_REGION_WIDTH * MAP_REGION_HEIGHT)
/**********************************************************************
** These are the various return conditions that production may
** produce.
*/
typedef enum ProdFailType {
PROD_OK, // Production request successful.
PROD_LIMIT, // Failed with production capacity limit reached.
PROD_ILLEGAL, // Failed because of illegal request.
PROD_CANT, // Faile because unable to comply (busy or occupied).
} ProdFailType;
/**********************************************************************
** These are the special weapons that can be used in the game. The common thread
** with these weapons is that they are controlled through the sidebar
** mechanism.
*/
typedef enum SpecialWeaponType {
SPC_NONE,
SPC_ION_CANNON, // Partical beam from satalite (Akira effect).
SPC_NUCLEAR_BOMB, // Tactical nuclear weapon.
SPC_AIR_STRIKE // Conventional air strike.
} SpecialWeaponType;
/**********************************************************************
** These defines control the rate of ion cannon and airstrike recharging.
*/
#define NUKE_GONE_TIME 14*TICKS_PER_MINUTE
#define ION_CANNON_GONE_TIME 10*TICKS_PER_MINUTE
#define AIR_CANNON_GONE_TIME 8*TICKS_PER_MINUTE
#define OBELISK_ANIMATION_RATE 15
/**********************************************************************
** These are the response values when checking to see if an object
** can enter or exist at a specified location. By examining this
** return value, appropriate action may be chosen.
** NOTE: If this changes, update the static array in Find_Path module.
*/
typedef enum MoveType {
MOVE_OK, // No blockage.
MOVE_CLOAK, // A cloaked blocking enemy object.
MOVE_MOVING_BLOCK, // Blocked, but only temporarily.
MOVE_DESTROYABLE, // Enemy unit or building is blocking.
MOVE_TEMP, // Blocked by friendly unit.
MOVE_NO, // Strictly prohibited terrain.
MOVE_COUNT
} MoveType;
/**********************************************************************
** These are the themes that the game can play. They must be in exact
** same order as specified in the CONQUER.TXT file as well as the filename
** list located in the ThemeClass.
*/
typedef enum ThemeType {
THEME_PICK_ANOTHER=-2,
THEME_NONE=-1,
THEME_AIRSTRIKE,
THEME_80MX,
THEME_CHRG,
THEME_CREP,
THEME_DRIL,
THEME_DRON,
THEME_FIST,
THEME_RECON,
THEME_VOICE,
THEME_HEAVYG,
THEME_J1,
THEME_JDI_V2,
THEME_RADIO,
THEME_RAIN,
THEME_AOI, // Act On Instinct
THEME_CCTHANG, // C&C Thang
THEME_DIE, // Die!!
THEME_FWP, // Fight, Win, Prevail
THEME_IND, // Industrial
THEME_IND2, // Industrial2
THEME_JUSTDOIT, // Just Do It!
THEME_LINEFIRE, // In The Line Of Fire
THEME_MARCH, // March To Your Doom
THEME_MECHMAN, // Mechanical Man
THEME_NOMERCY, // No Mercy
THEME_OTP, // On The Prowl
THEME_PRP, // Prepare For Battle
THEME_ROUT, // Reaching Out
THEME_HEART, //
THEME_STOPTHEM, // Stop Them
THEME_TROUBLE, // Looks Like Trouble
THEME_WARFARE, // Warfare
THEME_BFEARED, // Enemies To Be Feared
THEME_IAM, // I Am
THEME_WIN1, // Great Shot!
THEME_MAP1, // Map subliminal techno "theme".
THEME_VALKYRIE, // Ride of the valkyries.
THEME_COUNT,
THEME_LAST=THEME_BFEARED,
THEME_FIRST=0
} ThemeType;
inline ThemeType operator++(ThemeType &, int);
/**********************************************************************
** This is the various threat scan methods that can be used when looking
** for targets.
*/
typedef enum ThreatType {
THREAT_NORMAL=0x0000, // Any distance threat scan?
THREAT_RANGE=0x0001, // Limit scan to weapon range?
THREAT_AREA=0x0002, // Limit scan to general area (twice weapon range)?
THREAT_AIR=0x0004, // Scan for air units?
THREAT_INFANTRY=0x0008, // Scan for infantry units?
THREAT_VEHICLES=0x0010, // Scan for vehicles?
THREAT_BUILDINGS=0x0020, // Scan for buildings?
THREAT_TIBERIUM=0x0040, // Limit scan to Tiberium processing objects?
THREAT_BOATS=0x0080, // Scan for gunboats?
THREAT_CIVILIANS=0x0100, // Consider civilians to be primary target?
THREAT_CAPTURE=0x0200, // Consider capturable buildings only?
} ThreatType;
inline ThreatType operator |(ThreatType, ThreatType);
inline ThreatType operator &(ThreatType, ThreatType);
inline ThreatType operator ~(ThreatType);
#define THREAT_GROUND (THREAT_VEHICLES|THREAT_BUILDINGS|THREAT_INFANTRY)
/**********************************************************************
** These return values are used when determine if firing is legal.
** By examining this value it can be determined what should be done
** to fix the reason why firing wasn't allowed.
*/
typedef enum FireErrorType {
FIRE_OK, // Weapon is allowed to fire.
FIRE_AMMO, // No ammo available to fire?
FIRE_FACING, // Not correctly facing target?
FIRE_REARM, // It is busy rearming?
FIRE_ROTATING, // Is it in process of rotating?
FIRE_ILLEGAL, // Is it targeting something illegal?
FIRE_CANT, // Is this unit one that cannot fire anything?
FIRE_MOVING, // Is it moving and not allowed to fire while moving?
FIRE_RANGE, // Is the target out of range?
FIRE_CLOAKED, // Is the shooter currently cloaked?
FIRE_BUSY // Is shooter currently doing something else?
} FireErrorType;
/**********************************************************************
** If an object can cloak, then it will be in one of these states.
** For objects that cannot cloak, they will always be in the
** UNCLOAKED state. This state controls how the obect transitions between
** cloaked and uncloaked conditions.
*/
typedef enum CloakType {
UNCLOAKED, // Completely visible (normal state).
CLOAKING, // In process of claoking.
CLOAKED, // Completely cloaked (invisible).
UNCLOAKING // In process of uncloaking.
} CloakType;
/**********************************************************************
** For units that are cloaking, these value specify the visual character
** of the object.
*/
typedef enum VisualType {
VISUAL_NORMAL, // Completely visible -- normal.
VISUAL_INDISTINCT, // The edges shimmer and become indistinct.
VISUAL_DARKEN, // Color and texture is muted along with shimmering.
VISUAL_SHADOWY, // Body is translucent in addition to shimmering.
VISUAL_RIPPLE, // Just a ripple (true predator effect).
VISUAL_HIDDEN, // Nothing at all is visible.
} VisualType;
/**********************************************************************
** These missions enumerate the various state machines that can apply to
** a game object. Only one of these state machines is active at any one
** time.
*/
typedef enum MissionType {
MISSION_NONE=-1,
MISSION_SLEEP, // Do nothing whatsoever.
MISSION_ATTACK, // Attack nearest enemy.
MISSION_MOVE, // Guard location or unit.
MISSION_RETREAT, // Return home for R & R.
MISSION_GUARD, // Stay still.
MISSION_STICKY, // Stay still -- never recruit.
MISSION_ENTER, // Move into object cooperatively.
MISSION_CAPTURE, // Move into in order to capture.
MISSION_HARVEST, // Hunt for and collect nearby Tiberium.
MISSION_GUARD_AREA, // Active guard of area.
MISSION_RETURN, // Head back to refinery.
MISSION_STOP, // Sit still.
MISSION_AMBUSH, // Wait until discovered.
MISSION_HUNT, // Active search and destroy.
MISSION_TIMED_HUNT, // Wait a while, then go into HUNT (multiplayer AI)
MISSION_UNLOAD, // Search for and deliver cargo.
MISSION_SABOTAGE, // Move into in order to destroy.
MISSION_CONSTRUCTION, // Building buildup operation.
MISSION_DECONSTRUCTION, // Building builddown operation.
MISSION_REPAIR, // Repair process mission.
MISSION_RESCUE,
MISSION_MISSILE,
MISSION_COUNT,
MISSION_FIRST=0
} MissionType;
/**********************************************************************
** These are the enumerated animation sequences that a building may
** be processing. These serve to control the way that a building
** appears.
*/
typedef enum BStateType {
BSTATE_NONE=-1,
BSTATE_CONSTRUCTION, // Construction animation.
BSTATE_IDLE, // Idle animation.
BSTATE_ACTIVE, // Animation when building is "doing its thing".
BSTATE_FULL, // Special alternate active state.
BSTATE_AUX1, // Auxiliary animation.
BSTATE_AUX2, // Auxiliary animation.
BSTATE_COUNT
} BStateType;
/**********************************************************************
** Whenever a unit is selected and a click occurs over another object
** or terrain element, there is some action to initiate. This specifies
** the different types of actions possible. This also controls how the
** mouse cursor looks when "hovering" over the spot that clicking would
** occur at.
*/
typedef enum ActionType {
ACTION_NONE, // Either undefined action or "do nothing".
ACTION_MOVE, // Can move there or at least try to.
ACTION_NOMOVE, // Special case for movable object, but illegal mouse position.
ACTION_ENTER, // Special case for infantry->APC or vehicle->Repair facility.
ACTION_SELF, // Self select special case.
ACTION_ATTACK, // Can attack or fire upon it in some fashion.
ACTION_HARVEST, // Special harvest mode.
ACTION_SELECT, // Would change selection to specified object.
ACTION_TOGGLE_SELECT,// Toggles select state of the object.
ACTION_CAPTURE, // The unit will try to capture the object.
ACTION_REPAIR, // The target object should be repaired.
ACTION_SELL, // The target building should be sold back.
ACTION_SELL_UNIT, // The target unit should be sold back.
ACTION_NO_SELL, // No sell or no repair.
ACTION_NO_REPAIR, // No sell or no repair.
ACTION_SABOTAGE, // The unit will try to sabotage/destroy the object.
ACTION_ION, // That target object should be blasted.
ACTION_NUKE_BOMB, // That target object should be blasted.
ACTION_AIR_STRIKE, // That target object should be blasted.
ACTION_GUARD_AREA, // Guard the area/object clicked on.
ACTION_COUNT
} ActionType;
/**********************************************************************
** When a unit gets damaged, the result of the damage is returned as
** this type. It can range from no damage taken to complete destruction.
*/
typedef enum ResultType {
RESULT_NONE, // No damage was taken by the target.
RESULT_LIGHT, // Some damage was taken, but no state change occurred.
RESULT_HALF, // Damaged to below half strength (only returned on transition).
RESULT_MAJOR, // Damaged down to 1 hit point.
RESULT_DESTROYED, // Damaged to complete destruction.
} ResultType;
/**********************************************************************
** These are the special concrete control defines. They enumerate the
** sequence order of the concrete icons in the concrete art file.
*/
// DEBUG === convert this to be zero based so that a nulled cell is the
// default cell.
enum ConcreteEnum {
C_NONE=-1,
C_LEFT=0,
C_RIGHT=1,
C_RIGHT_UPDOWN=2,
C_LEFT_UPDOWN=3,
C_UP_RIGHT=4,
C_UP_LEFT=5,
C_DOWN_RIGHT=6,
C_DOWN_LEFT=7,
C_RIGHT_DOWN=8,
C_LEFT_DOWN=9,
C_RIGHT_UP=10,
C_LEFT_UP=11,
C_UPDOWN_RIGHT=12,
C_UPDOWN_LEFT=13
};
/**********************************************************************
** Units that move can move at different speeds. These enumerate the
** different speeds that a unit can move.
*/
typedef enum MPHType{
MPH_IMMOBILE=0,
MPH_VERY_SLOW=5,
MPH_KINDA_SLOW=6,
MPH_SLOW=8,
MPH_SLOW_ISH=10,
MPH_MEDIUM_SLOW=12,
MPH_MEDIUM=18,
MPH_MEDIUM_FAST=30,
MPH_MEDIUM_FASTER=35,
MPH_FAST=40,
MPH_ROCKET=60,
MPH_VERY_FAST=100,
MPH_LIGHT_SPEED=255
} MPHType;
/**********************************************************************
** General audio volume is enumerated by these identifiers. Since small
** volume variations are usually unnoticable when specifying the volume
** to play a sample, this enumeration list creates more readable code.
*/
typedef enum VolType
{
VOL_OFF=0,
VOL_0=VOL_OFF,
VOL_1=0x19,
VOL_2=0x32,
VOL_3=0x4C,
VOL_4=0x66,
VOL_5=0x80,
VOL_6=0x9A,
VOL_7=0xB4,
VOL_8=0xCC,
VOL_9=0xE6,
VOL_10=0xFF,
VOL_FULL=VOL_10
} VolType;
/**********************************************************************
** The houses that can be played are listed here. Each has their own
** personality and strengths.
*/
typedef enum HousesType {
HOUSE_NONE=-1,
HOUSE_GOOD, // Global Defense Initiative
HOUSE_BAD, // Brotherhood of Nod
HOUSE_NEUTRAL, // Civilians
HOUSE_JP, // Disaster Containment Team
HOUSE_MULTI1, // Multi-Player house #1
HOUSE_MULTI2, // Multi-Player house #2
HOUSE_MULTI3, // Multi-Player house #3
HOUSE_MULTI4, // Multi-Player house #4
HOUSE_MULTI5, // Multi-Player house #5
HOUSE_MULTI6, // Multi-Player house #6
HOUSE_COUNT,
HOUSE_FIRST=HOUSE_GOOD
} HousesType;
inline HousesType operator++(HousesType &, int);
#define HOUSEF_GOOD (1<<HOUSE_GOOD)
#define HOUSEF_BAD (1<<HOUSE_BAD)
#define HOUSEF_NEUTRAL (1<<HOUSE_NEUTRAL)
#define HOUSEF_JP (1<<HOUSE_JP)
#define HOUSEF_MULTI1 (1<<HOUSE_MULTI1)
#define HOUSEF_MULTI2 (1<<HOUSE_MULTI2)
#define HOUSEF_MULTI3 (1<<HOUSE_MULTI3)
#define HOUSEF_MULTI4 (1<<HOUSE_MULTI4)
#define HOUSEF_MULTI5 (1<<HOUSE_MULTI5)
#define HOUSEF_MULTI6 (1<<HOUSE_MULTI6)
typedef enum PlayerColorType {
REMAP_NONE = -1,
REMAP_YELLOW,
REMAP_FIRST=REMAP_YELLOW,
REMAP_RED,
REMAP_AQUA,
REMAP_ORANGE,
REMAP_GREEN,
REMAP_BLUE,
REMAP_LAST=REMAP_BLUE,
REMAP_COUNT
} PlayerColorType;
/**********************************************************************
** These are the types of games that can be played. GDI & NOD are the
** usual human-vs-computer games; 2-Player games are network or modem,
** with 2 players; multi-player games are network with > 2 players.
*/
typedef enum ScenarioPlayerEnum
{
SCEN_PLAYER_NONE = -1,
SCEN_PLAYER_GDI,
SCEN_PLAYER_NOD,
SCEN_PLAYER_JP,
SCEN_PLAYER_2PLAYER,
SCEN_PLAYER_MPLAYER,
SCEN_PLAYER_COUNT,
SCEN_PLAYER_FIRST = 0,
} ScenarioPlayerType;
inline ScenarioPlayerType operator++(ScenarioPlayerType &, int);
/**********************************************************************
** These are the directional parameters for a scenario.
*/
typedef enum ScenarioDirEnum
{
SCEN_DIR_NONE = -1,
SCEN_DIR_EAST,
SCEN_DIR_WEST,
SCEN_DIR_COUNT,
SCEN_DIR_FIRST = 0,
} ScenarioDirType;
inline ScenarioDirType operator++(ScenarioDirType &, int);
/**********************************************************************
** These are the random variations of a scenario.
*/
typedef enum ScenarioVarEnum
{
SCEN_VAR_NONE = -1,
SCEN_VAR_A,
SCEN_VAR_B,
SCEN_VAR_C,
SCEN_VAR_D,
SCEN_VAR_COUNT, // comes before the Lose value!
SCEN_VAR_LOSE,
SCEN_VAR_FIRST = 0,
} ScenarioVarType;
inline ScenarioVarType operator++(ScenarioVarType &, int);
/**********************************************************************
** The objects to be drawn on the map are grouped into layers. These
** enumerated values specify those layers. The ground layer is sorted
** from back to front.
*/
typedef enum LayerType {
LAYER_NONE=-1,
LAYER_GROUND, // Touching the ground type object (units & buildings).
LAYER_AIR, // Flying above the ground (explosions & flames).
LAYER_TOP, // Topmost layer (aircraft & bullets).
LAYER_COUNT,
LAYER_FIRST=0
} LayerType;
inline LayerType operator++(LayerType &, int);
/**********************************************************************
** This enumerates the various bullet types. These types specify bullet's
** visual and explosive characteristics.
*/
typedef enum BulletType {
BULLET_NONE=-1,
BULLET_SNIPER, // Sniper bullet.
BULLET_BULLET, // Small arms
BULLET_APDS, // Armor piercing projectile.
BULLET_HE, // High explosive shell.
BULLET_SSM, // Surface to surface small missile type.
BULLET_SSM2, // MLRS missile.
BULLET_SAM, // Fast homing anti-aircraft missile.
BULLET_TOW, // TOW anti-vehicle short range missile.
BULLET_FLAME, // Flame thrower flame.
BULLET_CHEMSPRAY, // Chemical weapon spray.
BULLET_NAPALM, // Napalm bomblet.
BULLET_GRENADE, // Hand tossed grenade.
BULLET_LASER, // Laser beam from obelisk
BULLET_NUKE_UP, // Nuclear Missile on its way down
BULLET_NUKE_DOWN, // Nuclear Missile on its way up
BULLET_HONEST_JOHN, // SSM with napalm warhead.
BULLET_SPREADFIRE, // Chain gun bullets.
BULLET_HEADBUTT, // Stegosaurus, Triceratops head butt
BULLET_TREXBITE, // Tyrannosaurus Rex's bite - especially bad for infantry
BULLET_COUNT,
BULLET_FIRST=0
} BulletType;
inline BulletType operator++(BulletType &, int);
/**********************************************************************
** All game buildings (structures) are enumerated here. This includes
** civilian structures as well.
*/
typedef enum StructType {
STRUCT_NONE=-1,
STRUCT_WEAP,
STRUCT_GTOWER,
STRUCT_ATOWER,
STRUCT_OBELISK,
STRUCT_RADAR,
STRUCT_TURRET,
STRUCT_CONST,
STRUCT_REFINERY,
STRUCT_STORAGE,
STRUCT_HELIPAD,
STRUCT_SAM,
STRUCT_AIRSTRIP,
STRUCT_POWER,
STRUCT_ADVANCED_POWER,
STRUCT_HOSPITAL,
STRUCT_BARRACKS,
STRUCT_TANKER,
STRUCT_REPAIR,
STRUCT_BIO_LAB,
STRUCT_HAND,
STRUCT_TEMPLE,
STRUCT_EYE,
STRUCT_MISSION,
/*
** All buildings that are never used as a prerequisite
** for construction, follow this point. Typically, this is
** limited to civilian structures.
*/
STRUCT_V01,
STRUCT_V02,
STRUCT_V03,
STRUCT_V04,
STRUCT_V05,
STRUCT_V06,
STRUCT_V07,
STRUCT_V08,
STRUCT_V09,
STRUCT_V10,
STRUCT_V11,
STRUCT_V12,
STRUCT_V13,
STRUCT_V14,
STRUCT_V15,
STRUCT_V16,
STRUCT_V17,
STRUCT_V18,
STRUCT_PUMP,
STRUCT_V20,
STRUCT_V21,
STRUCT_V22,
STRUCT_V23,
STRUCT_V24,
STRUCT_V25,
STRUCT_V26,
STRUCT_V27,
STRUCT_V28,
STRUCT_V29,
STRUCT_V30,
STRUCT_V31,
STRUCT_V32,
STRUCT_V33,
STRUCT_V34,
STRUCT_V35,
STRUCT_V36,
STRUCT_V37,
#ifdef OBSOLETE
STRUCT_ROAD,
#endif
STRUCT_SANDBAG_WALL,
STRUCT_CYCLONE_WALL,
STRUCT_BRICK_WALL,
STRUCT_BARBWIRE_WALL,
STRUCT_WOOD_WALL,
STRUCT_COUNT,
STRUCT_FIRST=0
} StructType;
inline StructType operator++(StructType &, int);
#define STRUCTF_NONE 0L
#define STRUCTF_ADVANCED_POWER (1L << STRUCT_ADVANCED_POWER)
#define STRUCTF_REPAIR (1L << STRUCT_REPAIR)
#define STRUCTF_EYE (1L << STRUCT_EYE)
#define STRUCTF_TEMPLE (1L << STRUCT_TEMPLE)
#define STRUCTF_HAND (1L << STRUCT_HAND)
#define STRUCTF_BIO_LAB (1L << STRUCT_BIO_LAB)
#define STRUCTF_OBELISK (1L << STRUCT_OBELISK)
#define STRUCTF_ATOWER (1L << STRUCT_ATOWER)
#define STRUCTF_WEAP (1L << STRUCT_WEAP)
#define STRUCTF_GTOWER (1L << STRUCT_GTOWER)
#define STRUCTF_RADAR (1L << STRUCT_RADAR)
#define STRUCTF_TURRET (1L << STRUCT_TURRET)
#define STRUCTF_CIV1 (1L << STRUCT_CIV1)
#define STRUCTF_CIV2 (1L << STRUCT_CIV2)
#define STRUCTF_CIV3 (1L << STRUCT_CIV3)
#define STRUCTF_CONST (1L << STRUCT_CONST)
#define STRUCTF_REFINERY (1L << STRUCT_REFINERY)
#define STRUCTF_STORAGE (1L << STRUCT_STORAGE)
#define STRUCTF_HELIPAD (1L << STRUCT_HELIPAD)
#define STRUCTF_SAM (1L << STRUCT_SAM)
#define STRUCTF_AIRSTRIP (1L << STRUCT_AIRSTRIP)
#define STRUCTF_POWER (1L << STRUCT_POWER)
#define STRUCTF_HOSPITAL (1L << STRUCT_HOSPITAL)
#define STRUCTF_BARRACKS (1L << STRUCT_BARRACKS)
#define STRUCTF_TANKER (1L << STRUCT_TANKER)
#define STRUCTF_MISSION (1L << STRUCT_MISSION)
/**********************************************************************
** The overlays are enumerated here. An overlay functions similarly to
** a transparent icon. It is placed over the terrain but usually falls
** "under" buildings, trees, and units.
*/
typedef enum OverlayType {
OVERLAY_NONE=-1,
OVERLAY_CONCRETE, // Concrete.
OVERLAY_SANDBAG_WALL, // Piled sandbags.
OVERLAY_CYCLONE_WALL, // Chain-link fence.
OVERLAY_BRICK_WALL, // Solid concrete wall.
OVERLAY_BARBWIRE_WALL, // Barbed-wire wall.
OVERLAY_WOOD_WALL, // Wooden fence.
OVERLAY_TIBERIUM1, // Tiberium patch.
OVERLAY_TIBERIUM2, // Tiberium patch.
OVERLAY_TIBERIUM3, // Tiberium patch.
OVERLAY_TIBERIUM4, // Tiberium patch.
OVERLAY_TIBERIUM5, // Tiberium patch.
OVERLAY_TIBERIUM6, // Tiberium patch.
OVERLAY_TIBERIUM7, // Tiberium patch.
OVERLAY_TIBERIUM8, // Tiberium patch.
OVERLAY_TIBERIUM9, // Tiberium patch.
OVERLAY_TIBERIUM10, // Tiberium patch.
OVERLAY_TIBERIUM11, // Tiberium patch.
OVERLAY_TIBERIUM12, // Tiberium patch.
OVERLAY_ROAD, // Road/concrete piece.
OVERLAY_SQUISH, // Squish mark for overran infantry.
OVERLAY_V12, // Haystacks
OVERLAY_V13, // Haystack
OVERLAY_V14, // Wheat field
OVERLAY_V15, // Fallow field
OVERLAY_V16, // Corn field
OVERLAY_V17, // Celery field
OVERLAY_V18, // Potato field
OVERLAY_FLAG_SPOT, // Flag start location.
OVERLAY_WOOD_CRATE, // Wooden goodie crate.
OVERLAY_STEEL_CRATE, // Steel goodie crate.
OVERLAY_COUNT,
OVERLAY_FIRST=0
} OverlayType;
inline OverlayType operator++(OverlayType &, int);
/**********************************************************************
** This specifies the infantry in the game. The "E" designation is
** similar to the army classification of enlisted soldiers.
*/
typedef enum InfantryType{
INFANTRY_NONE=-1,
INFANTRY_E1, // Mini-gun armed.
INFANTRY_E2, // Grenade thrower.
INFANTRY_E3, // Rocket launcher.
INFANTRY_E4, // Flame thrower equipped.
INFANTRY_E5, // Chemical thrower equipped.
INFANTRY_E7, // Engineer.
INFANTRY_RAMBO, // Commando.
INFANTRY_C1, // Civilian
INFANTRY_C2, // Civilian
INFANTRY_C3, // Civilian
INFANTRY_C4, // Civilian
INFANTRY_C5, // Civilian
INFANTRY_C6, // Civilian
INFANTRY_C7, // Civilian
INFANTRY_C8, // Civilian
INFANTRY_C9, // Civilian
INFANTRY_C10, // Nikumba
INFANTRY_MOEBIUS, // Dr. Moebius
INFANTRY_DELPHI, // Agent "Delphi"
INFANTRY_CHAN, // Dr. Chan
INFANTRY_COUNT,
INFANTRY_FIRST=0
} InfantryType;
inline InfantryType operator++(InfantryType &, int);
/**********************************************************************
** The game units are enumerated here. These include not only traditional
** vehicles, but also hovercraft and gunboats.
*/
typedef enum UnitType{
UNIT_NONE=-1,
UNIT_HTANK, // Heavy tank (Mammoth).
UNIT_MTANK, // Medium tank (M1).
UNIT_LTANK, // Light tank ('Bradly').
UNIT_STANK, // Stealth tank (Romulan).
UNIT_FTANK, // Flame thrower tank.
UNIT_VICE, // Visceroid
UNIT_APC, // APC.
UNIT_MLRS, // MLRS rocket launcher.
UNIT_JEEP, // 4x4 jeep replacement.
UNIT_BUGGY, // Rat patrol dune buggy type.
UNIT_HARVESTER, // Resource gathering vehicle.
UNIT_ARTY, // Artillery unit.
UNIT_MSAM, // Anti-Aircraft vehicle.
UNIT_HOVER, // Hovercraft.
UNIT_MHQ, // Mobile Head Quarters.
UNIT_GUNBOAT, // Gunboat
UNIT_MCV, // Mobile construction vehicle.
UNIT_BIKE, // Nod recon motor-bike.
UNIT_TRIC, // Triceratops
UNIT_TREX, // Tyranosaurus Rex
UNIT_RAPT, // Velociraptor
UNIT_STEG, // Stegasaurus
UNIT_COUNT,
UNIT_FIRST=0
} UnitType;
inline UnitType operator++(UnitType &, int);
#define UNITF_HTANK (1L<<UNIT_HTANK)
#define UNITF_MTANK (1L<<UNIT_MTANK)