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

The bar, the kill board, conversation scenes and the initial campaign state. More...

#include "wc1.h"

Go to the source code of this file.

Functions

void CorrectPointers (void)
void ClearRoomMenuLabel (void)
char IsRoomMenuLabelEmpty (void)
void DrawRoomMenuLabel (TextContext *context, const char *label)
void RefreshRoomMenuLabel (void)
void ClearRoomMenuCursorFrame (void)
void SelectRoomMenuLabel (short i)
void InitializeRoomMenu (const TitleMenuRegion *regions, char **labels, Viewport *viewport, char *text, unsigned char alignment)
int FindMenuRegionAtPoint (short x, short y, const TitleMenuRegion *regions)
void InitializeRoomViewports (void)
void RefreshMouseCursorHook (void)
void ReleaseEventManagerPointerHook (void)
void DrawMouseCursorIntoViewport (Viewport *viewport)
short RecRoom (void)
short SuspendMouseCursor (void)
short InitializeEventManagerTiming (void)
void ShowChalkBoard (void)
void ResetCampaignData (void)
short __stdcall ReadPacketSectionData (PacketSectionHandle *handle, void *destination, unsigned int length)

Variables

static const char * pszBlankRoomMenuLabel
const char * apszPilotRankNames [5]
CampaignState stInitialCampaignState
static PilotRecord aInitialPilotRecords [9]
static signed char abSpiritRecRoomAnimation [48]
static signed char abHunterRecRoomAnimation [40]
static signed char abAngelRecRoomAnimation [48]
static signed char abKnightRecRoomAnimation [40]
static signed char abIcemanRecRoomAnimation [40]
static signed char abManiacRecRoomAnimation [24]
static signed char abPaladinRecRoomAnimation [56]
static signed char abBossmanRecRoomAnimation [48]
static signed char abShotglassIdleAnimation [24]
static signed char abShotglassGlassAnimation [32]
static signed char abShotglassPourAnimation [80]
static signed char abShotglassWipeAnimation [24]
static signed char * apRecRoomAnimations [14]
static ShortPoint aRecRoomCharacterOrigins [3]
static ShortPoint stRecRoomPanelOrigin = {158, 28}
static TitleMenuRegion aRecRoomMenuRegions [7]
static char * apszRecRoomBaseLabels [3]
static char * apszRecRoomMenuLabels [6]
int bPanRoomTransition = 0
static CampaignDate stChalkBoardDate = {-1, -1}
static short asChalkBoardPilotOrder [9]
struct Shape * pRecRoomBgShape
Viewport stRoomDisplayView
Viewport stCurrentRoomMouseView
unsigned char * apRecRoomTxtDataArray [3]
RoomMenu stCurrentRoomMenu
unsigned char * apRecRoomSceneDataList [3]
unsigned char * pBriefingPacket

Detailed Description

The bar, the kill board, conversation scenes and the initial campaign state.

Address range 43f640-44089f. The room state precedes the rank, menu-label and chalk-board literals.

Definition in file killbrd.c.

Function Documentation

◆ ClearRoomMenuCursorFrame()

void ClearRoomMenuCursorFrame ( void )

◆ ClearRoomMenuLabel()

void ClearRoomMenuLabel ( void )

◆ CorrectPointers()

◆ DrawMouseCursorIntoViewport()

◆ DrawRoomMenuLabel()

void DrawRoomMenuLabel ( TextContext * context,
const char * label )

◆ FindMenuRegionAtPoint()

int FindMenuRegionAtPoint ( short x,
short y,
const TitleMenuRegion * regions )

◆ InitializeEventManagerTiming()

short InitializeEventManagerTiming ( void )

◆ InitializeRoomMenu()

◆ InitializeRoomViewports()

◆ IsRoomMenuLabelEmpty()

char IsRoomMenuLabelEmpty ( void )

◆ ReadPacketSectionData()

◆ RecRoom()

short RecRoom ( void )

Definition at line 331 of file killbrd.c.

