From fdd753f31d2136c6bd123f9f451b314973c3b337 Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 13 Mar 2017 05:04:53 +1100 Subject: [PATCH] [Glide64] Make unk_as_red private --- Source/Glide64/Combine.cpp | 3 +-- Source/Glide64/Settings.cpp | 9 ++++----- Source/Glide64/Settings.h | 3 ++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/Glide64/Combine.cpp b/Source/Glide64/Combine.cpp index 0cfc874e3..7f8134672 100644 --- a/Source/Glide64/Combine.cpp +++ b/Source/Glide64/Combine.cpp @@ -15659,7 +15659,7 @@ void Combine() Alpha0[(rdp.cycle1 >> 16) & 7], Alpha1[(rdp.cycle1 >> 19) & 7], Alpha2[(rdp.cycle1 >> 22) & 7], Alpha3[(rdp.cycle1 >> 25) & 7], Alpha0[(rdp.cycle2 >> 16) & 7], Alpha1[(rdp.cycle2 >> 19) & 7], Alpha2[(rdp.cycle2 >> 22) & 7], Alpha3[(rdp.cycle2 >> 25) & 7]); } - if (g_settings->unk_as_red) + if (g_settings->unk_as_red()) { BrightRed(); } @@ -15668,7 +15668,6 @@ void Combine() // use full alpha as default ac_t0(); } - //tex |= 3; } else { diff --git a/Source/Glide64/Settings.cpp b/Source/Glide64/Settings.cpp index 4c3ba1a1d..84bc0d99a 100644 --- a/Source/Glide64/Settings.cpp +++ b/Source/Glide64/Settings.cpp @@ -55,7 +55,7 @@ CSettings::CSettings() : m_ghq_hirs_dump(false), m_autodetect_ucode(true), m_ucode(ucode_Fast3D), -unk_as_red(0), + m_unk_as_red(false), unk_clear(0), wireframe(0), wfmode(0), @@ -133,7 +133,7 @@ void CSettings::RegisterSettings(void) general_setting(Set_ucode, "ucode", ucode_F3DEX2); general_setting(Set_wireframe, "wireframe", 0); general_setting(Set_wfmode, "wfmode", 1); - general_setting(Set_unk_as_red, "unk_as_red", 0); + general_setting(Set_unk_as_red, "unk_as_red", false); general_setting(Set_unk_clear, "unk_clear", 0); general_setting(Set_ghq_fltr, "ghq_fltr", TextureFilter_None); general_setting(Set_ghq_cmpr, "ghq_cmpr", TextureCompression_S3TC); @@ -553,15 +553,14 @@ void CSettings::ReadSettings() this->wrpAnisotropic = GetSetting(Set_wrpAnisotropic); m_autodetect_ucode = GetSetting(Set_autodetect_ucode) != 0; + m_unk_as_red = GetSetting(Set_unk_as_red) != 0; #ifndef _ENDUSER_RELEASE_ this->wireframe = GetSetting(Set_wireframe); this->wfmode = GetSetting(Set_wfmode); - this->unk_as_red = GetSetting(Set_unk_as_red); this->unk_clear = GetSetting(Set_unk_clear); #else this->wireframe = FALSE; this->wfmode = 0; - this->unk_as_red = FALSE; this->unk_clear = FALSE; #endif m_ucode = ucode_F3DEX2; @@ -831,11 +830,11 @@ void CSettings::WriteSettings(void) SetSetting(Set_wrpAnisotropic, g_settings->wrpAnisotropic); SetSetting(Set_autodetect_ucode, m_autodetect_ucode); + SetSetting(Set_unk_as_red, m_unk_as_red); #ifndef _ENDUSER_RELEASE_ SetSetting(Set_ucode, (int)g_settings->ucode); SetSetting(Set_wireframe, g_settings->wireframe); SetSetting(Set_wfmode, g_settings->wfmode); - SetSetting(Set_unk_as_red,g_settings->unk_as_red); SetSetting(Set_unk_clear, g_settings->unk_clear); #endif //_ENDUSER_RELEASE_ diff --git a/Source/Glide64/Settings.h b/Source/Glide64/Settings.h index 2d132811a..b67e10d73 100644 --- a/Source/Glide64/Settings.h +++ b/Source/Glide64/Settings.h @@ -224,7 +224,7 @@ public: //Debug inline bool autodetect_ucode(void) const { return m_autodetect_ucode; } inline ucode_t ucode(void) const { return m_ucode; } - int unk_as_red; + inline bool unk_as_red(void) const { return m_unk_as_red; } int unk_clear; int wireframe; int wfmode; @@ -347,6 +347,7 @@ private: bool m_ghq_hirs_let_texartists_fly; bool m_ghq_hirs_dump; bool m_autodetect_ucode; + bool m_unk_as_red; ucode_t m_ucode; StippleMode_t m_stipple_mode; hacks_t m_hacks;