4b825dc642cb6eb9a060e54bf8d69288fbee490494a6641b73026d662261604d7d192beae70b11dc
 
 
1
#include "system.h"
 
 
2
#include "prototyp.h"
 
 
3
#include "stratdef.h"
 
 
4
#include "bh_types.h"
 
 
5
#include "npc_marine.h"
 
 
6
#include "npc_alien.h"
 
 
7
#include "corpse.h"
 
 
8
#include "debris.h"
 
 
9
#include "weaponbehaviour.h"
 
 
10
#include "pldghost.h"
 
 
11
#include "userprofile.h"
 
 
12
#include <assert.h>
 
 
13
 
 
 
14
extern void RenderHUDString(const char *stringPtr, int x, int y, int colour);
 
 
15
extern void RenderStringCentred(const char *stringPtr, int centreX, int y, int colour);
 
 
16
extern void FadeDownScreen(int brightness, int colour);
 
 
17
 
 
 
18
#define TABPOINT1    (ScreenDescriptorBlock.SDB_Width/10)
 
 
19
#define TABPOINT2    (ScreenDescriptorBlock.SDB_CentreX)
 
 
20
#define TABPOINT3    ((ScreenDescriptorBlock.SDB_Width/6)+(ScreenDescriptorBlock.SDB_CentreX))
 
 
21
#define TABPOINT4    (((ScreenDescriptorBlock.SDB_Width/6)*2)+(ScreenDescriptorBlock.SDB_CentreX))
 
 
22
 
 
 
23
#define NotCheating (CHEATMODE_NONACTIVE == UserProfile.active_bonus)
 
 
24
 
 
 
25
AvP_GameStats CurrentGameStatistics;
 
 
26
extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock;
 
 
27
 
 
 
28
#define COLOUR_WHITE    (0xffffffff)
 
 
29
#define COLOUR_RED    (0xffff0000)
 
 
30
#define COLOUR_GREEN    (0xff00ff00)
 
 
31
 
 
 
32
#define NEWLINE_SPACING    ((ScreenDescriptorBlock.SDB_Height < 400) ? 12:15)
 
 
33
 
 
 
34
static struct
 
 
35
{
 
 
36
    AvP_GameStats_Stored StatTargets;
 
 
37
    enum CHEATMODE_ID CheatModeToActivate;
 
 
38
}
 
 
39
 
 
 
