Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
disk.c
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup data
4 * @brief Data files and packet fetching with retries, text-font setup and
5 * input waits.
6 *
7 * Address range 41d120-41dedf; the Mac ship unit begins right after it,
8 * with initialize_object at 41dee0.
9 */
10#include "wc1.h"
11
12const char *apszGraphicsModeNames[4] = {
13 "vga",
14 "ega",
15 "cga",
16 "tga"
17}; /* 0x00469668 */
18const char *pszPacketReadOperation = "reading from disk"; /* 0x00469678 */
19const char *pszPacketAllocationOperation = "allocating memory"; /* 0x0046967c */
20/* 0x00469680 */
22 "Sorry, an error has occured while %s.\n"
23 "Please note the following information:\n"
24 "%s #%d (ERR %d PS%ld LB%ld FL%d) at %s\n"
25 "Check your configuration. If this problem persists, please\n"
26 "call Origin Systems' service line. We are sorry for the inconvenience.";
27char szDiskMarkerFile[9] = "DISK.000"; /* 0x00469688 */
28short nDiskPromptBorderColour = 0x50; /* 0x00469694 */
29/* Unreferenced pointer sequence: two strings followed by a null entry. */
30const char *DAT_00469698[3] = {
31 "(OVR)", "", 0
32}; /* 0x00469698 */
33short nKeyboardPointerStep = 4; /* 0x004696a4 */
34
35/* Linker commons defined here; LINK orders them by identifier hash. */
38/* GetShutdownErrorCode's buffer. The prompt viewport that follows it at
39 * 0x005A7D40 bounds it to 17-32 bytes; the DOS hook that filled it is an
40 * empty stub, so its true length is unknown. */
41unsigned char abDiskPromptDriveStates[0x20]; /* 0x005a7d20 */
43int bPtrMovedByKeyboardState; /* 0x005a7d54 */
46
47/* Function start: 0x41D120 */
48void ReportPacketLoadError(void *packet, short logicalFile,
49 short retry, short section,
50 const char *sourceTag)
51{
52 unsigned int packetSize;
53 short error;
54 const char *operation;
55
56 if (packet != 0 && (nPacketError == 0 || nPacketError == 8))
57 return;
58 if (packet == 0 && nPacketError == 8)
59 return;
60 error = nPacketError;
61 if (section != -1)
62 packetSize = GetPacketSize(
63 pDiskFileRecords[logicalFile].name, section);
65 nPacketError = error;
66 if (packet != 0 && section != -1)
67 operation = pszPacketReadOperation;
68 else
70 sprintf(szDefaultTxtBuf,
72 operation,
73 pDiskFileRecords[logicalFile].name,
74 (int)section, (int)error, packetSize,
75 GetFixedOneMillionThunkAlt(retry), (int)retry, sourceTag);
77}
78
79/* Function start: 0x41D200 */
80void *LoadPacketIntoBuffer(short logicalFile, short section,
81 void *destination)
82{
83 void *packet;
84
85 PromptInsertNumberedDisk(logicalFile);
86 packet = PacketLoad(
87 pDiskFileRecords[logicalFile].name,
88 section, destination, 0, 0);
89 ReportPacketLoadError(destination, logicalFile, 0, section, "RP");
90 return packet;
91}
92
93/* Function start: 0x41D250 */
94void *LoadPacketAllocated(short logicalFile, short section)
95{
96 unsigned int packetSize;
97 void *packet;
98 short retries;
99 int fileIndex;
100 DiskFileRecord *files;
101 short error;
102
103 retries = 5;
104 PromptInsertNumberedDisk(logicalFile);
105 fileIndex = logicalFile;
106 packetSize = GetPacketSize(
107 pDiskFileRecords[fileIndex].name, section);
108 packet = AllocateTaggedMemory((unsigned int)(short)packetSize, 0x40);
109 if (packet != 0) {
110 files = pDiskFileRecords;
111 do {
112 retries--;
113 PacketLoad(files[fileIndex].name,
114 section, packet, 0, 0);
115 error = nPacketError;
116 files = pDiskFileRecords;
117 if (retries <= 0 || error == 0)
118 break;
119 } while (error != 8);
120 }
121 ReportPacketLoadError(packet, logicalFile, 0, section, "LPN");
122 return packet;
123}
124
125/* Function start: 0x41D2E0 */
126void *FetchDiskPacketRetrying(short logicalFile, short section,
127 short flags)
128{
129 void *packet = 0;
130 short retries = 5;
131
132 PromptInsertNumberedDisk(logicalFile);
133 if (flags == 0) {
134 if ((int)GetPacketSize(
135 pDiskFileRecords[logicalFile].name, section) >
137 ReportPacketLoadError(0, logicalFile, flags, section, "LP1");
138 }
139 }
140
141 do {
142 retries--;
143 FreePacketAndClear(&packet, flags);
144 packet = PacketLoad(pDiskFileRecords[logicalFile].name,
145 section, 0, flags, 0);
146 if (retries <= 0 || nPacketError == 0)
147 break;
148 } while (nPacketError != 8);
149
150 if (packet == 0 && stSpaceBufferViewport.pixels != 0) {
152 do {
153 retries--;
154 FreePacketAndClear(&packet, flags);
155 packet = PacketLoad(pDiskFileRecords[logicalFile].name,
156 section, 0, flags, 0);
157 if (retries <= 0 || nPacketError == 0)
158 break;
159 } while (nPacketError != 8);
161 (short)cPrimaryViewBufferColour, 0x20) == 0) {
162 ReportPacketLoadError(0, logicalFile, flags, flags,
163 "LP2");
164 }
165 }
166 if (packet == 0 && stSceneBuffer.pixels != 0) {
168 do {
169 retries--;
170 FreePacketAndClear(&packet, flags);
171 packet = PacketLoad(pDiskFileRecords[logicalFile].name,
172 section, 0, flags, 0);
173 if (retries <= 0 || nPacketError == 0)
174 break;
175 } while (nPacketError != 8);
177 (short)cBlackColour, 0) == 0) {
178 ReportPacketLoadError(0, logicalFile, flags, section,
179 "LP3");
180 }
181 }
182 if (packet == 0 && (flags & 4) == 0 &&
183 nPacketError != 0 && nPacketError != 8) {
184 ReportPacketLoadError(packet, logicalFile, flags, section, "LP4");
185 }
186
188 return packet;
189}
190
191/* Function start: 0x41D510 */
193 short fontIndex,
194 unsigned char colour,
195 signed char background)
196{
197 int index;
198
199 index = fontIndex;
200 if (apTextFonts[index] == 0) {
201 if (fontIndex == 1) {
202 apTextFonts[index] =
203 FetchDiskPacketRetrying(0, fontIndex,
204 0x10);
205 } else {
206 apTextFonts[index] =
207 FetchDiskPacketRetrying(0, fontIndex,
208 0);
209 }
210 apFontWorkspaces[index] =
211 AllocateFontWorkspace((short)index);
212 }
213 context->font = apTextFonts[index];
214 context->colour = colour;
215 context->backgroundColour = (unsigned char)background;
216 context->fontWorkspace = apFontWorkspaces[index];
217 SetTextContext(context);
218 return 0;
219}
220
221/* Function start: 0x41D590 */
222unsigned int ReleaseTextFont(short fontIndex)
223{
224 int index;
225
226 if (fontIndex == 1)
227 return 0;
228 index = fontIndex;
229 if (apTextFonts[index] != 0) {
231 apTextFonts[index] = 0;
233 apFontWorkspaces[index] = 0;
234 }
235 return 0;
236}
237
238/* Function start: 0x41D5F0 */
239unsigned int DrawTextAt(TextContext *context, short x, short y,
240 const char *text, unsigned char alignment)
241{
242 char *savedText = context->text;
243 unsigned char savedAlignment = context->alignment;
244
245 SetTextContext(context);
246 SetTextCursor((unsigned short)x, (unsigned short)y);
247 context->text = (char *)text;
248 context->alignment = alignment;
249 DrawTextString(text);
250 context->text = savedText;
251 context->alignment = savedAlignment;
252 if (context->viewport->pixels == stScreenView.pixels)
253 DIBslam();
254 return 0;
255}
256
257/* Function start: 0x41D650 */
258unsigned int SortSignedByteValuesAscending(signed char *values,
259 short count)
260{
261 short next;
262 signed char outer;
263 signed char inner;
264
265 outer = 0;
266 if (0 < count - 1) {
267 do {
268 inner = (signed char)(outer + 1);
269 next = (short)inner;
270 if ((short)inner < count) {
271 do {
272 signed char value = values[outer];
273
274 if (values[inner] < value) {
275 values[outer] = values[inner];
276 values[inner] = value;
277 }
278 inner++;
279 } while ((short)inner < count);
280 }
281 outer++;
282 } while ((int)next < count - 1);
283 }
284 return 0;
285}
286
287/* Function start: 0x41D6C0 */
288short OpenDiskDataFile(short logicalFile)
289{
290 short file;
291
293 (unsigned char)
294 pDiskFileRecords[logicalFile].diskNumber,
295 3);
297 if (file != -1) {
298 CloseDataFile((unsigned short)file);
299 return 1;
300 }
302 return 1;
303 if (GetCurrentDiskDriveHook() == 'A') {
304 if (toupper((int)(signed char)
305 abDiskPromptDriveStates[1]) == 'B') {
307 } else {
308 return 0;
309 }
310 } else {
312 }
314 if (file != -1) {
315 CloseDataFile((unsigned short)file);
316 return 1;
317 }
318 return 0;
319}
320
321/* Function start: 0x41D760 */
322void __stdcall PromptInsertNumberedDisk(short logicalFile)
323{
324 TextContext *savedTextContext;
325 short backgroundColour;
326 signed char diskReady;
327 signed char savedViewportMode;
328 signed char diskNumber;
329
330 savedViewportMode = 2;
331 diskReady = 0;
332 if (OpenDiskDataFile(logicalFile) != 0)
333 return;
334 if (bGraphicsActive == 0) {
335 diskNumber =
336 pDiskFileRecords[logicalFile].diskNumber;
337 do {
340 cprintf("Please Insert Disk %d. Press any key to continue",
341 (int)diskNumber);
343 } while (OpenDiskDataFile(logicalFile) == 0);
344 return;
345 }
346
347 savedTextContext = pCurTextContext;
349 {
350 unsigned int leftTop;
351 unsigned int rightBottom;
352
353 leftTop = *(unsigned int *)&stDiskPromptBounds.left;
354 rightBottom = *(unsigned int *)&stDiskPromptBounds.right;
355 *(unsigned int *)&stDiskPromptBgView.left = leftTop;
356 *(unsigned int *)&stDiskPromptViewport.left = leftTop;
357 *(unsigned int *)&stDiskPromptBgView.right = rightBottom;
358 *(unsigned int *)&stDiskPromptViewport.right = rightBottom;
359 }
360
361 if (stSpaceBufferViewport.pixels != 0) {
363 backgroundColour = (unsigned char)cPrimaryViewBufferColour;
364 } else if (stSceneBuffer.pixels != 0) {
366 backgroundColour = (unsigned char)cBlackColour;
367 } else {
368 savedViewportMode = (signed char)AllocateViewport(
369 &stDiskPromptBgView, -1, 0);
370 backgroundColour = (short)(unsigned int)savedTextContext;
371 }
372
374 if (savedViewportMode != 0) {
377 }
378
379 do {
383 (unsigned short)(stDiskPromptViewport.left + 2),
384 (unsigned short)(stDiskPromptViewport.top + 2));
393 "Please insert disk %d\ninto any drive\nPress any key when ready.",
394 (int)pDiskFileRecords[logicalFile].diskNumber);
397 if (OpenDiskDataFile(logicalFile) != 0)
398 diskReady++;
399 if (savedViewportMode != 0) {
403 } else {
405 backgroundColour);
406 }
407 } while (diskReady == 0);
408
409 if (savedViewportMode == 1) {
411 } else if (savedViewportMode == 2) {
413 backgroundColour);
414 }
415 pCurTextContext = savedTextContext;
416}
417
418/* Function start: 0x41D9B0 */
419unsigned int SetDiskFileNumber(char *fileName, short diskNumber)
420{
421 char *number;
422
423 number = strchr(fileName, '.');
424 if (number++ == 0) {
426 number = fileName + 1;
427 } else {
428 number++;
429 }
430 number[2] = '\0';
431 ConvertChar_Int(number, diskNumber, 2);
432 return 0;
433}
434
435/* Function start: 0x41DA00 */
436unsigned int GetZeroUnused(void)
437{
438 return 0;
439}
440
441/* Function start: 0x41DA10 */
442short CheckEscaped(void)
443{
444 InputEventState event;
445 short escaped;
446
448 escaped = 0;
449 if (IsInputEventQueued(10) != 0) {
450 PeekInputEvent(&event, 10);
451 escaped = (short)event.value + 1;
452 } else if (IsInputEventQueued(2) != 0) {
453 PeekInputEvent(&event, 2);
454 escaped = (short)event.value + 1;
455 } else if (IsInputEventQueued(3) != 0) {
456 PeekInputEvent(&event, 3);
457 escaped = (short)event.value + 1;
458 while (PollInputEvent(&event, 0xff) != 0)
459 ;
460 }
461 if (escaped != 0)
463 return escaped;
464}
465
466/* Function start: 0x41DAA0 */
468{
469 InputEventState event;
470 unsigned char savedMode;
471 signed char key;
472
473 key = 0;
474 if (nEventManagerActive == 0)
475 return (signed char)PumpMessagesDuringWait();
476
477 savedMode = bInputModeState;
478 bInputModeState = 1;
479 while (key == 0) {
480 switch (PollInputEvent(&event, 0xff)) {
481 case 2:
482 case 10:
483 key = 0x1c;
484 while (PollInputEvent(&event, 0xff) != 0)
485 ;
486 break;
487 case 3:
488 case 5:
489 key = (signed char)event.value;
490 switch (key) {
491 case 0x1d:
492 key = 0;
493 break;
494 default:
495 while (PollInputEvent(&event, 0xff) != 0)
496 ;
497 break;
498 }
499 break;
500 }
501 }
503 bInputModeState = savedMode;
505 return key;
506}
507
508/* Function start: 0x41DBA0 */
509void WaitForSceneAdvance(short duration, short unused)
510{
511 InputEventState event;
512 unsigned char savedMode;
513 short eventType;
514 short escaped;
515 short advanced;
516
517 (void)unused;
518 advanced = 0;
519 savedMode = bInputModeState;
520 bInputModeState = 1;
521 if (duration != -1) {
523 } else {
524 escaped = CheckEscaped();
525 if (escaped != 0) {
526 while (escaped != 0)
527 escaped = CheckEscaped();
529 }
530 }
531 while ((short)IsFrameTickElapsed() == 0 && advanced == 0) {
532 eventType = PollInputEvent(&event, 0xff);
533 switch (eventType) {
534 case 2:
535 case 3:
536 case 5:
537 case 10:
538 advanced++;
539 bInputModeState = savedMode;
541 do {
542 eventType = PollInputEvent(&event, 0xff);
543 } while (eventType != 0);
545 break;
546 }
547 }
548}
549
550/* Function start: 0x41DC70 */
552{
553 int delta;
554 int moved;
555
556 delta = nKeyboardPointerStep * 2;
557 moved = 0;
558 if ((short)event->value == 0x4c) {
559 if (nKeyboardPointerStep == 1)
561 else
563 } else {
564 switch ((short)event->value) {
565 case 0x47:
566 stMouseCursorState.y -= delta;
567 /* fall through */
568 case 0x4b:
569 stMouseCursorState.x -= delta;
570 moved = 1;
571 break;
572 case 0x49:
573 stMouseCursorState.x += delta;
574 /* fall through */
575 case 0x48:
576 stMouseCursorState.y -= delta;
577 moved = 1;
578 break;
579 case 0x4f:
580 stMouseCursorState.x -= delta;
581 /* fall through */
582 case 0x50:
583 stMouseCursorState.y += delta;
584 moved = 1;
585 break;
586 case 0x51:
587 stMouseCursorState.y += delta;
588 /* fall through */
589 case 0x4d:
590 stMouseCursorState.x += delta;
591 moved = 1;
592 break;
593 }
594 }
595
596 if (stMouseCursorState.x < 0)
598 else if (stMouseCursorState.x > 320)
599 stMouseCursorState.x = 320;
600 if (stMouseCursorState.y < 0)
602 else if (stMouseCursorState.y > 320)
603 stMouseCursorState.y = 320;
604
607 if (moved != 0) {
611 0, 0, 0, 0);
615 }
616}
617
618/* Function start: 0x41DDF0 */
620{
621 Viewport clearArea;
622 char *text;
623 short textWidth;
624 short length;
625 short characterWidth;
626
627 text = pCurTextContext->text;
628 textWidth = MeasureTextPixelWidthClamped(text);
629 length = DosStrlen(text);
630 if (length != 0) {
631 characterWidth = (short)GetFontCharWidth(text[length - 1]);
632 clearArea = *pCurTextContext->viewport;
633 clearArea.left = (short)(clearArea.left +
634 textWidth - characterWidth);
635 clearArea.right = (short)(clearArea.left + characterWidth - 1);
636 clearArea.top = pCurTextContext->cursorY;
637 clearArea.bottom = (short)(clearArea.top +
640 ClearViewport(&clearArea,
643 pCurTextContext->cursorX = (short)(
644 pCurTextContext->cursorX - characterWidth);
645 }
646}
647
648/* Function start: 0x41DEB0 */
650{
651 unsigned int saved = bKeyEventQueueEnabled;
652 short key;
653
655 do {
656 key = WaitForInputKey();
657 } while (key == 0);
658 bKeyEventQueueEnabled = saved;
659 return key;
660}
const char * pszPacketAllocationOperation
Definition disk.c:19
short nKeyboardPointerStep
Definition disk.c:33
const char * pszPacketReadOperation
Definition disk.c:18
const char * pszPacketLoadErrorFormat
Definition disk.c:21
const char * DAT_00469698[3]
Definition disk.c:30
const char * apszGraphicsModeNames[4]
Definition disk.c:12
char szDiskMarkerFile[9]
Definition disk.c:27
void(__cdecl *pIxFree)(void *)
short bSlowSceneAnimation
Definition init.c:11
unsigned char cBlackColour
Definition init.c:12
short nPacketError
Definition mono.c:15
char szTxtWorkspaceBuffer[256]
Definition screens.c:164
TextContext * pCurTextContext
Definition data.c:244
unsigned char cViewportClearColour
Definition init.c:13
unsigned int bKeyEventQueueEnabled
Definition winmain.c:31
short nDiskPromptBorderColour
Definition disk.c:28
MouseCursorState stHostMouseState
Definition data.c:243
unsigned char bInputModeState
Definition eventmgr.c:21
unsigned char * apTextFonts[4]
Definition pload.c:13
int bPtrMovedByKeyboardState
Definition disk.c:43
Viewport stDiskPromptBgView
Definition disk.c:37
unsigned char abDiskPromptDriveStates[0x20]
Definition disk.c:41
MouseCursorState stMouseCursorState
Definition strdos.c:19
Viewport stSceneBuffer
Definition select.c:17
short bCurrentRunningFromHardDiskFlag
Definition strdos.c:22
int bGraphicsActive
Definition init.c:39
unsigned char cPrimaryViewBufferColour
Definition init.c:27
char szDefaultTxtBuf[0xc8]
Definition timer.c:18
short nEventManagerActive
Definition eventmgr.c:24
Viewport stScreenView
Definition launch.c:50
Viewport stSpaceBufferViewport
Definition timer.c:13
Viewport stDiskPromptViewport
Definition disk.c:42
DiskFileRecord * pDiskFileRecords
Definition disk.c:36
FontWorkspace ** apFontWorkspaces[4]
Definition pload.c:14
TextContext stDiskPromptTextContext
Definition disk.c:44
ShortRect stDiskPromptBounds
Definition disk.c:45
signed char diskNumber
Definition wcdata.h:491
unsigned int value
Definition wc1base.h:140
short left
Definition wcdata.h:440
short right
Definition wcdata.h:442
unsigned char colour
Definition wc1base.h:240
short cursorY
Definition wc1base.h:238
unsigned char * font
Definition wc1base.h:239
char * text
Definition wc1base.h:242
FontWorkspace ** fontWorkspace
Definition wc1base.h:245
unsigned char backgroundColour
Definition wc1base.h:241
short cursorX
Definition wc1base.h:237
Viewport * viewport
Definition wc1base.h:236
unsigned char alignment
Definition wc1base.h:244
unsigned char * pixels
Definition wc1base.h:74
short right
Definition wc1base.h:78
short bottom
Definition wc1base.h:79
short left
Definition wc1base.h:76
short top
Definition wc1base.h:77
Umbrella header for the game core.
unsigned int GetZeroUnused(void)
Definition disk.c:436
void * AllocateTaggedMemory(int size, unsigned short flags)
Definition ending.c:31
void FormatTextBufferFromStart(const char *format,...)
Definition cockpt.c:211
void LeaveAllocationScope(void)
Definition eventmgr.c:556
unsigned short __stdcall GetFontCharWidth(char i)
Definition mathfp.c:184
void SetMousePosition(int x, int y)
Definition winsys.c:56
void DIBslam(void)
Definition dib.c:513
void MoveMenuPointerFromKeyboard(InputEventState *event)
Definition disk.c:551
void * LoadPacketAllocated(short logicalFile, short section)
Definition disk.c:94
char PumpMessagesDuringWait(void)
Definition pilot.cpp:188
unsigned int SetDiskFileNumber(char *fileName, short diskNumber)
Definition disk.c:419
unsigned int InitializeTextContextFromFont(TextContext *context, short fontIndex, unsigned char colour, signed char background)
Definition disk.c:192
short LogMemoryUsage(void)
Definition main.c:102
short __stdcall PollInputEvent(InputEventState *event, short filter)
Definition eventmgr.c:336
unsigned short __stdcall AllocateViewport(Viewport *viewport, short clearColour, short flags)
Definition view.c:758
unsigned int __stdcall GetPacketSize(const char *filename, short section)
Definition screen.c:368
void * FetchDiskPacketRetrying(short logicalFile, short section, short flags)
Definition disk.c:126
void __stdcall SetTextCursor(unsigned short a, unsigned short b)
Definition mathfp.c:145
short OpenDiskDataFile(short logicalFile)
Definition disk.c:288
void __stdcall PromptInsertNumberedDisk(short logicalFile)
Definition disk.c:322
void ClearInputKeyStatePreservingModifiers(void)
Definition eventmgr.c:787
short __stdcall MeasureTextPixelWidthClamped(const char *text)
Definition geom.c:18
unsigned int GetFixedOneMillionThunkAlt(short memoryType)
Definition ending.c:78
int IsFrameTickElapsed(void)
Definition eventmgr.c:629
void FlushInputEvents(void)
Definition eventmgr.c:381
void * LoadPacketIntoBuffer(short logicalFile, short section, void *destination)
Definition disk.c:80
short WaitForInputKey(void)
Definition disk.c:467
void FreeFontWorkspace(FontWorkspace **workspace)
Definition winsys.c:174
void __stdcall CloseDataFile(unsigned short fd)
Definition mono.c:23
void __stdcall SetTextContext(TextContext *context)
Definition mathfp.c:152
void QueueInputEvent(int type, int x, int y, int value, int primaryButton, int secondaryButton, unsigned int timestamp)
Definition eventmgr.c:114
void WaitForSceneAdvance(short duration, short unused)
Definition disk.c:509
void EnterAllocationScope(void)
Definition eventmgr.c:550
unsigned int PumpWindowMessages(void)
Definition winmain.c:740
short __stdcall OpenDataFileOrDie(const char *path)
Definition winsys.c:297
void __stdcall SetFrameTimerPeriodDirect(short p)
Definition eventmgr.c:617
void RetainInputEventsOfType(int type)
Definition eventmgr.c:179
void ReportPacketLoadError(void *packet, short logicalFile, short retry, short section, const char *sourceTag)
Definition disk.c:48
void __stdcall DrawTextString(const char *text)
Definition mathfp.c:232
FontWorkspace ** AllocateFontWorkspace(short fontIndex)
Definition winsys.c:155
short WaitForStreamInputKey(void)
Definition disk.c:649
unsigned short __stdcall FontHeight(const void *p)
Definition mathfp.c:178
void DrawViewportBorder(Viewport *viewport, short left, short top, short right, short bottom, short colour)
Definition gr.c:1052
void DiskPromptDrawHook(void)
Definition pilot.cpp:224
unsigned int SortSignedByteValuesAscending(signed char *values, short count)
Definition disk.c:258
void ClearViewport(Viewport *viewport, short colour)
Definition gr.c:963
void ResetDiskPromptTimerHook(int mode, int interval)
Definition pilot.cpp:203
void *__stdcall PacketLoad(const char *filename, short section, void *destination, unsigned short flags, void *decompressionWorkspace)
Definition pload.c:20
void __stdcall ConvertChar_Int(char *text, short number, short digits)
Definition eventmgr.c:1378
void __stdcall free_viewport(Viewport *viewport)
Definition gameflow.c:420
void ReleasePacketHandle(void *handle)
Definition ending.c:50
unsigned int DrawTextAt(TextContext *context, short x, short y, const char *text, unsigned char alignment)
Definition disk.c:239
short GetCurrentDiskDriveHook(void)
Definition eventmgr.c:1181
void EraseLastTextInputCharacter(void)
Definition disk.c:619
short CheckEscaped(void)
Definition disk.c:442
short __stdcall IsInputEventQueued(short type)
Definition eventmgr.c:371
void FatalErrorAndExit(const char *format,...)
Definition cockpt.c:237
void FreePacketAndClear(void *slot, unsigned short releaseFlags)
Definition mathutil.c:37
unsigned int ReleaseTextFont(short fontIndex)
Definition disk.c:222
short __stdcall DosStrlen(const char *s)
Definition strdos.c:61
void CopyViewportContents(Viewport *source, Viewport *destination)
Definition gr.c:945
void __stdcall FillGraphicSuffix(char *path, short number, short digits)
Definition eventmgr.c:1363
short __stdcall PeekInputEvent(InputEventState *event, short type)
Definition eventmgr.c:343
unsigned short __stdcall SelectDiskDriveHook(short drive)
Definition eventmgr.c:1175