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

Shared Win32 declarations, types and library interfaces. More...

#include <windows.h>
#include <ddraw.h>
#include <mmsystem.h>
#include <conio.h>
#include <direct.h>
#include <io.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "game_data.h"
#include "globals.h"
#include "functions.h"
#include "externs.h"

Go to the source code of this file.

Data Structures

struct  IxSample
struct  IxSound
struct  Viewport
struct  MouseCursorState
struct  HostMouseMessage
struct  InputEvent
struct  InputEventState
struct  InputDeviceSample
struct  RasterSurface
struct  RasterClip
struct  RLETransformVertex
struct  RLEFrameHeader
struct  FontWorkspace
struct  TextContext
struct  CockpitReadout
struct  ModalTextPanel
struct  HudMessageSlot
struct  WaveTableEntry
struct  ActiveSoundEntry
struct  GuardedAllocation
struct  FreedHeapBlock
struct  DebugOverlayConsole

Macros

#define CANNED_SCENE_SNAPSHOT_BYTES
#define LOAD_OBJECT_TYPE_RECORD(fileName, section, record)
#define CUTSCENE_MOUTH_MIN_TICKS   6
#define CUTSCENE_SPRITE_MIN_TICKS   6
#define HOST_POINTER_SIZE   4
#define DEG2RAD   0.017453292519943295
#define COM_RELEASE(surface)
#define SPRITE_ROW_OFFSET(viewport, row)

Typedefs

typedef unsigned int DwordPtr
typedef short INT16
typedef unsigned short UINT16
typedef unsigned char UINT8
typedef signed char INT8
typedef struct IxSound IxSound
typedef struct IxSample IxSample
typedef struct Viewport Viewport
typedef struct MouseCursorState MouseCursorState
typedef struct HostMouseMessage HostMouseMessage
typedef char MouseCursorState_size_must_be_0x21[sizeof(MouseCursorState)==0x21 ? 1 :-1]
typedef struct InputEvent InputEvent
typedef struct InputEventState InputEventState
typedef struct InputDeviceSample InputDeviceSample
typedef struct RasterSurface RasterSurface
typedef struct RasterClip RasterClip
typedef struct RLETransformVertex RLETransformVertex
typedef struct RLEFrameHeader RLEFrameHeader
typedef struct FontWorkspace FontWorkspace
typedef struct TextContext TextContext
typedef struct CockpitReadout CockpitReadout
typedef struct ModalTextPanel ModalTextPanel
typedef struct HudMessageSlot HudMessageSlot
typedef char CockpitReadout_size_must_be_0x0a[sizeof(CockpitReadout)==0x0a ? 1 :-1]
typedef struct WaveTableEntry WaveTableEntry
typedef struct ActiveSoundEntry ActiveSoundEntry
typedef struct GuardedAllocation GuardedAllocation
typedef struct FreedHeapBlock FreedHeapBlock
typedef struct DebugOverlayConsole DebugOverlayConsole

Enumerations

enum  GAME_MODE { Player = 0 }
enum  GAME_STATUS { ALIVE = 0 }

Functions

void ShowOnScreenMessage (short duration, const char *fmt,...)
void SoundDebugPrintf (const char *fmt,...)
void SystemDebugPrintf (const char *fmt,...)

Detailed Description

Shared Win32 declarations, types and library interfaces.

Definition in file game.h.

Macro Definition Documentation

◆ CANNED_SCENE_SNAPSHOT_BYTES

#define CANNED_SCENE_SNAPSHOT_BYTES
Value:
unsigned int g_dwCannedSceneSnapshotStart
Definition viewrect.c:31
unsigned int g_dwCannedSceneSnapshotEnd
Definition viewrect.c:200

Definition at line 61 of file game.h.

Referenced by FinishCannedScenePlayback(), InitializeHighMemoryGraphicsBuffers(), ReadTapeInitialState(), and WriteTapeInitialState().

◆ COM_RELEASE

#define COM_RELEASE ( surface)
Value:
do { if ((surface) != 0) { IDirectDrawSurface_Release(surface); (surface) = 0; } } while (0)

Definition at line 110 of file game.h.

Referenced by DIBerror(), DIBpositionWindow(), and DIBunInstall().

◆ CUTSCENE_MOUTH_MIN_TICKS

#define CUTSCENE_MOUTH_MIN_TICKS   6

Definition at line 88 of file game.h.