References abShotglassIdleAnimation, apRecRoomAnimations, apRecRoomFigureShapes, apRecRoomSceneDataList, apRecRoomTxtDataArray, apszRecRoomBaseLabels, apszRecRoomMenuLabels, apWingmanPilotsList, aRecRoomCharacterOrigins, aRecRoomMenuRegions, asCampaignPilotFiles, bEscapePressedFlag, bInputModeState, TitleMenuRegion::bottom, Viewport::bottom, bPanRoomTransition, cBlackColour, ClearInputKeyStatePreservingModifiers(), ClearViewport(), CopyViewportContents(), CampaignState::currentMission, CampaignState::currentSeries, DIBslam(), DIBslamReal(), DrawConstellationField(), DrawSpriteDefault(), EnterAllocationScope(), EventManagerHook(), FetchDiskPacketRetrying(), FindMenuRegionAtPoint(), FlushInputEvents(), free_constellation(), free_viewport(), FreePacketAndClear(), GetShapeFrameBounds(), init_constellation(), InitializeConstellationField(), InitializeConversationText(), InitializeRoomMenu(), InitializeRoomViewports(), IsFrameTickElapsed(), LeaveAllocationScope(), ShortRect::left, TitleMenuRegion::left, Viewport::left, LoadBriefingData(), LoadPacketAllocated(), MoveMenuPointerFromKeyboard(), nCampaignDataSet, nInputTickScale, nMenuInputRepeatDelay, nMenuPointerSpeed, nSavedRoomCtrlX, nTickCount60Hz, PanToScreen(), pBriefingPacket, pCurrentConversationBackdropShapePtr, PollInputEvent(), PollMenuInputDevices(), pRecRoomBgShape, pRecRoomRoster, PreloadMusicTrackHook(), RandomInRange(), RecRoom(), RefreshRoomMenuLabel(), ReleaseMusicTrackHook(), ReleasePacketHandle(), ReleaseTextFont(), TitleMenuRegion::right, Viewport::right, SceneDirector(), SetEventManagerPump(), SetFrameTimerPeriodDirect(), SetViewportRect(), ShouldSuspendCursorForRect(), ShowChalkBoard(), ShowMemoryStatusDebug(), spacetrack(), stCampaignState, stConstellationViewport, stCurrentRoomMouseView, stMouseCursorState, StopMusicUnlessSuppressed(), stRoomDisplayView, stRoomScreenViewport, stSceneBuffer, stScreenView, szDefaultTxtBuf, TitleMenuRegion::top, Viewport::top, UnionRectBounds(), UpdateRoomMenuCursor(), InputEventState::value, MouseCursorState::viewport, WarpMouseTo(), InputEventState::x, ShortPoint::x, InputEventState::y, and ShortPoint::y.

Referenced by CollectRasterClipColours(), GameFlow(), RecRoom(), and RunAnimationDemoLoop().

◆ RefreshMouseCursorHook()

void RefreshMouseCursorHook ( void )

Definition at line 411 of file eventmgr.c.

References RefreshMouseCursorHook().

Referenced by DrawMouseCursorIntoViewport(), and RefreshMouseCursorHook().

◆ RefreshRoomMenuLabel()

◆ ReleaseEventManagerPointerHook()

void ReleaseEventManagerPointerHook ( void )

Definition at line 115 of file strdos.c.

References ReleaseEventManagerPointerHook().

Referenced by ReleaseEventManagerPointerHook(), and SuspendMouseCursor().

◆ ResetCampaignData()

◆ SelectRoomMenuLabel()

void SelectRoomMenuLabel ( short i)

◆ ShowChalkBoard()

◆ SuspendMouseCursor()

short SuspendMouseCursor ( void )

Variable Documentation

◆ abAngelRecRoomAnimation

signed char abAngelRecRoomAnimation[48]
static
Initial value:
= {
3, 4, 3, 3, 4, 3, 4, 4, 3, 4, 3, 4, 0, 0, 0, 2,
0, 2, 0, 1, 0, 2, 0, 0, 2, 0, 1, 0, 2, 3, 3, 4,
3, 4, 4, 5, 5, 5, 5, 5, -1, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 67 of file killbrd.c.

◆ abBossmanRecRoomAnimation

signed char abBossmanRecRoomAnimation[48]
static
Initial value:
= {
3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 1, 3, 1, 3,
0, 3, 0, 3, 0, 2, 1, 2, 1, 3, 3, 4, 5, 5, 4, 5,
4, 5, 1, 3, 1, 3, 1, 3, -1, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 97 of file killbrd.c.

◆ abHunterRecRoomAnimation

signed char abHunterRecRoomAnimation[40]
static
Initial value:
= {
0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 2, 2,
3, 3, 4, 4, 5, 3, 3, 4, 4, 5, 5, 5, 2, 2, 1, 1,
0, 0, -1, 0, 0, 0, 0, 0
}

Definition at line 61 of file killbrd.c.

◆ abIcemanRecRoomAnimation

signed char abIcemanRecRoomAnimation[40]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 3,
3, 2, 2, 1, 0, 0, -1, 0
}

Definition at line 79 of file killbrd.c.

◆ abKnightRecRoomAnimation

signed char abKnightRecRoomAnimation[40]
static
Initial value:
= {
0, 0, 0, 0, 0, 1, 0, 1, 0, 5, 0, 0, 1, 2, 3, 4,
4, 3, 2, 2, 2, 3, 4, 4, 5, 5, 0, 0, 1, 0, 1, 2,
1, 0, 1, -1, 0, 0, 0, 0
}

Definition at line 73 of file killbrd.c.

◆ abManiacRecRoomAnimation

signed char abManiacRecRoomAnimation[24]
static
Initial value:
= {
0, 1, 2, 0, 1, 2, 0, 3, 2, 0, 1, 1,
0, 4, 2, 0, 1, 2, 0, 5, 5, 5, 5, -1
}

Definition at line 85 of file killbrd.c.

◆ abPaladinRecRoomAnimation

signed char abPaladinRecRoomAnimation[56]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 2, 2, 2, 3, 2,
2, 3, 2, 3, 2, 3, 2, 4, 4, 2, 3, 2, 3, 2, 3, 2,
3, 2, 3, 4, 4, 5, 5, 4, 4, 4, 4, 5, 5, 4, 2, 2,
2, -1, 0, 0, 0, 0, 0, 0
}