40
const LevelStatsTargets[AVP_ENVIRONMENT_END_OF_LIST] =
 
 
41
{
 
 
42
    {
 
 
43
        {    /* Temple */
 
 
44
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
45
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
46
            {-1,-1,-1,-1,-1,-1,-1,-1,10,-1,},    /* Trophies / Live Head Bites */
 
 
47
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
48
            -1,        /* Shots Fired */
 
 
49
            -1,        /* Accuracy */
 
 
50
            -1,        /* Spotted */
 
 
51
            0,        /* Total Seconds (unsigned!) */
 
 
52
            0,        /* Total Minutes (unsigned!) */
 
 
53
            -1,        /* Total Hours */
 
 
54
            0,        /* Cloaked Seconds */
 
 
55
            0,        /* Cloaked Minutes */
 
 
56
            -1,        /* Cloaked Hours */
 
 
57
            -1,        /* Health Damage */
 
 
58
            -1,        /* Armour Damage */
 
 
59
            -1,        /* Average Speed */
 
 
60
            -1,        /* Field Charge Used */
 
 
61
            -1        /* Head Shot Percentage */
 
 
62
        },
 
 
63
        CHEATMODE_SNIPERMUNCH,    /* Cheat to activate */
 
 
64
    },
 
 
65
    {
 
 
66
        {    /* Escape */
 
 
67
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
68
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
69
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
70
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
71
            -1,        /* Shots Fired */
 
 
72
            -1,        /* Accuracy */
 
 
73
            -1,        /* Spotted */
 
 
74
            0,        /* Total Seconds (unsigned!) */
 
 
75
            2,        /* Total Minutes (unsigned!) */
 
 
76
            0,        /* Total Hours */
 
 
77
            0,        /* Cloaked Seconds */
 
 
78
            0,        /* Cloaked Minutes */
 
 
79
            -1,        /* Cloaked Hours */
 
 
80
            -1,        /* Health Damage */
 
 
81
            -1,        /* Armour Damage */
 
 
82
            -1,        /* Average Speed */
 
 
83
            -1,        /* Field Charge Used */
 
 
84
            -1        /* Head Shot Percentage */
 
 
85
        },
 
 
86
        CHEATMODE_NAUSEA,    /* Cheat to activate */
 
 
87
    },
 
 
88
    {
 
 
89
        {    /* Feraco */
 
 
90
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
91
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
92
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
93
            {-1,-1,-1,-1,-1,-1,-1,-1,15,-1,},    /* Dead Head Bites */
 
 
94
            -1,        /* Shots Fired */
 
 
95
            -1,        /* Accuracy */
 
 
96
            -1,        /* Spotted */
 
 
97
            0,        /* Total Seconds (unsigned!) */
 
 
98
            0,        /* Total Minutes (unsigned!) */
 
 
99
            -1,        /* Total Hours */
 
 
100
            0,        /* Cloaked Seconds */
 
 
101
            0,        /* Cloaked Minutes */
 
 
102
            -1,        /* Cloaked Hours */
 
 
103
            -1,        /* Health Damage */
 
 
104
            -1,        /* Armour Damage */
 
 
105
            -1,        /* Average Speed */
 
 
106
            -1,        /* Field Charge Used */
 
 
107
            -1        /* Head Shot Percentage */
 
 
108
        },
 
 
109
        CHEATMODE_PIPECLEANER,    /* Cheat to activate */
 
 
110
    },
 
 
111
    {
 
 
112
        {    /* Gateway */
 
 
113
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
114
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
115
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
116
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
117
            -1,        /* Shots Fired */
 
 
118
            -1,        /* Accuracy */
 
 
119
            -1,        /* Spotted */
 
 
120
            (30*ONE_FIXED),    /* Total Seconds (unsigned!) */
 
 
121
            4,        /* Total Minutes (unsigned!) */
 
 
122
            0,        /* Total Hours */
 
 
123
            0,        /* Cloaked Seconds */
 
 
124
            0,        /* Cloaked Minutes */
 
 
125
            -1,        /* Cloaked Hours */
 
 
126
            -1,        /* Health Damage */
 
 
127
            -1,        /* Armour Damage */
 
 
128
            9000,    /* Average Speed */
 
 
129
            -1,        /* Field Charge Used */
 
 
130
            -1        /* Head Shot Percentage */
 
 
131
        },
 
 
132
        CHEATMODE_MOTIONBLUR,    /* Cheat to activate */
 
 
133
    },
 
 
134
    {
 
 
135
        {    /* Earthbound */
 
 
136
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
137
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
138
            {-1,-1,-1,-1,-1,-1, 1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
139
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
140
            -1,        /* Shots Fired */
 
 
141
            -1,        /* Accuracy */
 
 
142
            -1,        /* Spotted */
 
 
143
            0,        /* Total Seconds (unsigned!) */
 
 
144
            0,        /* Total Minutes (unsigned!) */
 
 
145
            -1,        /* Total Hours */
 
 
146
            0,        /* Cloaked Seconds */
 
 
147
            0,        /* Cloaked Minutes */
 
 
148
            -1,        /* Cloaked Hours */
 
 
149
            -1,        /* Health Damage */
 
 
150
            -1,        /* Armour Damage */
 
 
151
            -1,        /* Average Speed */
 
 
152
            -1,        /* Field Charge Used */
 
 
153
            -1        /* Head Shot Percentage */
 
 
154
        },
 
 
155
        CHEATMODE_MIRROR,    /* Cheat to activate */
 
 
156
    },
 
 
157
    {
 
 
158
        {    /* Invasion_A */
 
 
159
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
160
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
161
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
162
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
163
            -1,        /* Shots Fired */
 
 
164
            -1,        /* Accuracy */
 
 
165
            -1,        /* Spotted */
 
 
166
            0,        /* Total Seconds (unsigned!) */
 
 
167
            0,        /* Total Minutes (unsigned!) */
 
 
168
            -1,        /* Total Hours */
 
 
169
            0,        /* Cloaked Seconds */
 
 
170
            0,        /* Cloaked Minutes */
 
 
171
            -1,        /* Cloaked Hours */
 
 
172
            -1,        /* Health Damage */
 
 
173
            -1,        /* Armour Damage */
 
 
174
            -1,        /* Average Speed */
 
 
175
            -1,        /* Field Charge Used */
 
 
176
            -1        /* Head Shot Percentage */
 
 
177
        },
 
 
178
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
179
    },
 
 
180
    {
 
 
181
        {    /* Derelict_A */
 
 
182
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
183
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
184
            {-1,-1,-1,-1,-1,-1,-1,20,-1,-1,},    /* Trophies / Live Head Bites */
 
 
185
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
186
            -1,        /* Shots Fired */
 
 
187
            -1,        /* Accuracy */
 
 
188
            -1,        /* Spotted */
 
 
189
            0,        /* Total Seconds (unsigned!) */
 
 
190
            0,        /* Total Minutes (unsigned!) */
 
 
191
            -1,        /* Total Hours */
 
 
192
            0,        /* Cloaked Seconds */
 
 
193
            0,        /* Cloaked Minutes */
 
 
194
            -1,        /* Cloaked Hours */
 
 
195
            -1,        /* Health Damage */
 
 
196
            -1,        /* Armour Damage */
 
 
197
            -1,        /* Average Speed */
 
 
198
            -1,        /* Field Charge Used */
 
 
199
            -1        /* Head Shot Percentage */
 
 
200
        },
 
 
201
        CHEATMODE_RANDOMTEXTURES,    /* Cheat to activate */
 
 
202
    },
 
 
203
    {
 
 
204
        {    /* Tyrago_A */
 
 
205
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
206
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
207
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
208
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
209
            -1,        /* Shots Fired */
 
 
210
            -1,        /* Accuracy */
 
 
211
            -1,        /* Spotted */
 
 
212
            0,        /* Total Seconds (unsigned!) */
 
 
213
            0,        /* Total Minutes (unsigned!) */
 
 
214
            -1,        /* Total Hours */
 
 
215
            0,        /* Cloaked Seconds */
 
 
216
            0,        /* Cloaked Minutes */
 
 
217
            -1,        /* Cloaked Hours */
 
 
218
            -1,        /* Health Damage */
 
 
219
            -1,        /* Armour Damage */
 
 
220
            -1,        /* Average Speed */
 
 
221
            -1,        /* Field Charge Used */
 
 
222
            -1        /* Head Shot Percentage */
 
 
223
        },
 
 
224
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
225
    },
 
 
226
    {
 
 
227
        {    /* Fury161_A */
 
 
228
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
229
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
230
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
231
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
232
            -1,        /* Shots Fired */
 
 
233
            -1,        /* Accuracy */
 
 
234
            -1,        /* Spotted */
 
 
235
            0,        /* Total Seconds (unsigned!) */
 
 
236
            0,        /* Total Minutes (unsigned!) */
 
 
237
            -1,        /* Total Hours */
 
 
238
            0,        /* Cloaked Seconds */
 
 
239
            0,        /* Cloaked Minutes */
 
 
240
            -1,        /* Cloaked Hours */
 
 
241
            -1,        /* Health Damage */
 
 
242
            -1,        /* Armour Damage */
 
 
243
            -1,        /* Average Speed */
 
 
244
            -1,        /* Field Charge Used */
 
 
245
            -1        /* Head Shot Percentage */
 
 
246
        },
 
 
247
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
248
    },
 
 
249
    {
 
 
250
        {    /* Caverns_A */
 
 
251
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
252
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
253
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
254
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
255
            -1,        /* Shots Fired */
 
 
256
            -1,        /* Accuracy */
 
 
257
            -1,        /* Spotted */
 
 
258
            0,        /* Total Seconds (unsigned!) */
 
 
259
            0,        /* Total Minutes (unsigned!) */
 
 
260
            -1,        /* Total Hours */
 
 
261
            0,        /* Cloaked Seconds */
 
 
262
            0,        /* Cloaked Minutes */
 
 
263
            -1,        /* Cloaked Hours */
 
 
264
            -1,        /* Health Damage */
 
 
265
            -1,        /* Armour Damage */
 
 
266
            -1,        /* Average Speed */
 
 
267
            -1,        /* Field Charge Used */
 
 
268
            -1        /* Head Shot Percentage */
 
 
269
        },
 
 
270
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
271
    },
 
 
272
    {
 
 
273
        {    /* Derelict */
 
 
274
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
275
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
276
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
277
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
278
            -1,        /* Shots Fired */
 
 
279
            -1,        /* Accuracy */
 
 
280
            -1,        /* Spotted */
 
 
281
            0,        /* Total Seconds (unsigned!) */
 
 
282
            0,        /* Total Minutes (unsigned!) */
 
 
283
            -1,        /* Total Hours */
 
 
284
            0,        /* Cloaked Seconds */
 
 
285
            0,        /* Cloaked Minutes */
 
 
286
            -1,        /* Cloaked Hours */
 
 
287
            -1,        /* Health Damage */
 
 
288
            -1,        /* Armour Damage */
 
 
289
            -1,        /* Average Speed */
 
 
290
            -1,        /* Field Charge Used */
 
 
291
            80        /* Head Shot Percentage */
 
 
292
        },
 
 
293
        CHEATMODE_JOHNWOO,    /* Cheat to activate */
 
 
294
    },
 
 
295
    {
 
 
296
        {    /* Colony */
 
 
297
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
298
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
299
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
300
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
301
            -1,        /* Shots Fired */
 
 
302
            40,        /* Accuracy */
 
 
303
            -1,        /* Spotted */
 
 
304
            0,        /* Total Seconds (unsigned!) */
 
 
305
            0,        /* Total Minutes (unsigned!) */
 
 
306
            -1,        /* Total Hours */
 
 
307
            0,        /* Cloaked Seconds */
 
 
308
            0,        /* Cloaked Minutes */
 
 
309
            -1,        /* Cloaked Hours */
 
 
310
            -1,        /* Health Damage */
 
 
311
            -1,        /* Armour Damage */
 
 
312
            -1,        /* Average Speed */
 
 
313
            -1,        /* Field Charge Used */
 
 
314
            -1        /* Head Shot Percentage */
 
 
315
        },
 
 
316
        CHEATMODE_GRENADE,    /* Cheat to activate */
 
 
317
    },
 
 
318
    {
 
 
319
        {    /* Invasion */
 
 
320
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
321
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
322
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
323
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
324
            -1,        /* Shots Fired */
 
 
325
            -1,        /* Accuracy */
 
 
326
            -1,        /* Spotted */
 
 
327
            0,        /* Total Seconds (unsigned!) */
 
 
328
            4,        /* Total Minutes (unsigned!) */
 
 
329
            0,        /* Total Hours */
 
 
330
            0,        /* Cloaked Seconds */
 
 
331
            0,        /* Cloaked Minutes */
 
 
332
            -1,        /* Cloaked Hours */
 
 
333
            -1,        /* Health Damage */
 
 
334
            -1,        /* Armour Damage */
 
 
335
            -1,        /* Average Speed */
 
 
336
            -1,        /* Field Charge Used */
 
 
337
            -1        /* Head Shot Percentage */
 
 
338
        },
 
 
339
        CHEATMODE_WARPSPEED,    /* Cheat to activate */
 
 
340
    },
 
 
341
    {
 
 
342
        {    /* Orbital */
 
 
343
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
344
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
345
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
346
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
347
            20,        /* Shots Fired */
 
 
348
            -1,        /* Accuracy */
 
 
349
            -1,        /* Spotted */
 
 
350
            0,        /* Total Seconds (unsigned!) */
 
 
351
            0,        /* Total Minutes (unsigned!) */
 
 
352
            -1,        /* Total Hours */
 
 
353
            0,        /* Cloaked Seconds */
 
 
354
            0,        /* Cloaked Minutes */
 
 
355
            -1,        /* Cloaked Hours */
 
 
356
            -1,        /* Health Damage */
 
 
357
            -1,        /* Armour Damage */
 
 
358
            -1,        /* Average Speed */
 
 
359
            -1,        /* Field Charge Used */
 
 
360
            -1        /* Head Shot Percentage */
 
 
361
        },
 
 
362
        CHEATMODE_LANDOFTHEGIANTS,    /* Cheat to activate */
 
 
363
    },
 
 
364
    {
 
 
365
        {    /* Tyrago */
 
 
366
            {-1,32,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
367
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
368
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
369
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
370
            -1,        /* Shots Fired */
 
 
371
            -1,        /* Accuracy */
 
 
372
            -1,        /* Spotted */
 
 
373
            0,        /* Total Seconds (unsigned!) */
 
 
374
            0,        /* Total Minutes (unsigned!) */
 
 
375
            -1,        /* Total Hours */
 
 
376
            0,        /* Cloaked Seconds */
 
 
377
            0,        /* Cloaked Minutes */
 
 
378
            -1,        /* Cloaked Hours */
 
 
379
            -1,        /* Health Damage */
 
 
380
            -1,        /* Armour Damage */
 
 
381
            -1,        /* Average Speed */
 
 
382
            -1,        /* Field Charge Used */
 
 
383
            -1        /* Head Shot Percentage */
 
 
384
        },
 
 
385
        CHEATMODE_SLUGTRAIL,    /* Cheat to activate */
 
 
386
    },
 
 
387
    {
 
 
388
        {    /* Tyrago Hangar */
 
 
389
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
390
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
391
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
392
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
393
            -1,        /* Shots Fired */
 
 
394
            -1,        /* Accuracy */
 
 
395
            -1,        /* Spotted */
 
 
396
            0,        /* Total Seconds (unsigned!) */
 
 
397
            0,        /* Total Minutes (unsigned!) */
 
 
398
            -1,        /* Total Hours */
 
 
399
            0,        /* Cloaked Seconds */
 
 
400
            0,        /* Cloaked Minutes */
 
 
401
            -1,        /* Cloaked Hours */
 
 
402
            -1,        /* Health Damage */
 
 
403
            -1,        /* Armour Damage */
 
 
404
            -1,        /* Average Speed */
 
 
405
            -1,        /* Field Charge Used */
 
 
406
            -1        /* Head Shot Percentage */
 
 
407
        },
 
 
408
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
409
    },
 
 
410
    {
 
 
411
        {    /* Waterfall_M */
 
 
412
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
413
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
414
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
415
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
416
            -1,        /* Shots Fired */
 
 
417
            -1,        /* Accuracy */
 
 
418
            -1,        /* Spotted */
 
 
419
            0,        /* Total Seconds (unsigned!) */
 
 
420
            0,        /* Total Minutes (unsigned!) */
 
 
421
            -1,        /* Total Hours */
 
 
422
            0,        /* Cloaked Seconds */
 
 
423
            0,        /* Cloaked Minutes */
 
 
424
            -1,        /* Cloaked Hours */
 
 
425
            -1,        /* Health Damage */
 
 
426
            -1,        /* Armour Damage */
 
 
427
            -1,        /* Average Speed */
 
 
428
            -1,        /* Field Charge Used */
 
 
429
            -1        /* Head Shot Percentage */
 
 
430
        },
 
 
431
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
432
    },
 
 
433
    {
 
 
434
        {    /* Vaults_M */
 
 
435
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
436
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
437
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
438
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
439
            -1,        /* Shots Fired */
 
 
440
            -1,        /* Accuracy */
 
 
441
            -1,        /* Spotted */
 
 
442
            0,        /* Total Seconds (unsigned!) */
 
 
443
            0,        /* Total Minutes (unsigned!) */
 
 
444
            -1,        /* Total Hours */
 
 
445
            0,        /* Cloaked Seconds */
 
 
446
            0,        /* Cloaked Minutes */
 
 
447
            -1,        /* Cloaked Hours */
 
 
448
            60,        /* Health Damage */
 
 
449
            -1,        /* Armour Damage */
 
 
450
            -1,        /* Average Speed */
 
 
451
            -1,        /* Field Charge Used */
 
 
452
            -1        /* Head Shot Percentage */
 
 
453
        },
 
 
454
        CHEATMODE_UNDERWATER,    /* Cheat to activate */
 
 
455
    },
 
 
456
    {
 
 
457
        {    /* Feraco_M */
 
 
458
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
459
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
460
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
461
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
462
            -1,        /* Shots Fired */
 
 
463
            -1,        /* Accuracy */
 
 
464
            -1,        /* Spotted */
 
 
465
            0,        /* Total Seconds (unsigned!) */
 
 
466
            0,        /* Total Minutes (unsigned!) */
 
 
467
            -1,        /* Total Hours */
 
 
468
            0,        /* Cloaked Seconds */
 
 
469
            0,        /* Cloaked Minutes */
 
 
470
            -1,        /* Cloaked Hours */
 
 
471
            -1,        /* Health Damage */
 
 
472
            -1,        /* Armour Damage */
 
 
473
            -1,        /* Average Speed */
 
 
474
            -1,        /* Field Charge Used */
 
 
475
            -1        /* Head Shot Percentage */
 
 
476
        },
 
 
477
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
478
    },
 
 
479
    {
 
 
480
        {    /* Temple_M */
 
 
481
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
482
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
483
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
484
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
485
            -1,        /* Shots Fired */
 
 
486
            -1,        /* Accuracy */
 
 
487
            -1,        /* Spotted */
 
 
488
            0,        /* Total Seconds (unsigned!) */
 
 
489
            0,        /* Total Minutes (unsigned!) */
 
 
490
            -1,        /* Total Hours */
 
 
491
            0,        /* Cloaked Seconds */
 
 
492
            0,        /* Cloaked Minutes */
 
 
493
            -1,        /* Cloaked Hours */
 
 
494
            100,    /* Health Damage */
 
 
495
            -1,        /* Armour Damage */
 
 
496
            -1,        /* Average Speed */
 
 
497
            -1,        /* Field Charge Used */
 
 
498
            -1        /* Head Shot Percentage */
 
 
499
        },
 
 
500
        CHEATMODE_FREEFALL,    /* Cheat to activate */
 
 
501
    },
 
 
502
    {
 
 
503
        {    /* Gateway_M */
 
 
504
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
505
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
506
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
507
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
508
            -1,        /* Shots Fired */
 
 
509
            -1,        /* Accuracy */
 
 
510
            -1,        /* Spotted */
 
 
511
            0,        /* Total Seconds (unsigned!) */
 
 
512
            0,        /* Total Minutes (unsigned!) */
 
 
513
            -1,        /* Total Hours */
 
 
514
            0,        /* Cloaked Seconds */
 
 
515
            0,        /* Cloaked Minutes */
 
 
516
            -1,        /* Cloaked Hours */
 
 
517
            -1,        /* Health Damage */
 
 
518
            -1,        /* Armour Damage */
 
 
519
            -1,        /* Average Speed */
 
 
520
            -1,        /* Field Charge Used */
 
 
521
            -1        /* Head Shot Percentage */
 
 
522
        },
 
 
523
        CHEATMODE_DRAWFULLBRIGHT,    /* Cheat to activate */
 
 
524
    },
 
 
525
    {
 
 
526
        {    /* Waterfall */
 
 
527
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
528
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
529
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
530
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
531
            -1,        /* Shots Fired */
 
 
532
            80,        /* Accuracy */
 
 
533
            -1,        /* Spotted */
 
 
534
            0,        /* Total Seconds (unsigned!) */
 
 
535
            0,        /* Total Minutes (unsigned!) */
 
 
536
            -1,        /* Total Hours */
 
 
537
            0,        /* Cloaked Seconds */
 
 
538
            0,        /* Cloaked Minutes */
 
 
539
            -1,        /* Cloaked Hours */
 
 
540
            -1,        /* Health Damage */
 
 
541
            -1,        /* Armour Damage */
 
 
542
            -1,        /* Average Speed */
 
 
543
            -1,        /* Field Charge Used */
 
 
544
            -1        /* Head Shot Percentage */
 
 
545
        },
 
 
546
        CHEATMODE_PIGSTICKING,    /* Cheat to activate */
 
 
547
    },
 
 
548
    {
 
 
549
        {    /* Area52 */
 
 
550
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
551
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
552
            {-1,-1,-1,-1,-1,-1,-1,25,-1,-1,},    /* Trophies / Live Head Bites */
 
 
553
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
554
            -1,        /* Shots Fired */
 
 
555
            -1,        /* Accuracy */
 
 
556
            -1,        /* Spotted */
 
 
557
            0,        /* Total Seconds (unsigned!) */
 
 
558
            0,        /* Total Minutes (unsigned!) */
 
 
559
            -1,        /* Total Hours */
 
 
560
            0,        /* Cloaked Seconds */
 
 
561
            0,        /* Cloaked Minutes */
 
 
562
            -1,        /* Cloaked Hours */
 
 
563
            -1,        /* Health Damage */
 
 
564
            -1,        /* Armour Damage */
 
 
565
            -1,        /* Average Speed */
 
 
566
            -1,        /* Field Charge Used */
 
 
567
            -1        /* Head Shot Percentage */
 
 
568
        },
 
 
569
        CHEATMODE_SUPERGORE,    /* Cheat to activate */
 
 
570
    },
 
 
571
    {
 
 
572
        {    /* Vaults */
 
 
573
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
574
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
575
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
576
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
577
            -1,        /* Shots Fired */
 
 
578
            -1,        /* Accuracy */
 
 
579
            -1,        /* Spotted */
 
 
580
            0,        /* Total Seconds (unsigned!) */
 
 
581
            0,        /* Total Minutes (unsigned!) */
 
 
582
            -1,        /* Total Hours */
 
 
583
            0,        /* Cloaked Seconds */
 
 
584
            0,        /* Cloaked Minutes */
 
 
585
            -1,        /* Cloaked Hours */
 
 
586
            100,        /* Health Damage */
 
 
587
            -1,        /* Armour Damage */
 
 
588
            -1,        /* Average Speed */
 
 
589
            -1,        /* Field Charge Used */
 
 
590
            -1        /* Head Shot Percentage */
 
 
591
        },
 
 
592
        CHEATMODE_DISCOINFERNO,    /* Cheat to activate */
 
 
593
    },
 
 
594
    {
 
 
595
        {    /* Fury161 */
 
 
596
            {-1,40,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
597
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
598
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
599
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
600
            -1,        /* Shots Fired */
 
 
601
            -1,        /* Accuracy */
 
 
602
            -1,        /* Spotted */
 
 
603
            0,        /* Total Seconds (unsigned!) */
 
 
604
            0,        /* Total Minutes (unsigned!) */
 
 
605
            -1,        /* Total Hours */
 
 
606
            0,        /* Cloaked Seconds */
 
 
607
            0,        /* Cloaked Minutes */
 
 
608
            -1,        /* Cloaked Hours */
 
 
609
            -1,        /* Health Damage */
 
 
610
            -1,        /* Armour Damage */
 
 
611
            -1,        /* Average Speed */
 
 
612
            -1,        /* Field Charge Used */
 
 
613
            -1        /* Head Shot Percentage */
 
 
614
        },
 
 
615
        CHEATMODE_BALLSOFFIRE,    /* Cheat to activate */
 
 
616
    },
 
 
617
    {
 
 
618
        {    /* Caverns */
 
 
619
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
620
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
621
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
622
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
623
            -1,        /* Shots Fired */
 
 
624
            -1,        /* Accuracy */
 
 
625
            15,        /* Spotted */
 
 
626
            0,        /* Total Seconds (unsigned!) */
 
 
627
            0,        /* Total Minutes (unsigned!) */
 
 
628
            -1,        /* Total Hours */
 
 
629
            0,        /* Cloaked Seconds */
 
 
630
            0,        /* Cloaked Minutes */
 
 
631
            -1,        /* Cloaked Hours */
 
 
632
            -1,        /* Health Damage */
 
 
633
            -1,        /* Armour Damage */
 
 
634
            -1,        /* Average Speed */
 
 
635
            -1,        /* Field Charge Used */
 
 
636
            -1        /* Head Shot Percentage */
 
 
637
        },
 
 
638
        CHEATMODE_RAINBOWBLOOD,    /* Cheat to activate */
 
 
639
    },
 
 
640
    {
 
 
641
        {    /* CavernsEnd */
 
 
642
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
643
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
644
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
645
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
646
            -1,        /* Shots Fired */
 
 
647
            -1,        /* Accuracy */
 
 
648
            -1,        /* Spotted */
 
 
649
            0,        /* Total Seconds (unsigned!) */
 
 
650
            0,        /* Total Minutes (unsigned!) */
 
 
651
            -1,        /* Total Hours */
 
 
652
            0,        /* Cloaked Seconds */
 
 
653
            0,        /* Cloaked Minutes */
 
 
654
            -1,        /* Cloaked Hours */
 
 
655
            -1,        /* Health Damage */
 
 
656
            -1,        /* Armour Damage */
 
 
657
            -1,        /* Average Speed */
 
 
658
            -1,        /* Field Charge Used */
 
 
659
            -1        /* Head Shot Percentage */
 
 
660
        },
 
 
661
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
662
    },
 
 
663
    {
 
 
664
        {    /* Invasion_P */
 
 
665
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
666
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
667
            {-1,15,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
668
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
669
            -1,        /* Shots Fired */
 
 
670
            -1,        /* Accuracy */
 
 
671
            -1,        /* Spotted */
 
 
672
            0,        /* Total Seconds (unsigned!) */
 
 
673
            0,        /* Total Minutes (unsigned!) */
 
 
674
            -1,        /* Total Hours */
 
 
675
            0,        /* Cloaked Seconds */
 
 
676
            0,        /* Cloaked Minutes */
 
 
677
            -1,        /* Cloaked Hours */
 
 
678
            -1,        /* Health Damage */
 
 
679
            -1,        /* Armour Damage */
 
 
680
            -1,        /* Average Speed */
 
 
681
            -1,        /* Field Charge Used */
 
 
682
            -1        /* Head Shot Percentage */
 
 
683
        },
 
 
684
        CHEATMODE_TICKERTAPE,    /* Cheat to activate */
 
 
685
    },
 
 
686
    {
 
 
687
        {    /* Tyrago_P */
 
 
688
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
689
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
690
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
691
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
692
            -1,        /* Shots Fired */
 
 
693
            -1,        /* Accuracy */
 
 
694
            -1,        /* Spotted */
 
 
695
            0,        /* Total Seconds (unsigned!) */
 
 
696
            0,        /* Total Minutes (unsigned!) */
 
 
697
            -1,        /* Total Hours */
 
 
698
            0,        /* Cloaked Seconds */
 
 
699
            0,        /* Cloaked Minutes */
 
 
700
            -1,        /* Cloaked Hours */
 
 
701
            -1,        /* Health Damage */
 
 
702
            -1,        /* Armour Damage */
 
 
703
            -1,        /* Average Speed */
 
 
704
            -1,        /* Field Charge Used */
 
 
705
            -1        /* Head Shot Percentage */
 
 
706
        },
 
 
707
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
708
    },
 
 
709
    {
 
 
710
        {    /* Temple_P */
 
 
711
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
712
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
713
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
714
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
715
            -1,        /* Shots Fired */
 
 
716
            -1,        /* Accuracy */
 
 
717
            -1,        /* Spotted */
 
 
718
            0,        /* Total Seconds (unsigned!) */
 
 
719
            0,        /* Total Minutes (unsigned!) */
 
 
720
            -1,        /* Total Hours */
 
 
721
            0,        /* Cloaked Seconds */
 
 
722
            0,        /* Cloaked Minutes */
 
 
723
            -1,        /* Cloaked Hours */
 
 
724
            -1,        /* Health Damage */
 
 
725
            -1,        /* Armour Damage */
 
 
726
            -1,        /* Average Speed */
 
 
727
            -1,        /* Field Charge Used */
 
 
728
            -1        /* Head Shot Percentage */
 
 
729
        },
 
 
730
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
731
    },
 
 
732
    {
 
 
733
        {    /* Escape_P */
 
 
734
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
735
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
736
            {-1,-1,-1,-1,-1,-1,-1,-1,10,-1,},    /* Trophies / Live Head Bites */
 
 
737
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
738
            -1,        /* Shots Fired */
 
 
739
            -1,        /* Accuracy */
 
 
740
            -1,        /* Spotted */
 
 
741
            0,        /* Total Seconds (unsigned!) */
 
 
742
            0,        /* Total Minutes (unsigned!) */
 
 
743
            -1,        /* Total Hours */
 
 
744
            0,        /* Cloaked Seconds */
 
 
745
            0,        /* Cloaked Minutes */
 
 
746
            -1,        /* Cloaked Hours */
 
 
747
            -1,        /* Health Damage */
 
 
748
            -1,        /* Armour Damage */
 
 
749
            -1,        /* Average Speed */
 
 
750
            -1,        /* Field Charge Used */
 
 
751
            -1        /* Head Shot Percentage */
 
 
752
        },
 
 
753
        CHEATMODE_TRIPTASTIC,    /* Cheat to activate */
 
 
754
    },
 
 
755
    {
 
 
756
        {    /* Earthbound_P */
 
 
757
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
758
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
759
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
760
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
761
            -1,        /* Shots Fired */
 
 
762
            -1,        /* Accuracy */
 
 
763
            -1,        /* Spotted */
 
 
764
            0,        /* Total Seconds (unsigned!) */
 
 
765
            0,        /* Total Minutes (unsigned!) */
 
 
766
            -1,        /* Total Hours */
 
 
767
            0,        /* Cloaked Seconds */
 
 
768
            0,        /* Cloaked Minutes */
 
 
769
            -1,        /* Cloaked Hours */
 
 
770
            -1,        /* Health Damage */
 
 
771
            -1,        /* Armour Damage */
 
 
772
            -1,        /* Average Speed */
 
 
773
            -1,        /* Field Charge Used */
 
 
774
            -1        /* Head Shot Percentage */
 
 
775
        },
 
 
776
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
777
    },
 
 
778
    {
 
 
779
        {    /* Sewer */
 
 
780
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
781
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
782
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
783
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
784
            -1,        /* Shots Fired */
 
 
785
            -1,        /* Accuracy */
 
 
786
            -1,        /* Spotted */
 
 
787
            0,        /* Total Seconds (unsigned!) */
 
 
788
            0,        /* Total Minutes (unsigned!) */
 
 
789
            -1,        /* Total Hours */
 
 
790
            0,        /* Cloaked Seconds */
 
 
791
            0,        /* Cloaked Minutes */
 
 
792
            -1,        /* Cloaked Hours */
 
 
793
            -1,        /* Health Damage */
 
 
794
            -1,        /* Armour Damage */
 
 
795
            -1,        /* Average Speed */
 
 
796
            -1,        /* Field Charge Used */
 
 
797
            -1        /* Head Shot Percentage */
 
 
798
        },
 
 
799
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
800
    },
 
 
801
    {
 
 
802
        {    /* Massacre */
 
 
803
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
804
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
805
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
806
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
807
            -1,        /* Shots Fired */
 
 
808
            -1,        /* Accuracy */
 
 
809
            -1,        /* Spotted */
 
 
810
            0,        /* Total Seconds (unsigned!) */
 
 
811
            0,        /* Total Minutes (unsigned!) */
 
 
812
            -1,        /* Total Hours */
 
 
813
            0,        /* Cloaked Seconds */
 
 
814
            0,        /* Cloaked Minutes */
 
 
815
            -1,        /* Cloaked Hours */
 
 
816
            -1,        /* Health Damage */
 
 
817
            -1,        /* Armour Damage */
 
 
818
            -1,        /* Average Speed */
 
 
819
            -1,        /* Field Charge Used */
 
 
820
            -1        /* Head Shot Percentage */
 
 
821
        },
 
 
822
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
823
    },
 
 
824
    {
 
 
825
        {    /* Statue */
 
 
826
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
827
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
828
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
829
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
830
            -1,        /* Shots Fired */
 
 
831
            -1,        /* Accuracy */
 
 
832
            -1,        /* Spotted */
 
 
833
            0,        /* Total Seconds (unsigned!) */
 
 
834
            0,        /* Total Minutes (unsigned!) */
 
 
835
            -1,        /* Total Hours */
 
 
836
            0,        /* Cloaked Seconds */
 
 
837
            0,        /* Cloaked Minutes */
 
 
838
            -1,        /* Cloaked Hours */
 
 
839
            -1,        /* Health Damage */
 
 
840
            -1,        /* Armour Damage */
 
 
841
            -1,        /* Average Speed */
 
 
842
            -1,        /* Field Charge Used */
 
 
843
            -1        /* Head Shot Percentage */
 
 
844
        },
 
 
845
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
846
    },
 
 
847
    {
 
 
848
        {    /* Jockey */
 
 
849
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
850
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
851
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
852
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
853
            -1,        /* Shots Fired */
 
 
854
            -1,        /* Accuracy */
 
 
855
            -1,        /* Spotted */
 
 
856
            0,        /* Total Seconds (unsigned!) */
 
 
857
            0,        /* Total Minutes (unsigned!) */
 
 
858
            -1,        /* Total Hours */
 
 
859
            0,        /* Cloaked Seconds */
 
 
860
            0,        /* Cloaked Minutes */
 
 
861
            -1,        /* Cloaked Hours */
 
 
862
            -1,        /* Health Damage */
 
 
863
            -1,        /* Armour Damage */
 
 
864
            -1,        /* Average Speed */
 
 
865
            -1,        /* Field Charge Used */
 
 
866
            -1        /* Head Shot Percentage */
 
 
867
        },
 
 
868
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
869
    },
 
 
870
    {
 
 
871
        {    /* Hive */
 
 
872
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
873
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
874
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
875
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
876
            -1,        /* Shots Fired */
 
 
877
            -1,        /* Accuracy */
 
 
878
            -1,        /* Spotted */
 
 
879
            0,        /* Total Seconds (unsigned!) */
 
 
880
            0,        /* Total Minutes (unsigned!) */
 
 
881
            -1,        /* Total Hours */
 
 
882
            0,        /* Cloaked Seconds */
 
 
883
            0,        /* Cloaked Minutes */
 
 
884
            -1,        /* Cloaked Hours */
 
 
885
            -1,        /* Health Damage */
 
 
886
            -1,        /* Armour Damage */
 
 
887
            -1,        /* Average Speed */
 
 
888
            -1,        /* Field Charge Used */
 
 
889
            -1        /* Head Shot Percentage */
 
 
890
        },
 
 
891
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
892
    },
 
 
893
    {
 
 
894
        {    /* Kens_Coop */
 
 
895
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
896
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
897
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
898
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
899
            -1,        /* Shots Fired */
 
 
900
            -1,        /* Accuracy */
 
 
901
            -1,        /* Spotted */
 
 
902
            0,        /* Total Seconds (unsigned!) */
 
 
903
            0,        /* Total Minutes (unsigned!) */
 
 
904
            -1,        /* Total Hours */
 
 
905
            0,        /* Cloaked Seconds */
 
 
906
            0,        /* Cloaked Minutes */
 
 
907
            -1,        /* Cloaked Hours */
 
 
908
            -1,        /* Health Damage */
 
 
909
            -1,        /* Armour Damage */
 
 
910
            -1,        /* Average Speed */
 
 
911
            -1,        /* Field Charge Used */
 
 
912
            -1        /* Head Shot Percentage */
 
 
913
        },
 
 
914
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
915
    },
 
 
916
    {
 
 
917
        {    /* Hive_Coop */
 
 
918
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
919
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
920
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
921
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
922
            -1,        /* Shots Fired */
 
 
923
            -1,        /* Accuracy */
 
 
924
            -1,        /* Spotted */
 
 
925
            0,        /* Total Seconds (unsigned!) */
 
 
926
            0,        /* Total Minutes (unsigned!) */
 
 
927
            -1,        /* Total Hours */
 
 
928
            0,        /* Cloaked Seconds */
 
 
929
            0,        /* Cloaked Minutes */
 
 
930
            -1,        /* Cloaked Hours */
 
 
931
            -1,        /* Health Damage */
 
 
932
            -1,        /* Armour Damage */
 
 
933
            -1,        /* Average Speed */
 
 
934
            -1,        /* Field Charge Used */
 
 
935
            -1        /* Head Shot Percentage */
 
 
936
        },
 
 
937
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
938
    },
 
 
939
    {
 
 
940
        {    /* Trapped_Coop */
 
 
941
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
942
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
943
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
944
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
945
            -1,        /* Shots Fired */
 
 
946
            -1,        /* Accuracy */
 
 
947
            -1,        /* Spotted */
 
 
948
            0,        /* Total Seconds (unsigned!) */
 
 
949
            0,        /* Total Minutes (unsigned!) */
 
 
950
            -1,        /* Total Hours */
 
 
951
            0,        /* Cloaked Seconds */
 
 
952
            0,        /* Cloaked Minutes */
 
 
953
            -1,        /* Cloaked Hours */
 
 
954
            -1,        /* Health Damage */
 
 
955
            -1,        /* Armour Damage */
 
 
956
            -1,        /* Average Speed */
 
 
957
            -1,        /* Field Charge Used */
 
 
958
            -1        /* Head Shot Percentage */
 
 
959
        },
 
 
960
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
961
    },
 
 
962
    {
 
 
963
        {    /* Als_DM_Coop */
 
 
964
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
965
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
966
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
967
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
968
            -1,        /* Shots Fired */
 
 
969
            -1,        /* Accuracy */
 
 
970
            -1,        /* Spotted */
 
 
971
            0,        /* Total Seconds (unsigned!) */
 
 
972
            0,        /* Total Minutes (unsigned!) */
 
 
973
            -1,        /* Total Hours */
 
 
974
            0,        /* Cloaked Seconds */
 
 
975
            0,        /* Cloaked Minutes */
 
 
976
            -1,        /* Cloaked Hours */
 
 
977
            -1,        /* Health Damage */
 
 
978
            -1,        /* Armour Damage */
 
 
979
            -1,        /* Average Speed */
 
 
980
            -1,        /* Field Charge Used */
 
 
981
            -1        /* Head Shot Percentage */
 
 
982
        },
 
 
983
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
984
    },
 
 
985
    {
 
 
986
        {    /* Jokey Coop */
 
 
987
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
988
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
989
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
990
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
991
            -1,        /* Shots Fired */
 
 
992
            -1,        /* Accuracy */
 
 
993
            -1,        /* Spotted */
 
 
994
            0,        /* Total Seconds (unsigned!) */
 
 
995
            0,        /* Total Minutes (unsigned!) */
 
 
996
            -1,        /* Total Hours */
 
 
997
            0,        /* Cloaked Seconds */
 
 
998
            0,        /* Cloaked Minutes */
 
 
999
            -1,        /* Cloaked Hours */
 
 
1000
            -1,        /* Health Damage */
 
 
1001
            -1,        /* Armour Damage */
 
 
1002
            -1,        /* Average Speed */
 
 
1003
            -1,        /* Field Charge Used */
 
 
1004
            -1        /* Head Shot Percentage */
 
 
1005
        },
 
 
1006
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
1007
    },
 
 
1008
    {
 
 
1009
        {    /* E3DemoSP */
 
 
1010
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures Killed */
 
 
1011
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Creatures decapitated*/
 
 
1012
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Trophies / Live Head Bites */
 
 
1013
            {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},    /* Dead Head Bites */
 
 
1014
            -1,        /* Shots Fired */
 
 
1015
            -1,        /* Accuracy */
 
 
1016
            -1,        /* Spotted */
 
 
1017
            0,        /* Total Seconds (unsigned!) */
 
 
1018
            0,        /* Total Minutes (unsigned!) */
 
 
1019
            -1,        /* Total Hours */
 
 
1020
            0,        /* Cloaked Seconds */
 
 
1021
            0,        /* Cloaked Minutes */
 
 
1022
            -1,        /* Cloaked Hours */
 
 
1023
            -1,        /* Health Damage */
 
 
1024
            -1,        /* Armour Damage */
 
 
1025
            -1,        /* Average Speed */
 
 
1026
            -1,        /* Field Charge Used */
 
 
1027
            -1        /* Head Shot Percentage */
 
 
1028
        },
 
 
1029
        CHEATMODE_NONACTIVE,    /* Cheat to activate */
 
 
1030
    }
 
 
1031
};
 
 
1032
 
 
 
1033
void CurrentGameStats_Initialise()
 
 
1034
{
 
 
1035
    int i;
 
 
1036
    for (i=0; i < STATS_VICTIM_MAXIMUM; i++)
 
 
1037
    {
 
 
1038
        CurrentGameStatistics.Killed[i] = 0;
 
 
1039
        CurrentGameStatistics.Decapitated[i] = 0;
 
 
1040
        CurrentGameStatistics.Trophies[i] = 0;
 
 
1041
        CurrentGameStatistics.LiveHeadBites[i] = 0;
 
 
1042
        CurrentGameStatistics.DeadHeadBites[i] = 0;
 
 
1043
    }
 
 
1044
 
 
 
1045
    for (i=0; i < MAX_NO_OF_WEAPON_SLOTS; i++)
 
 
1046
    {
 
 
1047
        CurrentGameStatistics.WeaponTimes[i] = 0;
 
 
1048
        CurrentGameStatistics.ShotsFired[i] = 0;
 
 
1049
        CurrentGameStatistics.ShotsHit[i] = 0;
 
 
1050
    }
 
 
1051
 
 
 
1052
    for (i=0; i < NUMBER_OF_VISION_MODES; i++)
 
 
1053
        CurrentGameStatistics.VisionModeTimes[i] = 0;
 
 
1054
 
 
 
1055
    CurrentGameStatistics.Spotted = 0;
 
 
1056
 
 
 
1057
    CurrentGameStatistics.Cloak_ElapsedSeconds = 0;
 
 
1058
    CurrentGameStatistics.Cloak_ElapsedMinutes = 0;
 
 
1059
    CurrentGameStatistics.Cloak_ElapsedHours = 0;
 
 
1060
    CurrentGameStatistics.FieldChargeUsed = 0;
 
 
1061
 
 
 
1062
    CurrentGameStatistics.HealthDamage = 0;
 
 
1063
    CurrentGameStatistics.ArmourDamage = 0;
 
 
1064
    CurrentGameStatistics.IntegralSpeed = 0;
 
 
1065
 
 
 
1066
    AvP.ElapsedSeconds = 0;
 
 
1067
    AvP.ElapsedMinutes = 0;
 
 
1068
    AvP.ElapsedHours = 0;
 
 
1069
}
 
 
1070
 
 
 
1071
void CurrentGameStats_SpeedSample(unsigned int speed,unsigned int time)
 
 
1072
{
 
 
1073
    CurrentGameStatistics.IntegralSpeed += MUL_FIXED(speed, time);
 
 
1074
}
 
 
1075
 
 
 
1076
void CurrentGameStats_DamageTaken(unsigned int health,unsigned int armour)
 
 
1077
{
 
 
1078
    CurrentGameStatistics.HealthDamage += health;
 
 
1079
    CurrentGameStatistics.ArmourDamage += armour;
 
 
1080
}
 
 
1081
 
 
 
1082
void CurrentGameStats_ChargeUsed(unsigned int charge)
 
 
1083
{
 
 
1084
    if (PlayerStatus.Alive)
 
 
1085
    CurrentGameStatistics.FieldChargeUsed += charge;
 
 
1086
}
 
 
1087
 
 
 
1088
void CurrentGameStats_VisionMode(enum VISION_MODE_ID mode)
 
 
1089
{
 
 
1090
    CurrentGameStatistics.VisionModeTimes[mode] += NormalFrameTime;
 
 
1091
}
 
 
1092
 
 
 
1093
void CurrentGameStats_CloakOn()
 
 
1094
{
 
 
1095
    CurrentGameStatistics.Cloak_ElapsedSeconds += NormalFrameTime;
 
 
1096
 
 
 
1097
    if(CurrentGameStatistics.Cloak_ElapsedSeconds  >= FIXED_MINUTE)
 
 
1098
    {
 
 
1099
        CurrentGameStatistics.Cloak_ElapsedSeconds -= FIXED_MINUTE;
 
 
1100
        CurrentGameStatistics.Cloak_ElapsedMinutes ++;
 
 
1101
    }
 
 
1102
 
 
 
1103
    if(CurrentGameStatistics.Cloak_ElapsedMinutes >= 60)
 
 
1104
    {
 
 
1105
        CurrentGameStatistics.Cloak_ElapsedMinutes -= 60;
 
 
1106
        CurrentGameStatistics.Cloak_ElapsedHours ++;
 
 
1107
    }        
 
 
1108
}
 
 
1109
 
 
 
1110
void CurrentGameStats_WeaponFired(enum WEAPON_SLOT slot,unsigned int rounds)
 
 
1111
{
 
 
1112
    CurrentGameStatistics.ShotsFired[slot] += rounds;
 
 
1113
}
 
 
1114
 
 
 
1115
void CurrentGameStats_WeaponHit(enum WEAPON_SLOT slot, unsigned int rounds)
 
 
1116
{
 
 
1117
    CurrentGameStatistics.ShotsHit[slot] += rounds;
 
 
1118
}
 
 
1119
 
 
 
1120
void CurrentGameStats_UsingWeapon(enum WEAPON_SLOT slot)
 
 
1121
{
 
 
1122
    CurrentGameStatistics.WeaponTimes[slot]+=NormalFrameTime;
 
 
1123
}
 
 
1124
 
 
 
1125
void CurrentGameStats_Spotted()
 
 
1126
{
 
 
1127
    if (PlayerStatus.Alive)
 
 
1128
    CurrentGameStatistics.Spotted++;
 
 
1129
}
 
 
1130
 
 
 
1131
void CurrentGameStats_HeadBitten(STRATEGYBLOCK *sbPtr)
 
 
1132
{
 
 
1133
    switch (sbPtr->type)
 
 
1134
    {
 
 
1135
        case I_BehaviourMarine:
 
 
1136
        {
 
 
1137
            assert(sbPtr);
 
 
1138
            assert(sbPtr->containingModule); 
 
 
1139
            MARINE_STATUS_BLOCK *marineStatusPointer = (MARINE_STATUS_BLOCK *)(sbPtr->dataptr);    
 
 
1140
 
 
 
1141
            if (marineStatusPointer->My_Weapon->Android)
 
 
1142
            {
 
 
1143
                CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_ANDROID]++;
 
 
1144
            }
 
 
1145
            else if (marineStatusPointer->My_Weapon->ARealMarine)
 
 
1146
            {
 
 
1147
                CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_MARINE]++;
 
 
1148
            }
 
 
1149
            else
 
 
1150
            {
 
 
1151
                CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_CIVILIAN]++;
 
 
1152
            }
 
 
1153
        }
 
 
1154
        break;
 
 
1155
        case I_BehaviourXenoborg:
 
 
1156
        {
 
 
1157
            CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_XENOBORG]++;
 
 
1158
            break;
 
 
1159
        }
 
 
1160
        case I_BehaviourPredator:
 
 
1161
        {
 
 
1162
            CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_PREDATOR]++;
 
 
1163
            break;
 
 
1164
        }
 
 
1165
        case I_BehaviourCorpse:
 
 
1166
        {
 
 
1167
            CORPSEDATABLOCK *corpseDataPtr = (CORPSEDATABLOCK *)sbPtr->dataptr;
 
 
1168
 
 
 
1169
            switch (corpseDataPtr->Type)
 
 
1170
            {
 
 
1171
                case I_BehaviourAlien:
 
 
1172
                {
 
 
1173
                    switch (corpseDataPtr->subtype)
 
 
1174
                    {
 
 
1175
                        case 0:
 
 
1176
                        default:
 
 
1177
                            CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_XENOMORPH]++;
 
 
1178
                            break;
 
 
1179
                        case 1:
 
 
1180
                            CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_PREDALIEN]++;
 
 
1181
                            break;
 
 
1182
                        case 2:
 
 
1183
                            CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_PRAETORIAN]++;
 
 
1184
                    }
 
 
1185
                }
 
 
