[Glide64] Make ghq_hirs_dump private

This commit is contained in:
zilmar 2017-03-13 04:57:37 +11:00
parent 758de8f10a
commit 26841063ae
4 changed files with 20 additions and 9 deletions

View File

@ -658,12 +658,12 @@ public:
m_cbxHrsTexEdit.Attach(GetDlgItem(IDC_CHK_TEX_DUMP_EDIT));
TTSetTxt(IDC_CHK_TEX_DUMP_EDIT, "Texture dumping mode:\n\nIn this mode, you have that ability to dump textures on screen to the appropriate folder.\nYou can also reload textures while the game is running to see how they look instantly - big time saver!\n\nHotkeys:\n\"R\" reloads hires textures from the texture pack\n\"D\" toggles texture dumps on/off.");
m_cbxHrsTexEdit.SetCheck(g_settings->ghq_hirs_dump > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsTexEdit.SetCheck(g_settings->ghq_hirs_dump() > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsAltCRC.Attach(GetDlgItem(IDC_CHK_ALT_CRC));
TTSetTxt(IDC_CHK_ALT_CRC, "Alternative CRC calculation:\n\nThis option enables emulation of a palette CRC calculation bug in RiceVideo.\nIf some textures are not loaded, try to set this option on/off.\n\n[Recommended: texture pack dependant, mostly on]");
m_cbxHrsAltCRC.SetCheck(g_settings->ghq_hirs_altcrc() > 0 ? BST_CHECKED : BST_UNCHECKED);
if (g_settings->ghq_hirs_dump)
if (g_settings->ghq_hirs_dump())
{
m_cbxHrsAltCRC.EnableWindow(false);
}
@ -697,7 +697,7 @@ public:
g_settings->SetGhqHirs((CSettings::HiResPackFormat_t)m_cmbHrsFormat.GetItemData(m_cmbHrsFormat.GetCurSel()));
g_settings->SetGhqHirsTile(m_cbxHrsTile.GetCheck() == BST_CHECKED);
g_settings->SetGhqHirsF16bpp(m_cbxHrsForce16.GetCheck() == BST_CHECKED);
g_settings->ghq_hirs_dump = (int)m_cbxHrsTexEdit.GetCheck() == BST_CHECKED;
g_settings->SetGhqHirsDump(m_cbxHrsTexEdit.GetCheck() == BST_CHECKED);
g_settings->SetGhqHirsAltcrc(m_cbxHrsAltCRC.GetCheck() == BST_CHECKED);
g_settings->SetGhqHirsCmpr(m_cbxHrsTexCompression.GetCheck() == BST_CHECKED);
g_settings->SetGhqHirsGz(m_cbxHrsCompressCache.GetCheck() == BST_CHECKED);

View File

@ -697,7 +697,7 @@ int InitGfx()
{
options |= LET_TEXARTISTS_FLY;
}
if (g_settings->ghq_hirs_dump)
if (g_settings->ghq_hirs_dump())
{
options |= DUMP_TEX;
}

View File

@ -52,7 +52,7 @@ CSettings::CSettings() :
m_ghq_cache_save(false),
m_ghq_cache_size(0),
m_ghq_hirs_let_texartists_fly(false),
ghq_hirs_dump(0),
m_ghq_hirs_dump(false),
autodetect_ucode(0),
m_ucode(ucode_Fast3D),
unk_as_red(0),
@ -151,7 +151,7 @@ void CSettings::RegisterSettings(void)
general_setting(Set_ghq_cache_save, "ghq_cache_save", true);
general_setting(Set_ghq_cache_size, "ghq_cache_size", 0);
general_setting(Set_ghq_hirs_let_texartists_fly, "ghq_hirs_let_texartists_fly", false);
general_setting(Set_ghq_hirs_dump, "ghq_hirs_dump", 0);
general_setting(Set_ghq_hirs_dump, "ghq_hirs_dump", false);
general_setting(Set_optimize_texrect_default, "optimize_texrect", true);
general_setting(Set_filtering_default, "filtering", CSettings::Filter_Automatic);
@ -388,6 +388,15 @@ void CSettings::SetGhqHirsF16bpp(bool value)
}
}
void CSettings::SetGhqHirsDump(bool value)
{
if (value != m_ghq_hirs_dump)
{
m_ghq_hirs_dump = value;
m_dirty = true;
}
}
void CSettings::SetGhqEnhtNobg(bool value)
{
if (value != m_ghq_enht_nobg)
@ -578,7 +587,7 @@ void CSettings::ReadSettings()
m_ghq_cache_save = GetSetting(Set_ghq_cache_save) != 0;
m_ghq_cache_size = GetSetting(Set_ghq_cache_size);
m_ghq_hirs_let_texartists_fly = GetSetting(Set_ghq_hirs_let_texartists_fly) != 0;
this->ghq_hirs_dump = GetSetting(Set_ghq_hirs_dump);
m_ghq_hirs_dump = GetSetting(Set_ghq_hirs_dump) != 0;
if (Set_log_dir != 0)
{
@ -847,7 +856,7 @@ void CSettings::WriteSettings(void)
SetSetting(Set_ghq_cache_save, m_ghq_cache_save);
SetSetting(Set_ghq_cache_size, m_ghq_cache_size);
SetSetting(Set_ghq_hirs_let_texartists_fly, m_ghq_hirs_let_texartists_fly);
SetSetting(Set_ghq_hirs_dump, g_settings->ghq_hirs_dump);
SetSetting(Set_ghq_hirs_dump, m_ghq_hirs_dump);
SetSetting(g_romopen ? Set_filtering : Set_filtering_default, filtering());
SetSetting(g_romopen ? Set_fog : Set_fog_default, m_fog);

View File

@ -219,7 +219,7 @@ public:
inline bool ghq_cache_save(void) const { return m_ghq_cache_save; }
inline int ghq_cache_size(void) const { return m_ghq_cache_size; }
inline bool ghq_hirs_let_texartists_fly(void) const { return m_ghq_hirs_let_texartists_fly; }
int ghq_hirs_dump;
inline bool ghq_hirs_dump(void) const { return m_ghq_hirs_dump; }
//Debug
int autodetect_ucode;
@ -280,6 +280,7 @@ public:
void SetGhqEnhtGz(bool value);
void SetGhqHirsTile(bool value);
void SetGhqHirsF16bpp(bool value);
void SetGhqHirsDump(bool value);
void SetGhqEnhtNobg(bool value);
void SetGhqEnhtCmpr(bool value);
void SetGhqHirsAltcrc(bool value);
@ -344,6 +345,7 @@ private:
bool m_ghq_cache_save;
int m_ghq_cache_size;
bool m_ghq_hirs_let_texartists_fly;
bool m_ghq_hirs_dump;
ucode_t m_ucode;
StippleMode_t m_stipple_mode;
hacks_t m_hacks;