Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
screens.c File Reference

Briefing, debriefing, medal and funeral screens, and the conversation scene director. More...

#include "wc1.h"

Go to the source code of this file.

Functions

unsigned int LoadBriefingRoom (void)
unsigned int ViewMedals (void)
unsigned int AwardCampaignMedal (short medal)
unsigned int DrawMedalChest (char *text, short duration)
unsigned int DrawMedalLongShot (short *animation, char *text, short duration)
unsigned int MedalEstablish (char *text, short duration)
unsigned int PinMedal (char *text, short duration)
unsigned int DrawMedals (void)
unsigned int EstablishingShot (char *text, short duration)
unsigned int DrawBriefingLongShot (void)
unsigned int ReturnToBriefingLongShot (char *text, short duration)
unsigned int Dismissed (char *text, short duration)
unsigned int DrawDebriefingLongShot (void)
unsigned int DebriefingEstablishingShot (char *text, short duration)
short no_objectives_achieved (void)
short wing_status (short personality)
short int_value (char **text)
ConversationSceneRecord * ParseTests (ConversationSceneRecord *record, ConversationSceneRecord *sceneData, unsigned char *textData)
unsigned int TalkerInit (void)
unsigned int FreeTalker (void)
unsigned int SceneDirector (short sceneType, unsigned char *sceneBytes, unsigned char *textData)
unsigned int DrawPodiumShot (void)
unsigned int DrawBriefingCharacter (short character, short pose, short animationFrame, const signed char *unusedXOffsets, const signed char *unusedYOffsets)
unsigned int DrawFuneralLongShot (short shot, char *text, short duration)
void ShowOffscreenBuffer (void)
void __stdcall SetViewportRect (Viewport *viewport, unsigned short left, unsigned short top, unsigned short right, unsigned short bottom)
void __stdcall PanToScreen (Viewport *source, Viewport *destination)
unsigned int death_sequence (void)
unsigned int ShowGetReadyScreen (void)
unsigned int ShowVictoryScreen (void)
unsigned int ShowGameOverScreen (void)
void __stdcall FillRasterBytes (void *destination, unsigned int length, short value)

Variables

CampaignDate stSavedCampaignDate = {20, 340}
TalkingHeadOrigin aTalkingHeadOrigins [11]
static signed char abBriefingSmallCharacterAnimation [24]
static signed char abBriefingLargeCharacterAnimation [24]
BriefingCharacterLayout aBriefingCharacters [10]
static short asMedalDisplayX [5] = {191, 199, 207, 216, 228}
const char * apszMedalNames [5]
static struct Shape * pMedalSceneShape = 0
static const char * pszMedalsPilotSummary
static signed char aBriefingPortraitOffsetX [8][12]
static signed char aBriefingPortraitOffsetY [8][12]
static short aBriefingPortraitScale [8][12]
static int aiBriefingLeftPanelVelocity [12]
static int aiBriefingPodiumVelocity [12]
static int aiBriefingRightPanelVelocity [12]
static signed char abBriefingPodiumFrames [40]
static signed char abDebriefingEstablishDeltas [50]
static short nDebriefingLeftX = 0
static short nDebriefingPilotX = 80
static short nDebriefingRightX = 278
static short nDebriefingOfficerX = 200
short nDebriefingPodiumX = 344
short nConversationCharacter = -1
short nTalkingHeadFace = -1
short nConversationBackdropFrame = -1
int bConversationConstellation = 0
int bConversationOverlay = 0
unsigned char * pCurrentBriefingTextData
short * pSceneMouthAnimCmds
unsigned char * pRoomMedalTextData
unsigned char * pDebriefingSceneDataPtr
char szTxtWorkspaceBuffer [256]
unsigned char * pBriefingSceneInfo
struct Shape * pCurrentConversationBackdropShapePtr
short nCurrentConversationMedalIndex
short nTalkSceneType
struct Shape * pTalkHeadShape
short nConvTextColorValue
struct Shape * pCurrentBriefingAnimShape
short * pFaceAnimationCmds
struct Shape * pSceneBriefingBodyShape
unsigned char * pMedalSceneData
struct Shape * pSceneBriefingPortraitShape
unsigned char * pDebriefingTxtInfo
struct Shape * pBriefingCloseupShape
struct Shape * pConvOverlayShapePtr
unsigned char bFilteredKeyDelayStartedState