1186
                break;
 
 
1187
                case I_BehaviourMarine:
 
 
1188
                {
 
 
1189
                    if (corpseDataPtr->Android)
 
 
1190
                    {
 
 
1191
                        CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_ANDROID]++;
 
 
1192
                    }
 
 
1193
                    else if (corpseDataPtr->ARealMarine)
 
 
1194
                    {
 
 
1195
                        CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_MARINE]++;
 
 
1196
                    }
 
 
1197
                    else
 
 
1198
                    {
 
 
1199
                        CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_CIVILIAN]++;
 
 
1200
                    }
 
 
1201
                }
 
 
1202
                break;
 
 
1203
                case I_BehaviourXenoborg:
 
 
1204
                    CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_XENOBORG]++;
 
 
1205
                break;
 
 
1206
                case I_BehaviourPredator:
 
 
1207
                    CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_PREDATOR]++;
 
 
1208
                default:
 
 
1209
                    break;
 
 
1210
            }
 
 
1211
        }
 
 
1212
        break;
 
 
1213
        case I_BehaviourNetGhost:
 
 
1214
        {
 
 
1215
            NETGHOSTDATABLOCK *ghostData = (NETGHOSTDATABLOCK *)sbPtr->dataptr;
 
 
1216
 
 
 
1217
            switch (ghostData->type)
 
 
1218
            {
 
 
1219
                case I_BehaviourMarinePlayer:
 
 
1220
                    CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_MARINE]++;
 
 
1221
                break;
 
 
1222
                case I_BehaviourAlienPlayer:
 
 
1223
                    CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_XENOMORPH]++;
 
 
