5#include "res/resource.h"
16 m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(
IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(
IDI_CONFIG));
34ON_COMMAND(IDABORT, OnButtonCancel)
49 CDialog::OnInitDialog();
50 SwitchToAdvanced(
FALSE);
51 CMenu* system_menu = CMenu::FromHandle(::GetSystemMenu(m_hWnd,
FALSE));
55 AppendMenuA(system_menu->m_hMenu, MF_SEPARATOR, 0,
NULL);
56 AppendMenuA(system_menu->m_hMenu, MF_STRING, 16, (LPCTSTR) about_text);
58 SendMessage(WM_SETICON, ICON_BIG, (LPARAM) m_icon);
59 SendMessage(WM_SETICON, ICON_SMALL, (LPARAM) m_icon);
67 char device_name[256];
68 const list<MxDriver>& driver_list = enumerator->
GetDriverList();
69 for (list<MxDriver>::const_iterator it_driver = driver_list.begin(); it_driver != driver_list.end(); it_driver++) {
71 for (list<Direct3DDeviceInfo>::const_iterator it_device = driver.
m_devices.begin();
81 driver_i == 0 ?
"%s ( Primary Device )" :
"%s ( Secondary Device )",
84 ::SendMessage(list_3d_devices->m_hWnd, LB_ADDSTRING, 0, (LPARAM) device_name);
88 ::SendMessage(list_3d_devices->m_hWnd, LB_SETCURSEL, selected, 0);
96 if ((nID & 0xfff0) == 0x10) {
98 about_dialog.DoModal();
109 CPaintDC painter(
this);
110 ::SendMessage(m_hWnd, WM_ICONERASEBKGND, (WPARAM) painter.m_hDC, 0);
115 (dim.right - dim.left - GetSystemMetrics(SM_CXICON) + 1) / 2,
116 (dim.bottom - dim.top - GetSystemMetrics(SM_CYICON) + 1) / 2,
135 int selected = ::SendMessage(GetDlgItem(
IDC_LIST_3DDEVICES)->m_hWnd, LB_GETCURSEL, 0, 0);
202 ->EnableWindow(full_screen &&
currentConfigApp->GetConditionalDeviceRenderBitDepth());
313 RECT grp_advanced_rect;
314 ::GetWindowRect(m_hWnd, &dialog_rect);
320 height = grp_advanced_rect.bottom - dialog_rect.top + 10;
322 button_advanced->SetWindowText(
"Basic");
325 height = grp_advanced_rect.top - dialog_rect.top;
327 button_advanced->SetWindowText(
"Advanced");
329 SetWindowPos(&wndTop, 0, 0, dialog_rect.right - dialog_rect.left, height, SWP_NOMOVE);
#define IDC_CHK_DRAW_CURSOR
[AI] Checkbox for toggling hardware/software cursor drawing. [AI]
#define IDC_CHK_FLIP_VIDEO_MEM_PAGES
[AI] Checkbox for enabling video memory page flipping. [AI]
#define IDC_CHK_3DSOUND
[AI] Checkbox for enabling or disabling 3D sound effects. [AI]
#define IDC_CHK_MUSIC
[AI] Checkbox for enabling/disabling background music. [AI]
#define IDC_BTN_ADVANCED
[AI] Button ID for launching the advanced options dialog. [AI]
#define IDC_RAD_TEXTURE_QUALITY_LOW
[AI] Radio button for low texture quality setting. [AI]
#define IDC_RAD_PALETTE_256
[AI] Radio button ID for selecting 256-color palette. [AI]
#define IDC_LIST_3DDEVICES
[AI] Control ID for the list box of available 3D devices. [AI]
#define IDC_CHK_JOYSTICK
[AI] Checkbox for enabling joystick support. [AI]
#define IDC_BMP_SHARK
[AI] Bitmap control displaying the shark image/animation. [AI]
#define IDC_GRP_ADVANCED
[AI] Group box for "Advanced" options section. [AI]
#define IDI_CONFIG
[AI] Icon resource identifier for configuration dialog. [AI]
#define IDC_RAD_PALETTE_16BIT
[AI] Radio button ID for selecting 16-bit palette. [AI]
#define IDC_CHK_3D_VIDEO_MEMORY
[AI] Checkbox for enabling 3D video memory usage. [AI]
#define IDC_RAD_TEXTURE_QUALITY_HIGH
[AI] Radio button for high texture quality setting. [AI]
#define IDC_RAD_MODEL_QUALITY_LOW
[AI] Radio button for low model quality option. [AI]
#define IDS_ABOUT
[AI] String resource identifier for the "About" box text. [AI]
#define IDC_RAD_MODEL_QUALITY_HIGH
[AI] Radio button for high model quality option. [AI]
[AI] Dialog for the application's About box.
The main dialog window for the LEGO Island configuration program (config.exe).
BOOL m_advanced
Whether the dialog is in advanced mode. [AI].
void OnCheckboxFlipVideoMemPages()
Handler for 'Flip video memory pages' checkbox.
void OnCheckbox3DVideoMemory()
Handler for '3D video memory' checkbox toggle.
void OnList3DevicesSelectionChanged()
Handles selection changes in the list of 3D devices.
void OnPaint()
Handles dialog paint (redraw).
void OnRadiobuttonTextureLowQuality()
Handler for 'Low quality texture' radio button.
void OnCheckbox3DSound()
Handler for '3D sound' checkbox toggle.
HCURSOR m_icon
Handle to the dialog's icon (used for window/taskbar and drag). [AI].
void OnRadiobuttonModelLowQuality()
Handler for 'Low quality model' radio button.
void SwitchToAdvanced(BOOL p_advanced)
Switches UI layout between basic and advanced configuration.
void UpdateInterface()
Refreshes the dialog interface according to current configuration settings.
void OnCheckboxJoystick()
Handler for 'Joystick' checkbox toggle.
void DoDataExchange(CDataExchange *pDX) override
DDX (Dialog Data Exchange) for MFC controls.
void OnCheckboxMusic()
Handler for 'Music' checkbox toggle.
void OnSysCommand(UINT nID, LPARAM lParam)
MFC handler for system commands (such as About box invocation).
void OnCancel()
Handles dialog cancellation and executes clean-up (if needed).
void OnRadiobuttonPalette16bit()
Handler for '16-bit palette' radio button.
void OnDestroy()
Handles destruction/closing of the dialog window (WM_DESTROY handler).
void OnRadiobuttonTextureHighQuality()
Handler for 'High quality texture' radio button.
HCURSOR OnQueryDragIcon()
Returns handle to drag icon when dragging minimized window.
void OnRadiobuttonModelHighQuality()
Handler for 'High quality model' radio button.
void OnRadiobuttonPalette256()
Handler for '256-color palette' radio button.
BOOL m_modified
Whether any configuration setting has been modified and needs to be saved. [AI].
void OnCheckboxDrawCursor()
Handler for 'Draw cursor' checkbox toggle.
void OnButtonAdvanced()
Handler for 'Advanced' button.
void OnButtonCancel()
Processes 'Cancel' button press (IDABORT), optionally writes settings before exit.
[AI] Enumerates and manages Direct3D devices and drivers for the LEGO Island engine.
int GetDevice(int p_deviceNum, MxDriver *&p_driver, Direct3DDeviceInfo *&p_device)
[AI] Outputs pointers to the MxDriver and Direct3DDeviceInfo for the given device index.
int FUN_1009d210()
[AI] Prunes the enumeration to only include devices/drivers that support the required display mode an...
const list< MxDriver > & GetDriverList() const
[AI] Returns a const reference to the list of enumerated drivers/devices/modes.
#define currentConfigApp
[AI] Macro to access the currently running configuration application instance (cast from afxCurrentWi...
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
[AI] Encapsulates Direct3D device enumeration information and capability structures.
char * m_deviceName
[AI] Unlocalized device name/identifier (owned string).
[AI] Holds data about a DirectDraw driver including devices and supported display modes.
list< Direct3DDeviceInfo > m_devices
[AI] List of all Direct3D devices provided by this driver.