31 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
32 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0
36 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
37 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0
44 { 60, 123, 10, 95, 176, 1, 0, 2,
46 {316, 123, 264, 94, 176, 1, 2, 1,
48 {193, 123, 141, 95, 176, 1, 3, 1,
50 {250, 124, 199, 93, 176, 1, 4, 1,
52 {124, 123, 71, 94, 176, 1, 5, 1,
54 {103, 122, 29, 76, 256, 1, 6, 2,
56 {191, 122, 118, 76, 256, 1, 8, 1,
58 {287, 122, 212, 76, 256, 1, 9, 1,
69 "Terran Medal of Valor"
75 "$R $N, aka $C.\n$S system, dateline $D.";
78 { 0, 0, -2, -2, -1, -2, -4, -3, -5, -7, -7, -4},
79 { -1, 0, -2, -3, -3, -4, -3, -4, -6, -8, -7, -6},
80 { 0, 1, 0, 0, 0, 0, 0, -1, -2, -4, -5, -3},
81 { 0, -1, -2, -3, -1, -3, -2, -3, -4, -4, -5, -4},
82 { 2, 0, 0, 0, 0, 0, 0, 0, -2, -3, -4, -2},
83 { 1, 1, 1, 0, 1, 0, -6, -4, -4, -9, -8, -6},
84 { -2, -1, -4, -4, -4, -7, -8, -7, -5, -8, -9, -7},
85 { 0, 0, 0, 0, 0, -3, -3, -7, -5, -7, -8, -7}
89 { -6, -2, -3, -1, -4,-10,-12,-20,-32,-38,-42,-43},
90 { -5, 0, -4, -4, -7,-12,-16,-23,-32,-37,-42,-42},
91 { -5, -3, 0, 1, 0, -7,-13,-23,-33,-38,-42,-42},
92 { -3, -2, -1, 0, -5,-10,-16,-25,-33,-38,-41,-41},
93 { -6, 0, 2, 0, -6,-11,-18,-25,-33,-39,-42,-42},
94 { -8, -2, 1, -3, -6,-16,-23,-35,-46,-55,-61,-61},
95 { -6, -4, -3, -5, -9,-14,-23,-34,-49,-57,-61,-62},
96 {-10, -5, 0, 0, -3, -7,-24,-32,-47,-55,-59,-60}
100 {357, 357, 357, 359, 355, 0, 352, 355, 353, 353, 355, 1},
101 {355, 0, 354, 354, 352, 354, 355, 355, 352, 352, 353, 350},
102 {354, 354, 359, 0, 358, 357, 357, 356, 357, 0, 0, 2},
103 {354, 354, 353, 356, 358, 356, 356, 355, 356, 0, 357, 357},
104 { 0, 0, 0, 0, 358, 0, 358, 0, 0, 4, 0, 359},
105 { 0, 358, 358, 0, 357, 0, 350, 354, 357, 354, 0, 358},
106 {356, 356, 352, 354, 352, 349, 350, 352, 0, 0, 0, 0},
107 { 0, 0, 0, 359, 0, 350, 354, 350, 356, 357, 357, 357}
111 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4
115 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6
119 2, 2, 3, 4, 4, 4, 5, 5, 5, 6, 7, 8
123 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
124 10, 11, 12, 13, 14, 15, 15, 15, 15, 15,
125 15, 15, 15, 15, 14, 13, 12, 11, 10, 9,
126 8, 7, 6, 5, 4, 0, 0, 0, 0, 0
131 -2, -2, -1, -1, 0, 0, 1, 0,
132 1, 0, 1, 0, 1, 0, 1, 1,
133 1, 1, 1, 1, 1, 1, 1, 1,
134 1, 1, 1, 1, 1, 1, 1, 1,
135 1, 1, 1, 1, 0, 1, 0, 1,
136 0, 1, 0, 1, 0, 0, -1, -1, -2, -2
223 unsigned char clicked;
224 unsigned char savedInputMode;
246 "%X%Y%F%s%P", 0, 160,
278 switch (medalIndex) {
353 offset = (short)(offset + 2);
356 }
while (offset < 162);
392 while (*animation != -1) {
393 if (countdown-- == 0) {
394 if (*animation != -1)
396 switch (*animation) {
402 countdown = (short)(animation[1] * 2);
457 for (frame = 0; frame < 32; frame++) {
459 scale = (short)(0xc800L / distance);
496 while (escaped == 0) {
504 (
short)(frame % 3 + 38));
524 unsigned short medalRowY;
545 for (badge = 0; badge < 12; badge++) {
548 rowY = (short)(rowY + 3);
553 (
short)(badge + 13));
557 rowY = (short)(rowY + 5);
559 for (medal = 0; medal < 5; medal++) {
569 (
short)(medal + 25));
570 stack = (short)(stack + 2);
575 (
short)(medal + 28));
614 for (character = 0; character < 8; character++) {
618 .animation[frameIndex],
630 }
while (frame < 22);
653 for (character = 0; character < 8; character++) {
663 char active[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
665 char *characterActive;
684 for (character = 0; character < 8; character++) {
695 for (character = 0; character < 8; character++) {
696 characterActive = &active[character];
697 if (*characterActive == 0 &&
699 *characterActive = 1;
702 character, *phase, 0,
707 if (*characterActive == 1 && *phase < 11)
785 if (podiumFrame < 34)
798 podiumX = (short)(podiumX + podiumDelta);
799 rightX = (short)(rightX + rightDelta);
801 leftX = (short)(leftX + leftDelta);
804 }
while (frame < 32);
852 const signed char *delta;
878 MaxShort((
short)(delta[0] + 1), 0));
881 MaxShort((
short)(delta[0] + 2), 0));
884 MaxShort((
short)(delta[0] + 3), 0));
887 MaxShort((
short)(delta[0] + 3), 0));
933 if (deathMission == 0)
937 if (currentMission == deathMission)
939 if (currentMission > deathMission)
950 destination = number;
951 character = (short)**text;
952 while (character !=
',' && character !=
')') {
954 *destination = character;
960 return (
short)atoi(number);
966 unsigned char *textData)
974 while ((testCode = (
short)*test++) != 0) {
982 return sceneData + second;
988 return sceneData + second;
994 return sceneData + second;
1000 return sceneData + second;
1005 return sceneData + first;
1010 return sceneData + first;
1015 return sceneData + first;
1020 return sceneData + first;
1025 return sceneData + first;
1031 return sceneData + second;
1037 return sceneData + second;
1043 return sceneData + second;
1049 return sceneData + second;
1055 return sceneData + second;
1061 return sceneData + second;
1067 return sceneData + second;
1074 return sceneData + second;
1080 return sceneData + second;
1087 return sceneData + first;
1092 return sceneData + first;
1097 return sceneData + first;
1102 return sceneData + first;
1107 return sceneData + first;
1113 return sceneData + first;
1118 return sceneData + first;
1123 return sceneData + first;
1128 return sceneData + first;
1133 return sceneData + first;
1138 return sceneData + first;
1145 return sceneData + first;
1152 return sceneData + first;
1158 return sceneData + first;
1164 return sceneData + second;
1169 return sceneData + first;
1174 return sceneData + first;
1179 return sceneData + first;
1184 return sceneData + first;
1213 unsigned char *textData)
1218 short previousColour;
1224 previousColour = -2;
1233 while ((shot = (
short)record->
shot) != -2) {
1235 if ((shot & 0x40) != 0) {
1247 if (selected != record)
1250 if (record->
talker != -2)
1253 switch (shot & 0x3f) {
1265 previousShot = shot;
1269 if (previousShot != 1) {
1276 if (previousShot != 2) {
1291 if (previousShot != shot) {
1298 previousShot = shot;
1312 if (previousShot != shot) {
1314 previousShot = shot;
1331 if (previousColour != (
short)record->
textColour &&
1348 text = (
char *)textData + record->
textOffset;
1349 if (*text !=
'\0') {
1350 switch (previousShot) {
1451 short animationFrame,
1452 const signed char *unusedXOffsets,
1453 const signed char *unusedYOffsets)
1457 (
void)unusedXOffsets;
1458 (
void)unusedYOffsets;
1461 if (animationFrame <
1463 frame = (short)(frame + animationFrame);
1534 unsigned short pixels;
1535 unsigned short *rowOffsets;
1561 unsigned short top,
unsigned short right,
1562 unsigned short bottom)
1564 viewport->
left = (short)left;
1565 viewport->
top = (short)top;
1566 viewport->
right = (short)right;
1567 viewport->
bottom = (short)bottom;
1574 short *originalPalette;
1575 short *transitionPalette;
1576 unsigned int paletteBytes;
1579 unsigned char *indices;
1585 memset(indices, 0, 256);
1587 paletteBytes = (
unsigned int)(activeCount * 6);
1592 if (originalPalette == 0 || transitionPalette == 0) {
1594 if (originalPalette != 0)
1596 if (transitionPalette != 0)
1601 memset(originalPalette, 0, paletteBytes);
1602 memset(transitionPalette, 0, paletteBytes);
1608 for (index = 0; index < activeCount; index++) {
1610 (
short)indices[index],
1611 &originalPalette[index * 3]);
1613 memcpy(&transitionPalette[index * 3], target, 6);
1623 transitionPalette, originalPalette,
1624 (
short)(activeCount * 3)) != 0) {
1625 for (index = 0; index < activeCount; index++) {
1627 (
short)indices[index],
1628 &transitionPalette[index * 3]);
1647 struct Shape *deathShape;
1648 struct Shape *cockpitBackground;
1667 for (; frame < 8; frame++) {
1674 cockpitBackground, 0);
1677 deathShape, (
short)frame);
1706 }
while (frame < 60);
1738 (
short)(0xc800 / (
int)distance));
1742 distance = (short)(distance - 10);
1748 }
while (frame < 40);
1777 for (index = 0; index < 30; index++) {
1795 (
short)(0xc800 / (
int)distance));
1801 distance = (short)(distance - 10);
1805 }
while (frame < 80);
1827 -0x12c00, &cameraOffset);
1848 (
short)(0xc800 / (
int)distance));
1854 distance = (short)(distance - 10);
1858 }
while (frame < 80);
1872 memset(destination, value, length);
void(__cdecl *pIxFree)(void *)
unsigned char bEscapePressedFlag
short * pFaceAnimationCmds
short asCampaignBriefingFiles[3]
int bPlayerShipTypeChanged
unsigned char * pCurrentBriefingTextData
Viewport stConstellationViewport
unsigned char cBlackColour
char szTxtWorkspaceBuffer[256]
signed char cMissionObjectiveCountValue
struct Shape * pSceneBriefingBodyShape
short nConvTextColorValue
unsigned char * pDebriefingTxtInfo
short nConversationBackdropFrame
short nDebriefingPersonality
const char * apszMedalNames[5]
BriefingCharacterLayout aBriefingCharacters[10]
unsigned char cViewportClearColour
Viewport * pFullScreenRecord
struct Shape * pBriefingCloseupShape
TextContext stCurrentConvTxtCtx
struct Shape * pConvOverlayShapePtr
int bPlayerEjectedThisMission
unsigned char bInputModeState
struct Shape * pSceneBriefingPortraitShape
short * pSceneMouthAnimCmds
struct Shape * pCurrentBriefingAnimShape
Viewport stCurrentConvTextViewport
CampaignDate stSavedCampaignDate
int bConversationConstellation
FixedVector aShipVelocity[SPACE_OBJECT_COUNT]
short asObjectCollisionRadius[64]
signed char cCockpitLogicalFile
short nCurrentViewCenterPosX
struct Shape * pFireworkShape
Viewport stSpaceBufferViewport
unsigned char * pMedalSceneData
short nPreviousPlayerShipType
short nConversationCharacter
signed char cCurrentObjective
unsigned char * pRoomMedalTextData
FixedVector aShipUpVector[64]
CampaignState stCampaignState
struct Shape * pCurrentConversationBackdropShapePtr
TalkingHeadOrigin aTalkingHeadOrigins[11]
Viewport * pAllocatedScreenViewport
FireworkState aFireworksList[30]
short asConversationTextColours[12]
struct Shape * pTalkHeadShape
FixedVector aShipPositionsArray[SPACE_OBJECT_COUNT]
FixedVector aShipFwdVec[64]
short nCurrentViewCenterPosY
unsigned char bFilteredKeyDelayStartedState
struct Shape * pIntroFont
short nCurrentConversationMedalIndex
unsigned char * pDebriefingSceneDataPtr
unsigned char * pBriefingSceneInfo
static int aiBriefingPodiumVelocity[12]
static int aiBriefingRightPanelVelocity[12]
static const char * pszMedalsPilotSummary
static short asMedalDisplayX[5]
static signed char aBriefingPortraitOffsetX[8][12]
static signed char abBriefingSmallCharacterAnimation[24]
static signed char abBriefingLargeCharacterAnimation[24]
static short nDebriefingLeftX
static short nDebriefingPilotX
static int aiBriefingLeftPanelVelocity[12]
void ShowOffscreenBuffer(void)
static signed char abDebriefingEstablishDeltas[50]
static short aBriefingPortraitScale[8][12]
static signed char abBriefingPodiumFrames[40]
static short nDebriefingOfficerX
static short nDebriefingRightX
static signed char aBriefingPortraitOffsetY[8][12]
static struct Shape * pMedalSceneShape
signed char animationPhase
signed char firstPortraitFrame
PilotRecord * currentPilot
enum ObjectType playerShipType
signed char currentSeries
int personalityDeathMission[8]
signed char currentMission
short faceAnimationOffset
short mouthAnimationOffset
unsigned short * rowOffsets
Umbrella header for the game core.
unsigned int RefreshMemoryStatusOverlay(void)
unsigned int MedalEstablish(char *text, short duration)
void * AllocateTaggedMemory(int size, unsigned short flags)
unsigned int free_cockpit(void)
unsigned int InitializeConversationText(void)
unsigned int LongTalk(struct Shape *talker, char *text, short *mouthCommands, short *faceCommands, short duration)
void FormatTextBufferFromStart(const char *format,...)
void PollJoystickButtonEvents(void)
unsigned int TalkerInit(void)
short int_value(char **text)
void fix_objects_ijk(short obj)
unsigned int AwardCampaignMedal(short medal)
void __stdcall FillRasterBytes(void *destination, unsigned int length, short value)
unsigned int EstablishingShot(char *text, short duration)
unsigned int generate_stars(void)
unsigned int InitializeFireworks(void)
unsigned int force_view(int view, short obj)
unsigned int PinMedal(char *text, short duration)
unsigned int DrawMedals(void)
void __stdcall GetPaletteEntry(short index, short *rgb)
void * FetchDiskPacketRetrying(short logicalFile, short section, short flags)
void AddFixedVectors(const FixedVector *left, const FixedVector *right, FixedVector *sum)
unsigned int ParseMouthAnimation(char *text, short *commands)
short sighted(short objective)
unsigned int DrawDebriefingLongShot(void)
unsigned int DrawMedalLongShot(short *animation, char *text, short duration)
unsigned int FreeTalker(void)
void DrawSpriteScaled(Viewport *viewport, short x, short y, struct Shape *shape, short frame, short angle, short scale, short flip)
void ClearInputKeyStatePreservingModifiers(void)
unsigned int spacetrack(int track, int mode, short enabled)
unsigned short __stdcall StepPaletteTransition(short *current, const short *target, short componentCount)
ConversationSceneRecord * ParseTests(ConversationSceneRecord *record, ConversationSceneRecord *sceneData, unsigned char *textData)
unsigned int DrawConstellationField(void)
short no_objectives_achieved(void)
void DrawSpriteDefault(Viewport *viewport, short x, short y, struct Shape *shape, short frame)
int IsFrameTickElapsed(void)
void RestoreGamePalette(void)
unsigned int DrawBriefingCharacter(short character, short pose, short animationFrame, const signed char *unusedXOffsets, const signed char *unusedYOffsets)
void StopMusicUnlessSuppressed(void)
void FlushInputEvents(void)
unsigned int ViewMedals(void)
unsigned int clear_view_buffer(void)
short WaitForInputKey(void)
unsigned int PreloadMusicTrackHook(short track)
unsigned int GetScreenUpdateFlag(void)
unsigned int SceneDirector(short sceneType, unsigned char *sceneData, unsigned char *textData)
unsigned int init_constellation(short scene)
int GetViewportPixel(Viewport *viewport, short x, short y)
void __stdcall SetEventManagerPump(void(*pump)(void))
unsigned int DebriefingEstablishingShot(char *text, short duration)
void __stdcall SetTextContext(TextContext *context)
void WaitForSceneAdvance(short duration, short unused)
unsigned int ParseFaceAnimation(char *text, short *commands)
void ClearInputKeyState(void)
unsigned int PumpWindowMessages(void)
short achieved(short objective)
unsigned int DrawFuneralLongShot(short shot, char *text, short duration)
void WaitForVerticalBlankThunk(void)
void __stdcall SetFrameTimerPeriodDirect(short p)
void ResetSoundState(void)
void __stdcall FadeViewportPaletteToColour(Viewport *viewport, unsigned short colour, short enabled)
void ScaleFixedVector(const FixedVector *vector, int scale, FixedVector *result)
unsigned int ShowGetReadyScreen(void)
unsigned int Dismissed(char *text, short duration)
short TheEndFireWorks(Viewport *viewport, short count)
void zero_vector(FixedVector *vector)
unsigned int ReleaseMusicTrackHook(short track)
unsigned int ResetScreenClipToFullHeight(void)
void __stdcall PanToScreen(Viewport *source, Viewport *destination)
unsigned int CloseLook(struct Shape *shape, short shot, short *animation, char *text, short duration, int unused)
unsigned int UpdateMap(char *text, short duration)
unsigned int ReturnToBriefingLongShot(char *text, short duration)
unsigned int free_constellation(void)
short wing_status(short personality)
void CachePaletteEntryFromWords(short index, short *rgb)
void ClearViewport(Viewport *viewport, short colour)
unsigned int DrawMedalChest(char *text, short duration)
int DrawCenteredScaledIntroText(const char *text, short centreX, short baselineY, short scale)
int PlayersMissionScore(void)
unsigned int RefreshCockpitStatus(void)
unsigned int funeral_wingman(char *text, short duration)
unsigned int DrawPodiumShot(void)
short Explosion(short obj)
void PlaySfxWaveFileByNumber()
unsigned int new_view(int view, short obj)
void PlaySceneAnimation(char *text, short animation, short duration)
unsigned int death_sequence(void)
unsigned int ShowVictoryScreen(void)
short __stdcall CollectActivePaletteIndices(Viewport *viewport, unsigned char *indices, short capacity)
void ReleasePacketHandle(void *handle)
unsigned int DrawBriefingLongShot(void)
int FullMissionScore(void)
void __stdcall SetViewportRect(Viewport *viewport, unsigned short left, unsigned short top, unsigned short right, unsigned short bottom)
unsigned int LoadBriefingRoom(void)
unsigned int set_eye_direction_and_position(void)
unsigned int LoadFace(short face)
short MaxShort(short a, short b,...)
unsigned int ShowGameOverScreen(void)
void FreePacketAndClear(void *slot, unsigned short releaseFlags)
unsigned int ReleaseTextFont(short fontIndex)
short __stdcall RandomInRange(short lo, short hi)
unsigned int InitializeConstellationField(Viewport *viewport, short direction, short density)
short ace_status(short ace, unsigned char bits)
short RandomBelowOrEqual(short n)
void CopyViewportContents(Viewport *source, Viewport *destination)
char * AddPCName(const char *text)
unsigned int InitializeConversationViewport(void)
unsigned int dump_buffer_to_screen(void)
short __stdcall PeekInputEvent(InputEventState *event, short type)