◆ CUTSCENE_SPRITE_MIN_TICKS

#define CUTSCENE_SPRITE_MIN_TICKS   6

Definition at line 97 of file game.h.

◆ DEG2RAD

#define DEG2RAD   0.017453292519943295

Definition at line 107 of file game.h.

Referenced by CosFixed(), and SinFixed().

◆ HOST_POINTER_SIZE

◆ LOAD_OBJECT_TYPE_RECORD

#define LOAD_OBJECT_TYPE_RECORD ( fileName,
section,
record )
Value:
LoadPacketIntoBuffer((fileName), (section), (record), 0)
void * LoadPacketIntoBuffer(char *fileName, short section, void *destination, int registerHandle)
Definition disk.c:141

Definition at line 73 of file game.h.

Referenced by load_ship(), and LoadAlternateShipType().

◆ SPRITE_ROW_OFFSET

#define SPRITE_ROW_OFFSET ( viewport,
row )
Value:
viewport->rowOffsets[row]

Definition at line 159 of file game.h.

Typedef Documentation

◆ ActiveSoundEntry

typedef struct ActiveSoundEntry ActiveSoundEntry

◆ CockpitReadout

typedef struct CockpitReadout CockpitReadout

◆ CockpitReadout_size_must_be_0x0a

typedef char CockpitReadout_size_must_be_0x0a[ sizeof(CockpitReadout)==0x0a ? 1 :-1]

Definition at line 331 of file game.h.

◆ DebugOverlayConsole

typedef struct DebugOverlayConsole DebugOverlayConsole

◆ DwordPtr

typedef unsigned int DwordPtr

Definition at line 45 of file game.h.

◆ FontWorkspace

typedef struct FontWorkspace FontWorkspace

◆ FreedHeapBlock

typedef struct FreedHeapBlock FreedHeapBlock

◆ GuardedAllocation

typedef struct GuardedAllocation GuardedAllocation

◆ HostMouseMessage

typedef struct HostMouseMessage HostMouseMessage

◆ HudMessageSlot

typedef struct HudMessageSlot HudMessageSlot

◆ InputDeviceSample

typedef struct InputDeviceSample InputDeviceSample

◆ InputEvent

typedef struct InputEvent InputEvent

◆ InputEventState

typedef struct InputEventState InputEventState

◆ INT16

typedef short INT16

Definition at line 116 of file game.h.

◆ INT8

typedef signed char INT8

Definition at line 119 of file game.h.

◆ IxSample

typedef struct IxSample IxSample

Definition at line 122 of file game.h.

◆ IxSound

typedef struct IxSound IxSound

Definition at line 121 of file game.h.

◆ ModalTextPanel

typedef struct ModalTextPanel ModalTextPanel

◆ MouseCursorState

typedef struct MouseCursorState MouseCursorState

◆ MouseCursorState_size_must_be_0x21

typedef char MouseCursorState_size_must_be_0x21[ sizeof(MouseCursorState)==0x21 ? 1 :-1]

Definition at line 188 of file game.h.

◆ RasterClip

typedef struct RasterClip RasterClip

◆ RasterSurface

typedef struct RasterSurface RasterSurface

◆ RLEFrameHeader

typedef struct RLEFrameHeader RLEFrameHeader

◆ RLETransformVertex

typedef struct RLETransformVertex RLETransformVertex

◆ TextContext

typedef struct TextContext TextContext

◆ UINT16

typedef unsigned short UINT16

Definition at line 117 of file game.h.

◆ UINT8

typedef unsigned char UINT8

Definition at line 118 of file game.h.

◆ Viewport

typedef struct Viewport Viewport

◆ WaveTableEntry

typedef struct WaveTableEntry WaveTableEntry

Enumeration Type Documentation

◆ GAME_MODE

enum GAME_MODE
Enumerator
Player 

Definition at line 431 of file game.h.

◆ GAME_STATUS

Enumerator
ALIVE 

Definition at line 436 of file game.h.

Function Documentation

◆ ShowOnScreenMessage()

void ShowOnScreenMessage ( short duration,
const char * fmt,
... )

Definition at line 151 of file message.c.

◆ SoundDebugPrintf()

void SoundDebugPrintf ( const char * fmt,
... )

Definition at line 64 of file mono.c.

◆ SystemDebugPrintf()

void SystemDebugPrintf ( const char * fmt,
... )

Definition at line 30 of file console.cpp.