coastline 0.0.4
Loading...
Searching...
No Matches
DirectDrawDriver Class Reference

A DirectDraw driver the game found. More...

#include <renderer.h>

Public Member Functions

unsigned GetFlags () const
const GUID * GetGuid () const
const char * GetName () const
unsigned GetDisplayModeCount () const
DisplayMode * GetDisplayModesHead () const
DirectDrawDriver * GetPrevious () const
DirectDrawDriver * GetNext () const
void SetPrevious (DirectDrawDriver *driver)
 Link the preceding driver.
void SetNext (DirectDrawDriver *driver)
 Link the following driver.
 DirectDrawDriver ()
 Start a driver that is not usable, with empty abilities.
HRESULT EnqueueDirectDrawModeNode (DisplayMode *pMode)
 Add a display mode to the end of the modes of the driver.
HRESULT AppendDirect3DDeviceNode (D3DDeviceNode *pDevice)
 Add a Direct3D device to the end of the devices of the driver.
DisplayMode * FindDisplayMode (int nWidth, int nHeight, int nBitDepth, void *pUnused, DisplayMode **ppFallback, DisplayMode *pFirst)
 Find a display mode of a size and a depth.
D3DDeviceNode * SelectPreferredD3DDevice (GUID *pGuid, D3DDeviceNode **ppPreferred, D3DDeviceNode *pFirst)
 Select the device a GUID names, or report the device the game prefers: a device of the hardware, then the emulation of RGB, then that of MMX, then the first device.
D3DDeviceNode * FindRenderDevice (GUID *pGuid, DisplayMode *pMode, D3DDeviceNode **ppFallback, D3DDeviceNode *pFirst)
 Find the device a GUID names that supports a display mode.
DisplayMode * FindDisplayModeForDevice (int nWidth, int nHeight, int nBitDepth, void *pUnused, D3DDeviceNode *pDevice, DisplayMode **ppFallback, DisplayMode *pFirst)
 Find a display mode of a size and a depth that a device supports.
HRESULT InitializeDirectDrawDriver (GUID *pGuid, LPSTR pszName, LPSTR pszDescription)
 Read a driver DirectDraw reports, with its devices and its modes.
void ShutdownDirectDrawDriver ()
 Free the devices and the modes of the driver.
bool CompareDirectDrawDriverGuid (const GUID *pGuid)
 Whether a GUID selects the driver, a usable driver alone.
GUID * GetDirectDrawDriverGuid ()
 The GUID that selects the driver.

Detailed Description

A DirectDraw driver the game found.

Constructor & Destructor Documentation

◆ DirectDrawDriver()

DirectDrawDriver::DirectDrawDriver ( )
inline

Start a driver that is not usable, with empty abilities.

Member Function Documentation

◆ GetFlags()

unsigned DirectDrawDriver::GetFlags ( ) const
inline
Returns
The driver's capability flags.

◆ GetGuid()

const GUID * DirectDrawDriver::GetGuid ( ) const
inline
Returns
The driver's GUID.

◆ GetName()

const char * DirectDrawDriver::GetName ( ) const
inline
Returns
The driver's displayed name.

◆ GetDisplayModeCount()

unsigned DirectDrawDriver::GetDisplayModeCount ( ) const
inline
Returns
The number of display modes.

◆ GetDisplayModesHead()

DisplayMode * DirectDrawDriver::GetDisplayModesHead ( ) const
inline
Returns
The first display mode.

◆ GetPrevious()

DirectDrawDriver * DirectDrawDriver::GetPrevious ( ) const
inline
Returns
The previous driver in the list.

◆ GetNext()

DirectDrawDriver * DirectDrawDriver::GetNext ( ) const
inline
Returns
The next driver in the list.

◆ SetPrevious()

void DirectDrawDriver::SetPrevious ( DirectDrawDriver * driver)
inline

Link the preceding driver.

◆ SetNext()

void DirectDrawDriver::SetNext ( DirectDrawDriver * driver)
inline

Link the following driver.

◆ EnqueueDirectDrawModeNode()

HRESULT DirectDrawDriver::EnqueueDirectDrawModeNode ( DisplayMode * pMode)

Add a display mode to the end of the modes of the driver.

Parameters
pModeThe mode.
Returns
S_OK, or E_INVALIDARG without a mode.
Ghidra address:
BRD3D: 0x1001b430

◆ AppendDirect3DDeviceNode()

HRESULT DirectDrawDriver::AppendDirect3DDeviceNode ( D3DDeviceNode * pDevice)

