From f5eb97bbb56fbe903743fb22deadfbe0182b15d9 Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 13 Mar 2017 07:59:00 +1100 Subject: [PATCH] [Glide64] make clip_zmin private --- Source/Glide64/Settings.cpp | 6 +++--- Source/Glide64/Settings.h | 3 ++- Source/Glide64/Util.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Glide64/Settings.cpp b/Source/Glide64/Settings.cpp index aad2667fc..31adcd70a 100644 --- a/Source/Glide64/Settings.cpp +++ b/Source/Glide64/Settings.cpp @@ -71,7 +71,7 @@ CSettings::CSettings() : m_stipple_pattern(0), //used for dithered alpha emulation m_force_microcheck(false), //check microcode each frame, for mixed F3DEX-S2DEX games m_force_quad3d(false), //force 0xb5 command to be quad, not line 3d -clip_zmin(0), //enable near z clipping + m_clip_zmin(false), //enable near z clipping clip_zmax(0), //enable far plane clipping; adjust_aspect(0), //adjust screen aspect for wide screen mode force_calc_sphere(0), //use spheric mapping only, Ridge Racer 64 @@ -172,7 +172,7 @@ void CSettings::RegisterSettings(void) game_setting(Set_stipple_pattern, "stipple_pattern", 0x3E0F83E0); game_setting(Set_force_microcheck, "force_microcheck", false); game_setting(Set_force_quad3d, "force_quad3d", false); - game_setting(Set_clip_zmin, "clip_zmin", 0); + game_setting(Set_clip_zmin, "clip_zmin", false); game_setting(Set_clip_zmax, "clip_zmax", 1); game_setting(Set_fast_crc, "fast_crc", true); game_setting(Set_adjust_aspect, "adjust_aspect", 1); @@ -725,7 +725,7 @@ void CSettings::ReadGameSettings(const char * name) m_stipple_pattern = stipple_pattern > 0 ? (uint32_t)stipple_pattern : 0x3E0F83E0; m_force_microcheck = GetSetting(Set_force_microcheck) != 0; m_force_quad3d = GetSetting(Set_force_quad3d) != 0; - g_settings->clip_zmin = GetSetting(Set_clip_zmin); + m_clip_zmin = GetSetting(Set_clip_zmin) != 0; g_settings->clip_zmax = GetSetting(Set_clip_zmax); m_fast_crc = GetSetting(Set_fast_crc) != 0; g_settings->adjust_aspect = GetSetting(Set_adjust_aspect); diff --git a/Source/Glide64/Settings.h b/Source/Glide64/Settings.h index 7fee0d0d8..1755297dd 100644 --- a/Source/Glide64/Settings.h +++ b/Source/Glide64/Settings.h @@ -245,7 +245,7 @@ public: inline uint32_t stipple_pattern(void) const { return m_stipple_pattern; } //used for dithered alpha emulation inline bool force_microcheck(void) const { return m_force_microcheck; } //check microcode each frame, for mixed F3DEX-S2DEX games inline bool force_quad3d(void) const { return m_force_quad3d; } //force 0xb5 command to be quad, not line 3d - int clip_zmin; //enable near z clipping + inline bool clip_zmin(void) const { return m_clip_zmin; } //enable near z clipping int clip_zmax; //enable far plane clipping; int adjust_aspect; //adjust screen aspect for wide screen mode int force_calc_sphere; //use spheric mapping only, Ridge Racer 64 @@ -364,6 +364,7 @@ private: uint32_t m_stipple_pattern; bool m_force_microcheck; bool m_force_quad3d; + bool m_clip_zmin; hacks_t m_hacks; }; diff --git a/Source/Glide64/Util.cpp b/Source/Glide64/Util.cpp index 6de55ef60..af7d4908b 100644 --- a/Source/Glide64/Util.cpp +++ b/Source/Glide64/Util.cpp @@ -802,7 +802,7 @@ void do_triangle_stuff(uint16_t linew, int old_interpolate) // what else?? do th rdp.clip = 0; else { - if (!g_settings->clip_zmin) + if (!g_settings->clip_zmin()) { rdp.clip &= ~CLIP_ZMIN; }