Definition at line 90 of file killbrd.c.

◆ abShotglassGlassAnimation

signed char abShotglassGlassAnimation[32]
static
Initial value:
= {
3, 6, 7, 8, 8, 9, 9, 10, 10, 10, 12, 11, 10, 12, 11, 10,
12, 11, 10, 12, 11, 10, 13, 13, 13, 10, 9, 8, 8, 3, 3, -1
}

Definition at line 108 of file killbrd.c.

◆ abShotglassIdleAnimation

signed char abShotglassIdleAnimation[24]
static
Initial value:
= {
0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 0,
0, 3, 3, 3, -1, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 103 of file killbrd.c.

Referenced by RecRoom().

◆ abShotglassPourAnimation

signed char abShotglassPourAnimation[80]
static
Initial value:
= {
3, 3, 6, 6, 7, 8, 8, 14, 15, 15, 16, 17, 18, 18, 18, 18,
17, 19, 19, 20, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21,
22, 22, 23, 24, 24, 25, 25, 26, 26, 27, 28, 28, 28, 29, 30, 31,
31, 31, 31, 31, 32, 32, 31, 31, 31, 33, 33, 32, 34, 34, 35, 35,
36, 36, 37, 37, 37, 38, 38, 39, 40, 3, 3, 3, -1, 0, 0, 0
}

Definition at line 113 of file killbrd.c.

◆ abShotglassWipeAnimation

signed char abShotglassWipeAnimation[24]
static
Initial value:
= {
3, 4, 3, 4, 5, 3, 4, 3, 5, 6, 3, 3,
3, 3, 4, 3, 4, 3, -1, 0, 0, 0, 0, 0
}

Definition at line 121 of file killbrd.c.

◆ abSpiritRecRoomAnimation

signed char abSpiritRecRoomAnimation[48]
static
Initial value:
= {
0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 3, 4, 3, 3, 4,
3, 4, 3, 4, 5, 3, 4, 5, 3, 4, 3, 4, 3, 4, 5, 3,
2, 2, 2, 3, 2, 2, 2, 1, 1, 1, -1, 0, 0, 0, 0, 0
}

Definition at line 55 of file killbrd.c.

◆ aInitialPilotRecords

PilotRecord aInitialPilotRecords[9]
static
Initial value:
= {
{"TANAKA", "SPIRIT", 3, 1, 11, 14, 1},
{"ST.JOHN", "HUNTER", 4, 2, 25, 32, 4},
{"CHEN", "BOSSMAN", 1, 3, 35, 37, 2},
{"CASEY", "ICEMAN", 0, 3, 28, 43, 1},
{"DEVEREAUX", "ANGEL", 0, 2, 22, 20, 1},
{"TAGGART", "PALADIN", 2, 3, 42, 34, 2},
{"MARSHALL", "MANIAC", 4, 0, 5, 6, 1},
{"KHUMALO", "KNIGHT", 3, 2, 18, 23, 3},
{"PELLEY", "GOBLIN", 0, 0, 0, 0, 0}
}

Definition at line 43 of file killbrd.c.

Referenced by ResetCampaignData().

◆ apRecRoomAnimations

signed char* apRecRoomAnimations[14]
static
Initial value:
= {
0,
0
}
static signed char abShotglassGlassAnimation[32]
Definition killbrd.c:108
static signed char abPaladinRecRoomAnimation[56]
Definition killbrd.c:90
static signed char abHunterRecRoomAnimation[40]
Definition killbrd.c:61
static signed char abKnightRecRoomAnimation[40]
Definition killbrd.c:73
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
static signed char abAngelRecRoomAnimation[48]
Definition killbrd.c:67
static signed char abManiacRecRoomAnimation[24]
Definition killbrd.c:85
static signed char abSpiritRecRoomAnimation[48]
Definition killbrd.c:55
static signed char abBossmanRecRoomAnimation[48]
Definition killbrd.c:97
static signed char abIcemanRecRoomAnimation[40]
Definition killbrd.c:79

Definition at line 126 of file killbrd.c.

Referenced by RecRoom().

◆ apRecRoomSceneDataList

unsigned char* apRecRoomSceneDataList[3]

Definition at line 185 of file killbrd.c.

Referenced by LoadBriefingData(), and RecRoom().

◆ apRecRoomTxtDataArray

unsigned char* apRecRoomTxtDataArray[3]

Definition at line 183 of file killbrd.c.

Referenced by LoadBriefingData(), and RecRoom().

◆ apszPilotRankNames

const char* apszPilotRankNames[5]
Initial value:
= {
"2ND LT.",
"1ST LT.",
"CAPTAIN",
"MAJOR",
"LT. COL."
}

Definition at line 16 of file killbrd.c.

Referenced by AddPCName(), ExpandCommMessageTokens(), and ShowChalkBoard().

◆ apszRecRoomBaseLabels

char* apszRecRoomBaseLabels[3]
static
Initial value:
= {
"Talk to SHOTGLASS.",
"Talk to ??????????????",
"Talk to ??????????????"
}

Definition at line 159 of file killbrd.c.

Referenced by RecRoom().

◆ apszRecRoomMenuLabels

char* apszRecRoomMenuLabels[6]
static
Initial value:
= {
0, 0, 0,
"Check pilot scores",
"Enter barracks",
"Fly training mission"
}

Definition at line 165 of file killbrd.c.

Referenced by RecRoom().

◆ aRecRoomCharacterOrigins

ShortPoint aRecRoomCharacterOrigins[3]
static
Initial value:
= {
{94, 59}, {161, 79}, {202, 79}
}

Definition at line 143 of file killbrd.c.

Referenced by RecRoom().

◆ aRecRoomMenuRegions

TitleMenuRegion aRecRoomMenuRegions[7]
static
Initial value:
= {
{ 1, 94, 59, 130, 95 },
{ 1, 161, 79, 180, 95 },
{ 1, 210, 79, 240, 95 },
{ 1, 180, 50, 250, 75 },
{ 1, 275, 50, 319, 135 },
{ 1, 0, 100, 120, 190 },
{ -1, 0, 0, 0, 0 }
}

Definition at line 149 of file killbrd.c.

Referenced by RecRoom().

◆ asChalkBoardPilotOrder

short asChalkBoardPilotOrder[9]
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8
}

