Isle
Loading...
Searching...
No Matches
MxDirectDraw Class Reference

Class responsible for interfacing with DirectDraw to manage rendering surfaces, palettes, and fullscreen/windowed device modes. More...

#include <mxdirectdraw.h>

Inheritance diagram for MxDirectDraw:
Collaboration diagram for MxDirectDraw:

Public Types

typedef void(* ErrorHandler) (const char *, HRESULT, void *)
 Function pointer type for error handling callbacks. More...
 

Public Member Functions

 MxDirectDraw ()
 Constructs a MxDirectDraw instance and initializes its members. More...
 
virtual ~MxDirectDraw ()
 Virtual destructor. More...
 
virtual BOOL Create (HWND hWnd, BOOL fullscreen_1, BOOL surface_fullscreen, BOOL onlySystemMemory, int width, int height, int bpp, const PALETTEENTRY *pPaletteEntries, int paletteEntryCount)
 Creates and initializes the DirectDraw device and associated surfaces/windows/state. More...
 
virtual void Destroy ()
 Shuts down DirectDraw and releases all resources, including device and surfaces. More...
 
virtual void DestroyButNotDirectDraw ()
 Releases all DirectDraw-related resources except the DirectDraw device itself. More...
 
IDirectDraw * DirectDraw ()
 Returns the DirectDraw device interface pointer. More...
 
IDirectDrawSurface * FrontBuffer ()
 Returns the surface used as the primary/front buffer. More...
 
IDirectDrawSurface * BackBuffer ()
 Returns the back buffer surface. More...
 
IDirectDrawClipper * Clipper ()
 Returns the current DirectDraw clipper object used for window clipping. More...
 
DeviceModesInfo::ModeCurrentMode ()
 Provides access to the current selected display mode (width, height, bpp). More...
 
BOOL IsFullScreen ()
 Returns TRUE if DirectDraw is currently set in exclusive fullscreen mode. More...
 
BOOL IsSupportedMode (int width, int height, int bpp)
 Checks if the given mode (resolution, bpp) is supported by the current device. More...
 
int Pause (BOOL)
 Pauses or resumes DirectDraw rendering. More...
 
BOOL RestoreSurfaces ()
 Attempts to restore all DirectDraw surfaces that may have been lost. More...
 
BOOL TextToTextSurface1 (const char *text)
 Draws the specified text string to the debug "text1" surface. More...
 
BOOL TextToTextSurface2 (const char *lpString)
 Draws the specified string to the debug "text2" surface. More...
 
virtual const char * ErrorToString (HRESULT p_error)
 Converts DirectDraw error code to a human-readable string. More...
 
int FlipToGDISurface ()
 Flips to the Windows GDI surface, restoring the desktop when leaving exclusive fullscreen. More...
 

Static Public Member Functions

static int GetPrimaryBitDepth ()
 Returns the bit depth (color depth) of the primary display device. More...
 

Protected Member Functions

BOOL SetPaletteEntries (const PALETTEENTRY *pPaletteEntries, int paletteEntryCount, BOOL fullscreen)
 Sets the DirectDraw palette using the provided palette entries. More...
 
BOOL CacheOriginalPaletteEntries ()
 Caches the original Windows/system palette for restoration. More...
 
BOOL RestoreOriginalPaletteEntries ()
 Restores the original Windows palette from backup. More...
 
BOOL RestorePaletteEntries ()
 Restores the active DirectDraw palette entries from the internal palette array. More...
 
BOOL DDInit (BOOL fullscreen)
 Initializes DirectDraw cooperative level for fullscreen or windowed mode. More...
 
BOOL DDSetMode (int width, int height, int bpp)
 Changes DirectDraw to the specified display mode and creates relevant surfaces. More...
 
BOOL DDCreateSurfaces ()
 Internal: Creates all necessary front/back/offscreen surfaces for rendering. More...
 
HRESULT CreateDDSurface (LPDDSURFACEDESC a2, LPDIRECTDRAWSURFACE *a3, IUnknown *a4)
 Creates a DirectDraw surface with the given surface description. More...
 
BOOL GetDDSurfaceDesc (LPDDSURFACEDESC lpDDSurfDesc, LPDIRECTDRAWSURFACE lpDDSurf)
 Retrieves the surface description for the given DirectDraw surface. More...
 
