basic name improvements (#930)

* basic name improvements

* clang-format

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Cameron
2024-05-18 20:20:05 +01:00
committed by GitHub
parent 73844f14fa
commit d106aada11
23 changed files with 90 additions and 89 deletions

View File

@@ -177,7 +177,7 @@ void CMainDialog::UpdateInterface()
CheckDlgButton(IDC_CHK_FLIP_VIDEO_MEM_PAGES, currentConfigApp->m_flip_surfaces);
CheckDlgButton(IDC_CHK_3D_VIDEO_MEMORY, currentConfigApp->m_3d_video_ram);
BOOL full_screen = currentConfigApp->m_full_screen;
currentConfigApp->FUN_00403810();
currentConfigApp->AdjustDisplayBitDepthBasedOnRenderStatus();
if (currentConfigApp->GetHardwareDeviceColorModel()) {
CheckDlgButton(IDC_CHK_DRAW_CURSOR, TRUE);
}
@@ -198,8 +198,9 @@ void CMainDialog::UpdateInterface()
CheckDlgButton(IDC_RAD_PALETTE_16BIT, 0);
currentConfigApp->m_display_bit_depth = 0;
}
GetDlgItem(IDC_RAD_PALETTE_256)->EnableWindow(full_screen && currentConfigApp->FUN_004037a0());
GetDlgItem(IDC_RAD_PALETTE_16BIT)->EnableWindow(full_screen && currentConfigApp->FUN_004037e0());
GetDlgItem(IDC_RAD_PALETTE_256)
->EnableWindow(full_screen && currentConfigApp->GetConditionalDeviceRenderBitDepth());
GetDlgItem(IDC_RAD_PALETTE_16BIT)->EnableWindow(full_screen && currentConfigApp->GetDeviceRenderBitStatus());
CheckDlgButton(IDC_CHK_3DSOUND, currentConfigApp->m_3d_sound);
CheckDlgButton(IDC_CHK_DRAW_CURSOR, currentConfigApp->m_draw_cursor);
switch (currentConfigApp->m_model_quality) {

View File

@@ -198,7 +198,7 @@ BOOL CConfigApp::ReadRegInt(LPCSTR p_key, int* p_value) const
}
// FUNCTION: CONFIG 0x004033d0
BOOL CConfigApp::FUN_004033d0() const
BOOL CConfigApp::IsDeviceInBasicRGBMode() const
{
/*
* BUG: should be:
@@ -286,7 +286,7 @@ BOOL CConfigApp::ValidateSettings()
m_full_screen = TRUE;
is_modified = TRUE;
}
if (FUN_004033d0()) {
if (IsDeviceInBasicRGBMode()) {
if (m_3d_video_ram) {
m_3d_video_ram = FALSE;
is_modified = TRUE;
@@ -340,9 +340,9 @@ BOOL CConfigApp::ValidateSettings()
}
// FUNCTION: CONFIG 0x004037a0
DWORD CConfigApp::FUN_004037a0() const
DWORD CConfigApp::GetConditionalDeviceRenderBitDepth() const
{
if (FUN_004033d0()) {
if (IsDeviceInBasicRGBMode()) {
return 0;
}
if (GetHardwareDeviceColorModel()) {
@@ -352,7 +352,7 @@ DWORD CConfigApp::FUN_004037a0() const
}
// FUNCTION: CONFIG 0x004037e0
DWORD CConfigApp::FUN_004037e0() const
DWORD CConfigApp::GetDeviceRenderBitStatus() const
{
if (GetHardwareDeviceColorModel()) {
return m_device->m_HWDesc.dwDeviceRenderBitDepth & 0x400;
@@ -363,23 +363,23 @@ DWORD CConfigApp::FUN_004037e0() const
}
// FUNCTION: CONFIG 0x00403810
BOOL CConfigApp::FUN_00403810()
BOOL CConfigApp::AdjustDisplayBitDepthBasedOnRenderStatus()
{
if (m_display_bit_depth == 8) {
if (FUN_004037a0()) {
if (GetConditionalDeviceRenderBitDepth()) {
return FALSE;
}
}
if (m_display_bit_depth == 16) {
if (FUN_004037e0()) {
if (GetDeviceRenderBitStatus()) {
return FALSE;
}
}
if (FUN_004037a0()) {
if (GetConditionalDeviceRenderBitDepth()) {
m_display_bit_depth = 8;
return TRUE;
}
if (FUN_004037e0()) {
if (GetDeviceRenderBitStatus()) {
m_display_bit_depth = 16;
return TRUE;
}

View File

@@ -34,14 +34,14 @@ public:
BOOL ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const;
BOOL ReadRegBool(LPCSTR p_key, BOOL* p_bool) const;
BOOL ReadRegInt(LPCSTR p_key, int* p_value) const;
BOOL FUN_004033d0() const;
BOOL IsDeviceInBasicRGBMode() const;
D3DCOLORMODEL GetHardwareDeviceColorModel() const;
BOOL IsPrimaryDriver() const;
BOOL ReadRegisterSettings();
BOOL ValidateSettings();
DWORD FUN_004037a0() const;
DWORD FUN_004037e0() const;
BOOL FUN_00403810();
DWORD GetConditionalDeviceRenderBitDepth() const;
DWORD GetDeviceRenderBitStatus() const;
BOOL AdjustDisplayBitDepthBasedOnRenderStatus();
void CConfigApp::WriteRegisterSettings() const;
//{{AFX_MSG(CConfigApp)