Detailed Description

Briefing, debriefing, medal and funeral screens, and the conversation scene director.

Address range 436d00-439c3f. The briefing and medal state precedes this unit's text-format literals; the hand-written raster library in raster.asm follows.

Definition in file screens.c.

Function Documentation

◆ AwardCampaignMedal()

◆ death_sequence()

◆ DebriefingEstablishingShot()

◆ Dismissed()

◆ DrawBriefingCharacter()

unsigned int DrawBriefingCharacter ( short character,
short pose,
short animationFrame,
const signed char * unusedXOffsets,
const signed char * unusedYOffsets )

◆ DrawBriefingLongShot()

◆ DrawDebriefingLongShot()

◆ DrawFuneralLongShot()

◆ DrawMedalChest()

◆ DrawMedalLongShot()

◆ DrawMedals()

◆ DrawPodiumShot()

◆ EstablishingShot()

◆ FillRasterBytes()

void __stdcall FillRasterBytes ( void * destination,
unsigned int length,
short value )

Definition at line 1869 of file screens.c.

References FillRasterBytes().

Referenced by DosMemcpy(), and FillRasterBytes().

◆ FreeTalker()

unsigned int FreeTalker ( void )

◆ int_value()

short int_value ( char ** text)

Definition at line 944 of file screens.c.

References int_value().

Referenced by DosMemcpy(), int_value(), and ParseTests().

◆ LoadBriefingRoom()

◆ MedalEstablish()

◆ no_objectives_achieved()

short no_objectives_achieved ( void )

◆ PanToScreen()

◆ ParseTests()

◆ PinMedal()

◆ ReturnToBriefingLongShot()

◆ SceneDirector()

unsigned int SceneDirector ( short sceneType,
unsigned char * sceneBytes,
unsigned char * textData )

Definition at line 1212 of file screens.c.

References asConversationTextColours, bConversationConstellation, bConversationOverlay, bEscapePressedFlag, bInputModeState, cBlackColour, cCurrentObjective, ClearInputKeyState(), ClearViewport(), CloseLook(), DebriefingEstablishingShot(), Dismissed(), DrawBriefingLongShot(), DrawFuneralLongShot(), DrawMedalChest(), DrawMedalLongShot(), DrawPodiumShot(), ConversationSceneRecord::duration, EstablishingShot(), ConversationSceneRecord::faceAnimationOffset, FlushInputEvents(), free_constellation(), FreeTalker(), funeral_wingman(), init_constellation(), InitializeConstellationField(), LoadFace(), LongTalk(), MedalEstablish(), ConversationSceneRecord::mouthAnimationOffset, nConversationCharacter, nConvTextColorValue, nTalkingHeadFace, nTalkSceneType, ParseFaceAnimation(), ParseMouthAnimation(), ParseTests(), pBriefingCloseupShape, pFaceAnimationCmds, PinMedal(), PlaySceneAnimation(), PollJoystickButtonEvents(), pSceneMouthAnimCmds, pTalkHeadShape, ReturnToBriefingLongShot(), SceneDirector(), SetEventManagerPump(), ConversationSceneRecord::shot, stConstellationViewport, stCurrentConvTextViewport, stSceneBuffer, ConversationSceneRecord::talker, TalkerInit(), ConversationSceneRecord::testsOffset, ConversationSceneRecord::textColour, ConversationSceneRecord::textOffset, and UpdateMap().

Referenced by AwardCampaignMedal(), DeBriefing(), DosMemcpy(), funeral_sequence(), LoadBriefingRoom(), Office(), RecRoom(), SceneDirector(), and ShowMeanwhileTransition().

◆ SetViewportRect()

void __stdcall SetViewportRect ( Viewport * viewport,
unsigned short left,
unsigned short top,
unsigned short right,
unsigned short bottom )

◆ ShowGameOverScreen()

◆ ShowGetReadyScreen()

