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

#include <config.h>

Inheritance diagram for CConfigApp:
Collaboration diagram for CConfigApp:

Public Member Functions

 CConfigApp ()
 [AI] Constructs the configuration application instance. More...
 
BOOL InitInstance () override
 [AI] Initializes the configuration application, checks DirectX availability and system memory, enumerates devices, reads/writes registry, and potentially launches game. More...
 
int ExitInstance () override
 [AI] Finalizes and cleans up resources before configuration application exit. More...
 
BOOL WriteReg (const char *p_key, const char *p_value) const
 [AI] Writes a string value into the registry under the LEGO Island key. More...
 
BOOL ReadReg (LPCSTR p_key, LPCSTR p_value, DWORD p_size) const
 [AI] Reads a string value from the registry under the LEGO Island key. More...
 
BOOL ReadRegBool (LPCSTR p_key, BOOL *p_bool) const
 [AI] Reads a BOOL value ("YES"/"NO") from the registry. More...
 
BOOL ReadRegInt (LPCSTR p_key, int *p_value) const
 [AI] Reads an integer-valued registry entry. More...
 
BOOL IsDeviceInBasicRGBMode () const
 [AI] Checks if the selected Direct3D device operates in basic RGB color model mode. More...
 
D3DCOLORMODEL GetHardwareDeviceColorModel () const
 [AI] Returns the color model (RGB or other) used by the hardware Direct3D device. More...
 
BOOL IsPrimaryDriver () const
 [AI] Determines if the currently selected driver is the primary driver detected by enumeration. More...
 
BOOL ReadRegisterSettings ()
 [AI] Loads all settings from the registry if present, else selects appropriate default device/settings. More...
 
BOOL ValidateSettings ()
 [AI] Ensures all configuration values are legal/compatible, correcting them if needed (e.g., bit depths, surface flips). More...
 
DWORD GetConditionalDeviceRenderBitDepth () const
 [AI] Returns bit mask status for the conditional device-rendered bit depth, depending on current device and mode. More...
 
DWORD GetDeviceRenderBitStatus () const
 [AI] Returns bit mask status for the currently active device's rendering status (e.g., can it render in a certain mode). More...
 
BOOL AdjustDisplayBitDepthBasedOnRenderStatus ()
 [AI] Adjusts display (screen) bit depth according to the device's rendering capabilities and configuration. More...
 
void WriteRegisterSettings () const
 [AI] Saves current hardware/gameplay option selections to the registry under LEGO Island. More...
 

Public Attributes

LegoDeviceEnumeratem_device_enumerator
 [AI] Enumerates all supported Direct3D and DirectSound devices, used for configuration panel. Owned by this class. More...
 
MxDriverm_driver
 [AI] Currently selected (or default) 3D hardware driver. Managed externally or by enumerator. More...
 
Direct3DDeviceInfom_device
 [AI] Selected Direct3D device structure, describes device capabilities and mode. Not owned by this class. More...
 
int m_display_bit_depth
 [AI] User-selected or optimal display (screen) bit depth (8/16/etc.). More...
 
BOOL m_flip_surfaces
 [AI] If TRUE, enables flipping display buffers during rendering (double-buffering). More...
 
BOOL m_full_screen
 [AI] TRUE for fullscreen Direct3D, FALSE for windowed. More...
 
BOOL m_3d_video_ram
 [AI] TRUE if back-buffering should use 3D video RAM, else system RAM. More...
 
BOOL m_wide_view_angle
 [AI] If TRUE, increases camera field-of-view for wider display. More...
 
BOOL m_3d_sound
 [AI] TRUE if 3D positional audio is enabled. More...
 
BOOL m_draw_cursor
 [AI] TRUE if in-game mouse cursor is drawn. More...
 
BOOL m_use_joystick
 [AI] Enables joystick/gamepad input if supported and selected. More...
 
int m_joystick_index
 [AI] Index of selected joystick (if multiple present). More...
 
BOOL m_run_config_dialog
 [AI] Set to TRUE if the configuration dialog should run (otherwise will read reg & launch game). More...
 
int m_model_quality
 [AI] Detail/complexity level for 3D models (0 = low, 1 = medium, 2 = high). More...
 
int m_texture_quality
 [AI] Quality (bit-depth, filtering) of loaded textures (0 = low, 1 = high). More...
 
undefined m_unk0x100 [4]
 [AI] [AI_SUGGESTED_NAME: padding_or_reserved4] Reserved, unknown (possibly padding or future expansion). More...
 