BOOL CreateZBuffer (DWORD memorytype, DWORD depth)
 Creates a z-buffer with the given memory type/capabilities and attaches it to the back buffer. More...
 
BOOL CreateTextSurfaces ()
 Creates the two offscreen text surfaces used for debug overlay. More...
 
BOOL TextToTextSurface (const char *text, IDirectDrawSurface *pSurface, SIZE &textSizeOnSurface)
 Renders a string to the given surface and fills in its onscreen size. More...
 
void Error (const char *p_message, int p_error)
 Invokes the error handler, optionally destroying the device, and outputs the given error message/code. More...
 
BOOL RecreateDirectDraw (GUID **a2)
 Recreates the DirectDraw device, deleting and restoring the device object pointer. More...
 
void FUN_1009e020 ()
 Internal: Clears the backbuffer(s), locking and filling with zero color, possibly flipping to front. More...
 
void FUN_1009d920 ()
 Internal: Restores original palette and resets display mode and cooperative level. More...
 

Protected Attributes

BOOL m_bOnlySoftRender
 If TRUE, restricts rendering to software only; disables hardware acceleration. [AI]. More...
 
BOOL m_bFlipSurfaces
 TRUE if using DirectDraw flipping (fullscreen buffer swap); windowed disables this. [AI]. More...
 
IDirectDraw * m_pDirectDraw
 Pointer to the DirectDraw COM device. [AI]. More...
 
IDirectDrawSurface * m_pFrontBuffer
 Primary or front display surface. [AI]. More...
 
IDirectDrawSurface * m_pBackBuffer
 Backbuffer for offscreen rendering/flipping. [AI]. More...
 
IDirectDrawSurface * m_pZBuffer
 Attached Z-buffer for 3D rendering. [AI]. More...
 
IDirectDrawSurface * m_pText1Surface
 Debug overlay surface for "text1". [AI]. More...
 
IDirectDrawSurface * m_pText2Surface
 Debug overlay surface for "text2". [AI]. More...
 
IDirectDrawClipper * m_pClipper
 Clipper for managing windowed surface boundaries. [AI]. More...
 
IDirectDrawPalette * m_pPalette
 DirectDraw palette assigned to the primary/back surfaces. [AI]. More...
 
PALETTEENTRY m_paletteEntries [256]
 Active 8-bit palette entries for palettized modes. [AI]. More...
 
PALETTEENTRY m_originalPaletteEntries [256]
 Backup of system/Windows palette for restoration. [AI]. More...
 
SIZE m_text1SizeOnSurface
 Pixel size of rendered text1 overlay surface. [AI]. More...
 
SIZE m_text2SizeOnSurface
 Pixel size of rendered text2 overlay surface. [AI]. More...
 
HWND m_hWndMain
 Main window handle on which DirectDraw is initialized. [AI]. More...
 
HFONT m_hFont
 Font handle for debug text overlays. [AI]. More...
 
BOOL m_bIgnoreWMSIZE
 Internal flag to suppress window resize messages during device switching. [AI]. More...
 
BOOL m_bPrimaryPalettized
 TRUE if primary/backbuffer is using 8-bit palettized mode. [AI]. More...
 
BOOL m_bFullScreen
 TRUE if device is in exclusive fullscreen mode. [AI]. More...
 
void * m_unk0x850
 [AI] Purpose unknown; possibly driver-specific data or reserved. More...
 
BOOL m_bOnlySystemMemory
 TRUE for system RAM-only surfaces; disables video memory allocation. [AI]. More...
 
BOOL m_bIsOnPrimaryDevice
 TRUE if rendering on Windows' main display; disables windowed mode for other devices. [AI]. More...
 
ErrorHandler m_pErrorHandler
 Callback for non-fatal DirectDraw errors. [AI]. More...
 
ErrorHandler m_pFatalErrorHandler
 Callback invoked for fatal device errors. [AI]. More...
 
void * m_pErrorHandlerArg
 Custom argument pointer for error handler. [AI]. More...
 
void * m_pFatalErrorHandlerArg
 Custom argument pointer for fatal error handler. [AI]. More...
 
int m_pauseCount
 Count of nested pauses; ensures multiple Pause(TRUE)/Pause(FALSE) work correctly. [AI]. More...
 
DeviceModesInfom_currentDevInfo
 Device info array for storing supported display modes. [AI]. More...
 
