[Glide64] Make wfmode private

This commit is contained in:
zilmar 2017-03-13 05:24:23 +11:00
parent 0c24c4e12b
commit 444735966c
3 changed files with 16 additions and 13 deletions

View File

@ -57,7 +57,7 @@ CSettings::CSettings() :
m_ucode(ucode_Fast3D),
m_unk_as_red(false),
m_wireframe(false),
wfmode(0),
m_wfmode(wfmode_VertexColors),
// Special fixes
offset_x(0),
@ -131,7 +131,7 @@ void CSettings::RegisterSettings(void)
general_setting(Set_autodetect_ucode, "autodetect_ucode", true);
general_setting(Set_ucode, "ucode", ucode_F3DEX2);
general_setting(Set_wireframe, "wireframe", false);
general_setting(Set_wfmode, "wfmode", 1);
general_setting(Set_wfmode, "wfmode", wfmode_VertexColors);
general_setting(Set_unk_as_red, "unk_as_red", false);
general_setting(Set_ghq_fltr, "ghq_fltr", TextureFilter_None);
general_setting(Set_ghq_cmpr, "ghq_cmpr", TextureCompression_S3TC);
@ -553,11 +553,7 @@ void CSettings::ReadSettings()
m_autodetect_ucode = GetSetting(Set_autodetect_ucode) != 0;
m_unk_as_red = GetSetting(Set_unk_as_red) != 0;
m_wireframe = GetSetting(Set_wireframe) != 0;
#ifndef _ENDUSER_RELEASE_
this->wfmode = GetSetting(Set_wfmode);
#else
this->wfmode = 0;
#endif
m_wfmode = (wfmode_t)GetSetting(Set_wfmode);
m_ucode = ucode_F3DEX2;
char texture_dir[260];
@ -826,10 +822,10 @@ void CSettings::WriteSettings(void)
SetSetting(Set_autodetect_ucode, m_autodetect_ucode);
SetSetting(Set_wireframe, m_wireframe);
SetSetting(Set_wfmode, m_wfmode);
SetSetting(Set_unk_as_red, m_unk_as_red);
#ifndef _ENDUSER_RELEASE_
SetSetting(Set_ucode, (int)g_settings->ucode);
SetSetting(Set_wfmode, g_settings->wfmode);
#endif //_ENDUSER_RELEASE_
SetSetting(Set_ghq_fltr, m_ghq_fltr);

View File

@ -157,6 +157,12 @@ public:
ucode_Turbo3d = 21,
};
enum wfmode_t
{
wfmode_NormalColors = 0,
wfmode_VertexColors = 1,
wfmode_RedOnly = 2,
};
enum FBCRCMODE_t
{
@ -226,7 +232,7 @@ public:
inline ucode_t ucode(void) const { return m_ucode; }
inline bool unk_as_red(void) const { return m_unk_as_red; }
inline bool wireframe(void) const { return m_wireframe; }
int wfmode;
inline wfmode_t wfmode(void) const { return m_wfmode; }
// Special fixes
int offset_x, offset_y;
@ -348,6 +354,7 @@ private:
bool m_autodetect_ucode;
bool m_unk_as_red;
bool m_wireframe;
wfmode_t m_wfmode;
ucode_t m_ucode;
StippleMode_t m_stipple_mode;
hacks_t m_hacks;

View File

@ -2970,10 +2970,10 @@ static void rsp_reserved3()
void SetWireframeCol()
{
switch (g_settings->wfmode)
switch (g_settings->wfmode())
{
//case 0: // normal colors, don't do anything
case 1: // vertex colors
//case CSettings::wfmode_NormalColors: // normal colors, don't do anything
case CSettings::wfmode_VertexColors:
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_LOCAL_ITERATED,
@ -3001,7 +3001,7 @@ void SetWireframeCol()
GR_COMBINE_FACTOR_NONE,
FXFALSE, FXFALSE);
break;
case 2: // red only
case CSettings::wfmode_RedOnly:
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_LOCAL_CONSTANT,