1224
                break;
 
 
1225
                case I_BehaviourPredatorPlayer:
 
 
1226
                    CurrentGameStatistics.LiveHeadBites[STATS_VICTIM_PREDATOR]++;
 
 
1227
                break;
 
 
1228
                case I_BehaviourCorpse:
 
 
1229
                {
 
 
1230
                    switch (ghostData->subtype)
 
 
1231
                    {
 
 
1232
                        case I_BehaviourAlien:
 
 
1233
                        {
 
 
1234
                            switch (ghostData->IOType)
 
 
1235
                            {
 
 
1236
                                /* Hey ho, it was free... */
 
 
1237
                                case 0:
 
 
1238
                                default:
 
 
1239
                                    CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_XENOMORPH]++;
 
 
1240
                                break;
 
 
1241
                                case 1:
 
 
1242
                                    CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_PREDALIEN]++;
 
 
1243
                                break;
 
 
1244
                                case 2:
 
 
1245
                                    CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_PRAETORIAN]++;
 
 
1246
                                break;
 
 
1247
                            }
 
 
1248
                        }
 
 
1249
                        break;
 
 
1250
                        case I_BehaviourMarinePlayer:
 
 
1251
                            CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_MARINE]++;
 
 
1252
                        break;
 
 
1253
                        case I_BehaviourAlienPlayer:
 
 
1254
                            CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_XENOMORPH]++;
 
 
1255
                        break;
 
 
1256
                        case I_BehaviourPredatorPlayer:
 
 
1257
                            CurrentGameStatistics.DeadHeadBites[STATS_VICTIM_PREDATOR]++;
 
 
1258
                        default:
 
 
1259
                            break;
 
 
1260
                    }
 
 
1261
                }
 
 
1262
                default:
 
 
1263
                    break;
 
 
1264
            }
 
 
1265
        }
 
 
1266
        default:
 
 
1267
            break;
 
 
1268
    }
 
 
1269
}
 
 
1270
 
 
 
1271
void CurrentGameStats_TrophyCollected(STRATEGYBLOCK *sbPtr)
 
 
1272
{
 
 
1273
    /* It's always going to be a corpse or a ghost, isn't it? */
 
 
1274
 
 
 
1275
    switch (sbPtr->type)
 
 
1276
    {
 
 
1277
        case I_BehaviourCorpse:
 
 
1278
        {
 
 
1279
            CORPSEDATABLOCK *corpseDataPtr = (CORPSEDATABLOCK *)sbPtr->dataptr;
 
 
1280
 
 
 
1281
            switch (corpseDataPtr->Type)
 
 
1282
            {
 
 
1283
                case I_BehaviourAlien:
 
 
1284
                {
 
 
1285
                    switch (corpseDataPtr->subtype)
 
 
1286
                    {
 
 
1287
                        case 0:
 
 
1288
                        default:
 
 
1289
                            CurrentGameStatistics.Trophies[STATS_VICTIM_XENOMORPH]++;
 
 
1290
                        break;
 
 
1291
                        case 1:
 
 
1292
                            CurrentGameStatistics.Trophies[STATS_VICTIM_PREDALIEN]++;
 
 
1293
                        break;
 
 
1294
                        case 2:
 
 
1295
                            CurrentGameStatistics.Trophies[STATS_VICTIM_PRAETORIAN]++;
 
 
1296
                    }
 
 
1297
                }
 
 
1298
                break;
 
 
1299
                case I_BehaviourMarine:
 
 
1300
                {
 
 
1301
 
 
 
1302
                    if (corpseDataPtr->Android)
 
 
1303
                    {
 
 
1304
                        CurrentGameStatistics.Trophies[STATS_VICTIM_ANDROID]++;
 
 
1305
                    }
 
 
1306
                    else if (corpseDataPtr->ARealMarine)
 
 
1307
                    {
 
 
1308
                        CurrentGameStatistics.Trophies[STATS_VICTIM_MARINE]++;
 
 
1309
                    }
 
 
1310
                    else
 
 
1311
                    {
 
 
1312
                        CurrentGameStatistics.Trophies[STATS_VICTIM_CIVILIAN]++;
 
 
1313
                    }
 
 
1314
                }
 
 
1315
                break;
 
 
1316
                case I_BehaviourQueenAlien:
 
 
1317
                    CurrentGameStatistics.Trophies[STATS_VICTIM_QUEEN]++;
 
 
1318
                break;
 
 
1319
                case I_BehaviourFaceHugger:
 
 
1320
                    CurrentGameStatistics.Trophies[STATS_VICTIM_FACEHUGGER]++;
 
 
1321
                break;
 
 
1322
                case I_BehaviourXenoborg:
 
 
1323
                    CurrentGameStatistics.Trophies[STATS_VICTIM_XENOBORG]++;
 
 
1324
                break;
 
 
1325
                case I_BehaviourPredator:
 
 
1326
                    CurrentGameStatistics.Trophies[STATS_VICTIM_PREDATOR]++;
 
 
1327
                break;
 
 
1328
                default:
 
 
1329
                    break;
 
 
1330
            }
 
 
1331
        }
 
 
1332
        break;
 
 
1333
        case I_BehaviourNetGhost:
 
 
1334
        {
 
 
1335
            NETGHOSTDATABLOCK *ghostData = (NETGHOSTDATABLOCK *)sbPtr->dataptr;
 
 
1336
 
 
 
1337
            switch (ghostData->type)
 
 
1338
            {
 
 
1339
                case I_BehaviourCorpse:
 
 
1340
                {
 
 
1341
                    switch (ghostData->subtype)
 
 
1342
                    {
 
 
1343
                        case I_BehaviourAlien:
 
 
1344
                        {
 
 
1345
                            switch (ghostData->IOType)
 
 
1346
                            {
 
 
1347
                                /* Hey ho, it was free... */
 
 
1348
                                case 0:
 
 
1349
                                default:
 
 
1350
                                    CurrentGameStatistics.Trophies[STATS_VICTIM_XENOMORPH]++;
 
 
1351
                                    break;
 
 
1352
                                case 1:
 
 
1353
                                    CurrentGameStatistics.Trophies[STATS_VICTIM_PREDALIEN]++;
 
 
1354
                                    break;
 
 
1355
                                case 2:
 
 
1356
                                    CurrentGameStatistics.Trophies[STATS_VICTIM_PRAETORIAN]++;
 
 
1357
                            }
 
 
1358
                        }
 
 
1359
                        break;
 
 
1360
                        case I_BehaviourMarinePlayer:
 
 
1361
                            CurrentGameStatistics.Trophies[STATS_VICTIM_MARINE]++;
 
 
1362
                        break;
 
 
1363
                        case I_BehaviourAlienPlayer:
 
 
1364
                            CurrentGameStatistics.Trophies[STATS_VICTIM_XENOMORPH]++;
 
 
1365
                        break;
 
 
1366
                        case I_BehaviourPredatorPlayer:
 
 
1367
                            CurrentGameStatistics.Trophies[STATS_VICTIM_PREDATOR]++;
 
 
1368
                        default:
 
 
1369
                            break;
 
 
1370
                    }
 
 
1371
                }
 
 
1372
                default:
 
 
1373
                    break;
 
 
1374
            }
 
 
1375
        }
 
 
1376
        break;
 
 
1377
        case I_BehaviourHierarchicalFragment:
 
 
1378
        {
 
 
1379
            HDEBRIS_BEHAV_BLOCK *debrisDataPtr = (HDEBRIS_BEHAV_BLOCK *)sbPtr->dataptr;
 
 
1380
 
 
 
1381
            switch (debrisDataPtr->Type)
 
 
1382
            {
 
 
1383
                case I_BehaviourAlien:
 
 
1384
                {
 
 
1385
                    switch (debrisDataPtr->SubType)
 
 
1386
                    {
 
 
1387
                        case 0:
 
 
1388
                        default:
 
 
1389
                            CurrentGameStatistics.Trophies[STATS_VICTIM_XENOMORPH]++;
 
 
1390
                            break;
 
 
1391
                        case 1:
 
 
1392
                            CurrentGameStatistics.Trophies[STATS_VICTIM_PREDALIEN]++;
 
 
1393
                            break;
 
 
1394
                        case 2:
 
 
1395
                            CurrentGameStatistics.Trophies[STATS_VICTIM_PRAETORIAN]++;
 
 
1396
                    }
 
 
1397
                }
 
 
1398
                break;
 
 
1399
                case I_BehaviourMarine:
 
 
1400
                {
 
 
1401
                    if (debrisDataPtr->Android)
 
 
1402
                    {
 
 
1403
                        CurrentGameStatistics.Trophies[STATS_VICTIM_ANDROID]++;
 
 
1404
                    }
 
 
1405
                    else if (debrisDataPtr->SubType) /* Means ARealMarine for fragments of marines */
 
 
1406
                    {
 
 
1407
                        CurrentGameStatistics.Trophies[STATS_VICTIM_MARINE]++;
 
 
1408
                    }
 
 
1409
                    else
 
 
1410
                    {
 
 
1411
                        CurrentGameStatistics.Trophies[STATS_VICTIM_CIVILIAN]++;
 
 
1412
                    }
 
 
1413
                }
 
 
1414
                break;
 
 
1415
                case I_BehaviourQueenAlien:
 
 
1416
                    CurrentGameStatistics.Trophies[STATS_VICTIM_QUEEN]++;
 
 
1417
                break;
 
 
1418
                case I_BehaviourFaceHugger:
 
 
1419
                    CurrentGameStatistics.Trophies[STATS_VICTIM_FACEHUGGER]++;
 
 
1420
                break;
 
 
1421
                case I_BehaviourXenoborg:
 
 
1422
                    CurrentGameStatistics.Trophies[STATS_VICTIM_XENOBORG]++;
 
 
1423
                break;
 
 
1424
                case I_BehaviourPredator:
 
 
1425
                    CurrentGameStatistics.Trophies[STATS_VICTIM_PREDATOR]++;
 
 
1426
                break;
 
 
1427
                default:
 
 
1428
                    break;
 
 
1429
            }
 
 
1430
        }
 
 
1431
        break;
 
 
1432
        case I_BehaviourSpeargunBolt:
 
 
1433
        {
 
 
1434
            SPEAR_BEHAV_BLOCK *spearDataPtr = (SPEAR_BEHAV_BLOCK *)sbPtr->dataptr;
 
 
1435
 
 
 
1436
            switch (spearDataPtr->Type)
 
 
1437
            {
 
 
1438
                case I_BehaviourAlien:
 
 
1439
                {
 
 
1440
                    switch (spearDataPtr->SubType)
 
 
1441
                    {
 
 
1442
                        case 0:
 
 
1443
                        default:
 
 
1444
                            CurrentGameStatistics.Trophies[STATS_VICTIM_XENOMORPH]++;
 
 
1445
                            break;
 
 
1446
                        case 1:
 
 
1447
                            CurrentGameStatistics.Trophies[STATS_VICTIM_PREDALIEN]++;
 
 
1448
                            break;
 
 
1449
                        case 2:
 
 
1450
                            CurrentGameStatistics.Trophies[STATS_VICTIM_PRAETORIAN]++;
 
 
1451
                    }
 
 
1452
                }
 
 
1453
                break;
 
 
1454
                case I_BehaviourMarine:
 
 
1455
                {
 
 
1456
                    if (spearDataPtr->Android)
 
 
1457
                    {
 
 
1458
                        CurrentGameStatistics.Trophies[STATS_VICTIM_ANDROID]++;
 
 
1459
                    }
 
 
1460
                    else if (spearDataPtr->SubType) /* Means ARealMarine for fragments of marines */
 
 
1461
                    {
 
 
1462
                        CurrentGameStatistics.Trophies[STATS_VICTIM_MARINE]++;
 
 
1463
                    }
 
 
1464
                    else
 
 
1465
                    {
 
 
1466
                        CurrentGameStatistics.Trophies[STATS_VICTIM_CIVILIAN]++;
 
 
1467
                    }
 
 
1468
                }
 
 
1469
                break;
 
 
1470
                case I_BehaviourQueenAlien:
 
 
1471
                    CurrentGameStatistics.Trophies[STATS_VICTIM_QUEEN]++;
 
 
1472
                break;
 
 
1473
                case I_BehaviourFaceHugger:
 
 
1474
                    CurrentGameStatistics.Trophies[STATS_VICTIM_FACEHUGGER]++;
 
 
1475
                break;
 
 
1476
                case I_BehaviourXenoborg:
 
 
1477
                    CurrentGameStatistics.Trophies[STATS_VICTIM_XENOBORG]++;
 
 
1478
                break;
 
 
1479
                case I_BehaviourPredator:
 
 
1480
                    CurrentGameStatistics.Trophies[STATS_VICTIM_PREDATOR]++;
 
 
1481
                default:
 
 
1482
                    break;
 
 
1483
            }
 
 
1484
        }
 
 
1485
        default:
 
 
1486
            break;
 
 
1487
    }
 
 
1488
}
 
 
1489
 
 
 
1490
void CurrentGameStats_CreatureKilled(STRATEGYBLOCK *sbPtr,SECTION_DATA *sectionDataPtr)
 
 
1491
{
 
 
1492
    if (!PlayerStatus.Alive)
 
 
1493
        return;
 
 
1494
 
 
 
1495
    switch (sbPtr->type)
 
 
1496
    {
 
 
1497
        case I_BehaviourAlien:
 
 
1498
        {
 
 
1499
            ALIEN_STATUS_BLOCK *alienStatus = (ALIEN_STATUS_BLOCK *)sbPtr->dataptr;
 
 
1500
 
 
 
1501
            switch (alienStatus->Type)
 
 
1502
            {
 
 
1503
                case 0:
 
 
1504
                default:
 
 
1505
                    CurrentGameStatistics.Killed[STATS_VICTIM_XENOMORPH]++;
 
 
1506
                    break;
 
 
1507
                case 1:
 
 
1508
                    CurrentGameStatistics.Killed[STATS_VICTIM_PREDALIEN]++;
 
 
1509
                    break;
 
 
1510
                case 2:
 
 
1511
                    CurrentGameStatistics.Killed[STATS_VICTIM_PRAETORIAN]++;
 
 
1512
                    break;
 
 
1513
            }
 
 
1514
 
 
 
1515
            if (sectionDataPtr && sectionDataPtr->sempai && sectionDataPtr->sempai->Section_Name)
 
 
1516
            {
 
 
1517
                if (!strcasecmp(sectionDataPtr->sempai->Section_Name,"head"))
 
 
1518
                    CurrentGameStatistics.Decapitated[STATS_VICTIM_XENOMORPH]++;
 
 
1519
            }
 
 
1520
        }
 
 
1521
        break;
 
 
1522
        case I_BehaviourMarine:
 
 
1523
        {
 
 
1524
            MARINE_STATUS_BLOCK *marineStatusPointer = (MARINE_STATUS_BLOCK *)(sbPtr->dataptr);    
 
 
1525
 
 
 
1526
            if (marineStatusPointer->My_Weapon->Android)
 
 
1527
            {
 
 
1528
                CurrentGameStatistics.Killed[STATS_VICTIM_ANDROID]++;
 
 
1529
            }
 
 
1530
            else if (marineStatusPointer->My_Weapon->ARealMarine)
 
 
1531
            {
 
 
1532
                CurrentGameStatistics.Killed[STATS_VICTIM_MARINE]++;
 
 
1533
            }
 
 
1534
            else
 
 
1535
            {
 
 
1536
                CurrentGameStatistics.Killed[STATS_VICTIM_CIVILIAN]++;
 
 
1537
            }
 
 
1538
        }
 
 
1539
        break;
 
 
1540
        case I_BehaviourQueenAlien:
 
 
1541
            CurrentGameStatistics.Killed[STATS_VICTIM_QUEEN]++;
 
 
1542
        break;
 
 
1543
        case I_BehaviourFaceHugger:
 
 
1544
            CurrentGameStatistics.Killed[STATS_VICTIM_FACEHUGGER]++;
 
 
1545
        break;
 
 
1546
        case I_BehaviourXenoborg:
 
 
1547
            CurrentGameStatistics.Killed[STATS_VICTIM_XENOBORG]++;
 
 
1548
        break;
 
 
1549
        case I_BehaviourPredator:
 
 
1550
            CurrentGameStatistics.Killed[STATS_VICTIM_PREDATOR]++;
 
 
1551
        default:
 
 
1552
        break;
 
 
1553
    }
 
 
1554
}
 
 
1555
 
 
 