DeviceModesInfo::Mode m_currentMode
 Struct with current width, height, and bits per pixel. [AI]. More...
 

Detailed Description

Class responsible for interfacing with DirectDraw to manage rendering surfaces, palettes, and fullscreen/windowed device modes.

[AI]

[AI] Manages creation, destruction, and manipulation of primary/back buffers, palettes, display modes, clipper objects, z-buffers, and debug text surfaces for LEGO Island's rendering subsystem. Handles error notification and surface restoration. Allows for windowed and fullscreen operation and provides utility for palette management; also supports custom error handlers. [AI]

Definition at line 17 of file mxdirectdraw.h.

Member Typedef Documentation

◆ ErrorHandler

typedef void(* MxDirectDraw::ErrorHandler) (const char *, HRESULT, void *)

Function pointer type for error handling callbacks.

[AI]

Parameters
constchar* Error message string. [AI]
HRESULTError code from DirectDraw. [AI]
void*User-defined callback argument. [AI]

Definition at line 25 of file mxdirectdraw.h.

Constructor & Destructor Documentation

◆ MxDirectDraw()

MxDirectDraw::MxDirectDraw ( )

Constructs a MxDirectDraw instance and initializes its members.

[AI]

Definition at line 25 of file mxdirectdraw.cpp.

◆ ~MxDirectDraw()

MxDirectDraw::~MxDirectDraw ( )
virtual

Virtual destructor.

Destroys the DirectDraw instance and releases all resources. [AI]

Definition at line 53 of file mxdirectdraw.cpp.

Member Function Documentation

◆ BackBuffer()

IDirectDrawSurface * MxDirectDraw::BackBuffer ( )
inline

Returns the back buffer surface.

[AI]

Returns
IDirectDrawSurface* Pointer to the back buffer surface. [AI]

Definition at line 94 of file mxdirectdraw.h.

◆ CacheOriginalPaletteEntries()

BOOL MxDirectDraw::CacheOriginalPaletteEntries ( )
protected

Caches the original Windows/system palette for restoration.

[AI]

Returns
TRUE if palette was cached or not applicable. [AI]

Definition at line 141 of file mxdirectdraw.cpp.

◆ Clipper()

IDirectDrawClipper * MxDirectDraw::Clipper ( )
inline

Returns the current DirectDraw clipper object used for window clipping.

[AI]

Returns
IDirectDrawClipper* Pointer to the clipper. [AI]

Definition at line 100 of file mxdirectdraw.h.

◆ Create()

BOOL MxDirectDraw::Create ( HWND  hWnd,
BOOL  fullscreen_1,
BOOL  surface_fullscreen,
BOOL  onlySystemMemory,
int  width,
int  height,
int  bpp,
const PALETTEENTRY *  pPaletteEntries,
int  paletteEntryCount 
)
virtual

Creates and initializes the DirectDraw device and associated surfaces/windows/state.

[AI]

Parameters
hWndThe window handle to attach DirectDraw to. [AI]
fullscreen_1If TRUE, the device is set up for exclusive fullscreen; otherwise windowed. [AI]
surface_fullscreenIf TRUE, enables flipping surfaces (primary/back) for fullscreen rendering. [AI]
onlySystemMemoryIf TRUE, surfaces are allocated in system RAM only (not video memory). [AI]
widthDesired screen width. [AI]
heightDesired screen height. [AI]
bppDesired bits per pixel (color depth). [AI]
pPaletteEntriesPalette data to use for palettized displays. [AI]
paletteEntryCountNumber of entries in pPaletteEntries. [AI]
Returns
TRUE on success, FALSE if device or surfaces could not be created. [AI]

Reimplemented in MxDirect3D.

Definition at line 86 of file mxdirectdraw.cpp.

◆ CreateDDSurface()

HRESULT MxDirectDraw::CreateDDSurface ( LPDDSURFACEDESC  a2,
LPDIRECTDRAWSURFACE a3,
IUnknown a4 
)
protected

Creates a DirectDraw surface with the given surface description.

[AI]

Parameters
a2The DDSURFACEDESC that specifies the new surface parameters. [AI]
a3Receives the created surface pointer. [AI]
a4Optional: outer COM object for aggregation, usually NULL. [AI]
Returns
HRESULT from DirectDraw CreateSurface call. [AI]

Definition at line 446 of file mxdirectdraw.cpp.

◆ CreateTextSurfaces()

