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

Shared initialized data: event queue, cursor and screen geometry, direction-frame tables and cockpit display tables. More...

#include "wc1.h"

Go to the source code of this file.

Variables

InputEvent * pInputEventHead = 0
InputEvent * pInputEventTail = 0
int bInputEventPoolInitialized = 0
struct Shape * pDrawnMouseCursorShape = 0
int nMouseCursorShowCount = 0
short nScreenWidth = 320
short nScreenHeight = 200
int DAT_0046daac = 0
int DAT_0046dab0 = 0
int DAT_0046dab4 = 0
ScreenViewportGeometry aScreenViewportGeometry [7]
signed char acDirectionShapeFrame [DIRECTION_VIEW_COUNT *DIRECTION_SHAPE_TABLE_COUNT]
signed char acDirectionShapeFlip [DIRECTION_VIEW_COUNT *DIRECTION_SHAPE_TABLE_COUNT]
short aasCockpitLightX [5][7]
short aasCockpitLightY [5][7]
signed char aacCockpitLightOffFrame [5][7]
signed char aacCockpitLightOnFrame [5][7]
CockpitBarDefinition aaCockpitBars [5][8]
CockpitLayout stCockpitLayout
short asPilotHandOrigins [10]
short DAT_0046e138 [10]
short nUnusedInputTimerFlag
int aiInputEventSlotUsedTable [0x100]
MouseCursorState stHostMouseState
TextContext * pCurTextContext
int nInputTickScale
FixedVector aObjectViewPositionsList [SPACE_OBJECT_COUNT]
short anObjPitchRot [SPACE_OBJECT_COUNT]
int anShipSpeed [64]
short nCurrentSpaceFrameValue
unsigned int anShipAlertFlags [12]
FixedVector vPlayerAccel
int anShipFuelsTable [12]
unsigned short asObjDistancesTable [SPACE_OBJECT_COUNT]
ShortVector aShipFormationDeltaList [10]
enum ObjectType aeObjectTypeList [SPACE_OBJECT_COUNT]
short asObjectAnimationDelay [SPACE_OBJECT_COUNT]

Detailed Description

Shared initialized data: event queue, cursor and screen geometry, direction-frame tables and cockpit display tables.

The event queue, cursor and screen geometry are the event manager's; the direction-frame tables serve the 3-D object code; the light, bar, layout and pilot-hand tables are the cockpit's.

Data only. This block lies between game.c's literals and the following units' literal-only data, so it is a separate object linked before mathfp.c; the Super Wing Commander symbols also name a Data, files and memory module. The code that owned it, if any, is unknown.

Definition in file data.c.

Variable Documentation

◆ aacCockpitLightOffFrame

signed char aacCockpitLightOffFrame[5][7]
Initial value:
= {
{14, 14, 14, 11, 13, 14, 14},
{12, 12, 12, 13, 12, 12, 12},
{9, 9, 9, 14, 9, 9, 9},
{15, 15, 13, 11, 13, 13, 13},
{5, 5, 5, 5, 5, 5, 5}
}

Definition at line 121 of file data.c.

Referenced by draw_cockpit_lights().

◆ aacCockpitLightOnFrame

signed char aacCockpitLightOnFrame[5][7]
Initial value:
= {
{3, 3, 3, 0, 2, 3, 3},
{2, 2, 2, 3, 2, 2, 2},
{1, 1, 1, 6, 1, 1, 1},
{4, 4, 2, 0, 2, 2, 2},
{1, 1, 1, 1, 1, 1, 1}
}

Definition at line 130 of file data.c.

Referenced by draw_cockpit_lights().

◆ aaCockpitBars

CockpitBarDefinition aaCockpitBars[5][8]

Definition at line 139 of file data.c.

Referenced by vdu_polygon().

◆ aasCockpitLightX

short aasCockpitLightX[5][7]
Initial value:
= {
{101, 101, 189, 137, 265, -99, 203},
{198, 198, 133, 145, 234, 234, -99},
{76, 76, 139, 257, 20, 20, -99},
{194, 194, 96, 137, 96, 96, -99},
{-99, -99, 179, 133, -99, -99, -99}
}

Definition at line 103 of file data.c.

Referenced by draw_cockpit_lights().

◆ aasCockpitLightY

short aasCockpitLightY[5][7]
Initial value:
= {
{122, 145, 121, 7, 121, -99, 147},
{120, 139, 114, 114, 179, 188, -99},
{164, 183, 22, 181, 162, 178, -99},
{119, 142, 136, 15, 126, 116, -99},
{-99, -99, 115, 114, -99, -99, -99}
}

Definition at line 112 of file data.c.

Referenced by draw_cockpit_lights().

◆ acDirectionShapeFlip

signed char acDirectionShapeFlip[DIRECTION_VIEW_COUNT *DIRECTION_SHAPE_TABLE_COUNT]
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0
}