1556
static const char * TemporaryNameStore[] =
 
 
1557
{
 
 
1558
    "Facehuggers",
 
 
1559
    "Xenomorphs",
 
 
1560
    "Praetorians",
 
 
1561
    "Queens",
 
 
1562
    "Xenoborgs",
 
 
1563
    "Predaliens",
 
 
1564
    "Predators",
 
 
1565
    "Marines",
 
 
1566
    "Civilians",
 
 
1567
    "Androids"
 
 
1568
};
 
 
1569
 
 
 
1570
static const char * TemporaryNameStore2[] =
 
 
1571
{
 
 
1572
    "Facehugger",
 
 
1573
    "Xenomorph",
 
 
1574
    "Praetorian",
 
 
1575
    "Queen",
 
 
1576
    "Xenoborg",
 
 
1577
    "Predalien",
 
 
1578
    "Predator",
 
 
1579
    "Marine",
 
 
1580
    "Civilian",
 
 
1581
    "Android"
 
 
1582
};
 
 
1583
 
 
 
1584
static const char * VisionModeNames[] =
 
 
1585
{
 
 
1586
    "Normal",
 
 
1587
    "Navigation Sense",
 
 
1588
    "Image Intensifier",
 
 
1589
    "Thermal",
 
 
1590
    "Electrical",
 
 
1591
    "PredTech"
 
 
1592
};
 
 
1593
 
 
 
1594
void DoStatisticsScreen()
 
 
1595
{
 
 
1596
    int y;
 
 
1597
    char buffer[100];
 
 
1598
    int colour_to_draw,best;
 
 
1599
    int targets = 0;
 
 
1600
    int targetspassed = 0;
 
 
1601
    int unlockable_bonus = 0;
 
 
1602
 
 
 
1603
    sprintf(buffer, "%s", UserProfile.PlayerName);
 
 
1604
    RenderHUDString(buffer, TABPOINT1, 20, COLOUR_WHITE);
 
 
1605
 
 
 
1606
    RenderStringCentred("Level Completed", ScreenDescriptorBlock.SDB_CentreX, 20, COLOUR_GREEN);
 
 
1607
    AvP.LevelCompleted = NotCheating;
 
 
1608
    unlockable_bonus = (AvP.LevelCompleted && (I_Hard == AvP.Difficulty) && (CHEATMODE_NONACTIVE !=
LevelStatsTargets[AvP.level].CheatModeToActivate));
 
 
1609
 
 
 
1610
    RenderStringCentred("Current:", TABPOINT2, 40, COLOUR_WHITE);
 
 
1611
    RenderStringCentred("Best:", TABPOINT3, 40, COLOUR_WHITE);
 
 
1612
    RenderStringCentred("Target:", TABPOINT4, 40, COLOUR_WHITE);
 
 
1613
 
 
 
1614
    y = 55;
 
 
1615
 
 
 
1616
    colour_to_draw = COLOUR_WHITE;
 
 
1617
 
 
 
1618
    if (AvP.LevelCompleted)
 
 
1619
    {
 
 
1620
        /* Is it a new best? */
 
 
1621
        best = 0;
 
 
1622
        if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedHours == AvP.ElapsedHours)
 
 
1623
        {
 
 
1624
            if (AvP.ElapsedMinutes < UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedMinutes)
 
 
1625
            {
 
 
1626
                best = 1;
 
 
1627
            }
 
 
1628
            else if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedMinutes == AvP.ElapsedMinutes)
 
 
1629
            {
 
 
1630
                if (AvP.ElapsedSeconds < UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedSeconds)
 
 
1631
                    best = 1;
 
 
1632
            }        
 
 
1633
        }
 
 
1634
        else if (AvP.ElapsedHours < UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedHours)
 
 
1635
        {
 
 
1636
            best = 1;
 
 
1637
        }
 
 
1638
 
 
 
1639
        if (best)
 
 
1640
        {
 
 
1641
            colour_to_draw = COLOUR_GREEN;
 
 
1642
            UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedHours = AvP.ElapsedHours;
 
 
1643
            UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedMinutes = AvP.ElapsedMinutes;
 
 
1644
            UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedSeconds = AvP.ElapsedSeconds;
 
 
1645
        }
 
 
1646
    }
 
 
1647
 
 
 
1648
    RenderHUDString("Time Elapsed:", TABPOINT1, y, colour_to_draw);
 
 
1649
 
 
 
1650
    sprintf(buffer, "%dh %02dm %02ds", AvP.ElapsedHours, AvP.ElapsedMinutes, AvP.ElapsedSeconds/65536);
 
 
1651
 
 
 
1652
    RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw); //y was 50!
 
 
1653
 
 
 
1654
    sprintf(buffer,"%dh %02dm %02ds",
 
 
1655
        UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedHours,
 
 
1656
        UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedMinutes,
 
 
1657
        UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Total_ElapsedSeconds/65536);
 
 
1658
 
 
 
1659
    RenderStringCentred(buffer, TABPOINT3, y, colour_to_draw); //y was 50!
 
 
1660
 
 
 
1661
    colour_to_draw = COLOUR_WHITE;
 
 
1662
 
 
 
1663
    if(unlockable_bonus && (-1 < LevelStatsTargets[AvP.level].StatTargets.Total_ElapsedHours))
 
 
1664
    {
 
 
1665
        if (AvP.LevelCompleted)
 
 
1666
        {
 
 
1667
            /* Is it a completed target? */
 
 
1668
            best = 0;
 
 
1669
 
 
 
1670
            targets++;
 
 
1671
            if (!AvP.ElapsedHours)
 
 
1672
            {
 
 
1673
                if (LevelStatsTargets[AvP.level].StatTargets.Total_ElapsedMinutes > AvP.ElapsedMinutes)
 
 
1674
                {
 
 
1675
                    best = 1;
 
 
1676
                }
 
 
1677
                else if (LevelStatsTargets[AvP.level].StatTargets.Total_ElapsedMinutes == AvP.ElapsedMinutes)
 
 
1678
                {
 
 
1679
                    if (AvP.ElapsedSeconds <= LevelStatsTargets[AvP.level].StatTargets.Total_ElapsedSeconds)
 
 
1680
                        best = 1;
 
 
1681
                }
 
 
1682
            }
 
 
1683
 
 
 
1684
            if (best)
 
 
1685
            {
 
 
1686
                targetspassed++;
 
 
1687
                colour_to_draw = COLOUR_RED;
 
 
1688
            }
 
 
1689
        }
 
 
1690
 
 
 
1691
        if(!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
1692
        {
 
 
1693
            sprintf(buffer,"%dh %02dm %02ds",
 
 
1694
                LevelStatsTargets[AvP.level].StatTargets.Total_ElapsedHours,
 
 
1695
                LevelStatsTargets[AvP.level].StatTargets.Total_ElapsedMinutes,
 
 
1696
                LevelStatsTargets[AvP.level].StatTargets.Total_ElapsedSeconds/65536);
 
 
1697
        }
 
 
1698
        else
 
 
1699
        {
 
 
1700
            colour_to_draw = COLOUR_GREEN;
 
 
1701
            strcpy(buffer, "Completed");
 
 
1702
        }
 
 
1703
    }
 
 
1704
    else
 
 
1705
    {
 
 
1706
        strcpy(buffer, "None");
 
 
1707
    }
 
 
1708
 
 
 
1709
    RenderStringCentred(buffer, TABPOINT4, y, colour_to_draw);
 
 
1710
 
 
 
1711
    y += NEWLINE_SPACING;
 
 
1712
    colour_to_draw = COLOUR_WHITE;
 
 
1713
 
 
 
1714
    switch(AvP.PlayerType)
 
 
1715
    {
 
 
1716
        case I_Predator:
 
 
1717
        {
 
 
1718
            if (AvP.LevelCompleted)
 
 
1719
            {
 
 
1720
                /* Is it a new best? */
 
 
1721
                best = 0;
 
 
1722
 
 
 
1723
                if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedHours > CurrentGameStatistics.Cloak_ElapsedHours)
 
 
1724
                {
 
 
1725
                    best = 1;
 
 
1726
                }
 
 
1727
                else if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedHours == CurrentGameStatistics.Cloak_ElapsedHours)
 
 
1728
                {
 
 
1729
                    if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedMinutes > CurrentGameStatistics.Cloak_ElapsedMinutes)
 
 
1730
                    {
 
 
1731
                        best = 1;
 
 
1732
                    }
 
 
1733
                    else if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedMinutes == CurrentGameStatistics.Cloak_ElapsedMinutes)
 
 
1734
                    {
 
 
1735
                        if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedSeconds > CurrentGameStatistics.Cloak_ElapsedSeconds)
 
 
1736
                            best = 1;
 
 
1737
                    }
 
 
1738
                }
 
 
1739
 
 
 
1740
                if (best)
 
 
1741
                {
 
 
1742
                    colour_to_draw = COLOUR_GREEN;
 
 
1743
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedHours = CurrentGameStatistics.Cloak_ElapsedHours;
 
 
1744
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedMinutes = CurrentGameStatistics.Cloak_ElapsedMinutes;
 
 
1745
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedSeconds = CurrentGameStatistics.Cloak_ElapsedSeconds;
 
 
1746
                }
 
 
1747
            }
 
 
1748
 
 
 
1749
            RenderHUDString("Time Cloaked:", TABPOINT1, y, colour_to_draw);
 
 
1750
 
 
 
1751
            sprintf(buffer, "%dh %02dm %02ds", CurrentGameStatistics.Cloak_ElapsedHours,
CurrentGameStatistics.Cloak_ElapsedMinutes,CurrentGameStatistics.Cloak_ElapsedSeconds/65536);
 
 
1752
            RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
1753
 
 
 
1754
            sprintf(buffer,"%dh %02dm %02ds",
 
 
1755
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedHours,
 
 
1756
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedMinutes,
 
 
1757
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Cloak_ElapsedSeconds/65536);
 
 
1758
            RenderStringCentred(buffer, TABPOINT3, y, colour_to_draw); //y was 50!
 
 
1759
 
 
 
1760
            colour_to_draw = COLOUR_WHITE;
 
 
1761
 
 
 
1762
            if(unlockable_bonus && (-1 < LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedHours))
 
 
1763
            {
 
 
1764
                if (AvP.LevelCompleted)
 
 
1765
                {
 
 
1766
                    /* Is it a completed target? */
 
 
1767
                    best = 0;
 
 
1768
                    targets++;
 
 
1769
 
 
 
1770
                    if (LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedHours > AvP.ElapsedHours)
 
 
1771
                    {
 
 
1772
                        best = 1;
 
 
1773
                    }
 
 
1774
                    else if (LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedHours == AvP.ElapsedHours)
 
 
1775
                    {
 
 
1776
                        if (LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedMinutes > AvP.ElapsedMinutes)
 
 
1777
                        {
 
 
1778
                            best = 1;
 
 
1779
                        }
 
 
1780
                        else if (LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedMinutes == AvP.ElapsedMinutes)
 
 
1781
                        {
 
 
1782
                            if (LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedSeconds > AvP.ElapsedSeconds)
 
 
1783
                            {
 
 
1784
                                best = 1;
 
 
1785
                            }
 
 
1786
                            else if (LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedSeconds == AvP.ElapsedSeconds)
 
 
1787
                            {
 
 
1788
                                best = 1;
 
 
1789
                            }
 
 
1790
                        }
 
 
1791
                    }
 
 
1792
 
 
 
1793
                    if (best)
 
 
1794
                    {
 
 
1795
                        targetspassed++;
 
 
1796
                        colour_to_draw = COLOUR_RED;
 
 
1797
                    }
 
 
1798
                }
 
 
1799
 
 
 
1800
                if(!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
1801
                {
 
 
1802
                    sprintf(buffer,"%dh %02dm %02ds",
 
 
1803
                        LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedHours,
 
 
1804
                        LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedMinutes,
 
 
1805
                        LevelStatsTargets[AvP.level].StatTargets.Cloak_ElapsedSeconds/65536 );
 
 
1806
                }
 
 
1807
                else
 
 
1808
                {
 
 
1809
                    colour_to_draw = COLOUR_GREEN;
 
 
1810
                    strcpy(buffer, "Completed");
 
 
1811
                }
 
 
1812
            }
 
 
1813
            else
 
 
1814
            {
 
 
1815
                strcpy(buffer, "None");
 
 
1816
            }
 
 
1817
 
 
 
1818
            RenderStringCentred(buffer, TABPOINT4, y, COLOUR_WHITE);
 
 
1819
 
 
 
1820
            y += NEWLINE_SPACING;
 
 
1821
            colour_to_draw = COLOUR_WHITE;
 
 
1822
        }
 
 
1823
        break;
 
 
1824
        case I_Marine:
 
 
1825
        if(AVP_ENVIRONMENT_GATEWAY_M == AvP.level)
 
 
1826
        {
 
 
1827
            if(20 == PlayerStatus.FlaresLeft)
 
 
1828
            ;//enable cheats
 
 
1829
        }
 
 
1830
        break;
 
 
1831
    }
 
 
1832
 
 
 
1833
    {
 
 
1834
        int i;
 
 
1835
        for (i=0; i < STATS_VICTIM_MAXIMUM; i++)
 
 
1836
        {
 
 
1837
            if ((CurrentGameStatistics.Killed[i])
 
 
1838
            || (LevelStatsTargets[AvP.level].StatTargets.Killed[i] > -1)
 
 
1839
            || ((AvP.PlayerType==I_Predator) && (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] > -1))
 
 
1840
            || ((AvP.PlayerType==I_Alien) && (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] > -1))
 
 
1841
            || ((AvP.PlayerType==I_Alien) && (LevelStatsTargets[AvP.level].StatTargets.DeadHeadBites[i] > -1))
 
 
1842
                )
 
 
1843
            {
 
 
1844
                if (AvP.LevelCompleted)
 
 
1845
                {
 
 
1846
                    /* Is it a new best? */
 
 
1847
                    if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Killed[i] <= CurrentGameStatistics.Killed[i])
 
 
1848
                    {
 
 
1849
                        UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Killed[i]=CurrentGameStatistics.Killed[i];
 
 
1850
                        colour_to_draw = COLOUR_GREEN;
 
 
1851
                    }
 
 
1852
                }
 
 
1853
 
 
 
1854
                sprintf(buffer, "%s %s", TemporaryNameStore[i], "Killed:");
 
 
1855
                RenderHUDString(buffer,TABPOINT1,y,colour_to_draw);
 
 
1856
 
 
 
1857
                sprintf(buffer,"%d",CurrentGameStatistics.Killed[i]);
 
 
1858
                RenderStringCentred(buffer,TABPOINT2,y,colour_to_draw);
 
 
1859
 
 
 
1860
                if (NotCheating)
 
 
1861
                {
 
 
1862
                    sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Killed[i]);
 
 
1863
                    RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
1864
                }
 
 
1865
                else
 
 
1866
                {
 
 
1867
                    RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
1868
                }
 
 
1869
 
 
 
1870
                colour_to_draw = COLOUR_WHITE;
 
 
1871
 
 
 
1872
                if (AvP.LevelCompleted)
 
 
1873
                {
 
 
1874
                    /* Is it a completed target? */
 
 
1875
                    if (LevelStatsTargets[AvP.level].StatTargets.Killed[i] > -1)
 
 
1876
                    {
 
 
1877
                        targets++;
 
 
1878
                        if (LevelStatsTargets[AvP.level].StatTargets.Killed[i] <= CurrentGameStatistics.Killed[i])
 
 
1879
                        {
 
 
1880
                            colour_to_draw = COLOUR_RED;
 
 
1881
                            targetspassed++;
 
 
1882
                        }
 
 
1883
                    }
 
 
1884
                }
 
 