BOOL MxDirectDraw::CreateTextSurfaces ( )
protected

Creates the two offscreen text surfaces used for debug overlay.

[AI]

Returns
TRUE if surfaces and font created successfully. [AI]

Definition at line 639 of file mxdirectdraw.cpp.

◆ CreateZBuffer()

BOOL MxDirectDraw::CreateZBuffer ( DWORD  memorytype,
DWORD  depth 
)
protected

Creates a z-buffer with the given memory type/capabilities and attaches it to the back buffer.

[AI]

Parameters
memorytypeDevice memory type (e.g., system or video memory). [AI]
depthNumber of bits for the z-buffer. [AI]
Returns
TRUE if the z-buffer was created and attached successfully. [AI]

Definition at line 778 of file mxdirectdraw.cpp.

◆ CurrentMode()

DeviceModesInfo::Mode * MxDirectDraw::CurrentMode ( )
inline

Provides access to the current selected display mode (width, height, bpp).

[AI]

Returns
DeviceModesInfo::Mode* Pointer to the mode structure. [AI]

Definition at line 106 of file mxdirectdraw.h.

◆ DDCreateSurfaces()

BOOL MxDirectDraw::DDCreateSurfaces ( )
protected

Internal: Creates all necessary front/back/offscreen surfaces for rendering.

[AI]

Returns
TRUE if surfaces were created successfully. [AI]

Definition at line 474 of file mxdirectdraw.cpp.

◆ DDInit()

BOOL MxDirectDraw::DDInit ( BOOL  fullscreen)
protected

Initializes DirectDraw cooperative level for fullscreen or windowed mode.

[AI]

Parameters
fullscreenWhether to use exclusive fullscreen or not. [AI]
Returns
TRUE if initialization succeeded, otherwise FALSE. [AI]

Definition at line 260 of file mxdirectdraw.cpp.

◆ DDSetMode()

BOOL MxDirectDraw::DDSetMode ( int  width,
int  height,
int  bpp 
)
protected

Changes DirectDraw to the specified display mode and creates relevant surfaces.

[AI]

[AI] Handles resizing and switching window styles for windowed mode; validates that the requested mode exists. [AI]

Parameters
widthRequested width. [AI]
heightRequested height. [AI]
bppRequested bits per pixel. [AI]
Returns
TRUE if the mode was set and surfaces created, FALSE on failure. [AI]

Definition at line 321 of file mxdirectdraw.cpp.

◆ Destroy()

void MxDirectDraw::Destroy ( )
virtual

Shuts down DirectDraw and releases all resources, including device and surfaces.

[AI]

Reimplemented in MxDirect3D.

Definition at line 207 of file mxdirectdraw.cpp.

◆ DestroyButNotDirectDraw()

void MxDirectDraw::DestroyButNotDirectDraw ( )
virtual

Releases all DirectDraw-related resources except the DirectDraw device itself.

[AI]

Reimplemented in MxDirect3D.

Definition at line 225 of file mxdirectdraw.cpp.

◆ DirectDraw()

IDirectDraw * MxDirectDraw::DirectDraw ( )
inline

Returns the DirectDraw device interface pointer.

[AI]

Returns
IDirectDraw* DirectDraw COM interface. [AI]

Definition at line 82 of file mxdirectdraw.h.

◆ Error()

void MxDirectDraw::Error ( const char *  p_message,
int  p_error 
)
protected

Invokes the error handler, optionally destroying the device, and outputs the given error message/code.

[AI]

Parameters
p_messageDescription or context message. [AI]
p_errorDirectDraw HRESULT error or custom error code. [AI]

Definition at line 916 of file mxdirectdraw.cpp.

◆ ErrorToString()

const char * MxDirectDraw::ErrorToString ( HRESULT  p_error)
virtual

Converts DirectDraw error code to a human-readable string.

[AI]

Parameters
p_errorHRESULT error code from a DirectDraw operation. [AI]
Returns
Pointer to error message string. [AI]

Definition at line 936 of file mxdirectdraw.cpp.

◆ FlipToGDISurface()

int MxDirectDraw::FlipToGDISurface ( )

Flips to the Windows GDI surface, restoring the desktop when leaving exclusive fullscreen.

[AI]

Returns
TRUE on success, FALSE on error. [AI]

Definition at line 898 of file mxdirectdraw.cpp.

◆ FrontBuffer()