BOOL m_music
 [AI] If TRUE, enables background music. More...
 

Detailed Description

Definition at line 20 of file config.h.

Constructor & Destructor Documentation

◆ CConfigApp()

CConfigApp::CConfigApp ( )

[AI] Constructs the configuration application instance.

Primarily zero-initializes members and prepares for initialization.

Definition at line 22 of file config.cpp.

Member Function Documentation

◆ AdjustDisplayBitDepthBasedOnRenderStatus()

BOOL CConfigApp::AdjustDisplayBitDepthBasedOnRenderStatus ( )

[AI] Adjusts display (screen) bit depth according to the device's rendering capabilities and configuration.

Returns
TRUE if m_display_bit_depth changed, FALSE otherwise. [AI]

Definition at line 367 of file config.cpp.

◆ ExitInstance()

int CConfigApp::ExitInstance ( )
override

[AI] Finalizes and cleans up resources before configuration application exit.

Returns
Exit code from inherited CWinApp::ExitInstance(). [AI]

Definition at line 425 of file config.cpp.

◆ GetConditionalDeviceRenderBitDepth()

DWORD CConfigApp::GetConditionalDeviceRenderBitDepth ( ) const

[AI] Returns bit mask status for the conditional device-rendered bit depth, depending on current device and mode.

Returns
Status flags (DWORD) representing device render capabilities (dword flags). [AI]

Definition at line 344 of file config.cpp.

◆ GetDeviceRenderBitStatus()

DWORD CConfigApp::GetDeviceRenderBitStatus ( ) const

[AI] Returns bit mask status for the currently active device's rendering status (e.g., can it render in a certain mode).

Returns
DWORD status bitfield. [AI]

Definition at line 356 of file config.cpp.

◆ GetHardwareDeviceColorModel()

D3DCOLORMODEL CConfigApp::GetHardwareDeviceColorModel ( ) const

[AI] Returns the color model (RGB or other) used by the hardware Direct3D device.

Returns
D3DCOLORMODEL value from hardware device. [AI]

Definition at line 212 of file config.cpp.

◆ InitInstance()

BOOL CConfigApp::InitInstance ( )
override

[AI] Initializes the configuration application, checks DirectX availability and system memory, enumerates devices, reads/writes registry, and potentially launches game.

Returns
TRUE if the application instance starts successfully, otherwise FALSE. [AI]

Definition at line 29 of file config.cpp.

◆ IsDeviceInBasicRGBMode()

BOOL CConfigApp::IsDeviceInBasicRGBMode ( ) const

[AI] Checks if the selected Direct3D device operates in basic RGB color model mode.

Returns
TRUE if the device is in basic RGB mode, FALSE otherwise. [AI]

Definition at line 202 of file config.cpp.

◆ IsPrimaryDriver()

BOOL CConfigApp::IsPrimaryDriver ( ) const

[AI] Determines if the currently selected driver is the primary driver detected by enumeration.

Returns
TRUE if this is the primary driver, FALSE otherwise. [AI]

Definition at line 218 of file config.cpp.

◆ ReadReg()

BOOL CConfigApp::ReadReg ( LPCSTR  p_key,
LPCSTR  p_value,
DWORD  p_size 
) const

[AI] Reads a string value from the registry under the LEGO Island key.

Parameters
p_keyRegistry value name/key to query. [AI]
p_valueBuffer to receive the value. [AI]
p_sizeSize of p_value buffer. [AI]
Returns
TRUE if value read, FALSE otherwise. [AI]

Definition at line 149 of file config.cpp.

◆ ReadRegBool()

BOOL CConfigApp::ReadRegBool ( LPCSTR  p_key,
BOOL p_bool 
) const

[AI] Reads a BOOL value ("YES"/"NO") from the registry.

Parameters
p_keyRegistry value name/key. [AI]
p_boolReceives the parsed boolean result. [AI]
Returns
TRUE if value read and translated to boolean; FALSE otherwise. [AI]

Definition at line 167 of file config.cpp.

◆ ReadRegInt()

BOOL CConfigApp::ReadRegInt ( LPCSTR  p_key,
int *  p_value 
) const

[AI] Reads an integer-valued registry entry.

Parameters
p_keyRegistry value name/key to query. [AI]
p_valueInteger result written here. [AI]
Returns
TRUE if value read and converted to int, FALSE otherwise. [AI]

Definition at line 189 of file config.cpp.

◆ ReadRegisterSettings()

