Wing Commander II
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
campglob.c
Go to the documentation of this file.
1/*
2 * Campaign globals and campaign scripts.
3 *
4 * Retail object 0x428E00-0x42954F (link order; see docs/ORDER.md).
5 */
6#include "game.h"
7
8static char g_szTemporaryCampaignGlobalsFile[13]; /* 0x00499bc0 */
9
10/* Function start: 0x428E00 */
11short GetMissionShipPilotSaveIndex(short missionShip)
12{
13 short pilot;
14
15 pilot = g_aMissionShips[missionShip].pilot;
16 if (pilot < 6)
17 pilot = 99;
18 else
19 pilot = g_aMissionShips[missionShip].portrait;
20 return pilot;
21}
22
23/* Function start: 0x428E5C */
24short GetMissionShipVelocityState(short missionShip)
25{
26 short state;
27
28 state = -1;
29 if (g_aMissionShips[missionShip].state == 3)
30 state++;
31 return state;
32}
33
34/* Function start: 0x428E98 */
36{
37 short pilot;
38
40 if (pilot != -1)
41 pilot = GetMissionShipPilotSaveIndex(pilot);
42 return pilot;
43}
44
45/* Function start: 0x428EDC */
47{
48 short index;
49 short pilotTotal;
50
51 if (globals == 0) {
53 0x50, 2, 0, "ModuleToScript");
54 }
55 pilotTotal = globals->pilotCount;
56 for (index = 0; index < pilotTotal; index++)
57 globals->pilotStatus[index] = g_pPilotStatus[index];
58
59 for (index = 0; index < 8; index++) {
60 /* Preserve retail's achieved/sighted/visited call order in CL 4.1;
61 * the complements fold away without changing the flags. */
62 globals->objectiveFlags[index] =
63 ~~(achieved(index) | sighted(index)) | visited(index);
64 globals->objectiveSighted[index] = sighted(index);
65 }
66 for (index = 0; index < 16; index++)
67 globals->shipVelocityState[index] =
68 (short)(GetMissionShipVelocityState(index) + 1);
69
71 globals->shipMissionFlags[0] = 0;
72 globals->damageLevel = (short)calculate_damage_level();
73 globals->arcadeState = (short)g_nArcadeState;
74 if (g_nArcadeState == 2)
75 globals->shipMissionFlags[0] |= 2;
76 if (g_asShipSide[0] == 1)
77 globals->shipMissionFlags[0] |= 4;
78 if (g_nArcadeState >= 3)
79 globals->shipMissionFlags[0] |= 1;
80
81 for (index = 1; index < 8; index++) {
82 globals->shipKillCounts[index] =
84 globals->shipMissionFlags[index] =
86 if (index == 1 && g_6_bMissionWingmanState != 0)
87 globals->shipMissionFlags[index] |= 8;
88 pilotTotal = GetInitialMissionShipPilotSaveIndex(index);
89 if (pilotTotal != -1)
90 pilotTotal = (short)(pilotTotal * 2);
91 globals->shipPilotIndices[index] = pilotTotal;
92 }
95}
96
97/* Function start: 0x42917D */
99 short copyPosition)
100{
101 short pilot;
102 short count;
103
104 count = globals->pilotCount;
105 if (g_pPilotStatus == 0)
107 (short *)calloc((int)count, 2);
108 if (g_pPilotStatus == 0)
110 if (count != 32)
112
113 for (pilot = 0; pilot < count; pilot++)
114 g_pPilotStatus[pilot] =
115 globals->pilotStatus[pilot];
116
117 if (copyPosition != 0) {
120 }
121 g_nArcadeState = (int)globals->arcadeState;
122}
123
124#pragma function(strcat)
125/* Function start: 0x429261 */
126void RunCampaignScript(short campaignSlot)
127{
128 void *scenePacket;
129 unsigned int totalMain;
130 unsigned int largestMainBlock;
131 short font;
132 char number[4];
133 short inputMode;
134 char campaignFileName[13];
135 unsigned int totalFar;
136 unsigned int largestFarMemoryBlock;
137
138 inputMode = g_18_nInterfaceEventMode;
139 memcpy(campaignFileName, "campaign.s0", 12);
140 campaignFileName[12] = 0;
141 if (g_bSkipCampaignVideo != 0)
142 return;
144 strcat(campaignFileName,
145 itoa((int)campaignSlot, number, 10));
146 scenePacket = FetchDiskPacketRetrying(
147 campaignFileName, 0, 0);
148 for (font = 0; font < 4; font++) {
149 if (g_36_apTextGlyphs[font] != 0) {
151 g_36_apTextGlyphs[font] = 0;
152 }
153 }
154 totalMain = GetAvailableMainMemory();
155 largestMainBlock = GetLargestMainMemoryBlock();
156 totalFar = GetAvailableFarMemory();
157 largestFarMemoryBlock = GetLargestFreeMemoryBlock();
158 /* This unit reads the byte flag as a word. */
159 if (*(short *)&g_bCutsceneViewportPreallocated == 0)
161 if (g_bSkipCampaignScenes == 0) {
163 ParseCutsceneContainer(scenePacket);
168 g_18_nInterfaceEventMode = inputMode;
171 }
172 totalMain = GetAvailableMainMemory();
173 largestMainBlock = GetLargestMainMemoryBlock();
174 totalFar = GetAvailableFarMemory();
175 largestFarMemoryBlock = GetLargestFreeMemoryBlock();
176 ReleasePacketHandle(scenePacket);
177}
178
179/* Function start: 0x4293F9 */
186
187/* Function start: 0x429423 */
189{
190 short file;
191
192 if (g_pCampaignGlobals == 0)
193 return;
195 if (file >= 0) {
197 (unsigned short)file, 0,
198 (unsigned int)*(unsigned short *)g_pCampaignGlobals *
199 2,
201 CloseDataFile((unsigned short)file);
202 }
204}
205
206/* Function start: 0x42949F */
207void *LoadWholeDataFile(const char *path)
208{
209 void *data;
210 short handle;
211 unsigned int bytes;
212
213 data = 0;
214 handle = OpenDataFileOrDie(path);
215 if (handle >= 0) {
216 bytes = (unsigned int)filelength(handle);
217 if (bytes == (unsigned int)-1) {
218 CloseDataFile((unsigned short)handle);
219 return 0;
220 }
221 data = AllocateTaggedMemory(bytes, 0);
222 if (data != 0)
223 ReadDataFileAtOffset((unsigned short)handle, 0, bytes, data);
224 CloseDataFile((unsigned short)handle);
225 }
226 return data;
227}
228
229/* This unit's initialized data, after its functions so that the animation
230 * tables do not move the functions' symbol keys. The object-type records and
231 * their animation streams precede the campaign file name in the original. */
232/* Frame lists the object-type records point at; 0xA000 and 0x9000 end a
233 * sequence. They sit immediately below the table in the retail image. */
235 0, 1, 2, 3, 4, 5, 6, (short)0xa000
236}; /* 0x00496af0 */
238 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, (short)0xa000, 0, 0
239}; /* 0x00496b00 */
240static short g_asExplosionLargeAnimation[20] = {
241 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
242 (short)0xa000, 0, 0
243}; /* 0x00496b20 */
244static short g_asLaserSparkAnimation[8] = {
245 0, 1, 2, 3, 4, 5, (short)0xa000, 0
246}; /* 0x00496b48 */
247static short g_asBlueSparkAnimation[8] = {
248 0, 1, 2, 3, (short)0xa000, 0, 0, 0
249}; /* 0x00496b58 */
250static short g_asRedSparkAnimation[8] = {
251 0, 1, 2, 3, (short)0xa000, 0, 0, 0
252}; /* 0x00496b68 */
253static short g_asSparkTrailAnimation[8] = {
254 0, 1, 2, 3, (short)0xa000, 0, 0, 0
255}; /* 0x00496b78 */
256static short g_asGirderChunkAnimation[8] = {
257 0, 1, 2, 3, 4, 5, (short)0x9000, 0
258}; /* 0x00496b88 */
259static short g_asShipTubingAnimation[8] = {
260 6, 7, 8, 9, 10, 11, (short)0x9000, 0
261}; /* 0x00496b98 */
262static short g_asBurningDebrisAnimation[20] = {
263 12, 13, 14, 15, 16, 17, 18, 19, 146, 145, 144, 143, 142, 141, 140,
264 20, (short)0x9000, 0, 0, 0
265}; /* 0x00496ba8 */
266static short g_asORingDebrisAnimation[8] = {
267 21, 22, 23, 24, 25, 26, (short)0x9000, 0
268}; /* 0x00496bd0 */
269static short g_asPipeDebrisAnimation[8] = {
270 27, 28, 29, 30, 31, 32, (short)0x9000, 0
271}; /* 0x00496be0 */
272static short g_asMetalSheetAnimation[16] = {
273 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, (short)0x9000, 0, 0
274}; /* 0x00496bf0 */
275static short g_asDataCapsuleAnimation[12] = {
276 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, (short)0x9000
277}; /* 0x00496c10 */
278static short g_asMineAnimation[12] = {
279 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, (short)0x9000
280}; /* 0x00496c28 */
281static short g_asChaffPodAnimation[20] = {
282 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, (short)0x9000, 0, 1, 2, 3, 4, 5,
283 (short)0x9000, 0
284}; /* 0x00496c40 */
285static short g_asAsteroidSpinAnimation[16] = {
286 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, (short)0x9000, 0, 0
287}; /* 0x00496c68 */
288static short g_asAsteroidRollAnimation[16] = {
289 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, (short)0x9000, 0, 0
290}; /* 0x00496c88 */
292 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, (short)0x9000, 0, 0
293}; /* 0x00496ca8 */
295 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, (short)0x9000, 0, 0
296}; /* 0x00496cc8 */
297static short g_asEjectedPilotAnimation[12] = {
298 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, (short)0x9000, 0
299}; /* 0x00496ce8 */
301 0, 1026, 1028, 1028, 1032, 1032, 1032, 1040, 1040, 1040, 1040, 2080,
302 2080, 2064, 2056, 2052, 1, 2052, 2052, 2052, 2052, (short)0xa000, 0,
303 0
304}; /* 0x00496d00 */
305
306/* WC2 keeps its own 49-record table: slots 0-6 are the ship types the game
307 * loads at runtime and stay zero in the image, and 7-48 are the static
308 * projectile, missile, asteroid, debris and explosion records read straight
309 * out of the retail .data. */
311 { 0 },
312 { 0 },
313 { 0 },
314 { 0 },
315 { 0 },
316 { 0 },
317 { 0 },
318 {
319 "Laser cannon", OBJECT_CLASS_PROJECTILE, 0, 7, 10, 0, 512, 7,
320 30, 25, 0, 160
321 },
322 {
323 "Neutron gun", OBJECT_CLASS_PROJECTILE, 0, 8, 10, 1, 832, 14,
324 20, 40, 0, 140
325 },
326 {
327 "Mass driver", OBJECT_CLASS_PROJECTILE, 0, 9, 10, 0, 512, 9, 25, 30, 0, 120
328 },
329 {
330 "Particle cannon", OBJECT_CLASS_PROJECTILE, 0, 10, 10, 0, 512,
331 9, 30, 53, 0, 220
332 },
333 { "", OBJECT_CLASS_PROJECTILE, 0, 11, 10, 0, 512, 7, 30, 25, 0, 160 },
334 {
335 "", OBJECT_CLASS_PROJECTILE, 0, 12, 15, 0, 832, 15, 40, 50,
336 4000, 180
337 },
338 {
339 "", OBJECT_CLASS_PROJECTILE, 0, 13, 1, 0, 832, 15, 100, 300,
340 0, 250
341 },
342 {
343 "", OBJECT_CLASS_PROJECTILE, 0, 14, 1, 0, 832, 15, 80, 1200,
344 0, 150
345 },
346 {
347 "Dart DF", OBJECT_CLASS_MISSILE, 0, 15, 20, 5, 768, 500, 120,
348 4, 14500, 150, 0, 0, 1433, 15, 15, 15, 100
349 },
350 {
351 "Javelin HS", OBJECT_CLASS_MISSILE, 0, 16, 20, 5, 768, 400, 140, 4, 13500, 150, 0, 0, 1689, 11, 11, 11, 100
352 },
353 {
354 "Pilum FF", OBJECT_CLASS_MISSILE, 0, 17, 20, 5, 768, 400, 160, 4, 10500, 150, 0, 0, 1689, 11, 11, 11, 100
355 },
356 {
357 "Spiculum IR", OBJECT_CLASS_MISSILE, 0, 18, 20, 5, 768, 400,
358 110, 4, 11500, 150, 0, 0, 1689, 11, 11, 11, 100
359 },
360 {
361 "Torpedo", OBJECT_CLASS_MISSILE, 0, 19, 55, 10, 1280, 400, 8200, 20, 30000, 50, 0, 0, 512, 4, 4, 4, 500
362 },
363 {
364 "Chaff Pod", OBJECT_CLASS_MISSILE, 0, 20, 50, 1, 768, 400, 160, 4, 1000, 90, 0, (unsigned char
365 *)g_asChaffPodAnimation, 1689, 11, 11, 11, 100
366 },
367 {
368 "Porcupine", OBJECT_CLASS_MINE, 0, 21, 20, 5, 768, 110, 120,
369 4, 20000, 20, 20, (unsigned char *)g_asMineAnimation,
370 0, 0, 2, 2
371 },
372 {
373 "", OBJECT_CLASS_ASTEROID, 0, 22, 100, 300, 1024, 0, 0, -1,
374 0, 0, 0, (unsigned char *)g_asAsteroidSpinAnimation, 0,
375 0, 1, 13
376 },
377 {
378 "", OBJECT_CLASS_ASTEROID, 0, 23, 100, 300, 1024, 0, 0, -1,
379 0, 0, 0, (unsigned char *)g_asAsteroidRollAnimation, 0,
380 0, 1, 12
381 },
382 {
383 "", OBJECT_CLASS_ASTEROID, 0, 24, 100, 300, 1024, 0, 0, -1,
384 0, 0, 0, (unsigned char
386 },
387 {
388 "", OBJECT_CLASS_ASTEROID, 0, 25, 100, 300, 1024, 0, 0, -1,
389 0, 0, 0, (unsigned char
391 },
392 {
393 "", OBJECT_CLASS_ASTEROID, 0, 26, 100, 300, 1024, 0, 0, -1,
394 0, 0, 0, (unsigned char *)g_asAsteroidSpinAnimation, 0,
395 0, 2, 13
396 },
397 {
398 "", OBJECT_CLASS_ASTEROID, 0, 27, 100, 300, 1024, 0, 0, -1,
399 0, 0, 0, (unsigned char *)g_asAsteroidRollAnimation, 0,
400 0, 2, 12
401 },
402 {
403 "", OBJECT_CLASS_DEBRIS, 0, 28, 10, 4, 192, 0, 0, -1, 0, 0,
404 0, (unsigned char *)g_asAsteroidSpinAnimation, 0, 0, 2,
405 13
406 },
407 {
408 "", OBJECT_CLASS_DEBRIS, 0, 29, 10, 1, 2048, 0, 0, 0, 0, 0,
409 0, (unsigned char *)g_asGirderChunkAnimation, 0, 0, 2,
410 5
411 },
412 {
413 "", OBJECT_CLASS_DEBRIS, 0, 30, 10, 1, 2048, 0, 0, 0, 0, 0,
414 0, (unsigned char *)g_asShipTubingAnimation, 0, 0, 2, 5
415 },
416 {
417 "", OBJECT_CLASS_DEBRIS, 0, 31, 20, 2, 1280, 0, 0, 0, 0, 0,
418 0, (unsigned char *)g_asMetalSheetAnimation, 0, 0, 1,
419 11
420 },
421 {
422 "", OBJECT_CLASS_DEBRIS, 0, 32, 20, 2, 1280, 0, 0, 0, 0, 0,
423 0, (unsigned char *)g_asDataCapsuleAnimation, 0, 0, 1,
424 2
425 },
426 {
427 "", OBJECT_CLASS_DEBRIS, 0, 33, 20, 2, 768, 0, 0, 0, 0, 0, 0,
428 (unsigned char *)g_asBurningDebrisAnimation, 0, 0, 1,
429 15
430 },
431 {
432 "", OBJECT_CLASS_DEBRIS, 0, 34, 2, 1, 1792, 0, 0, 0, 0, 0, 0,
433 (unsigned char *)g_asORingDebrisAnimation, 0, 0, 1, 5
434 },
435 {
436 "", OBJECT_CLASS_DEBRIS, 0, 35, 6, 1, 1536, 0, 0, 0, 0, 0, 0,
437 (unsigned char *)g_asPipeDebrisAnimation, 0, 0, 1, 5
438 },
439 {
440 "", OBJECT_CLASS_EXPLOSION, 0, 36, 0, 0, 768, 0, 0, -1, 6000,
441 0, 0, (unsigned char *)g_asExplosionSmallAnimation, 0,
442 0, 1
443 },
444 {
445 "", OBJECT_CLASS_EXPLOSION, 0, 37, 0, 0, 1024, 0, 0, -1,
446 6000, 0, 0, (unsigned char
448 },
449 {
450 "", OBJECT_CLASS_EXPLOSION, 0, 38, 0, 0, 336, 0, 0, -1, 6000,
451 0, 0, (unsigned char *)g_asExplosionLargeAnimation, 0,
452 0, 1
453 },
454 {
455 "", OBJECT_CLASS_EXPLOSION, 0, 39, 0, 0, 256, 0, 0, 0, 0, 0,
456 0, (unsigned char *)g_asLaserSparkAnimation, 0, 0, 1
457 },
458 {
459 "", OBJECT_CLASS_EXPLOSION, 0, 40, 0, 0, 256, 0, 0, 0, 0, 0,
460 0, (unsigned char *)g_asRedSparkAnimation, 0, 0, 2, 3
461 },
462 {
463 "", OBJECT_CLASS_EXPLOSION, 0, 41, 0, 0, 256, 0, 0, 0, 0, 0,
464 0, (unsigned char *)g_asBlueSparkAnimation, 0, 0, 2, 3
465 },
466 {
467 "", OBJECT_CLASS_EXPLOSION, 0, 42, 1, 1, 256, 0, 0, 0, 0, 0,
468 0, (unsigned char *)g_asSparkTrailAnimation, 0, 0, 2, 3
469 },
470 { "", OBJECT_CLASS_FIXED_OBJECT, 0, 43, 0, 0, 256 },
471 {
472 "", OBJECT_CLASS_DEBRIS, 0, 44, 6, 10, 512, 0, 0, 0, 0, 0, 0,
473 (unsigned char *)g_asEjectedPilotAnimation, 0, 0, 1, 12
474 },
475 {
476 "", OBJECT_CLASS_EXPLOSION, 0, 45, 0, 0, 1024, 0, 0, 0, 0, 0,
477 0, (unsigned char *)g_asShipDebrisFlashAnimation, 0, 0,
478 1
479 },
480 {
481 "data capsule", OBJECT_CLASS_DEBRIS, 0, 61, 1, 10, 1024, 0, 0, 0, 0, 0, 0, (unsigned char
482 *)g_asDataCapsuleAnimation, 0, 0, 1
483 },
484 {
485 "", OBJECT_CLASS_FIXED_OBJECT, 0, 62, 0, 0, 192, 0, 0, 0, 0,
486 0, 0, 0, 0, 0, 1
487 },
488 {
489 "", OBJECT_CLASS_FIXED_OBJECT, 0, 63, 0, 0, 192, 0, 0, 0, 0,
490 0, 0, 0, 0, 0, 1
491 }
492}; /* 0x00496d30 */
493int g_nUnusedObjectDataWord = 0; /* 0x00499bb4 */ /* no references in the original */
494int g_bSceneDisplayUpdateActive = 0; /* 0x00499bb8 */
495static char g_szTemporaryCampaignGlobalsFile[13] = "TEMPGLOB.000"; /* 0x00499bc0 */
496
497/* Linker commons defined here. LINK lays a unit's commons out by the
498 * identifiers' hash keys, so these spellings follow the original addresses. */
499short *g_pPilotStatus; /* 0x005d2fcc */
int g_nUnusedObjectDataWord
Definition campglob.c:493
static char g_szTemporaryCampaignGlobalsFile[13]
Definition campglob.c:8
static short g_asAsteroidRollAnimation[16]
Definition campglob.c:288
static short g_asPipeDebrisAnimation[8]
Definition campglob.c:269
static short g_asExplosionLargeAnimation[20]
Definition campglob.c:240
static short g_asEjectedPilotAnimation[12]
Definition campglob.c:297
static short g_asAsteroidRollReverseAnimation[16]
Definition campglob.c:294
static short g_asExplosionMediumAnimation[16]
Definition campglob.c:237
static short g_asSparkTrailAnimation[8]
Definition campglob.c:253
static short g_asAsteroidSpinAnimation[16]
Definition campglob.c:285
static short g_asBurningDebrisAnimation[20]
Definition campglob.c:262
static short g_asShipTubingAnimation[8]
Definition campglob.c:259
static short g_asMetalSheetAnimation[16]
Definition campglob.c:272
static short g_asRedSparkAnimation[8]
Definition campglob.c:250
static short g_asChaffPodAnimation[20]
Definition campglob.c:281
static short g_asMineAnimation[12]
Definition campglob.c:278
static short g_asExplosionSmallAnimation[8]
Definition campglob.c:234
static short g_asORingDebrisAnimation[8]
Definition campglob.c:266
static short g_asShipDebrisFlashAnimation[24]
Definition campglob.c:300
static short g_asAsteroidSpinReverseAnimation[16]
Definition campglob.c:291
static short g_asGirderChunkAnimation[8]
Definition campglob.c:256
static short g_asLaserSparkAnimation[8]
Definition campglob.c:244
static short g_asBlueSparkAnimation[8]
Definition campglob.c:247
static short g_asDataCapsuleAnimation[12]
Definition campglob.c:275
void SaveAndFreeTemporaryCampaignGlobals(void)
Definition campglob.c:188
unsigned int GetLargestFreeMemoryBlock(void)
Definition eventmgr.c:1515
short WriteDataFileAtOffset(unsigned short fd, int offset, unsigned int length, const void *data)
Definition datafile.c:28
unsigned int GetAvailableMainMemory(void)
Definition memfree.c:13
short sighted(short objective)
Definition cockpt.c:1134
unsigned int GetLargestMainMemoryBlock(void)
Definition memfree.c:35
short GetInitialMissionShipPilotSaveIndex(short initialShip)
Definition campglob.c:35
int ReadDataFileAtOffset(unsigned short fd, int offset, unsigned int length, void *data)
Definition datafile.c:60
void ReportFatalErrorCode(const char *errorCode)
Definition message.c:29
void * AllocateTaggedMemory(unsigned int size, short flags)
Definition memapi.c:92
short visited(short objective)
Definition cockpt.c:1140
short achieved(short objective)
Definition cockpt.c:1146
void * FetchDiskPacketRetrying(char *fileName, short section, short flags)
Definition disk.c:187
void ReleasePacketSlot(void **slot)
Definition iffload.c:23
void RunLoadedCutscene(void)
Definition gameflow.c:919
void LoadTemporaryCampaignGlobals(void)
Definition campglob.c:180
short GetMissionShipPilotSaveIndex(short missionShip)
Definition campglob.c:11
void RunCampaignScript(short campaignSlot)
Definition campglob.c:126
void DisableMouseCursorDrawing(void)
Definition eventmgr.c:1327
short OpenDataFileOrDie(const char *path)
Definition datafile.c:13
short CreateDataFile(const char *path)
Definition datafile.c:46
void * AllocateScenePointerTable(int count, short elementSize, unsigned short flags, const char *errorMessage)
Definition iffload.c:131
void ClearViewport(Viewport *viewport, short colour)
Definition gr.c:1027
short calculate_damage_level(void)
Definition main.c:1890
void CloseDataFile(unsigned short fd)
Definition datafile.c:22
short GetMissionShipVelocityState(short missionShip)
Definition campglob.c:24
void * LoadWholeDataFile(const char *path)
Definition campglob.c:207
void SetMenuInputPump(void)
Definition eventmgr.c:2106
void ReleasePacketHandle(void *handle)
Definition memapi.c:108
void InitializeCampaignConstellationState(CampaignGlobals *globals, short copyPosition)
Definition campglob.c:98
void FreePacketAndClear(void *slot, unsigned short releaseFlags)
Definition disk.c:45
unsigned int GetAvailableFarMemory(void)
Definition eventmgr.c:1509
unsigned char ParseCutsceneContainer(void *scenePacket)
Definition iffload.c:410
void StoreMissionResultsInCampaignGlobals(CampaignGlobals *globals)
Definition campglob.c:46
Shared Win32 declarations, types and library interfaces.
#define OBJECT_DATA_COUNT
Definition game_data.h:1595
@ OBJECT_CLASS_FIXED_OBJECT
Definition game_data.h:44
@ OBJECT_CLASS_MISSILE
Definition game_data.h:48
@ OBJECT_CLASS_DEBRIS
Definition game_data.h:43
@ OBJECT_CLASS_ASTEROID
Definition game_data.h:46
@ OBJECT_CLASS_PROJECTILE
Definition game_data.h:45
@ OBJECT_CLASS_MINE
Definition game_data.h:47
@ OBJECT_CLASS_EXPLOSION
Definition game_data.h:42
short g_bSkipCampaignScenes
Definition startup.c:581
signed char g_bSceneEscapeRequested
Definition eventmgr.c:2420
CampaignGlobals * g_pCampaignGlobals
Definition gameflow.c:3707
ObjectTypeData g_aObjectTypeData[OBJECT_DATA_COUNT]
Definition campglob.c:310
int g_bSceneDisplayUpdateActive
Definition campglob.c:494
signed char g_acMissionShipStatusFlagsBytes[8]
Definition logic.c:1054
int g_bSkipCampaignVideo
Definition winmain.c:1360
short g_6_bMissionWingmanState
Definition turret.c:1287
int g_nArcadeState
Definition main.c:1938
signed char g_36_cPilotKillCountValue
Definition gameflow.c:3811
Viewport g_2_stModalSourceWindow
Definition message.c:231
signed char g_4_acInitialShipKillNumber[8]
Definition logic.c:1056
signed char g_bCutsceneViewportPreallocated
Definition gameflow.c:3687
MissionShipRecord g_aMissionShips[MISSION_SHIP_COUNT]
Definition hotspot.c:240
PilotProfile g_stCurrentPilotProfile
Definition viewrect.c:73
short g_18_nInterfaceEventMode
Definition eventmgr.c:2570
short g_asShipSide[12]
Definition viewrect.c:139
unsigned char * g_36_apTextGlyphs[4]
Definition cockpt.c:3835
MissionHeader g_13_stMissionHeaderBlock
Definition hotspot.c:253
short * g_pPilotStatus
Definition campglob.c:499
short shipPilotIndices[8]
Definition game_data.h:1156
short objectiveSighted[8]
Definition game_data.h:1151
short objectiveFlags[8]
Definition game_data.h:1150
short pilotStatus[32]
Definition game_data.h:1159
short shipMissionFlags[8]
Definition game_data.h:1155
short shipVelocityState[16]
Definition game_data.h:1153
short shipKillCounts[8]
Definition game_data.h:1154
short initialMissionShips[8]
Definition game_data.h:1347
signed char portrait
Definition game_data.h:1384
short missionScore
Definition game_data.h:1122