IDirectDrawSurface * MxDirectDraw::FrontBuffer ( )
inline

Returns the surface used as the primary/front buffer.

[AI]

Returns
IDirectDrawSurface* Pointer to the front buffer surface. [AI]

Definition at line 88 of file mxdirectdraw.h.

◆ FUN_1009d920()

void MxDirectDraw::FUN_1009d920 ( )
protected

Internal: Restores original palette and resets display mode and cooperative level.

[AI]

[AI] Used for gracefully transitioning out of exclusive fullscreen or when deinitializing. [AI]

Definition at line 247 of file mxdirectdraw.cpp.

◆ FUN_1009e020()

void MxDirectDraw::FUN_1009e020 ( )
protected

Internal: Clears the backbuffer(s), locking and filling with zero color, possibly flipping to front.

[AI]

[AI] Called after (re)creating surfaces or setting new modes; ensures surface memory is initialized. [AI]

Definition at line 552 of file mxdirectdraw.cpp.

◆ GetDDSurfaceDesc()

BOOL MxDirectDraw::GetDDSurfaceDesc ( LPDDSURFACEDESC  lpDDSurfDesc,
LPDIRECTDRAWSURFACE  lpDDSurf 
)
protected

Retrieves the surface description for the given DirectDraw surface.

[AI]

Parameters
lpDDSurfDescPointer to DDSURFACEDESC to receive surface info. [AI]
lpDDSurfThe surface to be queried. [AI]
Returns
TRUE if description was retrieved. [AI]

Definition at line 458 of file mxdirectdraw.cpp.

◆ GetPrimaryBitDepth()

int MxDirectDraw::GetPrimaryBitDepth ( )
static

Returns the bit depth (color depth) of the primary display device.

[AI]

[AI] Queries the current display mode and determines if it's palette-indexed. May set a global indicating 8-bit palette mode is active. [AI]

Definition at line 65 of file mxdirectdraw.cpp.

◆ IsFullScreen()

BOOL MxDirectDraw::IsFullScreen ( )
inline

Returns TRUE if DirectDraw is currently set in exclusive fullscreen mode.

[AI]

Definition at line 111 of file mxdirectdraw.h.

◆ IsSupportedMode()

BOOL MxDirectDraw::IsSupportedMode ( int  width,
int  height,
int  bpp 
)

Checks if the given mode (resolution, bpp) is supported by the current device.

[AI]

Parameters
widthWidth in pixels. [AI]
heightHeight in pixels. [AI]
bppBits per pixel. [AI]
Returns
TRUE if the mode is available, FALSE otherwise. [AI]

Definition at line 287 of file mxdirectdraw.cpp.

◆ Pause()

int MxDirectDraw::Pause ( BOOL  p_pause)

Pauses or resumes DirectDraw rendering.

Used to handle palette/surface swapping on alt-tab, restoring. [AI]

Parameters
Flagindicating whether to pause (TRUE) or resume (FALSE). [AI]
Returns
TRUE on success, FALSE on failure. [AI]

Definition at line 810 of file mxdirectdraw.cpp.

◆ RecreateDirectDraw()

BOOL MxDirectDraw::RecreateDirectDraw ( GUID **  a2)
protected

Recreates the DirectDraw device, deleting and restoring the device object pointer.

[AI]

[AI] Used during device mode switches or DX context loss; can be passed a GUID for the device. [AI]

Parameters
a2Pointer to GUID pointer, usually obtained from DeviceModesInfo. [AI]
Returns
TRUE if device was created successfully. [AI]

Definition at line 133 of file mxdirectdraw.cpp.

◆ RestoreOriginalPaletteEntries()

BOOL MxDirectDraw::RestoreOriginalPaletteEntries ( )
protected

Restores the original Windows palette from backup.

[AI]

Returns
TRUE if palette was restored. [AI]

Definition at line 874 of file mxdirectdraw.cpp.

◆ RestorePaletteEntries()

BOOL MxDirectDraw::RestorePaletteEntries ( )
protected

Restores the active DirectDraw palette entries from the internal palette array.

[AI]

Returns
TRUE if palette was set. [AI]

Definition at line 853 of file mxdirectdraw.cpp.

◆ RestoreSurfaces()

BOOL MxDirectDraw::RestoreSurfaces ( )

Attempts to restore all DirectDraw surfaces that may have been lost.