1885
 
 
 
1886
                if (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate]
 
 
1887
                &&
 
 
1888
                (LevelStatsTargets[AvP.level].StatTargets.Killed[i] > -1))
 
 
1889
                {
 
 
1890
                    sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.Killed[i]);
 
 
1891
                    RenderStringCentred(buffer, TABPOINT4, y, colour_to_draw);
 
 
1892
                }
 
 
1893
                else
 
 
1894
                {
 
 
1895
                    RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
1896
                }
 
 
1897
 
 
 
1898
                y += NEWLINE_SPACING;
 
 
1899
                colour_to_draw = COLOUR_WHITE;
 
 
1900
 
 
 
1901
                if (AvP.PlayerType == I_Predator)
 
 
1902
                {
 
 
1903
                    if ((i != STATS_VICTIM_XENOBORG) && (i != STATS_VICTIM_QUEEN) && (i != STATS_VICTIM_FACEHUGGER) && (i !=
STATS_VICTIM_PREDATOR))
 
 
1904
                    {
 
 
1905
                        if (AvP.LevelCompleted)
 
 
1906
                        {
 
 
1907
                            /* Is it a new best? */
 
 
1908
                            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].TrophiesOrLiveHeadBites[i] <= CurrentGameStatistics.Trophies[i])
 
 
1909
                            {
 
 
1910
                                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].TrophiesOrLiveHeadBites[i] = CurrentGameStatistics.Trophies[i];
 
 
1911
                                colour_to_draw = COLOUR_GREEN;
 
 
1912
                            }
 
 
1913
                        }
 
 
1914
 
 
 
1915
                        sprintf(buffer, "%s %s", TemporaryNameStore2[i], "Trophies Collected:");
 
 
1916
                        RenderHUDString(buffer, TABPOINT1, y, colour_to_draw);
 
 
1917
 
 
 
1918
                        sprintf(buffer, "%d", CurrentGameStatistics.Trophies[i]);
 
 
1919
                        RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
1920
 
 
 
1921
                        if (NotCheating)
 
 
1922
                        {
 
 
1923
                            sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].TrophiesOrLiveHeadBites[i]);
 
 
1924
                            RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
1925
                        }
 
 
1926
                        else
 
 
1927
                        {
 
 
1928
                            RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
1929
                        }
 
 
1930
 
 
 
1931
                        colour_to_draw = COLOUR_WHITE;
 
 
1932
 
 
 
1933
                        if (AvP.LevelCompleted)
 
 
1934
                        {
 
 
1935
                            /* Is it a completed target? */
 
 
1936
                            if (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] > -1)
 
 
1937
                            {
 
 
1938
                                targets++;
 
 
1939
                                if (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i]<=CurrentGameStatistics.Trophies[i])
 
 
1940
                                {
 
 
1941
                                    colour_to_draw = COLOUR_RED;
 
 
1942
                                    targetspassed++;
 
 
1943
                                }
 
 
1944
                            }
 
 
1945
                        }
 
 
1946
 
 
 
1947
                        if (NotCheating
 
 
1948
                        &&
 
 
1949
                        (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
1950
                        &&
 
 
1951
                        (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] > -1))
 
 
1952
                        {
 
 
1953
                            sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] );
 
 
1954
                            RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
1955
                        }
 
 
1956
                        else
 
 
1957
                        {
 
 
1958
                            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
1959
                        }
 
 
1960
 
 
 
1961
                        y += NEWLINE_SPACING;
 
 
1962
                        colour_to_draw = COLOUR_WHITE;
 
 
1963
                    }
 
 
1964
                }
 
 
1965
                else if (AvP.PlayerType == I_Alien)
 
 
1966
                {
 
 
1967
                    if ((i != STATS_VICTIM_ANDROID)
 
 
1968
                        &&(i != STATS_VICTIM_XENOMORPH)
 
 
1969
                        &&(i != STATS_VICTIM_PREDALIEN)
 
 
1970
                        &&(i != STATS_VICTIM_PRAETORIAN)
 
 
1971
                        &&(i != STATS_VICTIM_QUEEN)
 
 
1972
                        &&(i != STATS_VICTIM_XENOBORG)
 
 
1973
                        &&(i != STATS_VICTIM_FACEHUGGER))
 
 
1974
                    {
 
 
1975
                        if (AvP.LevelCompleted)
 
 
1976
                        {
 
 
1977
                            /* Is it a new best? */
 
 
1978
                            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].TrophiesOrLiveHeadBites[i] <= CurrentGameStatistics.LiveHeadBites[i])
 
 
1979
                            {
 
 
1980
                                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].TrophiesOrLiveHeadBites[i] = CurrentGameStatistics.LiveHeadBites[i];
 
 
1981
                                colour_to_draw = COLOUR_GREEN;
 
 
1982
                            }
 
 
1983
                        }
 
 
1984
 
 
 
1985
                        sprintf(buffer, "%s %s", TemporaryNameStore2[i], "Live Head Bites:");
 
 
1986
                        RenderHUDString(buffer,TABPOINT1,y,colour_to_draw);
 
 
1987
 
 
 
1988
                        sprintf(buffer,"%d",CurrentGameStatistics.LiveHeadBites[i]);
 
 
1989
                        RenderStringCentred(buffer,TABPOINT2,y,colour_to_draw);
 
 
1990
 
 
 
1991
                        if (NotCheating)
 
 
1992
                        {
 
 
1993
                            sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].TrophiesOrLiveHeadBites[i]);
 
 
1994
                            RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
1995
                        }
 
 
1996
                        else
 
 
1997
                        {
 
 
1998
                            RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
1999
                        }
 
 
2000
 
 
 
2001
                        colour_to_draw = COLOUR_WHITE;
 
 
2002
 
 
 
2003
                        if (AvP.LevelCompleted)
 
 
2004
                        {
 
 
2005
                            /* Is it a completed target? */
 
 
2006
                            if (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] > -1)
 
 
2007
                            {
 
 
2008
                                targets++;
 
 
2009
                                if (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] <= CurrentGameStatistics.LiveHeadBites[i])
 
 
2010
                                {
 
 
2011
                                    colour_to_draw = COLOUR_RED;
 
 
2012
                                    targetspassed++;
 
 
2013
                                }
 
 
2014
                            }
 
 
2015
                        }
 
 
2016
 
 
 
2017
                        if (NotCheating
 
 
2018
                        &&
 
 
2019
                        (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2020
                        &&
 
 
2021
                        (LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i] > -1))
 
 
2022
                        {
 
 
2023
                            sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.TrophiesOrLiveHeadBites[i]);
 
 
2024
                            RenderStringCentred(buffer, TABPOINT4, y, colour_to_draw);
 
 
2025
                        }
 
 
2026
                        else
 
 
2027
                        {
 
 
2028
                            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2029
                        }
 
 
2030
 
 
 
2031
                        y += NEWLINE_SPACING;
 
 
2032
                        colour_to_draw = COLOUR_WHITE;
 
 
2033
 
 
 
2034
                        if (AvP.LevelCompleted)
 
 
2035
                        {
 
 
2036
                            /* Is it a new best? */
 
 
2037
                            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].DeadHeadBites[i] <= CurrentGameStatistics.DeadHeadBites[i])
 
 
2038
                            {
 
 
2039
                                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].DeadHeadBites[i] = CurrentGameStatistics.DeadHeadBites[i];
 
 
2040
                                colour_to_draw = COLOUR_GREEN;
 
 
2041
                            }
 
 
2042
                        }
 
 
2043
 
 
 
2044
                        sprintf(buffer, "%s %s", TemporaryNameStore2[i], "Dead Head Bites:");
 
 
2045
                        RenderHUDString(buffer, TABPOINT1, y, colour_to_draw);
 
 
2046
 
 
 
2047
                        sprintf(buffer, "%d", CurrentGameStatistics.DeadHeadBites[i]);
 
 
2048
                        RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2049
 
 
 
2050
                        if (NotCheating)
 
 
2051
                        {
 
 
2052
                            sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].DeadHeadBites[i] );
 
 
2053
                            RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2054
                        }
 
 
2055
                        else
 
 
2056
                        {
 
 
2057
                            RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2058
                        }
 
 
2059
 
 
 
2060
                        colour_to_draw = COLOUR_WHITE;
 
 
2061
 
 
 
2062
                        if (AvP.LevelCompleted)
 
 
2063
                        {
 
 
2064
                            /* Is it a completed target? */
 
 
2065
                            if (LevelStatsTargets[AvP.level].StatTargets.DeadHeadBites[i] > -1)
 
 
2066
                            {
 
 
2067
                                targets++;
 
 
2068
                                if (LevelStatsTargets[AvP.level].StatTargets.DeadHeadBites[i]<=CurrentGameStatistics.DeadHeadBites[i])
 
 
2069
                                {
 
 
2070
                                    colour_to_draw = COLOUR_RED;
 
 
2071
                                    targetspassed++;
 
 
2072
                                }
 
 
2073
                            }
 
 
2074
                        }
 
 
2075
 
 
 
2076
                        if (NotCheating
 
 
2077
                        &&
 
 
2078
                        (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2079
                        &&
 
 
2080
                        (LevelStatsTargets[AvP.level].StatTargets.DeadHeadBites[i] > -1))
 
 
2081
                        {
 
 
2082
                            sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.DeadHeadBites[i]);
 
 
2083
                            RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2084
                        }
 
 
2085
                        else
 
 
2086
                        {
 
 
2087
                            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2088
                        }
 
 
2089
 
 
 
2090
                        y += NEWLINE_SPACING;
 
 
2091
                        colour_to_draw = COLOUR_WHITE;
 
 
2092
                    }
 
 
2093
                }
 
 
2094
            }
 
 
2095
        }
 
 
2096
    }
 
 
2097
 
 
 
2098
    /* Speed? */
 
 
2099
    {
 
 
2100
        float float_speed;
 
 
2101
 
 
 
2102
        unsigned int total_time = (AvP.ElapsedSeconds >> ONE_FIXED_SHIFT);
 
 
2103
        total_time += (AvP.ElapsedMinutes * 60);
 
 
2104
        total_time += ((AvP.ElapsedHours * 60)*60);
 
 
2105
 
 
 
2106
        if (total_time)
 
 
2107
        {
 
 
2108
            int average_speed = CurrentGameStatistics.IntegralSpeed / total_time;
 
 
2109
 
 
 
2110
            if (AvP.LevelCompleted)
 
 
2111
            {
 
 
2112
                /* Is it a new best? */
 
 
2113
                if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Speed <= average_speed)
 
 
2114
                {
 
 
2115
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Speed = average_speed;
 
 
2116
                    colour_to_draw = COLOUR_GREEN;
 
 
2117
                }
 
 
2118
            }
 
 
2119
 
 
 
2120
            RenderHUDString("Average Speed:", TABPOINT1, y, colour_to_draw);
 
 
2121
 
 
 
2122
            float_speed = (float)average_speed;
 
 
2123
            float_speed /= 1000;
 
 
2124
 
 
 
2125
            sprintf(buffer, "%.1f m/s", float_speed);
 
 
2126
            RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2127
 
 
 
2128
            if (NotCheating)
 
 
2129
            {
 
 
2130
                float_speed = (float)UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Speed;
 
 
2131
                float_speed /= 1000;
 
 
2132
 
 
 
2133
                sprintf(buffer,"%.1f m/s",float_speed);
 
 
2134
 
 
 
2135
                RenderStringCentred(buffer, TABPOINT3, y, colour_to_draw);
 
 
2136
            }
 
 
2137
            else
 
 
2138
            {
 
 
2139
                RenderStringCentred("---", TABPOINT3, y, COLOUR_WHITE);
 
 
2140
            }
 
 
2141
 
 
 
2142
            colour_to_draw = COLOUR_WHITE;
 
 
2143
 
 
 
2144
            if (AvP.LevelCompleted)
 
 
2145
            {
 
 
2146
                /* Is it a completed target? */
 
 
2147
                if (LevelStatsTargets[AvP.level].StatTargets.Speed > -1)
 
 
2148
                {
 
 
2149
                    targets++;
 
 
2150
                    if (LevelStatsTargets[AvP.level].StatTargets.Speed <= average_speed)
 
 
2151
                    {
 
 
2152
                        colour_to_draw = COLOUR_RED;
 
 
2153
                        targetspassed++;
 
 
2154
                    }
 
 
2155
                }
 
 
2156
            }
 
 
2157
 
 
 
2158
            if (NotCheating
 
 
2159
            &&
 
 
2160
            (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2161
            &&
 
 
2162
            (LevelStatsTargets[AvP.level].StatTargets.Speed > -1))
 
 
2163
            {
 
 
2164
                float_speed = (float)LevelStatsTargets[AvP.level].StatTargets.Speed;
 
 
2165
                float_speed /= 1000;
 
 
2166
                sprintf(buffer, "%.1f m/s", float_speed);
 
 
2167
                RenderStringCentred(buffer, TABPOINT4, y, colour_to_draw);
 
 
2168
            }
 
 
2169
            else
 
 
2170
            {
 
 
2171
                RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2172
            }
 
 
2173
        }
 
 
2174
        else
 
 
2175
        {
 
 
2176
            RenderHUDString("Average Speed:", TABPOINT1, y, COLOUR_WHITE);
 
 
2177
            RenderStringCentred("0 m/s" , TABPOINT2, y, COLOUR_WHITE);
 
 
2178
            RenderStringCentred("---", TABPOINT3, y, COLOUR_WHITE);
 
 
2179
            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2180
        }
 
 
2181
    }
 
 
2182
 
 
 
2183
    y += NEWLINE_SPACING;
 
 
2184
    colour_to_draw = COLOUR_WHITE;
 
 
2185
 
 
 
2186
    if (PlayerStatus.StartingHealth)
 
 
2187
    {
 
 
2188
        int percentage = ((CurrentGameStatistics.HealthDamage >> ONE_FIXED_SHIFT) * 100) / PlayerStatus.StartingHealth;
 
 
2189
 
 
 
2190
        if (AvP.LevelCompleted)
 
 
2191
        {
 
 
2192
            /* Is it a new best? */
 
 
2193
            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].HealthDamage >= percentage)
 
 
2194
            {
 
 
2195
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].HealthDamage = percentage;
 
 
2196
                colour_to_draw = COLOUR_GREEN;
 
 
2197
            }
 
 
2198
        }
 
 
2199
 
 
 
2200
        RenderHUDString("Health Damage Taken:", TABPOINT1, y, colour_to_draw);
 
 
2201
 
 
 
2202
        sprintf(buffer, "%03d%%", percentage);
 
 
2203
        RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2204
 
 
 
2205
        if (NotCheating)
 
 
2206
        {
 
 
2207
            sprintf(buffer,"%03d%%", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].HealthDamage);
 
 
2208
            RenderStringCentred(buffer, TABPOINT3, y, colour_to_draw);
 
 
2209
        }
 
 
2210
        else
 
 
2211
        {
 
 
2212
            RenderStringCentred("---", TABPOINT3, y, COLOUR_WHITE);
 
 
2213
        }
 
 
2214
 
 
 
2215
        colour_to_draw = COLOUR_WHITE;
 
 
2216
 
 
 
2217
        if (AvP.LevelCompleted)
 
 
2218
        {
 
 
2219
            /* Is it a completed target? */
 
 
2220
            if (LevelStatsTargets[AvP.level].StatTargets.HealthDamage > -1)
 
 
2221
            {
 
 
2222
                targets++;
 
 
2223
                if (LevelStatsTargets[AvP.level].StatTargets.HealthDamage >= percentage)
 
 
2224
                {
 
 
2225
                    colour_to_draw = COLOUR_RED;
 
 
2226
                    targetspassed++;
 
 
2227
                }
 
 
2228
            }
 
 
2229
        }
 
 
2230
 
 
 
2231
        if (NotCheating
 
 
2232
        &&
 
 
2233
        (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2234
        &&
 
 
2235
        (LevelStatsTargets[AvP.level].StatTargets.HealthDamage > -1))
 
 
2236
        {
 
 
2237
            sprintf(buffer,"%03d%%", LevelStatsTargets[AvP.level].StatTargets.HealthDamage);
 
 
2238
            RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2239
        }
 
 
2240
        else
 
 
2241
        {
 
 
2242
            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2243
        }
 
 
2244
 
 
 
2245
        y += NEWLINE_SPACING;
 
 
2246
        colour_to_draw = COLOUR_WHITE;
 
 
2247
    }
 
 
2248
 
 
 
2249
    if (PlayerStatus.StartingArmour && (AvP.PlayerType == I_Marine))
 
 
2250
    {
 
 
2251
        int percentage = ((CurrentGameStatistics.ArmourDamage >> ONE_FIXED_SHIFT) * 100) / PlayerStatus.StartingArmour;
 
 
2252
 
 
 
2253
        if (AvP.LevelCompleted)
 
 
2254
        {
 
 
2255
            /* Is it a new best? */
 
 
2256
            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ArmourDamage >= percentage)
 
 
2257
            {
 
 
2258
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ArmourDamage = percentage;
 
 
2259
                colour_to_draw = COLOUR_GREEN;
 
 
2260
            }
 
 
2261
        }
 
 
