[Glide64] Make correct_viewport private

This commit is contained in:
zilmar 2017-03-13 17:17:52 +11:00
parent ff805e9b3f
commit 391bf2ffa1
3 changed files with 8 additions and 7 deletions

View File

@ -76,7 +76,7 @@ CSettings::CSettings() :
m_adjust_aspect(false), //adjust screen aspect for wide screen mode
m_force_calc_sphere(false), //use spheric mapping only, Ridge Racer 64
m_pal230(false), //set special scale for PAL games
correct_viewport(0), //correct viewport values
m_correct_viewport(false), //correct viewport values
zmode_compare_less(0), //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.
@ -162,7 +162,7 @@ void CSettings::RegisterSettings(void)
game_setting(Set_alt_tex_size, "alt_tex_size", false);
game_setting(Set_use_sts1_only, "use_sts1_only", false);
game_setting(Set_force_calc_sphere, "force_calc_sphere", false);
game_setting(Set_correct_viewport, "correct_viewport", 0);
game_setting(Set_correct_viewport, "correct_viewport", false);
game_setting(Set_increase_texrect_edge, "increase_texrect_edge", false);
game_setting(Set_decrease_fillrect_edge, "decrease_fillrect_edge", false);
game_setting(Set_texture_correction, "texture_correction", true);
@ -715,7 +715,7 @@ void CSettings::ReadGameSettings(const char * name)
m_alt_tex_size = GetSetting(Set_alt_tex_size) != 0;
m_use_sts1_only = GetSetting(Set_use_sts1_only) != 0;
m_force_calc_sphere = GetSetting(Set_force_calc_sphere) != 0;
g_settings->correct_viewport = GetSetting(Set_correct_viewport);
m_correct_viewport = GetSetting(Set_correct_viewport);
m_increase_texrect_edge = GetSetting(Set_increase_texrect_edge) != 0;
m_decrease_fillrect_edge = GetSetting(Set_decrease_fillrect_edge) != 0;
m_texture_correction = GetSetting(Set_texture_correction) != 0;

View File

@ -250,7 +250,7 @@ public:
inline bool adjust_aspect(void) const { return m_adjust_aspect; } //adjust screen aspect for wide screen mode
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
int correct_viewport; //correct viewport values
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)
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.
@ -369,6 +369,7 @@ private:
bool m_adjust_aspect;
bool m_force_calc_sphere;
bool m_pal230;
bool m_correct_viewport;
hacks_t m_hacks;
};

View File

@ -357,10 +357,10 @@ static void uc0_movemem()
short trans_x = ((short*)gfx.RDRAM)[(a + 4) ^ 1] / 4;
short trans_y = ((short*)gfx.RDRAM)[(a + 5) ^ 1] / 4;
short trans_z = ((short*)gfx.RDRAM)[(a + 6) ^ 1];
if (g_settings->correct_viewport)
if (g_settings->correct_viewport())
{
scale_x = abs(scale_x);
scale_y = abs(scale_y);
scale_x = (short)abs(scale_x);
scale_y = (short)abs(scale_y);
}
rdp.view_scale[0] = scale_x * rdp.scale_x;
rdp.view_scale[1] = -scale_y * rdp.scale_y;