Definition at line 176 of file killbrd.c.

Referenced by ShowChalkBoard().

◆ bPanRoomTransition

int bPanRoomTransition = 0

Definition at line 172 of file killbrd.c.

Referenced by GameFlow(), RecRoom(), and StartNewCampaign().

◆ pBriefingPacket

unsigned char* pBriefingPacket

Definition at line 186 of file killbrd.c.

Referenced by Briefing(), DeBriefing(), LoadBriefingData(), and RecRoom().

◆ pRecRoomBgShape

struct Shape* pRecRoomBgShape

Definition at line 180 of file killbrd.c.

Referenced by RecRoom().

◆ pszBlankRoomMenuLabel

const char* pszBlankRoomMenuLabel
static
Initial value:
=
" "

Definition at line 13 of file killbrd.c.

Referenced by InitializeRoomMenu(), and RefreshRoomMenuLabel().

◆ stChalkBoardDate

CampaignDate stChalkBoardDate = {-1, -1}
static

Definition at line 174 of file killbrd.c.

Referenced by ShowChalkBoard().

◆ stCurrentRoomMenu

◆ stCurrentRoomMouseView

Viewport stCurrentRoomMouseView

Definition at line 182 of file killbrd.c.

Referenced by InitializeRoomViewports(), and RecRoom().

◆ stInitialCampaignState

CampaignState stInitialCampaignState
Initial value:
= {
0,
{0, 0, 0, 0, 0},
{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
0,
1,
0,
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1},
{110, 2654},
{6, 0},
0,
0,
0,
0
}
@ OBJECT_TYPE_HORNET
Definition wcdata.h:55

Definition at line 24 of file killbrd.c.

Referenced by main(), and ResetCampaignData().

◆ stRecRoomPanelOrigin

ShortPoint stRecRoomPanelOrigin = {158, 28}
static

Definition at line 147 of file killbrd.c.

◆ stRoomDisplayView

Viewport stRoomDisplayView

Definition at line 181 of file killbrd.c.

Referenced by InitializeRoomViewports(), and RecRoom().