[AI]

[AI] Surfaces can become lost when switching to/from exclusive fullscreen or losing the device context. [AI]

Returns
TRUE on success, FALSE on surface restoration failure. [AI]

Definition at line 719 of file mxdirectdraw.cpp.

◆ SetPaletteEntries()

BOOL MxDirectDraw::SetPaletteEntries ( const PALETTEENTRY *  pPaletteEntries,
int  paletteEntryCount,
BOOL  fullscreen 
)
protected

Sets the DirectDraw palette using the provided palette entries.

Used for palettized display modes. [AI]

Parameters
pPaletteEntriesPointer to palette entries. [AI]
paletteEntryCountNumber of palette entries. [AI]
fullscreenWhether called in fullscreen context (may affect updates to system palette). [AI]
Returns
TRUE on palette update success, otherwise FALSE. [AI]

Definition at line 155 of file mxdirectdraw.cpp.

◆ TextToTextSurface()

BOOL MxDirectDraw::TextToTextSurface ( const char *  text,
IDirectDrawSurface *  pSurface,
SIZE &  textSizeOnSurface 
)
protected

Renders a string to the given surface and fills in its onscreen size.

[AI]

Parameters
textNull-terminated string to draw. [AI]
pSurfaceTarget DirectDraw surface. [AI]
textSizeOnSurfaceReceives the size of the rendered text. [AI]
Returns
TRUE on success, FALSE on failure. [AI]

Definition at line 592 of file mxdirectdraw.cpp.

◆ TextToTextSurface1()

BOOL MxDirectDraw::TextToTextSurface1 ( const char *  text)

Draws the specified text string to the debug "text1" surface.

[AI]

Parameters
textNull-terminated string to draw. [AI]
Returns
TRUE on success. [AI]

Definition at line 625 of file mxdirectdraw.cpp.

◆ TextToTextSurface2()

BOOL MxDirectDraw::TextToTextSurface2 ( const char *  lpString)

Draws the specified string to the debug "text2" surface.

[AI]

Parameters
lpStringNull-terminated string to draw. [AI]
Returns
TRUE on success. [AI]

Definition at line 632 of file mxdirectdraw.cpp.

Member Data Documentation

◆ m_bFlipSurfaces

BOOL MxDirectDraw::m_bFlipSurfaces
protected

TRUE if using DirectDraw flipping (fullscreen buffer swap); windowed disables this. [AI].

Definition at line 287 of file mxdirectdraw.h.

◆ m_bFullScreen

BOOL MxDirectDraw::m_bFullScreen
protected

TRUE if device is in exclusive fullscreen mode. [AI].

Definition at line 304 of file mxdirectdraw.h.

◆ m_bIgnoreWMSIZE

BOOL MxDirectDraw::m_bIgnoreWMSIZE
protected

Internal flag to suppress window resize messages during device switching. [AI].

Definition at line 302 of file mxdirectdraw.h.

◆ m_bIsOnPrimaryDevice

BOOL MxDirectDraw::m_bIsOnPrimaryDevice
protected

TRUE if rendering on Windows' main display; disables windowed mode for other devices. [AI].

Definition at line 307 of file mxdirectdraw.h.

◆ m_bOnlySoftRender

BOOL MxDirectDraw::m_bOnlySoftRender
protected

If TRUE, restricts rendering to software only; disables hardware acceleration. [AI].

Definition at line 286 of file mxdirectdraw.h.

◆ m_bOnlySystemMemory

BOOL MxDirectDraw::m_bOnlySystemMemory
protected

TRUE for system RAM-only surfaces; disables video memory allocation. [AI].

Definition at line 306 of file mxdirectdraw.h.

◆ m_bPrimaryPalettized

BOOL MxDirectDraw::m_bPrimaryPalettized
protected

TRUE if primary/backbuffer is using 8-bit palettized mode. [AI].

Definition at line 303 of file mxdirectdraw.h.

◆ m_currentDevInfo

DeviceModesInfo* MxDirectDraw::m_currentDevInfo
protected

Device info array for storing supported display modes. [AI].

Definition at line 313 of file mxdirectdraw.h.

◆ m_currentMode

DeviceModesInfo::Mode MxDirectDraw::m_currentMode
protected

Struct with current width, height, and bits per pixel. [AI].

Definition at line 314 of file mxdirectdraw.h.

◆ m_hFont

