Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
data.c
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup data
4 * @brief Shared initialized data: event queue, cursor and screen geometry,
5 * direction-frame tables and cockpit display tables.
6 *
7 * The event queue, cursor and screen geometry are the event manager's; the
8 * direction-frame tables serve the 3-D object code; the light, bar, layout
9 * and pilot-hand tables are the cockpit's.
10 *
11 * Data only. This block lies between game.c's literals and the following
12 * units' literal-only data, so it is a separate object linked before
13 * mathfp.c; the Super Wing Commander symbols also name a `data` module. The
14 * code that owned it, if any, is unknown.
15 */
16#include "wc1.h"
17
18/* 0x0046da90 */
20
21/* 0x0046da94 */
23
24/* 0x0046da98 */
26
27/* 0x0046da9c */
29
30/* 0x0046daa0 */
32
33/* 0x0046daa4 */
34short nScreenWidth = 320;
35
36/* 0x0046daa8 */
37short nScreenHeight = 200;
38
39/* Nothing in the shipped executable references these three zero words. */
40/* 0x0046daac */
42
43/* 0x0046dab0 */
45
46/* 0x0046dab4 */
48
49/* The seventh, all-zero entry fills the original span up to the direction
50 * tables; no mode selects it. */
51/* 0x0046dab8 */
53 { 0, 0, 0, 0, 0, 0, 0, 0 },
54 { 0, 0, 0, 0, 0, 0, 0, 0 },
55 { 0, 0, 0, 0, 0, 0, 0, 0 },
56 { 0, 0, 0, 0, 0, 0, 0, 0 },
57 { 320, 128, 0, 24, 0, 24, -24576, -1 },
58 { 320, 200, 0, 0, 0, 0, -1536, -1 },
59 { 0, 0, 0, 0, 0, 0, 0, 0 }
60};
61
62/* 0x0046db28 */
64 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2,
65 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13,
66 15, 16, 17, 18, 19, 20, 21, 20, 19, 18, 17, 16,
67 28, 27, 26, 25, 24, 23, 22, 23, 24, 25, 26, 27,
68 29, 30, 31, 32, 33, 34, 35, 34, 33, 32, 31, 30,
69 36,
70 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2,
71 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13,
72 15, 16, 17, 18, 19, 20, 21, 20, 19, 18, 17, 16,
73 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13,
74 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 0,
75 0, 1, 2, 3, 1, 3, 2, 1, 2, 3, 1, 3, 2,
76 4, 5, 6, 4, 6, 5, 4, 5, 6, 4, 6, 5,
77 7, 8, 9, 7, 9, 8, 7, 8, 9, 7, 9, 8,
78 10, 11, 12, 10, 12, 11, 10, 11, 12, 10, 12, 11,
79 13, 14, 15, 13, 15, 14, 13, 14, 15, 13, 15, 14, 16
80};
81
82/* 0x0046dbe8 */
84 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
85 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
86 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
87 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
88 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
89 0,
90 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
91 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
92 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
93 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
94 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2,
95 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
96 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
97 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
98 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
99 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0
100};
101
102/* 0x0046dca8 */
103short aasCockpitLightX[5][7] = {
104 {101, 101, 189, 137, 265, -99, 203},
105 {198, 198, 133, 145, 234, 234, -99},
106 {76, 76, 139, 257, 20, 20, -99},
107 {194, 194, 96, 137, 96, 96, -99},
108 {-99, -99, 179, 133, -99, -99, -99}
109};
110
111/* 0x0046dcf0 */
112short aasCockpitLightY[5][7] = {
113 {122, 145, 121, 7, 121, -99, 147},
114 {120, 139, 114, 114, 179, 188, -99},
115 {164, 183, 22, 181, 162, 178, -99},
116 {119, 142, 136, 15, 126, 116, -99},
117 {-99, -99, 115, 114, -99, -99, -99}
118};
119
120/* 0x0046dd38 */
121signed char aacCockpitLightOffFrame[5][7] = {
122 {14, 14, 14, 11, 13, 14, 14},
123 {12, 12, 12, 13, 12, 12, 12},
124 {9, 9, 9, 14, 9, 9, 9},
125 {15, 15, 13, 11, 13, 13, 13},
126 {5, 5, 5, 5, 5, 5, 5}
127};
128
129/* 0x0046dd60 */
130signed char aacCockpitLightOnFrame[5][7] = {
131 {3, 3, 3, 0, 2, 3, 3},
132 {2, 2, 2, 3, 2, 2, 2},
133 {1, 1, 1, 6, 1, 1, 1},
134 {4, 4, 2, 0, 2, 2, 2},
135 {1, 1, 1, 1, 1, 1, 1}
136};
137
138/* 0x0046dd88 */
140 {
141 {0, 215, 122, 219, 152, 31, 16, 5},
142 {2, 143, 97, 175, 99, 33, 12, 1},
143 {0, 114, 127, 123, 130, 4, 17, 6},
144 {1, 114, 143, 123, 146, 4, 20, 9},
145 {2, 109, 132, 112, 141, 4, 18, 7},
146 {3, 125, 132, 128, 141, 4, 19, 8},
147 {0, 109, 122, 128, 125, 4, 15, 4},
148 {1, 109, 148, 128, 151, 4, 21, 10}
149 },
150 {
151 {2, 96, 14, 134, 17, 39, 10, 0},
152 {2, 185, 14, 223, 17, 39, 11, 1},
153 {0, 213, 124, 220, 127, 4, 15, 5},
154 {1, 213, 138, 220, 141, 4, 18, 8},
155 {2, 205, 129, 208, 136, 4, 16, 6},
156 {3, 225, 129, 228, 136, 4, 17, 7},
157 {0, 205, 116, 228, 122, 7, 14, 4},
158 {1, 205, 143, 228, 149, 7, 19, 9}
159 },
160 {
161 {2, 249, 165, 293, 169, 45, 11, 3},
162 {2, 131, 13, 189, 17, 59, 8, 0},
163 {0, -99, -99, -99, -99, 0, 0, 0},
164 {1, -99, -99, -99, -99, 0, 0, 0},
165 {2, 45, 172, 51, 181, 7, 12, 4},
166 {3, 70, 172, 76, 181, 7, 13, 5},
167 {0, 49, 164, 72, 170, 7, 10, 2},
168 {1, 49, 183, 72, 189, 7, 15, 7}
169 },
170 {
171 {0, 123, 118, 126, 148, 31, 14, 3},
172 {2, 144, 100, 174, 102, 31, 12, 1},
173 {0, 207, 124, 216, 127, 4, 17, 6},
174 {1, 207, 140, 216, 143, 4, 20, 9},
175 {2, 202, 129, 205, 138, 4, 18, 7},
176 {3, 218, 129, 221, 138, 4, 19, 8},
177 {0, 202, 119, 221, 122, 4, 16, 5},
178 {1, 202, 145, 221, 148, 4, 21, 10}
179 },
180 {
181 {0, 180, 124, 184, 146, 22, 6, 2},
182 {2, 143, 110, 175, 112, 33, 4, 0},
183 {0, -99, -99, 0, 0, 0, 0, 0},
184 {0, -99, -99, 0, 0, 0, 0, 0},
185 {0, -99, -99, 0, 0, 0, 0, 0},
186 {0, -99, -99, 0, 0, 0, 0, 0},
187 {0, 134, 124, 138, 146, 32, 7, 3},
188 {0, -99, -99, 0, 0, 0, 0, 0}
189 }
190};
191
192/* 0x0046e008 */
194 {
195 {{99, 130}, {227, 122}, {38, 164}, {192, 126},
196 {-99, -99}, {0, 0}},
197 {{99, 140}, {227, 140}, {38, 184}, {192, 136},
198 {-99, -99}, {0, 0}},
199 {{201, 105}, {156, 14}, {197, 145}, {262, 102},
200 {219, 115}, {0, 0}},
201 {{112, 105}, {156, 19}, {105, 145}, {38, 102},
202 {71, 115}, {0, 0}}
203 },
204 {
205 {10, 133, 82, 198}, {0, 99, 73, 165}, {6, 1, 78, 66},
206 {11, 111, 84, 176}, {48, 126, 120, 191}
207 },
208 {
209 {236, 133, 309, 198}, {246, 97, 319, 165},
210 {241, 1, 313, 66}, {235, 111, 308, 176},
211 {198, 126, 270, 191}
212 },
213 {
214 {159, 126, 145, 113, 173, 139},
215 {103, 132, 89, 119, 117, 145},
216 {160, 39, 146, 26, 174, 52},
217 {159, 129, 145, 116, 173, 142},
218 {159, 130, 145, 117, 173, 143}
219 },
220 {0, 0},
221 {
222 {120, 152, 203, 199}, {120, 152, 205, 199},
223 {120, 151, 213, 199}, {120, 152, 205, 199},
224 {120, 152, 203, 199}
225 }
226};
227
228/* 0x0046e120 */
230 154, 187, 154, 187, 154, 187, 154, 187, 154, 187
231};
232
233/* The original contains ten initialized signed words here. Their
234 * owner and purpose are not established by any identified reference. */
235/* 0x0046e138 */
236short DAT_0046e138[10] = {
237 -400, -400, -400, -400, -400,
238 -400, -400, -400, -400, -400
239};
240/* Linker commons defined here; LINK orders them by identifier hash. */
241short nUnusedInputTimerFlag; /* 0x0059ab64 */
242int aiInputEventSlotUsedTable[0x100]; /* 0x0059ab70 */
244TextContext *pCurTextContext; /* 0x0059af8c */
245int nInputTickScale; /* 0x0059af90 */
247short anObjPitchRot[SPACE_OBJECT_COUNT]; /* 0x0059b2a0 */
248int anShipSpeed[64]; /* 0x0059b320 */
249short nCurrentSpaceFrameValue; /* 0x0059b420 */
250unsigned int anShipAlertFlags[12]; /* 0x0059b430 */
251FixedVector vPlayerAccel; /* 0x0059b460 */
252int anShipFuelsTable[12]; /* 0x0059b470 */
253unsigned short asObjDistancesTable[SPACE_OBJECT_COUNT]; /* 0x0059b4a0 */
257
unsigned int anShipAlertFlags[12]
Definition data.c:250
signed char acDirectionShapeFrame[DIRECTION_VIEW_COUNT *DIRECTION_SHAPE_TABLE_COUNT]
Definition data.c:63
int DAT_0046dab4
Definition data.c:47
int nInputTickScale
Definition data.c:245
short nUnusedInputTimerFlag
Definition data.c:241
short anObjPitchRot[SPACE_OBJECT_COUNT]
Definition data.c:247
ShortVector aShipFormationDeltaList[10]
Definition data.c:254
TextContext * pCurTextContext
Definition data.c:244
int anShipFuelsTable[12]
Definition data.c:252
short aasCockpitLightX[5][7]
Definition data.c:103
FixedVector aObjectViewPositionsList[SPACE_OBJECT_COUNT]
Definition data.c:246
InputEvent * pInputEventTail
Definition data.c:22
short asPilotHandOrigins[10]
Definition data.c:229
signed char aacCockpitLightOffFrame[5][7]
Definition data.c:121
ScreenViewportGeometry aScreenViewportGeometry[7]
Definition data.c:52
MouseCursorState stHostMouseState
Definition data.c:243
FixedVector vPlayerAccel
Definition data.c:251
int anShipSpeed[64]
Definition data.c:248
int aiInputEventSlotUsedTable[0x100]
Definition data.c:242
short nScreenWidth
Definition data.c:34
unsigned short asObjDistancesTable[SPACE_OBJECT_COUNT]
Definition data.c:253
short nCurrentSpaceFrameValue
Definition data.c:249
signed char aacCockpitLightOnFrame[5][7]
Definition data.c:130
CockpitBarDefinition aaCockpitBars[5][8]
Definition data.c:139
enum ObjectType aeObjectTypeList[SPACE_OBJECT_COUNT]
Definition data.c:255
CockpitLayout stCockpitLayout
Definition data.c:193
struct Shape * pDrawnMouseCursorShape
Definition data.c:28
short nScreenHeight
Definition data.c:37
short asObjectAnimationDelay[SPACE_OBJECT_COUNT]
Definition data.c:256
InputEvent * pInputEventHead
Definition data.c:19
short aasCockpitLightY[5][7]
Definition data.c:112
int DAT_0046daac
Definition data.c:41
int nMouseCursorShowCount
Definition data.c:31
int bInputEventPoolInitialized
Definition data.c:25
int DAT_0046dab0
Definition data.c:44
short DAT_0046e138[10]
Definition data.c:236
signed char acDirectionShapeFlip[DIRECTION_VIEW_COUNT *DIRECTION_SHAPE_TABLE_COUNT]
Definition data.c:83
Umbrella header for the game core.
#define DIRECTION_SHAPE_TABLE_COUNT
Definition wcdata.h:1008
#define DIRECTION_VIEW_COUNT
Definition wcdata.h:1007
ObjectType
Definition wcdata.h:54
#define SPACE_OBJECT_COUNT
Definition wcdata.h:1004