1 #ifndef __OVERHEAD_TYPES_H
2 #define __OVERHEAD_TYPES_H
3 // GLOBAL HEADER FOR DATA, TYPES FOR TACTICAL ENGINE
4 
5 #include "Types.h"
6 
7 
8 #define REFINE_AIM_1					0
9 #define REFINE_AIM_MID1				1
10 #define REFINE_AIM_2					2
11 #define REFINE_AIM_MID2				3
12 #define REFINE_AIM_3					4
13 #define REFINE_AIM_MID3				5
14 #define REFINE_AIM_4					6
15 #define REFINE_AIM_MID4				7
16 #define REFINE_AIM_5					8
17 #define REFINE_AIM_BURST				10
18 
19 #define AIM_SHOT_RANDOM				0
20 #define AIM_SHOT_HEAD					1
21 #define AIM_SHOT_TORSO					2
22 #define AIM_SHOT_LEGS					3
23 #define AIM_SHOT_GLAND					4
24 
25 #define MIN_AMB_LEVEL_FOR_MERC_LIGHTS			9
26 
27 
28 #define MAXTEAMS					6
29 #define MAXMERCS					MAX_NUM_SOLDIERS
30 
31 //TACTICAL OVERHEAD STUFF
32 #define NO_SOLDIER					TOTAL_SOLDIERS // SAME AS NOBODY
33 #define NOBODY						NO_SOLDIER
34 
35 
36 
37 
38 // TACTICAL ENGINE STATUS FLAGS
39 #define IN_ENDGAME_SEQUENCE             		0x000000008
40 #define SHOW_ALL_ITEMS					0x000000010
41 #define SHOW_AP_LEFT					0x000000020
42 #define SHOW_ALL_MERCS					0x000000040
43 #define GODMODE					0x000000100
44 #define DISALLOW_SIGHT					0x000001000
45 #define CHECK_SIGHT_AT_END_OF_ATTACK			0x000002000
46 #define IN_CREATURE_LAIR				0x000004000
47 #define NOHIDE_REDUNDENCY				0x000010000
48 #define DEBUGCLIFFS					0x000020000
49 #define INCOMBAT					0x000040000
50 #define ACTIVE						0x000100000
51 #define SHOW_Z_BUFFER					0x000200000
52 #define SLOW_ANIMATION					0x000400000
53 #define ENGAGED_IN_CONV				0x000800000
54 #define LOADING_SAVED_GAME				0x001000000
55 #define OUR_MERCS_AUTO_MOVE				0x002000000
56 #define SHOW_ALL_ROOFS					0x004000000
57 #define RED_ITEM_GLOW_ON				0x010000000
58 #define IGNORE_ENGAGED_IN_CONV_UI_UNLOCK		0x020000000
59 #define IGNORE_ALL_OBSTACLES				0x040000000
60 #define IN_DEIDRANNA_ENDGAME				0x080000000
61 
62 #define OKBREATH					10
63 #define OKLIFE						15
64 #define CONSCIOUSNESS					10
65 
66 // VIEWRANGE DEFINES
67 #define GASSED_VIEW_RANGE				1 /**< a gassed merc can only see 1 tile away due to blurred vision */
68 #define NORMAL_VIEW_RANGE				13
69 
70 // MODIFIERS FOR AP COST FOR MOVEMENT
71 #define RUNDIVISOR					1.8
72 #define WALKCOST					-1
73 #define SWATCOST					0
74 #define CRAWLCOST					1
75 
76 
77 #define MAX_PATH_LIST_SIZE				30
78 #define NUM_SOLDIER_SHADES				48
79 #define NUM_SOLDIER_EFFECTSHADES			2
80 
81 // TIMER DELAYS
82 #define DAMAGE_DISPLAY_DELAY				250
83 
84 
85 #define DONTSETLOCATOR					0
86 #define SETLOCATOR					1
87 #define SETANDREMOVEPREVIOUSLOCATOR			2
88 #define SETLOCATORFAST					3
89 
90 
91 // ORDERS
92 enum
93 {
94 	STATIONARY = 0, // moves max 1 sq., no matter what's going on
95 	ONGUARD, // moves max 2 sqs. until alerted by something
96 	CLOSEPATROL, // patrols within 5 spaces until alerted
97 	FARPATROL, // patrols within 15 spaces
98 	POINTPATROL, // patrols using patrolGrids
99 	ONCALL, // helps buddies anywhere within the sector
100 	SEEKENEMY, // not tied down to any one particular spot
101 	RNDPTPATROL, // patrols randomly using patrolGrids
102 	MAXORDERS
103 };
104 
105 // ATTITUDES
106 enum
107 {
108 	DEFENSIVE = 0,
109 	BRAVESOLO,
110 	BRAVEAID,
111 	CUNNINGSOLO,
112 	CUNNINGAID,
113 	AGGRESSIVE,
114 	MAXATTITUDES,
115 	ATTACKSLAYONLY // special hyperaggressive vs Slay only value for Carmen the bounty hunter
116 };
117 
118 // alert status types
119 enum
120 {
121 	STATUS_GREEN = 0, // everything's OK, no suspicion
122 	STATUS_YELLOW, // he or his friend heard something
123 	STATUS_RED, // has definite evidence of opponent
124 	STATUS_BLACK, // currently sees an active opponent
125 	NUM_STATUS_STATES
126 };
127 
128 enum
129 {
130 	MORALE_HOPELESS = 0,
131 	MORALE_WORRIED,
132 	MORALE_NORMAL,
133 	MORALE_CONFIDENT,
134 	MORALE_FEARLESS,
135 	NUM_MORALE_STATES
136 };
137 
138 // DEFINES FOR WEAPON HIT EVENT SPECIAL PARAM
139 #define FIRE_WEAPON_NO_SPECIAL				0
140 #define FIRE_WEAPON_BURST_SPECIAL			1
141 #define FIRE_WEAPON_HEAD_EXPLODE_SPECIAL		2
142 #define FIRE_WEAPON_CHEST_EXPLODE_SPECIAL		3
143 #define FIRE_WEAPON_LEG_FALLDOWN_SPECIAL		4
144 #define FIRE_WEAPON_HIT_BY_KNIFE_SPECIAL		5
145 #define FIRE_WEAPON_SLEEP_DART_SPECIAL			6
146 #define FIRE_WEAPON_BLINDED_BY_SPIT_SPECIAL		7
147 #define FIRE_WEAPON_TOSSED_OBJECT_SPECIAL		8
148 
149 
150 #define NO_INTERRUPTS					0
151 #define ALLOW_INTERRUPTS				1
152 
153 
154 enum SightFlags
155 {
156 	SIGHT_LOOK      = 0x1,
157 	//SIGHT_SEND      = 0x2, // No longer needed using LOCAL OPPLISTs
158 	SIGHT_RADIO     = 0x4,
159 	SIGHT_INTERRUPT = 0x8,
160 	SIGHT_ALL       = 0xF
161 };
162 ENUM_BITSET(SightFlags)
163 
164 
165 // CHANGE THIS VALUE TO AFFECT TOTAL SIGHT RANGE
166 #define STRAIGHT_RANGE					13
167 
168 // CHANGE THESE VALUES TO ADJUST VARIOUS FOV ANGLES
169 #define STRAIGHT_RATIO					1
170 #define ANGLE_RATIO					0.857
171 #define SIDE_RATIO					0.571
172 // CJC: Changed SBEHIND_RATIO (side-behind ratio) to be 0 to make stealth attacks easier
173 // Changed on September 21, 1998
174 //#define SBEHIND_RATIO				0.142
175 #define SBEHIND_RATIO					0
176 #define BEHIND_RATIO					0
177 
178 // looking distance defines
179 #define BEHIND						(INT8)( BEHIND_RATIO * STRAIGHT_RANGE )
180 #define SBEHIND						(INT8)( SBEHIND_RATIO * STRAIGHT_RANGE )
181 #define SIDE						(INT8)( SIDE_RATIO * STRAIGHT_RANGE )
182 #define ANGLE						(INT8)( ANGLE_RATIO * STRAIGHT_RANGE )
183 #define STRAIGHT					(INT8)( STRAIGHT_RATIO * STRAIGHT_RANGE )
184 
185 
186 // opplist value constants
187 #define HEARD_3_TURNS_AGO				-4
188 #define HEARD_2_TURNS_AGO				-3
189 #define HEARD_LAST_TURN				-2
190 #define HEARD_THIS_TURN				-1
191 #define NOT_HEARD_OR_SEEN				0
192 #define SEEN_CURRENTLY					1
193 #define SEEN_THIS_TURN					2
194 #define SEEN_LAST_TURN					3
195 #define SEEN_2_TURNS_AGO				4
196 #define SEEN_3_TURNS_AGO				5
197 
198 #define OLDEST_SEEN_VALUE				SEEN_3_TURNS_AGO
199 #define OLDEST_HEARD_VALUE				HEARD_3_TURNS_AGO
200 
201 
202 // DEFINES FOR BODY TYPE SUBSTITUTIONS
203 #define SUB_ANIM_BIGGUYSHOOT2				0x00000001
204 #define SUB_ANIM_BIGGUYTHREATENSTANCE			0x00000002
205 
206 
207 // Enumerate directions
208 enum WorldDirections
209 {
210 	NORTH = 0,
211 	NORTHEAST,
212 	EAST,
213 	SOUTHEAST,
214 	SOUTH,
215 	SOUTHWEST,
216 	WEST,
217 	NORTHWEST,
218 	NUM_WORLD_DIRECTIONS,
219 	DIRECTION_IRRELEVANT,
220 	DIRECTION_EXITGRID = 255
221 };
222 
223 
224 // ENUMERATION OF SOLDIER POSIITONS IN GLOBAL SOLDIER LIST
225 #define MAX_NUM_SOLDIERS				148
226 #define NUM_PLANNING_MERCS				8 // XXX this is a remnant of the planning mode, see issue #902
227 #define TOTAL_SOLDIERS					( NUM_PLANNING_MERCS + MAX_NUM_SOLDIERS )
228 
229 // DEFINE TEAMS
230 #define OUR_TEAM					0
231 #define ENEMY_TEAM					1
232 #define CREATURE_TEAM					2
233 #define MILITIA_TEAM					3
234 #define CIV_TEAM					4
235 #define LAST_TEAM					CIV_TEAM
236 
237 
238 //-----------------------------------------------
239 //NOTE:  The editor uses these enumerations, so please update the text as well if you modify or
240 //       add new groups.  Try to abbreviate the team name as much as possible.  The text is in
241 //       EditorMercs.c
242 //
243 // civilian "sub teams":
244 enum
245 {
246 	NON_CIV_GROUP = 0,
247 	REBEL_CIV_GROUP,
248 	KINGPIN_CIV_GROUP,
249 	SANMONA_ARMS_GROUP,
250 	ANGELS_GROUP,
251 	BEGGARS_CIV_GROUP,
252 	TOURISTS_CIV_GROUP,
253 	ALMA_MILITARY_CIV_GROUP,
254 	DOCTORS_CIV_GROUP,
255 	COUPLE1_CIV_GROUP,
256 	HICKS_CIV_GROUP,
257 	WARDEN_CIV_GROUP,
258 	JUNKYARD_CIV_GROUP,
259 	FACTORY_KIDS_GROUP,
260 	QUEENS_CIV_GROUP,
261 	UNNAMED_CIV_GROUP_15,
262 	UNNAMED_CIV_GROUP_16,
263 	UNNAMED_CIV_GROUP_17,
264 	UNNAMED_CIV_GROUP_18,
265 	UNNAMED_CIV_GROUP_19,
266 
267 	NUM_CIV_GROUPS
268 };
269 
270 #define CIV_GROUP_NEUTRAL				0
271 #define CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE	1
272 #define CIV_GROUP_WILL_BECOME_HOSTILE			2
273 #define CIV_GROUP_HOSTILE				3
274 
275 
276 // boxing state
277 enum BoxingStates
278 {
279 	NOT_BOXING = 0,
280 	BOXING_WAITING_FOR_PLAYER,
281 	PRE_BOXING,
282 	BOXING,
283 	DISQUALIFIED,
284 	WON_ROUND,
285 	LOST_ROUND
286 };
287 
288 //
289 //-----------------------------------------------
290 
291 // PALETTE SUBSITUTION TYPES
292 
293 #define PaletteRepID_LENGTH 30
294 
295 #endif
296