[Glide64] Make ghq_enht_gz private

This commit is contained in:
zilmar 2017-03-10 16:42:29 +11:00
parent ee26e7930b
commit 494fbaf7f5
4 changed files with 19 additions and 8 deletions

View File

@ -646,7 +646,7 @@ public:
TTSetTxt(IDC_CHK_COMPRESS_CACHE, "Compress texture cache:\n\nMemory will be compressed so that more textures can be held in the texture cache.\nThe compression ratio varies with each texture, but 1/5 of the original size would be a modest approximation.\nThey will be decompressed on-the-fly, before being downloaded to the gfx hardware.\nThis option will still help save memory space even when using texture compression.\n\n[Recommended: on]");
m_cbxEnhCompressCache.Attach(GetDlgItem(IDC_CHK_COMPRESS_CACHE));
m_cbxEnhCompressCache.SetCheck(g_settings->ghq_enht_gz > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxEnhCompressCache.SetCheck(g_settings->ghq_enht_gz() > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsTile.Attach(GetDlgItem(IDC_CHK_TILE_TEX));
TTSetTxt(IDC_CHK_TILE_TEX, "Tile textures:\n\nWhen on, wide texture will be split on several tiles to fit in one 256-width texture.\nThis tiled texture takes much less video memory space and thus overall performance will increase.\nHowever, corresponding polygons must be split too, and this is not polished yet - various issues are possible, including black lines and polygons distortions.\n\n[Recommended: off]");
@ -693,7 +693,7 @@ public:
g_settings->ghq_cache_size = atoi(texcache);
g_settings->ghq_enht_nobg = (int)m_cbxEnhIgnoreBG.GetCheck() == BST_CHECKED;
g_settings->SetGhqEnhtCmpr(m_cbxEnhTexCompression.GetCheck() == BST_CHECKED);
g_settings->ghq_enht_gz = (int)m_cbxEnhCompressCache.GetCheck() == BST_CHECKED;
g_settings->SetGhqEnhtGz(m_cbxEnhCompressCache.GetCheck() == BST_CHECKED);
g_settings->SetGhqHirs((CSettings::HiResPackFormat_t)m_cmbHrsFormat.GetItemData(m_cmbHrsFormat.GetCurSel()));
g_settings->ghq_hirs_tile = (int)m_cbxHrsTile.GetCheck() == BST_CHECKED;
g_settings->ghq_hirs_f16bpp = (int)m_cbxHrsForce16.GetCheck() == BST_CHECKED;

View File

@ -681,7 +681,7 @@ int InitGfx()
{
options |= FORCE16BPP_HIRESTEX;
}
if (g_settings->ghq_enht_gz)
if (g_settings->ghq_enht_gz())
{
options |= GZ_TEXCACHE;
}

View File

@ -42,7 +42,7 @@ CSettings::CSettings() :
m_ghq_hirs(HiResPackFormat_None),
m_ghq_enht_cmpr(false),
m_ghq_enht_f16bpp(false),
ghq_enht_gz(0),
m_ghq_enht_gz(false),
ghq_enht_nobg(0),
ghq_hirs_cmpr(0),
ghq_hirs_tile(0),
@ -141,7 +141,7 @@ void CSettings::RegisterSettings(void)
general_setting(Set_ghq_hirs, "ghq_hirs", HiResPackFormat_None);
general_setting(Set_ghq_enht_cmpr, "ghq_enht_cmpr", false);
general_setting(Set_ghq_enht_f16bpp, "ghq_enht_f16bpp", false);
general_setting(Set_ghq_enht_gz, "ghq_enht_gz", 1);
general_setting(Set_ghq_enht_gz, "ghq_enht_gz", true);
general_setting(Set_ghq_enht_nobg, "ghq_enht_nobg", 0);
general_setting(Set_ghq_hirs_cmpr, "ghq_hirs_cmpr", 0);
general_setting(Set_ghq_hirs_tile, "ghq_hirs_tile", 0);
@ -361,6 +361,15 @@ void CSettings::SetGhqHirs(HiResPackFormat_t value)
}
}
void CSettings::SetGhqEnhtGz(bool value)
{
if (value != m_ghq_enht_gz)
{
m_ghq_enht_gz = value;
m_dirty = true;
}
}
void CSettings::SetGhqEnhtCmpr(bool value)
{
if (value != m_ghq_enht_cmpr)
@ -478,7 +487,7 @@ void CSettings::ReadSettings()
m_ghq_hirs = (HiResPackFormat_t)GetSetting(Set_ghq_hirs);
m_ghq_enht_cmpr = GetSetting(Set_ghq_enht_cmpr) != 0;
m_ghq_enht_f16bpp = GetSetting(Set_ghq_enht_f16bpp) !=0;
this->ghq_enht_gz = GetSetting(Set_ghq_enht_gz);
m_ghq_enht_gz = GetSetting(Set_ghq_enht_gz) != 0;
this->ghq_enht_nobg = GetSetting(Set_ghq_enht_nobg);
this->ghq_hirs_cmpr = GetSetting(Set_ghq_hirs_cmpr);
this->ghq_hirs_tile = GetSetting(Set_ghq_hirs_tile);
@ -747,7 +756,7 @@ void CSettings::WriteSettings(void)
SetSetting(Set_ghq_hirs, m_ghq_hirs);
SetSetting(Set_ghq_enht_cmpr, m_ghq_enht_cmpr);
SetSetting(Set_ghq_enht_f16bpp, m_ghq_enht_f16bpp);
SetSetting(Set_ghq_enht_gz, g_settings->ghq_enht_gz);
SetSetting(Set_ghq_enht_gz, m_ghq_enht_gz);
SetSetting(Set_ghq_enht_nobg, g_settings->ghq_enht_nobg);
SetSetting(Set_ghq_hirs_cmpr, g_settings->ghq_hirs_cmpr);
SetSetting(Set_ghq_hirs_tile, g_settings->ghq_hirs_tile);

View File

@ -209,7 +209,7 @@ public:
inline HiResPackFormat_t ghq_hirs(void) const { return m_ghq_hirs; }
inline bool ghq_enht_cmpr(void) const { return m_ghq_enht_cmpr; }
inline bool ghq_enht_f16bpp(void) const { return m_ghq_enht_f16bpp; }
int ghq_enht_gz;
inline bool ghq_enht_gz(void) const { return m_ghq_enht_gz; }
int ghq_enht_nobg;
int ghq_hirs_cmpr;
int ghq_hirs_tile;
@ -276,6 +276,7 @@ public:
void SetGhqEnht(TextureEnhancement_t value);
void SetGhqCmpr(TextureCompression_t value);
void SetGhqHirs(HiResPackFormat_t value);
void SetGhqEnhtGz(bool value);
void SetGhqEnhtCmpr(bool value);
void UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove);
ucode_t DetectUCode(uint32_t uc_crc);
@ -323,6 +324,7 @@ private:
HiResPackFormat_t m_ghq_hirs;
bool m_ghq_enht_cmpr;
bool m_ghq_enht_f16bpp;
bool m_ghq_enht_gz;
ucode_t m_ucode;
StippleMode_t m_stipple_mode;
hacks_t m_hacks;