[Glide64] Make ghq_hirs_gz private

This commit is contained in:
zilmar 2017-03-10 23:17:57 +11:00
parent 4e9214f6c6
commit 08e5df4dc6
4 changed files with 19 additions and 8 deletions

View File

@ -670,7 +670,7 @@ public:
m_cbxHrsCompressCache.Attach(GetDlgItem(IDC_CHK_HRS_COMPRESS_CACHE));
TTSetTxt(IDC_CHK_HRS_COMPRESS_CACHE, "Compress texture cache:\n\nWhen game started, plugin loads all its hi-resolution textures into PC memory.\nSince hi-resolution textures are usually large, the whole pack can take hundreds megabytes of memory.\nCache compression allows save memory space greatly.\nTextures 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_cbxHrsCompressCache.SetCheck(g_settings->ghq_hirs_gz > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsCompressCache.SetCheck(g_settings->ghq_hirs_gz() > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsLetFly.Attach(GetDlgItem(IDC_CHK_USE_ALPHA_FULLY));
TTSetTxt(IDC_CHK_USE_ALPHA_FULLY, "Use Alpha channel fully:\n\nWhen this option is off, 16bit rgba textures will be loaded using RiceVideo style, with 1bit for alpha channel.\nWhen it is on, GlideHQ will check, how alpha channel is used by the hires texture, and select most appropriate format for it.\nThis gives texture designers freedom to play with alpha, as they need, regardless of format of original N64 texture.\nFor older and badly designed texture packs it can cause unwanted black borders.\n\n[Recommended: texture pack dependant]");
@ -700,7 +700,7 @@ public:
g_settings->ghq_hirs_dump = (int)m_cbxHrsTexEdit.GetCheck() == BST_CHECKED;
g_settings->ghq_hirs_altcrc = (int)m_cbxHrsAltCRC.GetCheck() == BST_CHECKED;
g_settings->SetGhqHirsCmpr(m_cbxHrsTexCompression.GetCheck() == BST_CHECKED);
g_settings->ghq_hirs_gz = (int)m_cbxHrsCompressCache.GetCheck() == BST_CHECKED;
g_settings->SetGhqHirsGz(m_cbxHrsCompressCache.GetCheck() == BST_CHECKED);
g_settings->ghq_hirs_let_texartists_fly = (int)m_cbxHrsLetFly.GetCheck() == BST_CHECKED;
g_settings->SetGhqCmpr((CSettings::TextureCompression_t)m_cmbTextureCompression.GetItemData(m_cmbTextureCompression.GetCurSel()));
g_settings->ghq_cache_save = (int)m_cbxSaveTexCache.GetCheck() == BST_CHECKED;

View File

@ -685,7 +685,7 @@ int InitGfx()
{
options |= GZ_TEXCACHE;
}
if (g_settings->ghq_hirs_gz)
if (g_settings->ghq_hirs_gz())
{
options |= GZ_HIRESTEXCACHE;
}

View File

@ -47,7 +47,7 @@ CSettings::CSettings() :
m_ghq_hirs_cmpr(false),
m_ghq_hirs_tile(false),
m_ghq_hirs_f16bpp(false),
ghq_hirs_gz(0),
m_ghq_hirs_gz(false),
ghq_hirs_altcrc(0),
ghq_cache_save(0),
ghq_cache_size(0),
@ -146,7 +146,7 @@ void CSettings::RegisterSettings(void)
general_setting(Set_ghq_hirs_cmpr, "ghq_hirs_cmpr", false);
general_setting(Set_ghq_hirs_tile, "ghq_hirs_tile", false);
general_setting(Set_ghq_hirs_f16bpp, "ghq_hirs_f16bpp", false);
general_setting(Set_ghq_hirs_gz, "ghq_hirs_gz", 1);
general_setting(Set_ghq_hirs_gz, "ghq_hirs_gz", true);
general_setting(Set_ghq_hirs_altcrc, "ghq_hirs_altcrc", 1);
general_setting(Set_ghq_cache_save, "ghq_cache_save", 1);
general_setting(Set_ghq_cache_size, "ghq_cache_size", 0);
@ -415,6 +415,15 @@ void CSettings::SetGhqHirsCmpr(bool value)
}
}
void CSettings::SetGhqHirsGz(bool value)
{
if (value != m_ghq_hirs_gz)
{
m_ghq_hirs_gz = value;
m_dirty = true;
}
}
void CSettings::UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove)
{
uint32_t frame_buffer_original = m_frame_buffer;
@ -528,7 +537,7 @@ void CSettings::ReadSettings()
m_ghq_hirs_cmpr = GetSetting(Set_ghq_hirs_cmpr) != 0;
m_ghq_hirs_tile = GetSetting(Set_ghq_hirs_tile) != 0;
m_ghq_hirs_f16bpp = GetSetting(Set_ghq_hirs_f16bpp) != 0;
this->ghq_hirs_gz = GetSetting(Set_ghq_hirs_gz);
m_ghq_hirs_gz = GetSetting(Set_ghq_hirs_gz) != 0;
this->ghq_hirs_altcrc = GetSetting(Set_ghq_hirs_altcrc);
this->ghq_cache_save = GetSetting(Set_ghq_cache_save);
this->ghq_cache_size = GetSetting(Set_ghq_cache_size);
@ -797,7 +806,7 @@ void CSettings::WriteSettings(void)
SetSetting(Set_ghq_hirs_cmpr, m_ghq_hirs_cmpr);
SetSetting(Set_ghq_hirs_tile, m_ghq_hirs_tile);
SetSetting(Set_ghq_hirs_f16bpp, m_ghq_hirs_f16bpp);
SetSetting(Set_ghq_hirs_gz, g_settings->ghq_hirs_gz);
SetSetting(Set_ghq_hirs_gz, m_ghq_hirs_gz);
SetSetting(Set_ghq_hirs_altcrc, g_settings->ghq_hirs_altcrc);
SetSetting(Set_ghq_cache_save, g_settings->ghq_cache_save);
SetSetting(Set_ghq_cache_size, g_settings->ghq_cache_size);

View File

@ -214,7 +214,7 @@ public:
inline bool ghq_hirs_cmpr(void) const { return m_ghq_hirs_cmpr; }
inline bool ghq_hirs_tile(void) const { return m_ghq_hirs_tile; }
inline bool ghq_hirs_f16bpp(void) const { return m_ghq_hirs_f16bpp; }
int ghq_hirs_gz;
inline bool ghq_hirs_gz(void) const { return m_ghq_hirs_gz; }
int ghq_hirs_altcrc;
int ghq_cache_save;
int ghq_cache_size;
@ -282,6 +282,7 @@ public:
void SetGhqEnhtNobg(bool value);
void SetGhqEnhtCmpr(bool value);
void SetGhqHirsCmpr(bool value);
void SetGhqHirsGz(bool value);
void UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove);
ucode_t DetectUCode(uint32_t uc_crc);
void SetUcode(ucode_t value);
@ -333,6 +334,7 @@ private:
bool m_ghq_hirs_cmpr;
bool m_ghq_hirs_tile;
bool m_ghq_hirs_f16bpp;
bool m_ghq_hirs_gz;
ucode_t m_ucode;
StippleMode_t m_stipple_mode;
hacks_t m_hacks;