Isle
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1#if !defined(AFX_CONFIG_H)
2#define AFX_CONFIG_H
3
4#include "StdAfx.h"
5#include "compat.h"
6#include "decomp.h"
7
8#include <d3d.h>
9
10// [AI] Forward declarations for engine device enumeration and Direct3D objects.
13struct MxDriver;
14
15#define currentConfigApp ((CConfigApp*) afxCurrentWinApp)
16
17// [AI] CConfigApp manages hardware/software settings, registry I/O, and user configuration for LEGO Island's setup utility.
18// VTABLE: CONFIG 0x00406040
19// SIZE 0x108
20class CConfigApp : public CWinApp {
21public:
25 CConfigApp();
26
27 // Overrides
28 // ClassWizard generated virtual function overrides
29 //{{AFX_VIRTUAL(CConfigApp)
30
31public:
36 BOOL InitInstance() override;
37
42 int ExitInstance() override;
43 //}}AFX_VIRTUAL
44
45 // Implementation
46
53 BOOL WriteReg(const char* p_key, const char* p_value) const;
54
62 BOOL ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const;
63
70 BOOL ReadRegBool(LPCSTR p_key, BOOL* p_bool) const;
71
78 BOOL ReadRegInt(LPCSTR p_key, int* p_value) const;
79
85
91
96 BOOL IsPrimaryDriver() const;
97
103
109
115
121
127
131 void WriteRegisterSettings() const;
132
133 //{{AFX_MSG(CConfigApp)
134 // NOTE - the ClassWizard will add and remove member functions here.
135 // DO NOT EDIT what you see in these blocks of generated code !
136 //}}AFX_MSG
137 DECLARE_MESSAGE_MAP()
138
139private:
144 BOOL IsLegoNotRunning();
145
146public:
164};
165
166// SYNTHETIC: CONFIG 0x00402cd0
167// CConfigApp::`scalar deleting destructor'
168
169// FUNCTION: CONFIG 0x402c20
170// CConfigApp::_GetBaseMessageMap
171
172// FUNCTION: CONFIG 0x402c30
173// CConfigApp::GetMessageMap
174
175// GLOBAL: CONFIG 0x406008
176// CConfigApp::messageMap
177
178// GLOBAL: CONFIG 0x406010
179// CConfigApp::_messageEntries
180
181#endif // !defined(AFX_CONFIG_H)
BOOL m_3d_video_ram
[AI] TRUE if back-buffering should use 3D video RAM, else system RAM.
Definition: config.h:153
CConfigApp()
[AI] Constructs the configuration application instance.
Definition: config.cpp:22
BOOL ReadRegBool(LPCSTR p_key, BOOL *p_bool) const
[AI] Reads a BOOL value ("YES"/"NO") from the registry.
Definition: config.cpp:167
BOOL ReadRegInt(LPCSTR p_key, int *p_value) const
[AI] Reads an integer-valued registry entry.
Definition: config.cpp:189
BOOL m_use_joystick
[AI] Enables joystick/gamepad input if supported and selected.
Definition: config.h:157
BOOL IsDeviceInBasicRGBMode() const
[AI] Checks if the selected Direct3D device operates in basic RGB color model mode.
Definition: config.cpp:202
undefined m_unk0x100[4]
[AI] [AI_SUGGESTED_NAME: padding_or_reserved4] Reserved, unknown (possibly padding or future expansio...
Definition: config.h:162
BOOL InitInstance() override
[AI] Initializes the configuration application, checks DirectX availability and system memory,...
Definition: config.cpp:29
int m_model_quality
[AI] Detail/complexity level for 3D models (0 = low, 1 = medium, 2 = high).
Definition: config.h:160
D3DCOLORMODEL GetHardwareDeviceColorModel() const
[AI] Returns the color model (RGB or other) used by the hardware Direct3D device.
Definition: config.cpp:212
Direct3DDeviceInfo * m_device
[AI] Selected Direct3D device structure, describes device capabilities and mode. Not owned by this cl...
Definition: config.h:149
BOOL m_draw_cursor
[AI] TRUE if in-game mouse cursor is drawn.
Definition: config.h:156
DWORD GetDeviceRenderBitStatus() const
[AI] Returns bit mask status for the currently active device's rendering status (e....
Definition: config.cpp:356
BOOL m_music
[AI] If TRUE, enables background music.
Definition: config.h:163
int m_texture_quality
[AI] Quality (bit-depth, filtering) of loaded textures (0 = low, 1 = high).
Definition: config.h:161
BOOL ValidateSettings()
[AI] Ensures all configuration values are legal/compatible, correcting them if needed (e....
Definition: config.cpp:282
BOOL m_wide_view_angle
[AI] If TRUE, increases camera field-of-view for wider display.
Definition: config.h:154
BOOL m_flip_surfaces
[AI] If TRUE, enables flipping display buffers during rendering (double-buffering).
Definition: config.h:151
BOOL WriteReg(const char *p_key, const char *p_value) const
[AI] Writes a string value into the registry under the LEGO Island key.
Definition: config.cpp:120
BOOL IsPrimaryDriver() const
[AI] Determines if the currently selected driver is the primary driver detected by enumeration.
Definition: config.cpp:218
MxDriver * m_driver
[AI] Currently selected (or default) 3D hardware driver. Managed externally or by enumerator.
Definition: config.h:148
int m_joystick_index
[AI] Index of selected joystick (if multiple present).
Definition: config.h:158
BOOL ReadRegisterSettings()
[AI] Loads all settings from the registry if present, else selects appropriate default device/setting...
Definition: config.cpp:224
DWORD GetConditionalDeviceRenderBitDepth() const
[AI] Returns bit mask status for the conditional device-rendered bit depth, depending on current devi...
Definition: config.cpp:344
LegoDeviceEnumerate * m_device_enumerator
[AI] Enumerates all supported Direct3D and DirectSound devices, used for configuration panel....
Definition: config.h:147
int ExitInstance() override
[AI] Finalizes and cleans up resources before configuration application exit.
Definition: config.cpp:425
void WriteRegisterSettings() const
[AI] Saves current hardware/gameplay option selections to the registry under LEGO Island.
Definition: config.cpp:392
BOOL AdjustDisplayBitDepthBasedOnRenderStatus()
[AI] Adjusts display (screen) bit depth according to the device's rendering capabilities and configur...
Definition: config.cpp:367
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.
Definition: config.cpp:149
BOOL m_3d_sound
[AI] TRUE if 3D positional audio is enabled.
Definition: config.h:155
BOOL m_full_screen
[AI] TRUE for fullscreen Direct3D, FALSE for windowed.
Definition: config.h:152
int m_display_bit_depth
[AI] User-selected or optimal display (screen) bit depth (8/16/etc.).
Definition: config.h:150
BOOL m_run_config_dialog
[AI] Set to TRUE if the configuration dialog should run (otherwise will read reg & launch game).
Definition: config.h:159
[AI] Enumerates and manages Direct3D devices and drivers for the LEGO Island engine.
Definition: legodxinfo.h:24
DWORD D3DCOLORMODEL
Definition: d3dtypes.h:685
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
unsigned char undefined
Definition: decomp.h:26
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
[AI] Encapsulates Direct3D device enumeration information and capability structures.
[AI] Holds data about a DirectDraw driver including devices and supported display modes.