2262
 
 
 
2263
        RenderHUDString("Armor Damage Taken:", TABPOINT1, y, colour_to_draw);
 
 
2264
 
 
 
2265
        sprintf(buffer, "%03d%%", percentage);
 
 
2266
        RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2267
 
 
 
2268
        if (NotCheating)
 
 
2269
        {
 
 
2270
            sprintf(buffer,"%03d%%", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ArmourDamage);
 
 
2271
            RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2272
        }
 
 
2273
        else
 
 
2274
        {
 
 
2275
            RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2276
        }
 
 
2277
 
 
 
2278
        colour_to_draw = COLOUR_WHITE;
 
 
2279
 
 
 
2280
        if (AvP.LevelCompleted)
 
 
2281
        {
 
 
2282
            /* Is it a completed target? */
 
 
2283
            if (LevelStatsTargets[AvP.level].StatTargets.ArmourDamage > -1)
 
 
2284
            {
 
 
2285
                targets++;
 
 
2286
                if (LevelStatsTargets[AvP.level].StatTargets.ArmourDamage >= percentage)
 
 
2287
                {
 
 
2288
                    colour_to_draw = COLOUR_RED;
 
 
2289
                    targetspassed++;
 
 
2290
                }
 
 
2291
            }
 
 
2292
        }
 
 
2293
 
 
 
2294
        if (NotCheating
 
 
2295
        &&
 
 
2296
        (UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate] != 1)
 
 
2297
        &&
 
 
2298
        (LevelStatsTargets[AvP.level].StatTargets.ArmourDamage > -1))
 
 
2299
        {
 
 
2300
            sprintf(buffer,"%03d%%", LevelStatsTargets[AvP.level].StatTargets.ArmourDamage);
 
 
2301
            RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2302
        }
 
 
2303
        else
 
 
2304
        {
 
 
2305
            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2306
        }
 
 
2307
 
 
 
2308
        y += NEWLINE_SPACING;
 
 
2309
        colour_to_draw = COLOUR_WHITE;
 
 
2310
    }
 
 
2311
 
 
 
2312
    /* Creature specific stats... */
 
 
2313
    if (AvP.PlayerType == I_Marine)
 
 
2314
    {
 
 
2315
        int headshots=0,kills=0,i=0;
 
 
2316
 
 
 
2317
        for (; i < STATS_VICTIM_MAXIMUM; i++)
 
 
2318
        {
 
 
2319
            headshots += CurrentGameStatistics.Decapitated[i];
 
 
2320
            kills += CurrentGameStatistics.Killed[i];
 
 
2321
        }
 
 
2322
 
 
 
2323
        headshots = kills ? (100*headshots)/kills : 0 ;
 
 
2324
 
 
 
2325
        if (AvP.LevelCompleted)
 
 
2326
        {
 
 
2327
            /* Is it a new best? */
 
 
2328
            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].HeadShotPercentage <= headshots)
 
 
2329
            {
 
 
2330
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].HeadShotPercentage = headshots;
 
 
2331
                colour_to_draw = COLOUR_GREEN;
 
 
2332
            }
 
 
2333
        }
 
 
2334
 
 
 
2335
        RenderHUDString("Head Shots:", TABPOINT1, y, colour_to_draw);
 
 
2336
 
 
 
2337
        sprintf(buffer, "%03d%%", headshots);
 
 
2338
        RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2339
 
 
 
2340
        if (NotCheating)
 
 
2341
        {
 
 
2342
            sprintf(buffer,"%03d%%", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].HeadShotPercentage);
 
 
2343
            RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2344
        }
 
 
2345
        else
 
 
2346
        {
 
 
2347
            RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2348
        }
 
 
2349
 
 
 
2350
        colour_to_draw = COLOUR_WHITE;
 
 
2351
 
 
 
2352
        if (AvP.LevelCompleted)
 
 
2353
        {
 
 
2354
            /* Is it a completed target? */
 
 
2355
            if (LevelStatsTargets[AvP.level].StatTargets.HeadShotPercentage > -1)
 
 
2356
            {
 
 
2357
                targets++;
 
 
2358
                if (LevelStatsTargets[AvP.level].StatTargets.HeadShotPercentage <= headshots)
 
 
2359
                {
 
 
2360
                    colour_to_draw = COLOUR_RED;
 
 
2361
                    targetspassed++;
 
 
2362
                }
 
 
2363
            }
 
 
2364
        }
 
 
2365
 
 
 
2366
        if (NotCheating
 
 
2367
        &&
 
 
2368
        (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2369
        &&
 
 
2370
        (LevelStatsTargets[AvP.level].StatTargets.HeadShotPercentage > -1))
 
 
2371
        {
 
 
2372
            sprintf(buffer,"%03d%%", LevelStatsTargets[AvP.level].StatTargets.HeadShotPercentage);
 
 
2373
            RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2374
        }
 
 
2375
        else
 
 
2376
        {
 
 
2377
            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2378
        }
 
 
2379
 
 
 
2380
        y += NEWLINE_SPACING;
 
 
2381
        colour_to_draw = COLOUR_WHITE;
 
 
2382
        /* Shots fired... */
 
 
2383
        {
 
 
2384
            int total_shots = 0;
 
 
2385
 
 
 
2386
            for (i=0; i < MAX_NO_OF_WEAPON_SLOTS; i++)
 
 
2387
            {
 
 
2388
                struct PLAYER_WEAPON_DATA *weaponPtr = &PlayerStatus.WeaponSlot[i];
 
 
2389
                const TEMPLATE_WEAPON_DATA *twPtr = &TemplateWeapon[weaponPtr->WeaponIDNumber];
 
 
2390
 
 
 
2391
                if (twPtr->LogShots)
 
 
2392
                    total_shots += CurrentGameStatistics.ShotsFired[i];
 
 
2393
            }
 
 
2394
 
 
 
2395
            if (AvP.LevelCompleted)
 
 
2396
            {
 
 
2397
                /* Is it a new best? */
 
 
2398
                if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ShotsFired >= total_shots)
 
 
2399
                {
 
 
2400
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ShotsFired = total_shots;
 
 
2401
                    colour_to_draw = COLOUR_GREEN;
 
 
2402
                }
 
 
2403
            }
 
 
2404
 
 
 
2405
            RenderHUDString("Total Shots Fired:", TABPOINT1, y, colour_to_draw);
 
 
2406
            sprintf(buffer, "%d\n", (total_shots));
 
 
2407
            RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2408
 
 
 
2409
            if (NotCheating)
 
 
2410
            {
 
 
2411
                sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ShotsFired);
 
 
2412
                RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2413
            }
 
 
2414
            else
 
 
2415
            {
 
 
2416
                RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2417
            }
 
 
2418
 
 
 
2419
            colour_to_draw = COLOUR_WHITE;
 
 
2420
 
 
 
2421
            if (AvP.LevelCompleted)
 
 
2422
            {
 
 
2423
                /* Is it a completed target? */
 
 
2424
                if (LevelStatsTargets[AvP.level].StatTargets.ShotsFired > -1)
 
 
2425
                {
 
 
2426
                    targets++;
 
 
2427
                    if (LevelStatsTargets[AvP.level].StatTargets.ShotsFired >= total_shots)
 
 
2428
                    {
 
 
2429
                        colour_to_draw = COLOUR_RED;
 
 
2430
                        targetspassed++;
 
 
2431
                    }
 
 
2432
                }
 
 
2433
            }
 
 
2434
 
 
 
2435
            if (NotCheating
 
 
2436
            &&
 
 
2437
            (UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate] != 1)
 
 
2438
            &&
 
 
2439
            (LevelStatsTargets[AvP.level].StatTargets.ShotsFired > -1))
 
 
2440
            {
 
 
2441
                sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.ShotsFired);
 
 
2442
                RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2443
            }
 
 
2444
            else
 
 
2445
            {
 
 
2446
                RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2447
            }
 
 
2448
 
 
 
2449
            y += NEWLINE_SPACING;
 
 
2450
            colour_to_draw = COLOUR_WHITE;
 
 
2451
        }
 
 
2452
 
 
 
2453
        /* Accuracy... */
 
 
2454
        {
 
 
2455
            int percentage = 0;
 
 
2456
            int total_shots = 0;
 
 
2457
            int total_hits = 0;
 
 
2458
 
 
 
2459
            for (i=0; i < MAX_NO_OF_WEAPON_SLOTS; i++)
 
 
2460
            {
 
 
2461
                struct PLAYER_WEAPON_DATA *weaponPtr = &PlayerStatus.WeaponSlot[i];
 
 
2462
                const TEMPLATE_WEAPON_DATA *twPtr = &TemplateWeapon[weaponPtr->WeaponIDNumber];
 
 
2463
 
 
 
2464
                if (twPtr->LogAccuracy)
 
 
2465
                {
 
 
2466
                    total_shots += CurrentGameStatistics.ShotsFired[i];
 
 
2467
                    total_hits += CurrentGameStatistics.ShotsHit[i];
 
 
2468
                }
 
 
2469
            }
 
 
2470
 
 
 
2471
            if (total_shots)
 
 
2472
                percentage = (100*total_hits) / total_shots;
 
 
2473
 
 
 
2474
            if (AvP.LevelCompleted)
 
 
2475
            {
 
 
2476
                /* Is it a new best? */
 
 
2477
                if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Accuracy <= percentage)
 
 
2478
                {
 
 
2479
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Accuracy = percentage;
 
 
2480
                    colour_to_draw = COLOUR_GREEN;
 
 
2481
                }
 
 
2482
            }
 
 
2483
 
 
 
2484
            RenderHUDString("Accuracy:", TABPOINT1, y, colour_to_draw);
 
 
2485
 
 
 
2486
            sprintf(buffer, "%03d%%", percentage);
 
 
2487
            RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2488
 
 
 
2489
            if (NotCheating)
 
 
2490
            {
 
 
2491
                sprintf(buffer,"%03d%%", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Accuracy);
 
 
2492
                RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2493
            }
 
 
2494
            else
 
 
2495
            {
 
 
2496
                RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2497
            }
 
 
2498
 
 
 
2499
            colour_to_draw = COLOUR_WHITE;
 
 
2500
 
 
 
2501
            if (AvP.LevelCompleted)
 
 
2502
            {
 
 
2503
                /* Is it a completed target? */
 
 
2504
                if (LevelStatsTargets[AvP.level].StatTargets.Accuracy > -1)
 
 
2505
                {
 
 
2506
                    targets++;
 
 
2507
                    if (LevelStatsTargets[AvP.level].StatTargets.Accuracy <= percentage)
 
 
2508
                    {
 
 
2509
                        colour_to_draw = COLOUR_RED;
 
 
2510
                        targetspassed++;
 
 
2511
                    }
 
 
2512
                }
 
 
2513
            }
 
 
2514
 
 
 
2515
            if (NotCheating
 
 
2516
            &&
 
 
2517
            (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2518
            &&
 
 
2519
            (LevelStatsTargets[AvP.level].StatTargets.Accuracy > -1))
 
 
2520
            {
 
 
2521
                sprintf(buffer,"%03d%%", LevelStatsTargets[AvP.level].StatTargets.Accuracy);
 
 
2522
                RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2523
            }
 
 
2524
            else
 
 
2525
            {
 
 
2526
                RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2527
            }
 
 
2528
 
 
 
2529
            y += NEWLINE_SPACING;
 
 
2530
            colour_to_draw = COLOUR_WHITE;
 
 
2531
        }
 
 
2532
 
 
 
2533
        /* Preferred weapon... */
 
 
2534
        {
 
 
2535
            unsigned int maxtime = 0;
 
 
2536
            int preferred_slot = -1;
 
 
2537
            const char * weapon_name;
 
 
2538
 
 
 
2539
            struct PLAYER_WEAPON_DATA *weaponPtr;
 
 
2540
 
 
 
2541
            for (i=0; i < MAX_NO_OF_WEAPON_SLOTS; i++)
 
 
2542
            {
 
 
2543
                if (CurrentGameStatistics.WeaponTimes[i] >= maxtime)
 
 
2544
                {
 
 
2545
                    maxtime = CurrentGameStatistics.WeaponTimes[i];
 
 
2546
                    preferred_slot = i;
 
 
2547
                }
 
 
2548
            }
 
 
2549
 
 
 
2550
            assert(preferred_slot != -1);
 
 
2551
 
 
 
2552
            weaponPtr = &PlayerStatus.WeaponSlot[preferred_slot];
 
 
2553
 
 
 
2554
            RenderHUDString("Preferred Weapon:", TABPOINT1, y, colour_to_draw);
 
 
2555
 
 
 
2556
            switch(weaponPtr->WeaponIDNumber)
 
 
2557
            {
 
 
2558
                case WEAPON_PULSERIFLE:
 
 
2559
                    weapon_name = "Pulse Rifle";
 
 
2560
                break;
 
 
2561
                case WEAPON_SMARTGUN:
 
 
2562
                    weapon_name = "Smartgun";
 
 
2563
                break;
 
 
2564
                case WEAPON_FLAMETHROWER: 
 
 
2565
                    weapon_name = "Flamethrower";
 
 
2566
                break;
 
 
2567
                case WEAPON_SADAR:
 
 
2568
                    weapon_name = "SADAR";
 
 
2569
                break;
 
 
2570
                case WEAPON_GRENADELAUNCHER:
 
 
2571
                    weapon_name = "Grenade Launcher";
 
 
2572
                break;
 
 
2573
                case WEAPON_MINIGUN:
 
 
2574
                    weapon_name = "Minigun";
 
 
2575
                break;
 
 
2576
                case WEAPON_MARINE_PISTOL:
 
 
2577
                    weapon_name = "Pistol";
 
 
2578
                break;
 
 
2579
                case WEAPON_FRISBEE_LAUNCHER:
 
 
2580
                    weapon_name = "Skeeter Launcher";
 
 
2581
                break;
 
 
2582
                case WEAPON_TWO_PISTOLS:
 
 
2583
                    weapon_name =  "Pistols";
 
 
2584
                break;
 
 
2585
                default: 
 
 
2586
                    weapon_name = "dead cow";
 
 
2587
            }
 
 
2588
 
 
 
2589
            RenderStringCentred(weapon_name, TABPOINT2, y, colour_to_draw);
 
 
2590
            RenderStringCentred("---",TABPOINT3,y,colour_to_draw);
 
 
2591
            RenderStringCentred("---",TABPOINT4,y,COLOUR_WHITE);
 
 
2592
 
 
 
2593
            y += NEWLINE_SPACING;
 
 
2594
            colour_to_draw = COLOUR_WHITE;
 
 
2595
        }
 
 
2596
    }
 
 
2597
    else if (AvP.PlayerType == I_Alien)
 
 
2598
    {
 
 
2599
        if (AvP.LevelCompleted)
 
 
2600
        {
 
 
2601
            /* Is it a new best? */
 
 
2602
            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Spotted >= CurrentGameStatistics.Spotted)
 
 
2603
            {
 
 
2604
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Spotted = CurrentGameStatistics.Spotted;
 
 
2605
                colour_to_draw = COLOUR_GREEN;
 
 
2606
            }
 
 
2607
        }
 
 
2608
 
 
 
2609
        RenderHUDString("Spotted:", TABPOINT1, y, colour_to_draw);
 
 
2610
 
 
 
2611
        sprintf(buffer, "%d", CurrentGameStatistics.Spotted);
 
 
2612
        RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2613
 
 
 
2614
        if (NotCheating)
 
 
2615
        {
 
 
2616
            sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Spotted);
 
 
2617
            RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2618
        }
 
 
2619
        else
 
 
2620
        {
 
 
2621
            RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2622
        }
 
 
2623
 
 
 
2624
        colour_to_draw = COLOUR_WHITE;
 
 
2625
 
 
 
2626
        if (AvP.LevelCompleted)
 
 
2627
        {
 
 
2628
            /* Is it a completed target? */
 
 
2629
            if (LevelStatsTargets[AvP.level].StatTargets.Spotted > -1)
 
 
2630
            {
 
 
2631
                targets++;
 
 
2632
                if (LevelStatsTargets[AvP.level].StatTargets.Spotted >= CurrentGameStatistics.Spotted)
 
 
2633
                {
 
 
2634
                    colour_to_draw = COLOUR_RED;
 
 
2635
                    targetspassed++;
 
 
2636
                }
 
 
2637
            }
 
 
2638
        }
 
 
2639
 
 
 
2640
        if (NotCheating
 
 
2641
        &&
 
 
2642
        (UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate] != 1)
 
 
2643
        &&
 
 
2644
        (LevelStatsTargets[AvP.level].StatTargets.Spotted > -1))
 
 
2645
        {
 
 
2646
            sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.Spotted);
 
 
2647
            RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2648
        }
 
 
2649
        else
 
 
2650
        {
 
 
2651
            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2652
        }
 
 
2653
 
 
 
2654
        y += NEWLINE_SPACING;
 
 
2655
        colour_to_draw = COLOUR_WHITE;
 
 
2656
    }
 
 
2657
    else if (AvP.PlayerType == I_Predator)
 
 