◆ ShowOffscreenBuffer()

◆ ShowVictoryScreen()

◆ TalkerInit()

unsigned int TalkerInit ( void )

◆ ViewMedals()

◆ wing_status()

short wing_status ( short personality)

Variable Documentation

◆ abBriefingLargeCharacterAnimation

signed char abBriefingLargeCharacterAnimation[24]
static
Initial value:
= {
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0
}

Definition at line 35 of file screens.c.

◆ abBriefingPodiumFrames

signed char abBriefingPodiumFrames[40]
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 15, 15, 15, 15,
15, 15, 15, 15, 14, 13, 12, 11, 10, 9,
8, 7, 6, 5, 4, 0, 0, 0, 0, 0
}

Definition at line 122 of file screens.c.

Referenced by Dismissed().

◆ abBriefingSmallCharacterAnimation

signed char abBriefingSmallCharacterAnimation[24]
static
Initial value:
= {
1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0
}

Definition at line 30 of file screens.c.

◆ abDebriefingEstablishDeltas

signed char abDebriefingEstablishDeltas[50]
static
Initial value:
= {
-2, -2, -1, -1, 0, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 0, -1, -1, -2, -2
}

Definition at line 130 of file screens.c.

Referenced by DebriefingEstablishingShot().

◆ aBriefingCharacters

