Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
killbrd.c
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup campaign
4 * @brief The bar, the kill board, conversation scenes and the initial campaign
5 * state.
6 *
7 * Address range 43f640-44089f. The room state precedes the rank, menu-label
8 * and chalk-board literals.
9 */
10#include "wc1.h"
11
12/* 0x00470090 */
13static const char *pszBlankRoomMenuLabel =
14 " ";
15/* 0x00470098 */
16const char *apszPilotRankNames[5] = {
17 "2ND LT.",
18 "1ST LT.",
19 "CAPTAIN",
20 "MAJOR",
21 "LT. COL."
22};
23/* 0x004700b0 */
25 0,
27 {0, 0, 0, 0, 0},
28 {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
29 0,
30 1,
31 0,
32 {0, 0, 0, 0, 0, 0, 0, 0},
33 {0, 0, 0, 0, 0, 0, 0, 0},
34 {1, 1, 1, 1},
35 {110, 2654},
36 {6, 0},
37 0,
38 0,
39 0,
40 0
41};
42/* 0x00470108 */
44 {"TANAKA", "SPIRIT", 3, 1, 11, 14, 1},
45 {"ST.JOHN", "HUNTER", 4, 2, 25, 32, 4},
46 {"CHEN", "BOSSMAN", 1, 3, 35, 37, 2},
47 {"CASEY", "ICEMAN", 0, 3, 28, 43, 1},
48 {"DEVEREAUX", "ANGEL", 0, 2, 22, 20, 1},
49 {"TAGGART", "PALADIN", 2, 3, 42, 34, 2},
50 {"MARSHALL", "MANIAC", 4, 0, 5, 6, 1},
51 {"KHUMALO", "KNIGHT", 3, 2, 18, 23, 3},
52 {"PELLEY", "GOBLIN", 0, 0, 0, 0, 0}
53};
54/* 0x00470260 */
55static signed char abSpiritRecRoomAnimation[48] = {
56 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 3, 4, 3, 3, 4,
57 3, 4, 3, 4, 5, 3, 4, 5, 3, 4, 3, 4, 3, 4, 5, 3,
58 2, 2, 2, 3, 2, 2, 2, 1, 1, 1, -1, 0, 0, 0, 0, 0
59};
60/* 0x00470290 */
61static signed char abHunterRecRoomAnimation[40] = {
62 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 2, 2,
63 3, 3, 4, 4, 5, 3, 3, 4, 4, 5, 5, 5, 2, 2, 1, 1,
64 0, 0, -1, 0, 0, 0, 0, 0
65};
66/* 0x004702b8 */
67static signed char abAngelRecRoomAnimation[48] = {
68 3, 4, 3, 3, 4, 3, 4, 4, 3, 4, 3, 4, 0, 0, 0, 2,
69 0, 2, 0, 1, 0, 2, 0, 0, 2, 0, 1, 0, 2, 3, 3, 4,
70 3, 4, 4, 5, 5, 5, 5, 5, -1, 0, 0, 0, 0, 0, 0, 0
71};
72/* 0x004702e8 */
73static signed char abKnightRecRoomAnimation[40] = {
74 0, 0, 0, 0, 0, 1, 0, 1, 0, 5, 0, 0, 1, 2, 3, 4,
75 4, 3, 2, 2, 2, 3, 4, 4, 5, 5, 0, 0, 1, 0, 1, 2,
76 1, 0, 1, -1, 0, 0, 0, 0
77};
78/* 0x00470310 */
79static signed char abIcemanRecRoomAnimation[40] = {
80 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 3, 3, 3, 3,
81 4, 4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 3,
82 3, 2, 2, 1, 0, 0, -1, 0
83};
84/* 0x00470338 */
85static signed char abManiacRecRoomAnimation[24] = {
86 0, 1, 2, 0, 1, 2, 0, 3, 2, 0, 1, 1,
87 0, 4, 2, 0, 1, 2, 0, 5, 5, 5, 5, -1
88};
89/* 0x00470350 */
90static signed char abPaladinRecRoomAnimation[56] = {
91 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 2, 2, 2, 3, 2,
92 2, 3, 2, 3, 2, 3, 2, 4, 4, 2, 3, 2, 3, 2, 3, 2,
93 3, 2, 3, 4, 4, 5, 5, 4, 4, 4, 4, 5, 5, 4, 2, 2,
94 2, -1, 0, 0, 0, 0, 0, 0
95};
96/* 0x00470388 */
97static signed char abBossmanRecRoomAnimation[48] = {
98 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 1, 3, 1, 3,
99 0, 3, 0, 3, 0, 2, 1, 2, 1, 3, 3, 4, 5, 5, 4, 5,
100 4, 5, 1, 3, 1, 3, 1, 3, -1, 0, 0, 0, 0, 0, 0, 0
101};
102/* 0x004703b8 */
103static signed char abShotglassIdleAnimation[24] = {
104 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 0,
105 0, 3, 3, 3, -1, 0, 0, 0, 0, 0, 0, 0
106};
107/* 0x004703d0 */
108static signed char abShotglassGlassAnimation[32] = {
109 3, 6, 7, 8, 8, 9, 9, 10, 10, 10, 12, 11, 10, 12, 11, 10,
110 12, 11, 10, 12, 11, 10, 13, 13, 13, 10, 9, 8, 8, 3, 3, -1
111};
112/* 0x004703f0 */
113static signed char abShotglassPourAnimation[80] = {
114 3, 3, 6, 6, 7, 8, 8, 14, 15, 15, 16, 17, 18, 18, 18, 18,
115 17, 19, 19, 20, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21,
116 22, 22, 23, 24, 24, 25, 25, 26, 26, 27, 28, 28, 28, 29, 30, 31,
117 31, 31, 31, 31, 32, 32, 31, 31, 31, 33, 33, 32, 34, 34, 35, 35,
118 36, 36, 37, 37, 37, 38, 38, 39, 40, 3, 3, 3, -1, 0, 0, 0
119};
120/* 0x00470440 */
121static signed char abShotglassWipeAnimation[24] = {
122 3, 4, 3, 4, 5, 3, 4, 3, 5, 6, 3, 3,
123 3, 3, 4, 3, 4, 3, -1, 0, 0, 0, 0, 0
124};
125/* 0x00470458 */
142/* 0x00470490 */
144 {94, 59}, {161, 79}, {202, 79}
145};
146/* 0x0047049c */
148/* 0x004704a0 */
150 { 1, 94, 59, 130, 95 },
151 { 1, 161, 79, 180, 95 },
152 { 1, 210, 79, 240, 95 },
153 { 1, 180, 50, 250, 75 },
154 { 1, 275, 50, 319, 135 },
155 { 1, 0, 100, 120, 190 },
156 { -1, 0, 0, 0, 0 }
157};
158/* 0x004704e8 */
159static char *apszRecRoomBaseLabels[3] = {
160 "Talk to SHOTGLASS.",
161 "Talk to ??????????????",
162 "Talk to ??????????????"
163};
164/* 0x004704f8 */
165static char *apszRecRoomMenuLabels[6] = {
166 0, 0, 0,
167 "Check pilot scores",
168 "Enter barracks",
169 "Fly training mission"
170};
171/* 0x00470510 */
173/* 0x00470514 */
175/* 0x00470518 */
176static short asChalkBoardPilotOrder[9] = {
177 0, 1, 2, 3, 4, 5, 6, 7, 8
178};
179
180struct Shape *pRecRoomBgShape; /* 0x00598a50 */
183unsigned char *apRecRoomTxtDataArray[3]; /* 0x00598aa0 */
185unsigned char *apRecRoomSceneDataList[3]; /* 0x00598ae0 */
186unsigned char *pBriefingPacket; /* 0x00598aec */
187
188/* Function start: 0x43F640 */
190{
191 short pilot;
192
193 for (pilot = 0; pilot < 8; pilot++) {
194 apWingmanPilotsList[pilot] =
195 &aPilotEntriesList[pilot];
196 }
203}
204
205/* Function start: 0x43F690 */
210
211/* Function start: 0x43F6A0 */
213{
215}
216
217/* Function start: 0x43F6B0 */
218void DrawRoomMenuLabel(TextContext *context, const char *label)
219{
221 SetTextContext(context);
222 FormatTextBufferFromStart("%X%Y%s%P",
223 0, 188,
225}
226
227/* Function start: 0x43F6F0 */
236
237/* Function start: 0x43F720 */
242
243/* Function start: 0x43F730 */
245{
246 const char *label;
247
248 label = stCurrentRoomMenu.labels[i];
249 if (label != 0)
251}
252
253/* Function start: 0x43F750 */
254void InitializeRoomMenu(const TitleMenuRegion *regions, char **labels,
255 Viewport *viewport, char *text,
256 unsigned char alignment)
257{
258 stCurrentRoomMenu.regions = regions;
259 stCurrentRoomMenu.labels = labels;
265 stCurrentRoomMenu.text.alignment = alignment;
266 *text = ""[0];
269 -1);
271}
272
273/* Function start: 0x43F7C0 */
274int FindMenuRegionAtPoint(short x, short y,
275 const TitleMenuRegion *regions)
276{
277 short index;
278
279 for (index = 0; regions->frame != -1; index++, regions++) {
280 if (IsPointInRect(x, y, &regions->left) != 0)
281 return index;
282 }
283 return -1;
284}
285
286/* Function start: 0x43F810 */
303
304/* Empty hidden routines of the event manager (eventmgr.c and strdos.c). */
305void RefreshMouseCursorHook(void); /* 0x00435DF0 */
306void ReleaseEventManagerPointerHook(void); /* 0x004355B0 */
307
308/* Function start: 0x43F8B0 */
309/* No inbound reference is known in the shipped executable; this routine is
310 * believed unreachable. */
329
330/* Function start: 0x43F940 */
331short RecRoom(void)
332{
333 InputEventState event;
334 ShortRect firstPilotBounds;
335 ShortRect nextFrameBounds;
336 ShortRect secondPilotBounds;
337 Viewport bottomDestination;
338 Viewport bottomSource;
339 Viewport pilotDestination;
340 Viewport pilotWork;
341 Viewport shotglassDestination;
342 Viewport shotglassWork;
343 signed char animationIds[3];
344 signed char *animations[3];
345 signed char animationId;
346 unsigned char clicked;
347 unsigned char firstFrame;
348 short characterMask;
349 short eventType;
350 short index;
351 short personality;
352 short refreshRoom;
353 short region;
354 short result;
355 int lastChalkboardTick;
356
357 result = 0;
358 lastChalkboardTick = 0;
359 firstFrame = 0;
366
368 spacetrack(30, 2, 1);
374
375 animationIds[0] = (signed char)(RandomInRange(0, 3) + 9);
379 aRecRoomMenuRegions[0].left = 400;
380 aRecRoomMenuRegions[0].top = 400;
381 aRecRoomMenuRegions[0].right = 401;
383 *(ShortRect *)&aRecRoomMenuRegions[1].left =
385 *(ShortRect *)&aRecRoomMenuRegions[2].left =
387
389 FetchDiskPacketRetrying(5, 11, 0);
394
395 animationIds[1] = (signed char)pRecRoomRoster[
398 if (animationIds[1] != -1) {
399 personality = (short)animationIds[1];
401 .personalityDeathMission[personality] == 0) {
404 5, (short)(personality + 3), 0);
406 &aRecRoomMenuRegions[1].left,
410 sprintf(apszRecRoomBaseLabels[1],
411 "Talk to %s.",
412 apWingmanPilotsList[personality]->callsign);
413 } else {
414 sprintf(apszRecRoomBaseLabels[1],
415 "");
416 }
417 }
418
419 animationIds[2] = (signed char)pRecRoomRoster[
422 /* The original tests the first pilot's sentinel here too. */
423 if (animationIds[1] != -1) {
424 personality = (short)animationIds[2];
426 .personalityDeathMission[personality] == 0) {
429 5, (short)(personality + 3), 0);
431 &aRecRoomMenuRegions[2].left,
435 sprintf(apszRecRoomBaseLabels[2],
436 "Talk to %s.",
437 apWingmanPilotsList[personality]->callsign);
438 } else {
439 sprintf(apszRecRoomBaseLabels[2],
440 "");
441 }
442 }
443
444 characterMask = 0;
446 if (apRecRoomFigureShapes[2] != 0)
447 characterMask = 1;
448 if (apRecRoomFigureShapes[1] != 0)
449 characterMask = 2;
450 if (apRecRoomFigureShapes[1] != 0 &&
451 apRecRoomFigureShapes[2] != 0)
452 characterMask = 3;
453
454 SetViewportRect(&stSceneBuffer, 0, 0, 319, 199);
459 54, 35, 146, 72);
461 -1, 6);
462
463 animations[0] = abShotglassIdleAnimation;
464 animations[1] =
465 apRecRoomAnimations[animationIds[1]];
466 animations[2] =
467 apRecRoomAnimations[animationIds[2]];
471 szDefaultTxtBuf, 2);
472
473 bottomSource = stSceneBuffer;
474 SetViewportRect(&bottomSource, 0, 187, 319, 199);
475 bottomDestination = stRoomScreenViewport;
476 SetViewportRect(&bottomDestination, 0, 187, 319, 199);
480 bInputModeState = 1;
482
483 pilotWork = stSceneBuffer;
484 shotglassWork = stSceneBuffer;
485 pilotDestination = stRoomScreenViewport;
486 shotglassDestination = stRoomScreenViewport;
487
488 if (apRecRoomFigureShapes[2] != 0) {
490 &secondPilotBounds.left,
494 (short)*animations[2]);
495 }
496 if (apRecRoomFigureShapes[1] != 0) {
498 &firstPilotBounds.left,
502 (short)*animations[1]);
503 }
504 if (apRecRoomFigureShapes[1] != 0) {
505 *(ShortRect *)&pilotWork.left = firstPilotBounds;
506 if (apRecRoomFigureShapes[2] != 0) {
507 UnionRectBounds((ShortRect *)&pilotWork.left,
508 &firstPilotBounds, &secondPilotBounds);
509 }
510 } else if (apRecRoomFigureShapes[2] != 0) {
511 *(ShortRect *)&pilotWork.left = secondPilotBounds;
512 }
513 *(ShortRect *)&pilotDestination.left =
514 *(ShortRect *)&pilotWork.left;
515
516 WarpMouseTo(160, 100);
518 &shotglassWork.left,
522 (short)*animations[0]);
523
524 while (result == 0) {
525 if (firstFrame == 0) {
527 pRecRoomBgShape, 0);
528 if (characterMask != 0) {
531 characterMask);
532 }
534 }
535
536 if ((short)IsFrameTickElapsed() != 0) {
537 DrawSpriteDefault(&pilotWork, 0, 0,
538 pRecRoomBgShape, 0);
539 for (index = 0; index < 3; index++) {
540 if (apRecRoomFigureShapes[index] != 0) {
541 if (*animations[index] == -1) {
542 if (index == 0) {
543 animationId =
544 (signed char)(RandomInRange(0, 3) + 9);
545 if (animationId == 11 &&
546 RandomInRange(0, 3) != 0)
547 animationId--;
548 } else {
549 animationId = animationIds[index];
550 }
551 animations[index] =
552 apRecRoomAnimations[animationId];
553 }
554
555 if (index > 0) {
557 &pilotWork,
560 apRecRoomFigureShapes[index], 0);
562 &pilotWork,
566 (short)*animations[index]++);
567 } else {
569 (ShortRect *)&shotglassWork.left,
570 (ShortRect *)&shotglassWork.left,
574 &shotglassWork, 0, 0,
575 pRecRoomBgShape, 0);
577 &shotglassWork,
581 (short)*animations[index]++);
583 &nextFrameBounds.left,
587 (short)*animations[index]);
588 if (firstFrame != 0) {
589 *(ShortRect *)&shotglassDestination.left =
590 *(ShortRect *)&shotglassWork.left;
592 &nextFrameBounds) != 0) {
595 &shotglassWork,
596 &shotglassDestination);
598 } else {
600 &shotglassWork,
601 &shotglassDestination);
602 }
603 }
604 }
605 }
606 }
607
608 if (firstFrame == 0) {
609 firstFrame = 1;
610 if (bPanRoomTransition != 0) {
614 } else {
618 }
620 } else if (apRecRoomFigureShapes[1] != 0 ||
621 apRecRoomFigureShapes[2] != 0) {
623 (ShortRect *)&pilotWork.left) != 0) {
625 CopyViewportContents(&pilotWork,
626 &pilotDestination);
628 } else {
629 CopyViewportContents(&pilotWork,
630 &pilotDestination);
631 }
632 }
633
635 CopyViewportContents(&bottomSource, &bottomDestination);
639 }
640
641 eventType = PollInputEvent(&event, 0xff);
642 switch (eventType) {
643 case 3:
644 case 5:
645 clicked = 0;
647 switch ((short)event.value) {
648 case 0x1c:
649 case 0x39:
650 clicked = 1;
651 break;
652 default:
654 break;
655 }
656 if (clicked == 0)
657 break;
658 /* Fall through to the shared mouse/keyboard activation. */
659 case 2:
660 case 10:
661 refreshRoom = 1;
662 region = FindMenuRegionAtPoint(
663 event.x, event.y, aRecRoomMenuRegions);
665 switch (region) {
666 case 1:
667 case 2:
668 if (apRecRoomFigureShapes[region] == 0)
669 break;
670 /* Shotglass enters this path without the shape check. */
671 case 0:
674 stSceneBuffer.bottom = 127;
675 stScreenView.top = 24;
676 stScreenView.bottom = 151;
682 5, 1, 0);
684 2,
686 apRecRoomTxtDataArray[region]);
692 stScreenView.top = 0;
693 stScreenView.bottom = 199;
694 stSceneBuffer.bottom = 199;
706 5, 0, 0);
709 break;
710 case 3:
712 if ((int)(nTickCount60Hz - lastChalkboardTick) >
716 lastChalkboardTick = (int)nTickCount60Hz;
717 }
718 break;
719 case 4:
720 case 5:
721 result = region;
722 break;
723 default:
724 refreshRoom = 0;
726 break;
727 }
728
731 bInputModeState = 1;
732 if (refreshRoom != 0)
733 firstFrame = 0;
734 break;
735 case 13:
737 break;
738 }
739
741 DIBslam();
742 DIBslamReal();
743 }
744
761 return result;
762}
763
764/* Function start: 0x4404E0 */
765/* No inbound reference is known in the shipped executable; this routine is
766 * believed unreachable. */
768{
771 return 0;
772}
773
774/* Function start: 0x4404F0 */
775/* No inbound reference is known in the shipped executable; this routine is
776 * believed unreachable. */
778{
780 DAT_0059a9f0 = 20;
781 nInputTickScale = 20;
782 return 1;
783}
784
785/* Function start: 0x440510 */
787{
788 InputEventState event;
789 TextContext context;
790 TextContext *previousContext;
791 struct Shape *background;
792 unsigned char done;
793 unsigned char savedInputMode;
794 char pilotName[20];
795 short other;
796 short index;
797 short pilot;
798 short rowY;
799 short swap;
800
801 done = 0;
802 for (index = 0; index < 9; index++) {
803 for (other = index; other < 9; other++) {
804 if (aPilotEntriesList[asChalkBoardPilotOrder[index]].kills * 1000 -
805 aPilotEntriesList[asChalkBoardPilotOrder[index]].missions + 1 <
806 aPilotEntriesList[asChalkBoardPilotOrder[other]].kills * 1000 -
807 aPilotEntriesList[asChalkBoardPilotOrder[other]].missions + 1) {
808 swap = asChalkBoardPilotOrder[other];
811 asChalkBoardPilotOrder[index] = swap;
812 }
813 }
814 }
815
816 context.colour = 0;
817 context.backgroundColour = 0;
819 background = FetchDiskPacketRetrying(5, 2, 0);
820 previousContext = pCurTextContext;
821 context.viewport = &stModalSrcViewport;
824 context.text = szDefaultTxtBuf;
825 savedInputMode = bInputModeState;
826 bInputModeState = 1;
827 do {
829 if (PeekInputEvent(&event, 10) != 0 ||
830 PeekInputEvent(&event, 2) != 0 ||
831 PeekInputEvent(&event, 3) != 0)
832 done = 1;
833
835 0, 0, background, 0);
836 context.alignment = 2;
837 SetTextContext(&context);
838 FormatTextBufferFromStart("%X%YCARRIER - TIGER'S CLAW%P",
839 0, 10);
840 DrawFormattedText("%X%YPILOT",
841 60, 24);
842 DrawFormattedText("%X%YSORTIES KILLS",
843 185, 24);
844 rowY = 46;
845 index = 0;
846 for (; index < 9; index++, rowY = (short)(rowY + 16)) {
847 pilot = asChalkBoardPilotOrder[index];
848 DosStrcpy(pilotName, aPilotEntriesList[pilot].name);
849 strupr(pilotName);
850 DrawFormattedText("%X%Y%s %s",
851 10, rowY,
853 pilotName);
854 if (pilot == 8 ||
856 .personalityDeathMission[pilot] == 0) {
857 DrawFormattedText("%X%Y%d%X%d",
858 230, rowY,
859 aPilotEntriesList[pilot].missions,
860 280,
861 aPilotEntriesList[pilot].kills);
862 } else {
863 DrawFormattedText("%X%Y %s",
864 230, rowY,
865 "KIA");
866 }
867 }
868 DIBslam();
869 DIBslamReal();
870 } while (done == 0);
871
873 ReleasePacketHandle(background);
874 pCurTextContext = previousContext;
876 bInputModeState = savedInputMode;
878}
879
880/* Function start: 0x440800 */
892
893/* Function start: 0x440840 */
895 void *destination,
896 unsigned int length)
897{
898 int end;
899 int offset;
900
901 offset = (int)(handle->dataOffset + handle->position);
902 end = (int)(handle->dataOffset + handle->dataSize);
903 if (destination == 0)
904 return 0;
905 if (end < (int)(offset + length) || length == (unsigned int)-1)
906 length = (unsigned int)(end - offset);
907 if (ReadDataFileAtOffset((unsigned short)handle->file, offset,
908 length, destination) == 0)
909 return 0;
910 handle->position += length;
911 return 1;
912}
void RefreshMouseCursorHook(void)
Definition eventmgr.c:411
unsigned char bEscapePressedFlag
Definition mathfp.c:24
unsigned char * pBriefingPacket
Definition killbrd.c:186
short nCampaignDataSet
Definition gameflow.c:30
Viewport stConstellationViewport
Definition launch.c:43
struct Shape * pRecRoomBgShape
Definition killbrd.c:180
unsigned char cBlackColour
Definition init.c:12
CampaignDate * pElapsedCampaignDatePtr
Definition mission.c:59
int nInputTickScale
Definition data.c:245
short nUnusedInputTimerFlag
Definition data.c:241
char szTxtWorkspaceBuffer[256]
Definition screens.c:164
Viewport stRoomScreenViewport
Definition gr.c:1526
TextContext * pCurTextContext
Definition data.c:244
unsigned char cViewportClearColour
Definition init.c:13
CampaignState stInitialCampaignState
Definition killbrd.c:24
short nMenuPointerSpeed
Definition input.c:11
unsigned char bInputModeState
Definition eventmgr.c:21
short DAT_0059a9f0
Definition eventmgr.c:33
unsigned char * apRecRoomTxtDataArray[3]
Definition killbrd.c:183
MouseCursorState stMouseCursorState
Definition strdos.c:19
Viewport stSceneBuffer
Definition select.c:17
char szDefaultTxtBuf[0xc8]
Definition timer.c:18
unsigned char * apRecRoomSceneDataList[3]
Definition killbrd.c:185
Viewport stScreenView
Definition launch.c:50
Viewport stCurrentRoomMouseView
Definition killbrd.c:182
int nTickCount60Hz
Definition mathfp.c:23
PilotRecord * apWingmanPilotsList[8]
Definition gr.c:1533
Viewport stRoomDisplayView
Definition killbrd.c:181
CampaignState stCampaignState
Definition dib.c:107
struct Shape * pCurrentConversationBackdropShapePtr
Definition screens.c:166
Viewport stModalSrcViewport
Definition select.c:14
short nMenuInputRepeatDelay
Definition objdata.c:597
short nSavedRoomCtrlX
Definition gr.c:1527
int bPanRoomTransition
Definition killbrd.c:172
unsigned char * pRecRoomRoster
Definition gr.c:1528
const char * apszPilotRankNames[5]
Definition killbrd.c:16
short asCampaignPilotFiles[3]
Definition barracks.c:56
PilotRecord aPilotEntriesList[9]
Definition gr.c:1531
RoomMenu stCurrentRoomMenu
Definition killbrd.c:184
struct Shape * apRecRoomFigureShapes[3]
Definition gr.c:1530
CampaignDate * pCurrentCampaignDate
Definition mission.c:58
static signed char abShotglassGlassAnimation[32]
Definition killbrd.c:108
static CampaignDate stChalkBoardDate
Definition killbrd.c:174
static signed char abPaladinRecRoomAnimation[56]
Definition killbrd.c:90
static TitleMenuRegion aRecRoomMenuRegions[7]
Definition killbrd.c:149
static signed char * apRecRoomAnimations[14]
Definition killbrd.c:126
void ReleaseEventManagerPointerHook(void)
Definition strdos.c:115
static const char * pszBlankRoomMenuLabel
Definition killbrd.c:13
short SuspendMouseCursor(void)
Definition killbrd.c:767
static signed char abHunterRecRoomAnimation[40]
Definition killbrd.c:61
static signed char abKnightRecRoomAnimation[40]
Definition killbrd.c:73
static ShortPoint stRecRoomPanelOrigin
Definition killbrd.c:147
static signed char abShotglassPourAnimation[80]
Definition killbrd.c:113
static signed char abShotglassWipeAnimation[24]
Definition killbrd.c:121
static signed char abShotglassIdleAnimation[24]
Definition killbrd.c:103
void DrawMouseCursorIntoViewport(Viewport *viewport)
Definition killbrd.c:311
static signed char abAngelRecRoomAnimation[48]
Definition killbrd.c:67
static PilotRecord aInitialPilotRecords[9]
Definition killbrd.c:43
static signed char abManiacRecRoomAnimation[24]
Definition killbrd.c:85
static signed char abSpiritRecRoomAnimation[48]
Definition killbrd.c:55
short InitializeEventManagerTiming(void)
Definition killbrd.c:777
static signed char abBossmanRecRoomAnimation[48]
Definition killbrd.c:97
static char * apszRecRoomBaseLabels[3]
Definition killbrd.c:159
static short asChalkBoardPilotOrder[9]
Definition killbrd.c:176
static ShortPoint aRecRoomCharacterOrigins[3]
Definition killbrd.c:143
static char * apszRecRoomMenuLabels[6]
Definition killbrd.c:165
static signed char abIcemanRecRoomAnimation[40]
Definition killbrd.c:79
PilotRecord * currentPilot
Definition wcdata.h:710
CampaignDate currentDate
Definition wcdata.h:720
CampaignDate elapsedDate
Definition wcdata.h:721
signed char currentSeries
Definition wcdata.h:715
signed char currentMission
Definition wcdata.h:714
unsigned int value
Definition wc1base.h:140
Viewport * viewport
Definition wc1base.h:110
unsigned int reservedAfterFrame
Definition wc1base.h:109
struct Shape * shape
Definition wc1base.h:107
unsigned char shapeChanged
Definition wc1base.h:112
unsigned short frame
Definition wc1base.h:108
unsigned int dataOffset
Definition wcdata.h:757
unsigned int dataSize
Definition wcdata.h:759
unsigned int position
Definition wcdata.h:758
const char * currentLabel
Definition wc1base.h:290
char ** labels
Definition wc1base.h:289
TextContext text
Definition wc1base.h:291
short cursorFrame
Definition wc1base.h:287
const struct TitleMenuRegion * regions
Definition wc1base.h:288
short y
Definition wcdata.h:416
short x
Definition wcdata.h:415
short left
Definition wcdata.h:440
unsigned char colour
Definition wc1base.h:240
char * text
Definition wc1base.h:242
unsigned char backgroundColour
Definition wc1base.h:241
char * textCursor
Definition wc1base.h:243
Viewport * viewport
Definition wc1base.h:236
unsigned char alignment
Definition wc1base.h:244
short right
Definition wc1base.h:78
short bottom
Definition wc1base.h:79
short left
Definition wc1base.h:76
short top
Definition wc1base.h:77
Umbrella header for the game core.
unsigned int InitializeConversationText(void)
Definition main.c:448
short RecRoom(void)
Definition killbrd.c:331
void FormatTextBufferFromStart(const char *format,...)
Definition cockpt.c:211
void LeaveAllocationScope(void)
Definition eventmgr.c:556
short __stdcall IsPointInRect(short x, short y, const short *rect)
Definition mathfp.c:217
void DIBslam(void)
Definition dib.c:513
void MoveMenuPointerFromKeyboard(InputEventState *event)
Definition disk.c:551
void * LoadPacketAllocated(short logicalFile, short section)
Definition disk.c:94
unsigned int InitializeTextContextFromFont(TextContext *context, short fontIndex, unsigned char colour, signed char background)
Definition disk.c:192
short __stdcall PollInputEvent(InputEventState *event, short filter)
Definition eventmgr.c:336
char IsRoomMenuLabelEmpty(void)
Definition killbrd.c:212
void ClearRoomMenuLabel(void)
Definition killbrd.c:206
short __stdcall ReadPacketSectionData(PacketSectionHandle *handle, void *destination, unsigned int length)
Definition killbrd.c:894
unsigned short __stdcall AllocateViewport(Viewport *viewport, short clearColour, short flags)
Definition view.c:758
void UpdateRoomMenuCursor(void)
Definition main.c:2181
void * FetchDiskPacketRetrying(short logicalFile, short section, short flags)
Definition disk.c:126
void InitializeRoomViewports(void)
Definition killbrd.c:287
void ClearInputKeyStatePreservingModifiers(void)
Definition eventmgr.c:787
unsigned int spacetrack(int track, int mode, short enabled)
Definition music.c:411
int FindMenuRegionAtPoint(short x, short y, const TitleMenuRegion *regions)
Definition killbrd.c:274
unsigned int DrawConstellationField(void)
Definition view.c:289
void DrawSpriteDefault(Viewport *viewport, short x, short y, struct Shape *shape, short frame)
Definition gr.c:660
int __stdcall ReadDataFileAtOffset(unsigned short fd, int offset, unsigned int length, void *data)
Definition mono.c:61
int IsFrameTickElapsed(void)
Definition eventmgr.c:629
void StopMusicUnlessSuppressed(void)
Definition music.c:419
void FlushInputEvents(void)
Definition eventmgr.c:381
void DIBslamReal(void)
Definition dib.c:519
unsigned int PreloadMusicTrackHook(short track)
Definition logic.c:2044
unsigned int SceneDirector(short sceneType, unsigned char *sceneData, unsigned char *textData)
Definition screens.c:1212
void InitializeRoomMenu(const TitleMenuRegion *regions, char **labels, Viewport *viewport, char *text, unsigned char alignment)
Definition killbrd.c:254
unsigned int init_constellation(short scene)
Definition logic.c:1665
void __stdcall SetEventManagerPump(void(*pump)(void))
Definition strdos.c:126
void __stdcall SetTextContext(TextContext *context)
Definition mathfp.c:152
unsigned short __stdcall ShouldSuspendCursorForRect(const ShortRect *bounds)
Definition screen.c:320
void ClearRoomMenuCursorFrame(void)
Definition killbrd.c:238
void EnterAllocationScope(void)
Definition eventmgr.c:550
unsigned int PumpWindowMessages(void)
Definition winmain.c:740
char *__stdcall DosStrcpy(char *dst, const char *src)
Definition strdos.c:49
void CheckCursor(void)
Definition eventmgr.c:405
void __stdcall SetFrameTimerPeriodDirect(short p)
Definition eventmgr.c:617
void __stdcall WarpMouseTo(short x, short y)
Definition winmain.c:501
unsigned int ReleaseMusicTrackHook(short track)
Definition logic.c:2051
void __stdcall PanToScreen(Viewport *source, Viewport *destination)
Definition screens.c:1571
void RefreshRoomMenuLabel(void)
Definition killbrd.c:228
unsigned int free_constellation(void)
Definition logic.c:1697
void ClearViewport(Viewport *viewport, short colour)
Definition gr.c:963
void PollMenuInputDevices(void)
Definition input.c:110
short __stdcall GetShapeFrameBounds(short *bounds, short x, short y, struct Shape *shape, short frame)
Definition mathfp.c:195
unsigned int LoadBriefingData(short series, short mission)
Definition cmpgn.c:513
void SelectRoomMenuLabel(short i)
Definition killbrd.c:244
void CorrectPointers(void)
Definition killbrd.c:189
void __stdcall free_viewport(Viewport *viewport)
Definition gameflow.c:420
void CaptureSpriteBackground(Viewport *viewport, unsigned char *background, short x, short y, struct Shape *shape, short frame)
Definition gr.c:669
void ReleasePacketHandle(void *handle)
Definition ending.c:50
void __stdcall SetViewportRect(Viewport *viewport, unsigned short left, unsigned short top, unsigned short right, unsigned short bottom)
Definition screens.c:1560
void __stdcall EventManagerHook(void(*callback)(void))
Definition strdos.c:120
unsigned int ShowMemoryStatusDebug(void)
Definition main.c:135
void __stdcall UnionRectBounds(ShortRect *destination, const ShortRect *first, const ShortRect *second)
Definition joycal.c:255
void FreePacketAndClear(void *slot, unsigned short releaseFlags)
Definition mathutil.c:37
unsigned int ReleaseTextFont(short fontIndex)
Definition disk.c:222
void ResetCampaignData(void)
Definition killbrd.c:881
short __stdcall RandomInRange(short lo, short hi)
Definition mathfp.c:49
unsigned int InitializeConstellationField(Viewport *viewport, short direction, short density)
Definition view.c:238
void InitializeTrainSimHighScores(void)
Definition trainsim.c:199
void DrawFormattedText(const char *format,...)
Definition cockpt.c:197
void ShowChalkBoard(void)
Definition killbrd.c:786
void CopyViewportContents(Viewport *source, Viewport *destination)
Definition gr.c:945
void DrawRoomMenuLabel(TextContext *context, const char *label)
Definition killbrd.c:218
short __stdcall PeekInputEvent(InputEventState *event, short type)
Definition eventmgr.c:343
@ OBJECT_TYPE_HORNET
Definition wcdata.h:55