2658
    {
 
 
2659
        int i;
 
 
2660
 
 
 
2661
        if (AvP.LevelCompleted)
 
 
2662
        {
 
 
2663
            /* Is it a new best? */
 
 
2664
            if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Spotted >= CurrentGameStatistics.Spotted)
 
 
2665
            {
 
 
2666
                UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Spotted = CurrentGameStatistics.Spotted;
 
 
2667
                colour_to_draw = COLOUR_GREEN;
 
 
2668
            }
 
 
2669
        }
 
 
2670
 
 
 
2671
        RenderHUDString("Spotted:", TABPOINT1, y, colour_to_draw);
 
 
2672
 
 
 
2673
        sprintf(buffer, "%d", CurrentGameStatistics.Spotted);
 
 
2674
        RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2675
 
 
 
2676
        if (NotCheating)
 
 
2677
        {
 
 
2678
            sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Spotted);
 
 
2679
            RenderStringCentred(buffer, TABPOINT3, y, colour_to_draw);
 
 
2680
        }
 
 
2681
        else
 
 
2682
        {
 
 
2683
            RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2684
        }
 
 
2685
 
 
 
2686
        colour_to_draw = COLOUR_WHITE;
 
 
2687
 
 
 
2688
        if (AvP.LevelCompleted)
 
 
2689
        {
 
 
2690
            /* Is it a completed target? */
 
 
2691
            if (LevelStatsTargets[AvP.level].StatTargets.Spotted > -1)
 
 
2692
            {
 
 
2693
                targets++;
 
 
2694
                if (LevelStatsTargets[AvP.level].StatTargets.Spotted >= CurrentGameStatistics.Spotted)
 
 
2695
                {
 
 
2696
                    colour_to_draw = COLOUR_RED;
 
 
2697
                    targetspassed++;
 
 
2698
                }
 
 
2699
            }
 
 
2700
        }
 
 
2701
 
 
 
2702
        if (NotCheating
 
 
2703
        &&
 
 
2704
        (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2705
        &&
 
 
2706
        (LevelStatsTargets[AvP.level].StatTargets.Spotted > -1))
 
 
2707
        {
 
 
2708
            sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.Spotted);
 
 
2709
            RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2710
        }
 
 
2711
        else
 
 
2712
        {
 
 
2713
            RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2714
        }
 
 
2715
 
 
 
2716
        y += NEWLINE_SPACING;
 
 
2717
        colour_to_draw = COLOUR_WHITE;
 
 
2718
 
 
 
2719
        /* FieldCharge... */
 
 
2720
        {
 
 
2721
            int percentage = CurrentGameStatistics.FieldChargeUsed / (PLAYERCLOAK_MAXENERGY/100);
 
 
2722
 
 
 
2723
            if (AvP.LevelCompleted)
 
 
2724
            {
 
 
2725
                /* Is it a new best? */
 
 
2726
                if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].FieldChargeUsed >= percentage)
 
 
2727
                {
 
 
2728
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].FieldChargeUsed = percentage;
 
 
2729
                    colour_to_draw = COLOUR_GREEN;
 
 
2730
                }
 
 
2731
            }
 
 
2732
 
 
 
2733
            RenderHUDString("Field Charge Used:", TABPOINT1, y, colour_to_draw);
 
 
2734
 
 
 
2735
            sprintf(buffer, "%03d%%", percentage);
 
 
2736
            RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2737
 
 
 
2738
            if (NotCheating)
 
 
2739
            {
 
 
2740
                sprintf(buffer,"%03d%%", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].FieldChargeUsed);
 
 
2741
                RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2742
            }
 
 
2743
            else
 
 
2744
            {
 
 
2745
                RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2746
            }
 
 
2747
 
 
 
2748
            colour_to_draw = COLOUR_WHITE;
 
 
2749
 
 
 
2750
            if (AvP.LevelCompleted)
 
 
2751
            {
 
 
2752
                /* Is it a completed target? */
 
 
2753
                if (LevelStatsTargets[AvP.level].StatTargets.FieldChargeUsed > -1)
 
 
2754
                {
 
 
2755
                    targets++;
 
 
2756
                    if (LevelStatsTargets[AvP.level].StatTargets.FieldChargeUsed >= percentage)
 
 
2757
                    {
 
 
2758
                        colour_to_draw = COLOUR_RED;
 
 
2759
                        targetspassed++;
 
 
2760
                    }
 
 
2761
                }
 
 
2762
            }
 
 
2763
 
 
 
2764
            if (NotCheating
 
 
2765
            &&
 
 
2766
            (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2767
            &&
 
 
2768
            (LevelStatsTargets[AvP.level].StatTargets.FieldChargeUsed > -1))
 
 
2769
            {
 
 
2770
                sprintf(buffer,"%03d%%", LevelStatsTargets[AvP.level].StatTargets.FieldChargeUsed);
 
 
2771
                RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2772
            }
 
 
2773
            else
 
 
2774
            {
 
 
2775
                RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2776
            }
 
 
2777
 
 
 
2778
            y += NEWLINE_SPACING;
 
 
2779
            colour_to_draw = COLOUR_WHITE;
 
 
2780
        }
 
 
2781
        /* Shots fired... */
 
 
2782
        {
 
 
2783
            int total_shots = 0;
 
 
2784
 
 
 
2785
            for (i=0; i < MAX_NO_OF_WEAPON_SLOTS; i++)
 
 
2786
            {
 
 
2787
                struct PLAYER_WEAPON_DATA *weaponPtr = &PlayerStatus.WeaponSlot[i];
 
 
2788
                const TEMPLATE_WEAPON_DATA *twPtr = &TemplateWeapon[weaponPtr->WeaponIDNumber];
 
 
2789
 
 
 
2790
                if (twPtr->LogShots)
 
 
2791
                    total_shots += CurrentGameStatistics.ShotsFired[i];
 
 
2792
            }
 
 
2793
 
 
 
2794
            if (AvP.LevelCompleted)
 
 
2795
            {
 
 
2796
                /* Is it a new best? */
 
 
2797
                if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ShotsFired >= total_shots)
 
 
2798
                {
 
 
2799
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ShotsFired = total_shots;
 
 
2800
                    colour_to_draw = COLOUR_GREEN;
 
 
2801
                }
 
 
2802
            }
 
 
2803
 
 
 
2804
            RenderHUDString("Total Shots Fired:", TABPOINT1, y, colour_to_draw);
 
 
2805
 
 
 
2806
            sprintf(buffer, "%d", (total_shots));
 
 
2807
            RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2808
 
 
 
2809
            if (NotCheating)
 
 
2810
            {
 
 
2811
                sprintf(buffer,"%d", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].ShotsFired);
 
 
2812
                RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2813
            }
 
 
2814
            else
 
 
2815
            {
 
 
2816
                RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2817
            }
 
 
2818
 
 
 
2819
            colour_to_draw = COLOUR_WHITE;
 
 
2820
 
 
 
2821
            if (AvP.LevelCompleted)
 
 
2822
            {
 
 
2823
                /* Is it a completed target? */
 
 
2824
                if (LevelStatsTargets[AvP.level].StatTargets.ShotsFired > -1)
 
 
2825
                {
 
 
2826
                    targets++;
 
 
2827
                    if (LevelStatsTargets[AvP.level].StatTargets.ShotsFired >= total_shots)
 
 
2828
                    {
 
 
2829
                        colour_to_draw = COLOUR_RED;
 
 
2830
                        targetspassed++;
 
 
2831
                    }
 
 
2832
                }
 
 
2833
            }
 
 
2834
 
 
 
2835
            if (NotCheating
 
 
2836
            &&
 
 
2837
            (UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate] != 1)
 
 
2838
            &&
 
 
2839
            (LevelStatsTargets[AvP.level].StatTargets.ShotsFired > -1))
 
 
2840
            {
 
 
2841
                sprintf(buffer,"%d", LevelStatsTargets[AvP.level].StatTargets.ShotsFired);
 
 
2842
                RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2843
            }
 
 
2844
            else
 
 
2845
            {
 
 
2846
                RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2847
            }
 
 
2848
 
 
 
2849
            y += NEWLINE_SPACING;
 
 
2850
            colour_to_draw = COLOUR_WHITE;
 
 
2851
        }
 
 
2852
 
 
 
2853
        /* Accuracy... */
 
 
2854
        {
 
 
2855
            int percentage = 0;
 
 
2856
            int total_shots = 0;
 
 
2857
            int total_hits = 0;
 
 
2858
 
 
 
2859
            for (i=0; i < MAX_NO_OF_WEAPON_SLOTS; i++)
 
 
2860
            {
 
 
2861
                struct PLAYER_WEAPON_DATA *weaponPtr = &PlayerStatus.WeaponSlot[i];
 
 
2862
                const TEMPLATE_WEAPON_DATA *twPtr = &TemplateWeapon[weaponPtr->WeaponIDNumber];
 
 
2863
 
 
 
2864
                if (twPtr->LogAccuracy)
 
 
2865
                {
 
 
2866
                    total_shots += CurrentGameStatistics.ShotsFired[i];
 
 
2867
                    total_hits += CurrentGameStatistics.ShotsHit[i];
 
 
2868
                }
 
 
2869
            }
 
 
2870
 
 
 
2871
            if (total_shots)
 
 
2872
                percentage = (100*total_hits) / total_shots;
 
 
2873
 
 
 
2874
            if (AvP.LevelCompleted)
 
 
2875
            {
 
 
2876
                /* Is it a new best? */
 
 
2877
                if (UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Accuracy <= percentage)
 
 
2878
                {
 
 
2879
                    UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Accuracy = percentage;
 
 
2880
                    colour_to_draw = COLOUR_GREEN;
 
 
2881
                }
 
 
2882
            }
 
 
2883
 
 
 
2884
            RenderHUDString("Accuracy:", TABPOINT1, y, colour_to_draw);
 
 
2885
 
 
 
2886
            sprintf(buffer, "%03d%%", percentage);
 
 
2887
            RenderStringCentred(buffer, TABPOINT2, y, colour_to_draw);
 
 
2888
 
 
 
2889
            if (NotCheating)
 
 
2890
            {
 
 
2891
                sprintf(buffer,"%03d%%", UserProfile.PersonalBests[AvP.Difficulty][AvP.level].Accuracy);
 
 
2892
                RenderStringCentred(buffer,TABPOINT3,y,colour_to_draw);
 
 
2893
            }
 
 
2894
            else
 
 
2895
            {
 
 
2896
                RenderStringCentred("---",TABPOINT3,y,COLOUR_WHITE);
 
 
2897
            }
 
 
2898
 
 
 
2899
            colour_to_draw = COLOUR_WHITE;
 
 
2900
 
 
 
2901
            if (AvP.LevelCompleted)
 
 
2902
            {
 
 
2903
                /* Is it a completed target? */
 
 
2904
                if (LevelStatsTargets[AvP.level].StatTargets.Accuracy > -1)
 
 
2905
                {
 
 
2906
                    targets++;
 
 
2907
                    if (LevelStatsTargets[AvP.level].StatTargets.Accuracy <= percentage)
 
 
2908
                    {
 
 
2909
                        colour_to_draw = COLOUR_RED;
 
 
2910
                        targetspassed++;
 
 
2911
                    }
 
 
2912
                }
 
 
2913
            }
 
 
2914
 
 
 
2915
            if (NotCheating
 
 
2916
            &&
 
 
2917
            (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
2918
            &&
 
 
2919
            (LevelStatsTargets[AvP.level].StatTargets.Accuracy > -1))
 
 
2920
            {
 
 
2921
                sprintf(buffer,"%03d%%", LevelStatsTargets[AvP.level].StatTargets.Accuracy);
 
 
2922
                RenderStringCentred(buffer,TABPOINT4,y,colour_to_draw);
 
 
2923
            }
 
 
2924
            else
 
 
2925
            {
 
 
2926
                RenderStringCentred("---", TABPOINT4, y, COLOUR_WHITE);
 
 
2927
            }
 
 
2928
 
 
 
2929
            y += NEWLINE_SPACING;
 
 
2930
            colour_to_draw = COLOUR_WHITE;
 
 
2931
        }
 
 
2932
 
 
 
2933
        /* Preferred weapon... */
 
 
2934
        {
 
 
2935
            unsigned int maxtime = 0;
 
 
2936
            int preferred_slot = -1;
 
 
2937
            const char * weapon_name;
 
 
2938
            struct PLAYER_WEAPON_DATA *weaponPtr;
 
 
2939
 
 
 
2940
            for (i=0; i < MAX_NO_OF_WEAPON_SLOTS; i++)
 
 
2941
            {
 
 
2942
                if (CurrentGameStatistics.WeaponTimes[i] >= maxtime)
 
 
2943
                {
 
 
2944
                    maxtime=CurrentGameStatistics.WeaponTimes[i];
 
 
2945
                    preferred_slot = i;
 
 
2946
                }
 
 
2947
            }
 
 
2948
 
 
 
2949
            assert(preferred_slot!=-1);
 
 
2950
 
 
 
2951
            weaponPtr = &PlayerStatus.WeaponSlot[preferred_slot];
 
 
2952
 
 
 
2953
            RenderHUDString("Preferred Weapon:", TABPOINT1, y, colour_to_draw);
 
 
2954
 
 
 
2955
            switch(weaponPtr->WeaponIDNumber)
 
 
2956
            {
 
 
2957
                case WEAPON_PRED_WRISTBLADE:
 
 
2958
                    weapon_name = "Wristblade";
 
 
2959
                break;
 
 
2960
                case WEAPON_PRED_PISTOL:
 
 
2961
                    weapon_name = "Pistol";
 
 
2962
                break;
 
 
2963
                case WEAPON_PRED_RIFLE:
 
 
2964
                    weapon_name = "Speargun";
 
 
2965
                break;
 
 
2966
                case WEAPON_PRED_SHOULDERCANNON:
 
 
2967
                    weapon_name = "Shoulder Cannon";
 
 
2968
                break;
 
 
2969
                case WEAPON_PRED_DISC:
 
 
2970
                    weapon_name = "Disc";
 
 
2971
                break;
 
 
2972
                case WEAPON_PRED_MEDICOMP:
 
 
2973
                    weapon_name = "Medicomp";
 
 
2974
                break;
 
 
2975
                default:
 
 
2976
                    weapon_name = "fists of fury";
 
 
2977
            }
 
 
2978
 
 
 
2979
            RenderStringCentred(weapon_name, TABPOINT2, y, colour_to_draw);
 
 
2980
            RenderStringCentred("---",TABPOINT3,y,colour_to_draw);
 
 
2981
            RenderStringCentred("---",TABPOINT4,y,COLOUR_WHITE);
 
 
2982
 
 
 
2983
            y += NEWLINE_SPACING;
 
 
2984
            colour_to_draw = COLOUR_WHITE;
 
 
2985
        }
 
 
2986
    }
 
 
2987
 
 
 
2988
    /* Vision Mode... */
 
 
2989
    {
 
 
2990
        int i;
 
 
2991
        unsigned int maxtime = 0;
 
 
2992
        int preferred_slot = -1;
 
 
2993
 
 
 
2994
        for (i=0; i < NUMBER_OF_VISION_MODES; i++)
 
 
2995
        {
 
 
2996
            if (CurrentGameStatistics.VisionModeTimes[i] >= maxtime)
 
 
2997
            {
 
 
2998
                maxtime=CurrentGameStatistics.VisionModeTimes[i];
 
 
2999
                preferred_slot = i;
 
 
3000
            }
 
 
3001
        }
 
 
3002
 
 
 
3003
        assert(preferred_slot!=-1);
 
 
3004
 
 
 
3005
        RenderHUDString("Preferred Vision Mode:", TABPOINT1, y, colour_to_draw);
 
 
3006
        sprintf(buffer,"%s\n", VisionModeNames[preferred_slot]);
 
 
3007
        RenderStringCentred(buffer,TABPOINT2,y,colour_to_draw);
 
 
3008
 
 
 
3009
        RenderStringCentred("---",TABPOINT3,y,colour_to_draw);
 
 
3010
        RenderStringCentred("---",TABPOINT4,y,COLOUR_WHITE);
 
 
3011
 
 
 
3012
    }
 
 
3013
 
 
 
3014
    y += NEWLINE_SPACING;
 
 
3015
    colour_to_draw = COLOUR_WHITE;
 
 
3016
 
 
 
3017
    /* Unlock a cheat mode? */
 
 
3018
    if(unlockable_bonus)
 
 
3019
    if (NotCheating && targets)
 
 
3020
    {
 
 
3021
        if (targets == targetspassed)
 
 
3022
        {
 
 
3023
            if (LevelStatsTargets[AvP.level].CheatModeToActivate != CHEATMODE_NONACTIVE)
 
 
3024
            {
 
 
3025
                if (!UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate])
 
 
3026
                {
 
 
3027
                    UserProfile.CheatMode[LevelStatsTargets[AvP.level].CheatModeToActivate] = 1;
 
 
3028
                    RenderStringCentred("Bonus Mode Enabled!", ScreenDescriptorBlock.SDB_CentreX, y, COLOUR_GREEN);
 
 
3029
                }
 
 
3030
            }
 
 
3031
        }
 
 
3032
    }
 
 
3033
}