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

Data-file wrappers, scaled interstitial text, canned sequences and the MONODEBG.VXD developer console. More...

#include "wc1.h"
#include <sys/stat.h>
#include <sys/utime.h>
#include <share.h>

Go to the source code of this file.

Functions

void __stdcall CloseDataFile (unsigned short fd)
short __stdcall WriteDataFileAtOffset (unsigned short fd, int offset, unsigned int length, const void *data)
short __stdcall CreateDataFile (const char *path)
int __stdcall ReadDataFileAtOffset (unsigned short fd, int offset, unsigned int length, void *data)
int __stdcall SeekDataFile (unsigned short fd, int offset, unsigned int origin)
int MeasureScaledIntroTextWidth (const char *text, short scale)
int DrawCenteredScaledIntroText (const char *text, short centreX, short baselineY, short scale)
short GetLineLength (const char *text)
void DrawSpriteDefault (Viewport *viewport, short x, short y, struct Shape *shape, short frame)
int print_subtitle (Viewport *viewport, short colour, const char *text)
int advance_canned_sequence (short obj)
unsigned int update_canned_sequence (short obj)
void __stdcall SplitGameClockTicks (unsigned char *parts)
void MonoDebug_install (void)
void MonoDebug_remove (void)
void SendMonoDebugCommand3 (void)
void SoundDebugPrintf (const char *fmt,...)
void MonoDebug_print (const char *text)
void ReadPerformanceCounter (LARGE_INTEGER *p)
char *__stdcall ResetStringBuilder (TextContext *context)

Variables

short nPacketError = 0
static char szDataFileReadError [0x40]
static char szDataCreateError [0x40]
static char szWriteDataError [0x40]
static char szSeekDataError [0x40]
static unsigned char abUnusedMonoBuffer [0x50]
static int bMonoDebugAvailable
static HANDLE hMonoDebugDriver
int nHostMouseMessageY
int bHostPrimaryMouseButton
int bHostSecondaryMouseButton

Detailed Description

Data-file wrappers, scaled interstitial text, canned sequences and the MONODEBG.VXD developer console.

Address range 403500-403e4f. MonoDebug_install and MonoDebug_print anchor the final block; the Mac auto unit starts at visit_the_cinema (403e50).

Definition in file mono.c.

Function Documentation

◆ advance_canned_sequence()

◆ CloseDataFile()

◆ CreateDataFile()

short __stdcall CreateDataFile ( const char * path)

Definition at line 47 of file mono.c.

References CreateDataFile(), nPacketError, and szDataCreateError.

Referenced by CreateDataFile(), and CreateEmptySaveGameFile().

◆ DrawCenteredScaledIntroText()

int DrawCenteredScaledIntroText ( const char * text,
short centreX,
short baselineY,
short scale )

◆ DrawSpriteDefault()

void DrawSpriteDefault ( Viewport * viewport,
short x,
short y,
struct Shape * shape,
short frame )

Definition at line 660 of file gr.c.

◆ GetLineLength()

short GetLineLength ( const char * text)

Definition at line 159 of file mono.c.

References GetLineLength(), GetShapeFrameExtent(), and pIntroFont.

Referenced by GetLineLength(), and print_subtitle().

◆ MeasureScaledIntroTextWidth()

int MeasureScaledIntroTextWidth ( const char * text,
short scale )

◆ MonoDebug_install()

void MonoDebug_install ( void )

Definition at line 331 of file mono.c.

References bMonoDebugAvailable, exit_squadron(), hMonoDebugDriver, and MonoDebug_install().

Referenced by MonoDebug_install(), and WinMain().

◆ MonoDebug_print()

void MonoDebug_print ( const char * text)

◆ MonoDebug_remove()

void MonoDebug_remove ( void )

◆ print_subtitle()

◆ ReadDataFileAtOffset()

int __stdcall ReadDataFileAtOffset ( unsigned short fd,
int offset,
unsigned int length,
void * data )

◆ ReadPerformanceCounter()

void ReadPerformanceCounter ( LARGE_INTEGER * p)

Definition at line 405 of file mono.c.

References ReadPerformanceCounter().

Referenced by ReadPerformanceCounter(), and RunSpaceFlight().

◆ ResetStringBuilder()

char *__stdcall ResetStringBuilder ( TextContext * context)

◆ SeekDataFile()

int __stdcall SeekDataFile ( unsigned short fd,
int offset,
unsigned int origin )

Definition at line 79 of file mono.c.

References nPacketError, SeekDataFile(), and szSeekDataError.

Referenced by OpenPacketSection(), SeekDataFile(), and SeekPacketSection().

◆ SendMonoDebugCommand3()

void SendMonoDebugCommand3 ( void )

◆ SoundDebugPrintf()

◆ SplitGameClockTicks()

void __stdcall SplitGameClockTicks ( unsigned char * parts)

Definition at line 307 of file mono.c.

References GetGameClockTicks(), and SplitGameClockTicks().

Referenced by FormatNavCoordinates(), and SplitGameClockTicks().

◆ update_canned_sequence()

◆ WriteDataFileAtOffset()

short __stdcall WriteDataFileAtOffset ( unsigned short fd,
int offset,
unsigned int length,
const void * data )

Variable Documentation

◆ abUnusedMonoBuffer

unsigned char abUnusedMonoBuffer[0x50]
static

Definition at line 321 of file mono.c.

◆ bHostPrimaryMouseButton

int bHostPrimaryMouseButton

Definition at line 327 of file mono.c.

Referenced by MainWindowProc(), player_input(), and TranslatePolledInputEvent().

◆ bHostSecondaryMouseButton

int bHostSecondaryMouseButton

Definition at line 328 of file mono.c.

Referenced by MainWindowProc(), player_input(), and TranslatePolledInputEvent().

◆ bMonoDebugAvailable

int bMonoDebugAvailable
static

◆ hMonoDebugDriver

HANDLE hMonoDebugDriver
static

◆ nHostMouseMessageY

int nHostMouseMessageY

Definition at line 326 of file mono.c.

Referenced by MainWindowProc(), and TranslatePolledInputEvent().

◆ nPacketError

◆ szDataCreateError

char szDataCreateError[0x40]
static

Definition at line 19 of file mono.c.

Referenced by CreateDataFile().

◆ szDataFileReadError

char szDataFileReadError[0x40]
static

Definition at line 18 of file mono.c.

Referenced by ReadDataFileAtOffset().

◆ szSeekDataError

char szSeekDataError[0x40]
static

Definition at line 21 of file mono.c.

Referenced by SeekDataFile().

◆ szWriteDataError

char szWriteDataError[0x40]
static

Definition at line 20 of file mono.c.

Referenced by WriteDataFileAtOffset().