Definition at line 83 of file data.c.

Referenced by get_right_shape().

◆ acDirectionShapeFrame

signed char acDirectionShapeFrame[DIRECTION_VIEW_COUNT *DIRECTION_SHAPE_TABLE_COUNT]
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2,
14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13,
15, 16, 17, 18, 19, 20, 21, 20, 19, 18, 17, 16,
28, 27, 26, 25, 24, 23, 22, 23, 24, 25, 26, 27,
29, 30, 31, 32, 33, 34, 35, 34, 33, 32, 31, 30,
36,
0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2,
14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13,
15, 16, 17, 18, 19, 20, 21, 20, 19, 18, 17, 16,
14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13,
1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 0,
0, 1, 2, 3, 1, 3, 2, 1, 2, 3, 1, 3, 2,
4, 5, 6, 4, 6, 5, 4, 5, 6, 4, 6, 5,
7, 8, 9, 7, 9, 8, 7, 8, 9, 7, 9, 8,
10, 11, 12, 10, 12, 11, 10, 11, 12, 10, 12, 11,
13, 14, 15, 13, 15, 14, 13, 14, 15, 13, 15, 14, 16
}

Definition at line 63 of file data.c.

Referenced by get_right_shape().

◆ aeObjectTypeList

◆ aiInputEventSlotUsedTable

int aiInputEventSlotUsedTable[0x100]

Definition at line 242 of file data.c.

Referenced by AllocateInputEvent(), and ReleaseInputEvent().

◆ anObjPitchRot

◆ anShipAlertFlags

unsigned int anShipAlertFlags[12]

Definition at line 250 of file data.c.

Referenced by alert_flag(), clear_alert(), HasSpeechBuffer(), and set_alert().

◆ anShipFuelsTable

◆ anShipSpeed

◆ aObjectViewPositionsList

FixedVector aObjectViewPositionsList[SPACE_OBJECT_COUNT]

Definition at line 246 of file data.c.

Referenced by draw_3d_scanner(), object_collision(), and transform_objects_to_your_view().

◆ aScreenViewportGeometry

ScreenViewportGeometry aScreenViewportGeometry[7]
Initial value:
= {
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 320, 128, 0, 24, 0, 24, -24576, -1 },
{ 320, 200, 0, 0, 0, 0, -1536, -1 },
{ 0, 0, 0, 0, 0, 0, 0, 0 }
}

Definition at line 52 of file data.c.

Referenced by set_up_screen_viewport().

◆ aShipFormationDeltaList

ShortVector aShipFormationDeltaList[10]

Definition at line 254 of file data.c.

Referenced by auto_position(), maintain_formation(), and set_formation_position().

◆ asObjDistancesTable

◆ asObjectAnimationDelay

short asObjectAnimationDelay[SPACE_OBJECT_COUNT]

Definition at line 256 of file data.c.

Referenced by animate_shape(), and set_objects_data().

◆ asPilotHandOrigins

short asPilotHandOrigins[10]
Initial value:
= {
154, 187, 154, 187, 154, 187, 154, 187, 154, 187
}

Definition at line 229 of file data.c.

Referenced by DrawPilotHandFrame().

◆ bInputEventPoolInitialized

int bInputEventPoolInitialized = 0

Definition at line 25 of file data.c.

Referenced by AllocateInputEvent().

◆ DAT_0046daac

int DAT_0046daac = 0

Definition at line 41 of file data.c.

◆ DAT_0046dab0

int DAT_0046dab0 = 0

Definition at line 44 of file data.c.

◆ DAT_0046dab4

int DAT_0046dab4 = 0

Definition at line 47 of file data.c.

◆ DAT_0046e138

short DAT_0046e138[10]
Initial value:
= {
-400, -400, -400, -400, -400,
-400, -400, -400, -400, -400
}

Definition at line 236 of file data.c.

◆ nCurrentSpaceFrameValue

◆ nInputTickScale

◆ nMouseCursorShowCount

◆ nScreenHeight

◆ nScreenWidth

◆ nUnusedInputTimerFlag

short nUnusedInputTimerFlag

Definition at line 241 of file data.c.

Referenced by InitializeEventManagerResources(), and InitializeEventManagerTiming().

◆ pCurTextContext

◆ pDrawnMouseCursorShape

struct Shape* pDrawnMouseCursorShape = 0

Definition at line 28 of file data.c.

Referenced by SetMouseCursorShape().

◆ pInputEventHead

◆ pInputEventTail

InputEvent* pInputEventTail = 0

◆ stCockpitLayout

CockpitLayout stCockpitLayout

◆ stHostMouseState

◆ vPlayerAccel

FixedVector vPlayerAccel

Definition at line 251 of file data.c.

Referenced by accelerate_and_move_object().