BriefingCharacterLayout aBriefingCharacters[10]
Initial value:
= {
{ 60, 123, 10, 95, 176, 1, 0, 2,
{316, 123, 264, 94, 176, 1, 2, 1,
{193, 123, 141, 95, 176, 1, 3, 1,
{250, 124, 199, 93, 176, 1, 4, 1,
{124, 123, 71, 94, 176, 1, 5, 1,
{103, 122, 29, 76, 256, 1, 6, 2,
{191, 122, 118, 76, 256, 1, 8, 1,
{287, 122, 212, 76, 256, 1, 9, 1,
}
static signed char abBriefingSmallCharacterAnimation[24]
Definition screens.c:30
static signed char abBriefingLargeCharacterAnimation[24]
Definition screens.c:35

Definition at line 43 of file screens.c.

Referenced by CloseLook(), DrawBriefingCharacter(), EstablishingShot(), and ReturnToBriefingLongShot().

◆ aBriefingPortraitOffsetX

signed char aBriefingPortraitOffsetX[8][12]
static
Initial value:
= {
{ 0, 0, -2, -2, -1, -2, -4, -3, -5, -7, -7, -4},
{ -1, 0, -2, -3, -3, -4, -3, -4, -6, -8, -7, -6},
{ 0, 1, 0, 0, 0, 0, 0, -1, -2, -4, -5, -3},
{ 0, -1, -2, -3, -1, -3, -2, -3, -4, -4, -5, -4},
{ 2, 0, 0, 0, 0, 0, 0, 0, -2, -3, -4, -2},
{ 1, 1, 1, 0, 1, 0, -6, -4, -4, -9, -8, -6},
{ -2, -1, -4, -4, -4, -7, -8, -7, -5, -8, -9, -7},
{ 0, 0, 0, 0, 0, -3, -3, -7, -5, -7, -8, -7}
}

Definition at line 77 of file screens.c.

Referenced by DrawBriefingCharacter(), and ReturnToBriefingLongShot().

◆ aBriefingPortraitOffsetY

signed char aBriefingPortraitOffsetY[8][12]
static
Initial value:
= {
{ -6, -2, -3, -1, -4,-10,-12,-20,-32,-38,-42,-43},
{ -5, 0, -4, -4, -7,-12,-16,-23,-32,-37,-42,-42},
{ -5, -3, 0, 1, 0, -7,-13,-23,-33,-38,-42,-42},
{ -3, -2, -1, 0, -5,-10,-16,-25,-33,-38,-41,-41},
{ -6, 0, 2, 0, -6,-11,-18,-25,-33,-39,-42,-42},
{ -8, -2, 1, -3, -6,-16,-23,-35,-46,-55,-61,-61},
{ -6, -4, -3, -5, -9,-14,-23,-34,-49,-57,-61,-62},
{-10, -5, 0, 0, -3, -7,-24,-32,-47,-55,-59,-60}
}

Definition at line 88 of file screens.c.

Referenced by DrawBriefingCharacter(), and ReturnToBriefingLongShot().

◆ aBriefingPortraitScale

short aBriefingPortraitScale[8][12]
static
Initial value:
= {
{357, 357, 357, 359, 355, 0, 352, 355, 353, 353, 355, 1},
{355, 0, 354, 354, 352, 354, 355, 355, 352, 352, 353, 350},
{354, 354, 359, 0, 358, 357, 357, 356, 357, 0, 0, 2},
{354, 354, 353, 356, 358, 356, 356, 355, 356, 0, 357, 357},
{ 0, 0, 0, 0, 358, 0, 358, 0, 0, 4, 0, 359},
{ 0, 358, 358, 0, 357, 0, 350, 354, 357, 354, 0, 358},
{356, 356, 352, 354, 352, 349, 350, 352, 0, 0, 0, 0},
{ 0, 0, 0, 359, 0, 350, 354, 350, 356, 357, 357, 357}
}

Definition at line 99 of file screens.c.

Referenced by DrawBriefingCharacter().

◆ aiBriefingLeftPanelVelocity

int aiBriefingLeftPanelVelocity[12]
static
Initial value:
= {
1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4
}

Definition at line 110 of file screens.c.

Referenced by Dismissed().

◆ aiBriefingPodiumVelocity

int aiBriefingPodiumVelocity[12]
static
Initial value:
= {
1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6
}

Definition at line 114 of file screens.c.

Referenced by Dismissed().

◆ aiBriefingRightPanelVelocity

int aiBriefingRightPanelVelocity[12]
static
Initial value:
= {
2, 2, 3, 4, 4, 4, 5, 5, 5, 6, 7, 8
}

Definition at line 118 of file screens.c.

Referenced by Dismissed().

◆ apszMedalNames

const char* apszMedalNames[5]
Initial value:
= {
"Bronze Star",
"Silver Star",
"Gold Star",
"Golden Sun",
"Terran Medal of Valor"
}

Definition at line 64 of file screens.c.

Referenced by AddPCName().

◆ asMedalDisplayX

short asMedalDisplayX[5] = {191, 199, 207, 216, 228}
static

Definition at line 62 of file screens.c.

Referenced by DrawMedals(), and MedalEstablish().

◆ aTalkingHeadOrigins

TalkingHeadOrigin aTalkingHeadOrigins[11]
Initial value:
= {
{161, 60, 161, 90},
{161, 60, 161, 87},
{160, 60, 159, 90},
{161, 60, 161, 90},
{161, 60, 161, 90},
{161, 60, 161, 90},
{161, 60, 161, 90},
{161, 60, 161, 90},
{161, 60, 161, 90},
{161, 60, 161, 90},
{160, 53, 160, 88},
}

Definition at line 16 of file screens.c.

Referenced by LoadFace().

◆ bConversationConstellation

int bConversationConstellation = 0

Definition at line 155 of file screens.c.

Referenced by CloseTalk(), DrawFuneralLongShot(), LoadFace(), and SceneDirector().

◆ bConversationOverlay

int bConversationOverlay = 0

Definition at line 157 of file screens.c.

Referenced by CloseTalk(), and SceneDirector().

◆ bFilteredKeyDelayStartedState

unsigned char bFilteredKeyDelayStartedState

Definition at line 179 of file screens.c.

Referenced by WaitForKeyExceptXOrF12().

◆ nConversationBackdropFrame

short nConversationBackdropFrame = -1

Definition at line 153 of file screens.c.

Referenced by CloseTalk(), and LoadFace().

◆ nConversationCharacter

short nConversationCharacter = -1

Definition at line 149 of file screens.c.

Referenced by CloseTalk(), LoadFace(), and SceneDirector().

◆ nConvTextColorValue

◆ nCurrentConversationMedalIndex

short nCurrentConversationMedalIndex

◆ nDebriefingLeftX

short nDebriefingLeftX = 0
static

Definition at line 139 of file screens.c.

Referenced by DebriefingEstablishingShot(), and DrawDebriefingLongShot().

◆ nDebriefingOfficerX

short nDebriefingOfficerX = 200
static

Definition at line 145 of file screens.c.

Referenced by DebriefingEstablishingShot(), and DrawDebriefingLongShot().

◆ nDebriefingPilotX

short nDebriefingPilotX = 80
static

Definition at line 141 of file screens.c.

Referenced by DebriefingEstablishingShot(), and DrawDebriefingLongShot().

◆ nDebriefingPodiumX

short nDebriefingPodiumX = 344

Definition at line 147 of file screens.c.

Referenced by CloseLook(), DebriefingEstablishingShot(), and DrawDebriefingLongShot().

◆ nDebriefingRightX

short nDebriefingRightX = 278
static

Definition at line 143 of file screens.c.

Referenced by DebriefingEstablishingShot(), and DrawDebriefingLongShot().

◆ nTalkingHeadFace

short nTalkingHeadFace = -1

Definition at line 151 of file screens.c.

Referenced by CloseTalk(), LoadFace(), and SceneDirector().

◆ nTalkSceneType

short nTalkSceneType

Definition at line 168 of file screens.c.

Referenced by CloseTalk(), and SceneDirector().

◆ pBriefingCloseupShape

struct Shape* pBriefingCloseupShape

Definition at line 177 of file screens.c.

Referenced by LoadBriefingRoom(), and SceneDirector().

◆ pBriefingSceneInfo

unsigned char* pBriefingSceneInfo

Definition at line 165 of file screens.c.

Referenced by LoadBriefingData(), and LoadBriefingRoom().

◆ pConvOverlayShapePtr

struct Shape* pConvOverlayShapePtr

Definition at line 178 of file screens.c.

Referenced by CloseTalk(), FreeTalker(), and LoadFace().

◆ pCurrentBriefingAnimShape

struct Shape* pCurrentBriefingAnimShape

◆ pCurrentBriefingTextData

unsigned char* pCurrentBriefingTextData

Definition at line 160 of file screens.c.

Referenced by LoadBriefingData(), and LoadBriefingRoom().

◆ pCurrentConversationBackdropShapePtr

◆ pDebriefingSceneDataPtr

unsigned char* pDebriefingSceneDataPtr

Definition at line 163 of file screens.c.

Referenced by DeBriefing(), and LoadBriefingData().

◆ pDebriefingTxtInfo

unsigned char* pDebriefingTxtInfo

Definition at line 176 of file screens.c.

Referenced by DeBriefing(), and LoadBriefingData().

◆ pFaceAnimationCmds

short* pFaceAnimationCmds

Definition at line 172 of file screens.c.

Referenced by FreeTalker(), SceneDirector(), and TalkerInit().

◆ pMedalSceneData

unsigned char* pMedalSceneData

Definition at line 174 of file screens.c.

Referenced by AwardCampaignMedal().

◆ pMedalSceneShape

struct Shape* pMedalSceneShape = 0
static

◆ pRoomMedalTextData

unsigned char* pRoomMedalTextData

Definition at line 162 of file screens.c.

Referenced by AwardCampaignMedal().

◆ pSceneBriefingBodyShape

◆ pSceneBriefingPortraitShape

◆ pSceneMouthAnimCmds

short* pSceneMouthAnimCmds

Definition at line 161 of file screens.c.

Referenced by FreeTalker(), SceneDirector(), and TalkerInit().

◆ pszMedalsPilotSummary

const char* pszMedalsPilotSummary
static
Initial value:
=
"$R $N, aka $C.\n$S system, dateline $D."

Definition at line 74 of file screens.c.

Referenced by ViewMedals().

◆ pTalkHeadShape

struct Shape* pTalkHeadShape

Definition at line 169 of file screens.c.

Referenced by Dismissed(), DrawPodiumShot(), FreeTalker(), LoadFace(), and SceneDirector().

◆ stSavedCampaignDate

CampaignDate stSavedCampaignDate = {20, 340}

Definition at line 14 of file screens.c.

Referenced by AddPCName(), and UpdateSeries().

◆ szTxtWorkspaceBuffer