From 9dc2a8bc8c5532b802e7266501f938f2fe5beef5 Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 13 Mar 2017 07:52:37 +1100 Subject: [PATCH] [Glide64] Make force_microcheck private --- Source/Glide64/Settings.cpp | 6 +++--- Source/Glide64/Settings.h | 3 ++- Source/Glide64/rdp.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Glide64/Settings.cpp b/Source/Glide64/Settings.cpp index 107b1d399..ea9021be3 100644 --- a/Source/Glide64/Settings.cpp +++ b/Source/Glide64/Settings.cpp @@ -69,7 +69,7 @@ CSettings::CSettings() : m_texture_correction(false), // enable perspective texture correction emulation. is on by default m_stipple_mode(STIPPLE_Disable), //used for dithered alpha emulation m_stipple_pattern(0), //used for dithered alpha emulation -force_microcheck(0), //check microcode each frame, for mixed F3DEX-S2DEX games + m_force_microcheck(false), //check microcode each frame, for mixed F3DEX-S2DEX games force_quad3d(0), //force 0xb5 command to be quad, not line 3d clip_zmin(0), //enable near z clipping clip_zmax(0), //enable far plane clipping; @@ -170,7 +170,7 @@ void CSettings::RegisterSettings(void) game_setting(Set_stipple_mode, "stipple_mode", STIPPLE_Rotate); game_setting(Set_stipple_pattern, "stipple_pattern", 0x3E0F83E0); - game_setting(Set_force_microcheck, "force_microcheck", 0); + game_setting(Set_force_microcheck, "force_microcheck", false); game_setting(Set_force_quad3d, "force_quad3d", 0); game_setting(Set_clip_zmin, "clip_zmin", 0); game_setting(Set_clip_zmax, "clip_zmax", 1); @@ -723,7 +723,7 @@ void CSettings::ReadGameSettings(const char * name) m_stipple_mode = (StippleMode_t)GetSetting(Set_stipple_mode); int stipple_pattern = GetSetting(Set_stipple_pattern); m_stipple_pattern = stipple_pattern > 0 ? (uint32_t)stipple_pattern : 0x3E0F83E0; - g_settings->force_microcheck = GetSetting(Set_force_microcheck); + m_force_microcheck = GetSetting(Set_force_microcheck) != 0; g_settings->force_quad3d = GetSetting(Set_force_quad3d); g_settings->clip_zmin = GetSetting(Set_clip_zmin); g_settings->clip_zmax = GetSetting(Set_clip_zmax); diff --git a/Source/Glide64/Settings.h b/Source/Glide64/Settings.h index 1e504669f..6ac547107 100644 --- a/Source/Glide64/Settings.h +++ b/Source/Glide64/Settings.h @@ -243,7 +243,7 @@ public: inline bool texture_correction(void) const { return m_texture_correction; } // enable perspective texture correction emulation. is on by default inline StippleMode_t stipple_mode(void) const { return m_stipple_mode; } //used for dithered alpha emulation inline uint32_t stipple_pattern(void) const { return m_stipple_pattern; } //used for dithered alpha emulation - int force_microcheck; //check microcode each frame, for mixed F3DEX-S2DEX games + inline bool force_microcheck(void) const { return m_force_microcheck; } //check microcode each frame, for mixed F3DEX-S2DEX games int force_quad3d; //force 0xb5 command to be quad, not line 3d int clip_zmin; //enable near z clipping int clip_zmax; //enable far plane clipping; @@ -362,6 +362,7 @@ private: bool m_texture_correction; StippleMode_t m_stipple_mode; uint32_t m_stipple_pattern; + bool m_force_microcheck; hacks_t m_hacks; }; diff --git a/Source/Glide64/rdp.cpp b/Source/Glide64/rdp.cpp index 5ea461bfc..fb241369d 100644 --- a/Source/Glide64/rdp.cpp +++ b/Source/Glide64/rdp.cpp @@ -586,7 +586,7 @@ EXPORT void CALL ProcessDList(void) else memset(microcode, 0, 4096); } - else if ((g_old_ucode == CSettings::ucode_S2DEX && g_settings->ucode() == CSettings::ucode_F3DEX) || g_settings->force_microcheck) + else if ((g_old_ucode == CSettings::ucode_S2DEX && g_settings->ucode() == CSettings::ucode_F3DEX) || g_settings->force_microcheck()) { uint32_t startUcode = *(uint32_t*)(gfx.DMEM + 0xFD0); memcpy(microcode, gfx.RDRAM + startUcode, 4096);