[Glide64] Make ghq_hirs_let_texartists_fly private

This commit is contained in:
zilmar 2017-03-13 04:54:23 +11:00
parent 970be7c96c
commit 758de8f10a
4 changed files with 19 additions and 8 deletions

View File

@ -674,7 +674,7 @@ public:
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]");
m_cbxHrsLetFly.SetCheck(g_settings->ghq_hirs_let_texartists_fly > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxHrsLetFly.SetCheck(g_settings->ghq_hirs_let_texartists_fly() > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxSaveTexCache.Attach(GetDlgItem(IDC_CHK_TEX_CACHE_HD));
TTSetTxt(IDC_CHK_TEX_CACHE_HD, "Save texture cache to HD:\n\nFor enhanced textures cache:\nThis will save all previously loaded and enhanced textures to HD.\nSo upon next game launch, all the textures will be instantly loaded, resulting in smoother performance.\n\nFor high-resolution textures cache:\nAfter creation, loading hi-res texture will take only a few seconds upon game launch, as opposed to the 5 to 60 seconds a pack can take to load without this cache file.\nThe only downside here is upon any changes to the pack, the cache file will need to be manually deleted.\n\nSaved cache files go into a folder called \"Cache\" within the Textures folder.\n\n[Highly Recommended: on]");
@ -701,7 +701,7 @@ public:
g_settings->SetGhqHirsAltcrc(m_cbxHrsAltCRC.GetCheck() == BST_CHECKED);
g_settings->SetGhqHirsCmpr(m_cbxHrsTexCompression.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->SetGhqHirsLetTexartistsFly(m_cbxHrsLetFly.GetCheck() == BST_CHECKED);
g_settings->SetGhqCmpr((CSettings::TextureCompression_t)m_cmbTextureCompression.GetItemData(m_cmbTextureCompression.GetCurSel()));
g_settings->SetGhqCacheSave(m_cbxSaveTexCache.GetCheck() == BST_CHECKED);
if (memcmp(&oldsettings, g_settings, sizeof(oldsettings))) //check that settings were changed

View File

@ -693,7 +693,7 @@ int InitGfx()
{
options |= (DUMP_TEXCACHE | DUMP_HIRESTEXCACHE);
}
if (g_settings->ghq_hirs_let_texartists_fly)
if (g_settings->ghq_hirs_let_texartists_fly())
{
options |= LET_TEXARTISTS_FLY;
}

View File

@ -51,7 +51,7 @@ CSettings::CSettings() :
m_ghq_hirs_altcrc(false),
m_ghq_cache_save(false),
m_ghq_cache_size(0),
ghq_hirs_let_texartists_fly(0),
m_ghq_hirs_let_texartists_fly(false),
ghq_hirs_dump(0),
autodetect_ucode(0),
m_ucode(ucode_Fast3D),
@ -150,7 +150,7 @@ void CSettings::RegisterSettings(void)
general_setting(Set_ghq_hirs_altcrc, "ghq_hirs_altcrc", true);
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", 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_optimize_texrect_default, "optimize_texrect", true);
@ -433,6 +433,15 @@ void CSettings::SetGhqHirsGz(bool value)
}
}
void CSettings::SetGhqHirsLetTexartistsFly(bool value)
{
if (value != m_ghq_hirs_let_texartists_fly)
{
m_ghq_hirs_let_texartists_fly = value;
m_dirty = true;
}
}
void CSettings::SetGhqCacheSave(bool value)
{
if (value != m_ghq_cache_save)
@ -568,7 +577,7 @@ void CSettings::ReadSettings()
m_ghq_hirs_altcrc = GetSetting(Set_ghq_hirs_altcrc) != 0;
m_ghq_cache_save = GetSetting(Set_ghq_cache_save) != 0;
m_ghq_cache_size = GetSetting(Set_ghq_cache_size);
this->ghq_hirs_let_texartists_fly = GetSetting(Set_ghq_hirs_let_texartists_fly);
m_ghq_hirs_let_texartists_fly = GetSetting(Set_ghq_hirs_let_texartists_fly) != 0;
this->ghq_hirs_dump = GetSetting(Set_ghq_hirs_dump);
if (Set_log_dir != 0)
@ -837,7 +846,7 @@ void CSettings::WriteSettings(void)
SetSetting(Set_ghq_hirs_altcrc, m_ghq_hirs_altcrc);
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, g_settings->ghq_hirs_let_texartists_fly);
SetSetting(Set_ghq_hirs_let_texartists_fly, m_ghq_hirs_let_texartists_fly);
SetSetting(Set_ghq_hirs_dump, g_settings->ghq_hirs_dump);
SetSetting(g_romopen ? Set_filtering : Set_filtering_default, filtering());

View File

@ -218,7 +218,7 @@ public:
inline bool ghq_hirs_altcrc(void) const { return m_ghq_hirs_altcrc; }
inline bool ghq_cache_save(void) const { return m_ghq_cache_save; }
inline int ghq_cache_size(void) const { return m_ghq_cache_size; }
int ghq_hirs_let_texartists_fly;
inline bool ghq_hirs_let_texartists_fly(void) const { return m_ghq_hirs_let_texartists_fly; }
int ghq_hirs_dump;
//Debug
@ -286,6 +286,7 @@ public:
void SetGhqHirsCmpr(bool value);
void SetGhqHirsGz(bool value);
void SetGhqCacheSave(bool value);
void SetGhqHirsLetTexartistsFly(bool value);
void SetGhqCacheSize(int value);
void UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove);
ucode_t DetectUCode(uint32_t uc_crc);
@ -342,6 +343,7 @@ private:
bool m_ghq_hirs_altcrc;
bool m_ghq_cache_save;
int m_ghq_cache_size;
bool m_ghq_hirs_let_texartists_fly;
ucode_t m_ucode;
StippleMode_t m_stipple_mode;
hacks_t m_hacks;