[Glide64] Make zmode_compare_less private

This commit is contained in:
zilmar 2017-03-13 17:21:20 +11:00
parent 391bf2ffa1
commit d6fc37fdda
3 changed files with 7 additions and 6 deletions

View File

@ -77,7 +77,7 @@ CSettings::CSettings() :
m_force_calc_sphere(false), //use spheric mapping only, Ridge Racer 64
m_pal230(false), //set special scale for PAL games
m_correct_viewport(false), //correct viewport values
zmode_compare_less(0), //force GR_CMP_LESS for zmode=0 (opaque)and zmode=1 (interpenetrating)
m_zmode_compare_less(false), //force GR_CMP_LESS for zmode=0 (opaque)and zmode=1 (interpenetrating)
old_style_adither(0), //apply alpha dither regardless of alpha_dither_mode
n64_z_scale(0), //scale vertex z value before writing to depth buffer, as N64 does.
@ -176,7 +176,7 @@ void CSettings::RegisterSettings(void)
game_setting(Set_clip_zmax, "clip_zmax", true);
game_setting(Set_fast_crc, "fast_crc", true);
game_setting(Set_adjust_aspect, "adjust_aspect", true);
game_setting(Set_zmode_compare_less, "zmode_compare_less", 0);
game_setting(Set_zmode_compare_less, "zmode_compare_less", false);
game_setting(Set_old_style_adither, "old_style_adither", 0);
game_setting(Set_n64_z_scale, "n64_z_scale", 0);
game_setting_default(Set_optimize_texrect, "optimize_texrect", Set_optimize_texrect_default);
@ -729,7 +729,7 @@ void CSettings::ReadGameSettings(const char * name)
m_clip_zmax = GetSetting(Set_clip_zmax) != 0;
m_fast_crc = GetSetting(Set_fast_crc) != 0;
m_adjust_aspect = GetSetting(Set_adjust_aspect);
g_settings->zmode_compare_less = GetSetting(Set_zmode_compare_less);
m_zmode_compare_less = GetSetting(Set_zmode_compare_less);
g_settings->old_style_adither = GetSetting(Set_old_style_adither);
g_settings->n64_z_scale = GetSetting(Set_n64_z_scale);

View File

@ -251,7 +251,7 @@ public:
inline bool force_calc_sphere(void) const { return m_force_calc_sphere; } //use spheric mapping only, Ridge Racer 64
inline bool pal230(void) const { return m_pal230; } //use spheric mapping only, Ridge Racer 64
inline bool correct_viewport(void) const { return m_correct_viewport; } //correct viewport values
int zmode_compare_less; //force GR_CMP_LESS for zmode=0 (opaque)and zmode=1 (interpenetrating)
inline bool zmode_compare_less(void) const { return m_zmode_compare_less; } //force GR_CMP_LESS for zmode=0 (opaque)and zmode=1 (interpenetrating)
int old_style_adither; //apply alpha dither regardless of alpha_dither_mode
int n64_z_scale; //scale vertex z value before writing to depth buffer, as N64 does.
@ -370,6 +370,7 @@ private:
bool m_force_calc_sphere;
bool m_pal230;
bool m_correct_viewport;
bool m_zmode_compare_less;
hacks_t m_hacks;
};

View File

@ -1792,11 +1792,11 @@ void update()
switch ((rdp.rm & 0xC00) >> 10) {
case 0:
grDepthBiasLevel(0);
grDepthBufferFunction(g_settings->zmode_compare_less ? GR_CMP_LESS : GR_CMP_LEQUAL);
grDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL);
break;
case 1:
grDepthBiasLevel(-4);
grDepthBufferFunction(g_settings->zmode_compare_less ? GR_CMP_LESS : GR_CMP_LEQUAL);
grDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL);
break;
case 2:
grDepthBiasLevel(g_settings->ucode() == CSettings::ucode_PerfectDark ? -4 : 0);