Add a Direct3D device to the end of the devices of the driver.

Parameters
pDeviceThe device.
Returns
S_OK, or E_INVALIDARG without a device.
Ghidra address:
BRD3D: 0x1001b630

◆ FindDisplayMode()

DisplayMode * DirectDrawDriver::FindDisplayMode ( int nWidth,
int nHeight,
int nBitDepth,
void * pUnused,
DisplayMode ** ppFallback,
DisplayMode * pFirst )

Find a display mode of a size and a depth.

Parameters
nWidthThe width of the mode.
nHeightThe height of the mode.
nBitDepthThe bits of a pixel of the mode.
pUnusedNot read.
ppFallbackReceives the last mode of 640 by 480 at 8 bits on the way, or the first mode searched, unless nullptr.
pFirstThe mode the search starts at, or nullptr for the first.
Returns
The mode, or nullptr when none matches.
Ghidra address:
BRD3D: 0x1001b490

◆ SelectPreferredD3DDevice()

D3DDeviceNode * DirectDrawDriver::SelectPreferredD3DDevice ( GUID * pGuid,
D3DDeviceNode ** ppPreferred,
D3DDeviceNode * pFirst )

Select the device a GUID names, or report the device the game prefers: a device of the hardware, then the emulation of RGB, then that of MMX, then the first device.

Parameters
pGuidThe GUID of the device, or nullptr.
ppPreferredReceives the device the game prefers, unless nullptr.
pFirstThe device the search starts at, or nullptr for the first.
Returns
The device the GUID names, or nullptr.
Ghidra address:
BRD3D: 0x1001b690

◆ FindRenderDevice()

D3DDeviceNode * DirectDrawDriver::FindRenderDevice ( GUID * pGuid,
DisplayMode * pMode,
D3DDeviceNode ** ppFallback,
D3DDeviceNode * pFirst )

Find the device a GUID names that supports a display mode.

Parameters
pGuidThe GUID of the device.
pModeThe mode.
ppFallbackReceives the last device on the way that supports the mode, unless nullptr.
pFirstThe device the search starts at, or nullptr for the first.
Returns
The device, or nullptr when none matches.
Ghidra address:
BRD3D: 0x1001b7c0

◆ FindDisplayModeForDevice()

DisplayMode * DirectDrawDriver::FindDisplayModeForDevice ( int nWidth,
int nHeight,
int nBitDepth,
void * pUnused,
D3DDeviceNode * pDevice,
DisplayMode ** ppFallback,
DisplayMode * pFirst )

Find a display mode of a size and a depth that a device supports.

Parameters
nWidthThe width of the mode.
nHeightThe height of the mode.
nBitDepthThe bits of a pixel of the mode.
pUnusedNot read.
pDeviceThe device.
ppFallbackReceives the last mode on the way that the device supports, unless nullptr.
pFirstThe mode the search starts at, or nullptr for the first.
Returns
The mode, or nullptr when none matches.
Ghidra address:
BRD3D: 0x1001b880

◆ InitializeDirectDrawDriver()

HRESULT DirectDrawDriver::InitializeDirectDrawDriver ( GUID * pGuid,
LPSTR pszName,
LPSTR pszDescription )

Read a driver DirectDraw reports, with its devices and its modes.

Parameters
pGuidThe GUID of the driver, or nullptr for the primary.
pszNameThe name of the driver.
pszDescriptionThe description of the driver.
Returns
S_OK, or the error of DirectDraw.
Ghidra address:
BRD3D: 0x1001b090

◆ ShutdownDirectDrawDriver()

void DirectDrawDriver::ShutdownDirectDrawDriver ( )

Free the devices and the modes of the driver.

Ghidra address:
BRD3D: 0x1001b280

◆ CompareDirectDrawDriverGuid()

bool DirectDrawDriver::CompareDirectDrawDriverGuid ( const GUID * pGuid)

Whether a GUID selects the driver, a usable driver alone.

No GUID selects the primary.

Parameters
pGuidThe GUID, or nullptr for the primary driver.
Returns
Whether the GUID selects the driver.
Ghidra address:
BRD3D: 0x1001b2d0

◆ GetDirectDrawDriverGuid()

GUID * DirectDrawDriver::GetDirectDrawDriverGuid ( )

The GUID that selects the driver.

Returns
The GUID, or nullptr for the primary driver.
Ghidra address:
BRD3D: 0x1001b960

The documentation for this class was generated from the following file: