Isle
|
[AI] Enumerates and manages Direct3D devices and drivers for the LEGO Island engine. More...
#include <legodxinfo.h>
Public Member Functions | |
int | ParseDeviceName (const char *p_deviceId) |
[AI] Parses a device string identifier and locates the matching device entry. More... | |
int | ProcessDeviceBytes (int p_deviceNum, GUID &p_guid) |
[AI] Returns the index of the device matching the given GUID and driver number. More... | |
int | GetDevice (int p_deviceNum, MxDriver *&p_driver, Direct3DDeviceInfo *&p_device) |
[AI] Outputs pointers to the MxDriver and Direct3DDeviceInfo for the given device index. More... | |
int | FormatDeviceName (char *p_buffer, const MxDriver *p_ddInfo, const Direct3DDeviceInfo *p_d3dInfo) const |
[AI] Formats and serializes a device identification string for a given driver/device. More... | |
int | BETA_1011cc65 (int p_idx, char *p_buffer) |
[AI] Formats device identification string for the device at a specific global index (Beta10-specific). More... | |
int | FUN_1009d0d0 () |
[AI] Finds and returns the preferred device index that supports required features. More... | |
int | FUN_1009d210 () |
[AI] Prunes the enumeration to only include devices/drivers that support the required display mode and features. More... | |
unsigned char | DriverSupportsRequiredDisplayMode (MxDriver &p_driver) |
[AI] Checks if a driver supports a 640x480 display mode in 8bpp or 16bpp (needed by LEGO Island). More... | |
unsigned char | FUN_1009d3d0 (Direct3DDeviceInfo &p_device) |
[AI] Checks if a device supports required rendering features (Z-buffer, perspective, HW support, etc). More... | |
![]() | |
MxDeviceEnumerate () | |
[AI] Constructs an MxDeviceEnumerate object, sets initialized flag to FALSE. More... | |
~MxDeviceEnumerate () | |
[AI] Destructor. More... | |
virtual int | DoEnumerate () |
[AI] Begins enumeration of DirectDraw drivers, their devices, and available display modes. More... | |
BOOL | EnumDirectDrawCallback (LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName) |
[AI] Callback for enumerating a single DirectDraw driver. More... | |
HRESULT | EnumDisplayModesCallback (LPDDSURFACEDESC p_ddsd) |
[AI] Callback for each display mode in a driver. More... | |
HRESULT | EnumDevicesCallback (LPGUID p_guid, LPSTR p_deviceDesc, LPSTR p_deviceName, LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HELDesc) |
[AI] Callback for enumerating 3D devices on a driver. More... | |
const char * | EnumerateErrorToString (HRESULT p_error) |
[AI] Converts a DirectDraw/Direct3D HRESULT enumeration error to a human-readable string. More... | |
const list< MxDriver > & | GetDriverList () const |
[AI] Returns a const reference to the list of enumerated drivers/devices/modes. More... | |
unsigned char | IsInitialized () const |
[AI] Checks if the enumeration has already been performed. More... | |
Static Public Member Functions | |
static int | SupportsMMX () |
[AI] Checks if the CPU supports MMX instructions. More... | |
static int | SupportsCPUID () |
[AI] Checks if the CPU supports CPUID instruction. More... | |
![]() | |
static void | BuildErrorString (const char *,...) |
[AI] Utility for formatting and outputting error/debug strings. More... | |
static BOOL CALLBACK | DirectDrawEnumerateCallback (LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName, LPVOID p_context) |
[AI] Static thunk callback suitable for passing to DirectDrawEnumerate. More... | |
static HRESULT CALLBACK | DisplayModesEnumerateCallback (LPDDSURFACEDESC p_ddsd, LPVOID p_context) |
[AI] Static thunk callback for enumerating display modes during driver enumeration. More... | |
static HRESULT CALLBACK | DevicesEnumerateCallback (LPGUID p_guid, LPSTR p_deviceDesc, LPSTR p_deviceName, LPD3DDEVICEDESC p_HWDesc, LPD3DDEVICEDESC p_HELDesc, LPVOID p_context) |
[AI] Static thunk callback for enumerating 3D devices within a driver. More... | |
Additional Inherited Members | |
![]() | |
list< MxDriver > | m_list |
[AI] List of all discovered DirectDraw drivers and their device/mode info. More... | |
unsigned char | m_initialized |
[AI] Set TRUE after successful enumeration to prevent redundant operations. More... | |
[AI] Enumerates and manages Direct3D devices and drivers for the LEGO Island engine.
LegoDeviceEnumerate inherits from MxDeviceEnumerate, providing extended functionality to identify, process, and verify Direct3D devices and drivers required for engine rendering. This includes hardware capability checks (such as MMX and CPUID support), device string parsing/formatting, and display mode support checks.
[AI] This class holds a list of available Direct3D drivers (MxDriver) with their associated device information. It provides functions to search, filter, and format driver or device descriptors, and supports pruning the list according to hardware or mode requirements needed by the LEGO Island engine renderer.
Definition at line 24 of file legodxinfo.h.
int LegoDeviceEnumerate::BETA_1011cc65 | ( | int | p_idx, |
char * | p_buffer | ||
) |
[AI] Formats device identification string for the device at a specific global index (Beta10-specific).
p_idx | Index of the device in the global list. [AI] |
p_buffer | Output buffer for the formatted string. [AI] |
Definition at line 131 of file legodxinfo.cpp.
unsigned char LegoDeviceEnumerate::DriverSupportsRequiredDisplayMode | ( | MxDriver & | p_driver | ) |
[AI] Checks if a driver supports a 640x480 display mode in 8bpp or 16bpp (needed by LEGO Island).
p_driver | The driver to check. [AI] |
Definition at line 335 of file legodxinfo.cpp.
int LegoDeviceEnumerate::FormatDeviceName | ( | char * | p_buffer, |
const MxDriver * | p_ddInfo, | ||
const Direct3DDeviceInfo * | p_d3dInfo | ||
) | const |
[AI] Formats and serializes a device identification string for a given driver/device.
p_buffer | Output buffer for the formatted device string. [AI] |
p_ddInfo | Pointer to the relevant MxDriver (DirectDraw info). [AI] |
p_d3dInfo | Pointer to the relevant Direct3DDeviceInfo. [AI] |
Definition at line 111 of file legodxinfo.cpp.
int LegoDeviceEnumerate::FUN_1009d0d0 | ( | ) |
[AI] Finds and returns the preferred device index that supports required features.
[AI]
Definition at line 161 of file legodxinfo.cpp.
int LegoDeviceEnumerate::FUN_1009d210 | ( | ) |
[AI] Prunes the enumeration to only include devices/drivers that support the required display mode and features.
Definition at line 294 of file legodxinfo.cpp.
unsigned char LegoDeviceEnumerate::FUN_1009d3d0 | ( | Direct3DDeviceInfo & | p_device | ) |
[AI] Checks if a device supports required rendering features (Z-buffer, perspective, HW support, etc).
p_device | The device to validate. [AI] |
Definition at line 352 of file legodxinfo.cpp.
int LegoDeviceEnumerate::GetDevice | ( | int | p_deviceNum, |
MxDriver *& | p_driver, | ||
Direct3DDeviceInfo *& | p_device | ||
) |
[AI] Outputs pointers to the MxDriver and Direct3DDeviceInfo for the given device index.
p_deviceNum | Global device list index. [AI] |
p_driver | Output: Pointer to the matched MxDriver. [AI] |
p_device | Output: Pointer to the matched Direct3DDeviceInfo. [AI] |
Definition at line 85 of file legodxinfo.cpp.
int LegoDeviceEnumerate::ParseDeviceName | ( | const char * | p_deviceId | ) |
[AI] Parses a device string identifier and locates the matching device entry.
p_deviceId | Device identifier string in the format: "<driverIndex> 0x<X> 0x<Y> 0x<Z> 0x<W>" [AI] |
Definition at line 11 of file legodxinfo.cpp.
int LegoDeviceEnumerate::ProcessDeviceBytes | ( | int | p_deviceNum, |
GUID & | p_guid | ||
) |
[AI] Returns the index of the device matching the given GUID and driver number.
p_deviceNum | Driver index; may be -1 to search all drivers. [AI] |
p_guid | GUID of the device. [AI] |
Definition at line 44 of file legodxinfo.cpp.
|
static |
[AI] Checks if the CPU supports CPUID instruction.
[AI] Uses platform-specific assembly instructions to detect CPUID availability.
Definition at line 249 of file legodxinfo.cpp.
|
static |
[AI] Checks if the CPU supports MMX instructions.
[AI] Uses platform-specific assembly instructions to detect MMX feature availability.
Definition at line 202 of file legodxinfo.cpp.