HFONT MxDirectDraw::m_hFont
protected

Font handle for debug text overlays. [AI].

Definition at line 301 of file mxdirectdraw.h.

◆ m_hWndMain

HWND MxDirectDraw::m_hWndMain
protected

Main window handle on which DirectDraw is initialized. [AI].

Definition at line 300 of file mxdirectdraw.h.

◆ m_originalPaletteEntries

PALETTEENTRY MxDirectDraw::m_originalPaletteEntries[256]
protected

Backup of system/Windows palette for restoration. [AI].

Definition at line 297 of file mxdirectdraw.h.

◆ m_paletteEntries

PALETTEENTRY MxDirectDraw::m_paletteEntries[256]
protected

Active 8-bit palette entries for palettized modes. [AI].

Definition at line 296 of file mxdirectdraw.h.

◆ m_pauseCount

int MxDirectDraw::m_pauseCount
protected

Count of nested pauses; ensures multiple Pause(TRUE)/Pause(FALSE) work correctly. [AI].

Definition at line 312 of file mxdirectdraw.h.

◆ m_pBackBuffer

IDirectDrawSurface* MxDirectDraw::m_pBackBuffer
protected

Backbuffer for offscreen rendering/flipping. [AI].

Definition at line 290 of file mxdirectdraw.h.

◆ m_pClipper

IDirectDrawClipper* MxDirectDraw::m_pClipper
protected

Clipper for managing windowed surface boundaries. [AI].

Definition at line 294 of file mxdirectdraw.h.

◆ m_pDirectDraw

IDirectDraw* MxDirectDraw::m_pDirectDraw
protected

Pointer to the DirectDraw COM device. [AI].

Definition at line 288 of file mxdirectdraw.h.

◆ m_pErrorHandler

ErrorHandler MxDirectDraw::m_pErrorHandler
protected

Callback for non-fatal DirectDraw errors. [AI].

Definition at line 308 of file mxdirectdraw.h.

◆ m_pErrorHandlerArg

void* MxDirectDraw::m_pErrorHandlerArg
protected

Custom argument pointer for error handler. [AI].

Definition at line 310 of file mxdirectdraw.h.

◆ m_pFatalErrorHandler

ErrorHandler MxDirectDraw::m_pFatalErrorHandler
protected

Callback invoked for fatal device errors. [AI].

Definition at line 309 of file mxdirectdraw.h.

◆ m_pFatalErrorHandlerArg

void* MxDirectDraw::m_pFatalErrorHandlerArg
protected

Custom argument pointer for fatal error handler. [AI].

Definition at line 311 of file mxdirectdraw.h.

◆ m_pFrontBuffer

IDirectDrawSurface* MxDirectDraw::m_pFrontBuffer
protected

Primary or front display surface. [AI].

Definition at line 289 of file mxdirectdraw.h.

◆ m_pPalette

IDirectDrawPalette* MxDirectDraw::m_pPalette
protected

DirectDraw palette assigned to the primary/back surfaces. [AI].

Definition at line 295 of file mxdirectdraw.h.

◆ m_pText1Surface

IDirectDrawSurface* MxDirectDraw::m_pText1Surface
protected

Debug overlay surface for "text1". [AI].

Definition at line 292 of file mxdirectdraw.h.

◆ m_pText2Surface

IDirectDrawSurface* MxDirectDraw::m_pText2Surface
protected

Debug overlay surface for "text2". [AI].

Definition at line 293 of file mxdirectdraw.h.

◆ m_pZBuffer

IDirectDrawSurface* MxDirectDraw::m_pZBuffer
protected

Attached Z-buffer for 3D rendering. [AI].

Definition at line 291 of file mxdirectdraw.h.

◆ m_text1SizeOnSurface

SIZE MxDirectDraw::m_text1SizeOnSurface
protected

Pixel size of rendered text1 overlay surface. [AI].

Definition at line 298 of file mxdirectdraw.h.

◆ m_text2SizeOnSurface

SIZE MxDirectDraw::m_text2SizeOnSurface
protected

Pixel size of rendered text2 overlay surface. [AI].

Definition at line 299 of file mxdirectdraw.h.

◆ m_unk0x850

void* MxDirectDraw::m_unk0x850
protected

[AI] Purpose unknown; possibly driver-specific data or reserved.

Definition at line 305 of file mxdirectdraw.h.


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