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

Packet loading, text contexts and input waits. More...

#include "game.h"

Go to the source code of this file.

Functions

void FillMemoryBytes (void *destination, unsigned int count, short value)
short MinShort (short a, short b)
short MaxShort (short a, short b)
void FreePacketAndClear (void *slot, unsigned short releaseFlags)
void ReportPacketLoadError (void *packet, char *fileName, short retry, short section, const char *sourceTag)
void AppendPacketLoadDebugLog (char *fileName, short section, void *packet)
void RewritePacketFilenameForInstalledData (char *fileName)
void * LoadPacketIntoBuffer (char *fileName, short section, void *destination, int registerHandle)
void * LoadPacketAllocated (char *fileName, short section)
void * FetchDiskPacketRetrying (char *fileName, short section, short flags)
void InitializeTextContextFromFont (TextContext *context, short fontIndex, unsigned char colour, signed char background)
void ReleaseTextFont (short fontIndex)
void DrawTextAt (TextContext *context, short x, short y, const char *text, unsigned char alignment)
void FlushPendingInputPresses (void)
short WaitForInputKey (void)
unsigned short WaitForAnyInputPress (void)

Variables

const char * g_pszPacketReadOperation = "reading from disk"
const char * g_pszPacketAllocateOperation = "allocating memory"
const char * g_pszPacketLoadErrorFormat
int g_nUnusedDiskWord = 0
short g_nUnusedDiskPromptBorderColour = 0x50

Detailed Description

Packet loading, text contexts and input waits.

Definition in file disk.c.

Function Documentation

◆ AppendPacketLoadDebugLog()

void AppendPacketLoadDebugLog ( char * fileName,
short section,
void * packet )

◆ DrawTextAt()

void DrawTextAt ( TextContext * context,
short x,
short y,
const char * text,
unsigned char alignment )

◆ FetchDiskPacketRetrying()

◆ FillMemoryBytes()

void FillMemoryBytes ( void * destination,
unsigned int count,
short value )

Definition at line 21 of file disk.c.

References FillMemoryBytes().

Referenced by FillMemoryBytes().

◆ FlushPendingInputPresses()

◆ FreePacketAndClear()

◆ InitializeTextContextFromFont()

◆ LoadPacketAllocated()

◆ LoadPacketIntoBuffer()

◆ MaxShort()

◆ MinShort()

◆ ReleaseTextFont()

void ReleaseTextFont ( short fontIndex)

◆ ReportPacketLoadError()

◆ RewritePacketFilenameForInstalledData()

void RewritePacketFilenameForInstalledData ( char * fileName)

◆ WaitForAnyInputPress()

◆ WaitForInputKey()

Variable Documentation

◆ g_nUnusedDiskPromptBorderColour

short g_nUnusedDiskPromptBorderColour = 0x50

Definition at line 376 of file disk.c.

◆ g_nUnusedDiskWord

int g_nUnusedDiskWord = 0

Definition at line 375 of file disk.c.

◆ g_pszPacketAllocateOperation

const char* g_pszPacketAllocateOperation = "allocating memory"

Definition at line 9 of file disk.c.

Referenced by ReportPacketLoadError().

◆ g_pszPacketLoadErrorFormat

const char* g_pszPacketLoadErrorFormat
Initial value:
=
"Sorry, an error has occurred while %s.\n"
"Please note the following information:\n"
"%Fs #%d (ERR %d PS%ld LB%ld FL%d) at %s\n"
"Check your configuration. If this problem persists, please\n"
"call Origin Systems' service line. We are sorry for the inconvenience."

Definition at line 10 of file disk.c.

Referenced by ReportPacketLoadError().

◆ g_pszPacketReadOperation

const char* g_pszPacketReadOperation = "reading from disk"

Definition at line 8 of file disk.c.

Referenced by ReportPacketLoadError().