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

16-bit DOS C string and memory shims, and the event manager's set-up entries. More...

#include "wc1.h"

Go to the source code of this file.

Functions

unsigned int __stdcall DosFarPtrToNear (void *v)
void *__stdcall DosNearPtrToFar (unsigned int v)
char *__stdcall DosStrrchr (char *s, short c)
char *__stdcall DosStrchr (const char *s, short c)
char *__stdcall DosStrcpy (char *dst, const char *src)
char *__stdcall CopyFarString (char *destination, const char *source)
short __stdcall DosStrlen (const char *s)
void __stdcall DosMemcpy (void *dst, const void *src, size_t n)
void __stdcall DosMemset (void *destination, unsigned int count, short value)
unsigned short GetEventManagerStatus (void)
void __stdcall RegisterEventManagerShutdown (void(*fn)(void))
short __stdcall InitializeEventManager (short period, unsigned short(*initialize)(void), void *configuration)
void ShutdownEventManager (void)
unsigned short __stdcall ConfigureEventManagerPointer (struct Shape *shape, short frame)
void ReleaseEventManagerPointerHook (void)
void __stdcall EventManagerHook (void(*callback)(void))
void __stdcall SetEventManagerPump (void(*pump)(void))
void EventManagerControlHook (void)

Variables

signed char cScreenViewMode
const ScreenViewportGeometry * pScreenViewGeometry
int anSortedObjects [SPACE_OBJECT_COUNT]
short nPacketDecompressInputPositionValue
void * pPktDecompInput
unsigned short wCurrentInputModifiers
MouseCursorState stMouseCursorState
void(*) pCurrentEventManagerPump (void)
int nPacketDecompressResult
short bCurrentRunningFromHardDiskFlag

Detailed Description

16-bit DOS C string and memory shims, and the event manager's set-up entries.

Address range 435410-4355ef. The shims are all __stdcall with short-width arguments, each forwarding to one CRT routine.

Definition in file strdos.c.

Function Documentation

◆ ConfigureEventManagerPointer()

unsigned short __stdcall ConfigureEventManagerPointer ( struct Shape * shape,
short frame )

Definition at line 107 of file strdos.c.

References ConfigureEventManagerPointer().

Referenced by ConfigureEventManagerPointer(), DosMemcpy(), and EMStartUp().

◆ CopyFarString()

char *__stdcall CopyFarString ( char * destination,
const char * source )

Definition at line 55 of file strdos.c.

References CopyFarString().

Referenced by CopyFarString(), and PlaySfxWaveFileByNumber().

◆ DosFarPtrToNear()

unsigned int __stdcall DosFarPtrToNear ( void * v)

◆ DosMemcpy()

void __stdcall DosMemcpy ( void * dst,
const void * src,
size_t n )

Definition at line 67 of file strdos.c.

References DosMemcpy().

◆ DosMemset()

void __stdcall DosMemset ( void * destination,
unsigned int count,
short value )

Definition at line 73 of file strdos.c.

References DosMemset().

Referenced by DosMemcpy(), and DosMemset().

◆ DosNearPtrToFar()

◆ DosStrchr()

char *__stdcall DosStrchr ( const char * s,
short c )

◆ DosStrcpy()

◆ DosStrlen()

short __stdcall DosStrlen ( const char * s)

◆ DosStrrchr()

char *__stdcall DosStrrchr ( char * s,
short c )

Definition at line 37 of file strdos.c.

References DosStrrchr().

Referenced by DosStrrchr(), and PlaySfxWaveFileByNumber().

◆ EventManagerControlHook()

void EventManagerControlHook ( void )

Definition at line 134 of file strdos.c.

References EventManagerControlHook().

Referenced by DosMemcpy(), and EventManagerControlHook().

◆ EventManagerHook()

void __stdcall EventManagerHook ( void(* callback )(void))

◆ GetEventManagerStatus()

unsigned short GetEventManagerStatus ( void )

Definition at line 79 of file strdos.c.

References GetEventManagerStatus().

Referenced by DosMemcpy(), GetEventManagerStatus(), and LoadOriginFxDrivers().

◆ InitializeEventManager()

short __stdcall InitializeEventManager ( short period,
unsigned short(* initialize )(void),
void * configuration )

Definition at line 90 of file strdos.c.

References InitializeEventManager(), and nEventManagerActive.

Referenced by DosMemcpy(), EMStartUp(), and InitializeEventManager().

◆ RegisterEventManagerShutdown()

void __stdcall RegisterEventManagerShutdown ( void(* fn )(void))

Definition at line 85 of file strdos.c.

References RegisterEventManagerShutdown().

Referenced by DosMemcpy(), EMStartUp(), and RegisterEventManagerShutdown().

◆ ReleaseEventManagerPointerHook()

void ReleaseEventManagerPointerHook ( void )

Definition at line 115 of file strdos.c.

References ReleaseEventManagerPointerHook().

Referenced by ReleaseEventManagerPointerHook(), and SuspendMouseCursor().

◆ SetEventManagerPump()

◆ ShutdownEventManager()

Variable Documentation

◆ anSortedObjects

int anSortedObjects[SPACE_OBJECT_COUNT]

Definition at line 15 of file strdos.c.

Referenced by draw_sorted_objects_to_buffer(), and sort_object_depth().

◆ bCurrentRunningFromHardDiskFlag

short bCurrentRunningFromHardDiskFlag

Definition at line 22 of file strdos.c.

Referenced by main(), and OpenDiskDataFile().

◆ cScreenViewMode

◆ nPacketDecompressInputPositionValue

short nPacketDecompressInputPositionValue

Definition at line 16 of file strdos.c.

Referenced by DecompressPacketSection().

◆ nPacketDecompressResult

int nPacketDecompressResult

Definition at line 21 of file strdos.c.

Referenced by DecompressPacketSection().

◆ pCurrentEventManagerPump

void(*) pCurrentEventManagerPump(void) ( void )

Definition at line 20 of file strdos.c.

Referenced by PumpWindowMessages(), SetEventManagerPump(), and WinMain().

◆ pPktDecompInput

void* pPktDecompInput

Definition at line 17 of file strdos.c.

Referenced by DecompressPacketSection().

◆ pScreenViewGeometry

const ScreenViewportGeometry* pScreenViewGeometry

Definition at line 14 of file strdos.c.

Referenced by dump_buffer_to_screen(), and set_up_screen_viewport().

◆ stMouseCursorState

◆ wCurrentInputModifiers

unsigned short wCurrentInputModifiers

Definition at line 18 of file strdos.c.

Referenced by player_input().