BOOL CConfigApp::ReadRegisterSettings ( )

[AI] Loads all settings from the registry if present, else selects appropriate default device/settings.

Returns
TRUE if any settings were modified, FALSE if all matches registry. [AI]

Definition at line 224 of file config.cpp.

◆ ValidateSettings()

BOOL CConfigApp::ValidateSettings ( )

[AI] Ensures all configuration values are legal/compatible, correcting them if needed (e.g., bit depths, surface flips).

Returns
TRUE if any values were changed, otherwise FALSE. [AI]

Definition at line 282 of file config.cpp.

◆ WriteReg()

BOOL CConfigApp::WriteReg ( const char *  p_key,
const char *  p_value 
) const

[AI] Writes a string value into the registry under the LEGO Island key.

Parameters
p_keyRegistry value name/key. [AI]
p_valueValue to write. [AI]
Returns
TRUE on success, FALSE if the registry operation fails. [AI]

Definition at line 120 of file config.cpp.

◆ WriteRegisterSettings()

void CConfigApp::WriteRegisterSettings ( ) const

[AI] Saves current hardware/gameplay option selections to the registry under LEGO Island.

Definition at line 392 of file config.cpp.

Member Data Documentation

◆ m_3d_sound

BOOL CConfigApp::m_3d_sound

[AI] TRUE if 3D positional audio is enabled.

Definition at line 155 of file config.h.

◆ m_3d_video_ram

BOOL CConfigApp::m_3d_video_ram

[AI] TRUE if back-buffering should use 3D video RAM, else system RAM.

Definition at line 153 of file config.h.

◆ m_device

Direct3DDeviceInfo* CConfigApp::m_device

[AI] Selected Direct3D device structure, describes device capabilities and mode. Not owned by this class.

Definition at line 149 of file config.h.

◆ m_device_enumerator

LegoDeviceEnumerate* CConfigApp::m_device_enumerator

[AI] Enumerates all supported Direct3D and DirectSound devices, used for configuration panel. Owned by this class.

Definition at line 147 of file config.h.

◆ m_display_bit_depth

int CConfigApp::m_display_bit_depth

[AI] User-selected or optimal display (screen) bit depth (8/16/etc.).

Definition at line 150 of file config.h.

◆ m_draw_cursor

BOOL CConfigApp::m_draw_cursor

[AI] TRUE if in-game mouse cursor is drawn.

Definition at line 156 of file config.h.

◆ m_driver

MxDriver* CConfigApp::m_driver

[AI] Currently selected (or default) 3D hardware driver. Managed externally or by enumerator.

Definition at line 148 of file config.h.

◆ m_flip_surfaces

BOOL CConfigApp::m_flip_surfaces

[AI] If TRUE, enables flipping display buffers during rendering (double-buffering).

Definition at line 151 of file config.h.

◆ m_full_screen

BOOL CConfigApp::m_full_screen

[AI] TRUE for fullscreen Direct3D, FALSE for windowed.

Definition at line 152 of file config.h.

◆ m_joystick_index

int CConfigApp::m_joystick_index

[AI] Index of selected joystick (if multiple present).

Definition at line 158 of file config.h.

◆ m_model_quality

int CConfigApp::m_model_quality

[AI] Detail/complexity level for 3D models (0 = low, 1 = medium, 2 = high).

Definition at line 160 of file config.h.

◆ m_music

BOOL CConfigApp::m_music

[AI] If TRUE, enables background music.

Definition at line 163 of file config.h.

◆ m_run_config_dialog

BOOL CConfigApp::m_run_config_dialog

[AI] Set to TRUE if the configuration dialog should run (otherwise will read reg & launch game).

Definition at line 159 of file config.h.

◆ m_texture_quality

int CConfigApp::m_texture_quality

[AI] Quality (bit-depth, filtering) of loaded textures (0 = low, 1 = high).

Definition at line 161 of file config.h.

◆ m_unk0x100

undefined CConfigApp::m_unk0x100[4]

[AI] [AI_SUGGESTED_NAME: padding_or_reserved4] Reserved, unknown (possibly padding or future expansion).

Definition at line 162 of file config.h.

◆ m_use_joystick

BOOL CConfigApp::m_use_joystick

[AI] Enables joystick/gamepad input if supported and selected.

Definition at line 157 of file config.h.

◆ m_wide_view_angle

BOOL CConfigApp::m_wide_view_angle

[AI] If TRUE, increases camera field-of-view for wider display.

Definition at line 154 of file config.h.


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