From ecb32bd4a057a3f3985230d5cbd6c84cc8bf3388 Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 13 Mar 2017 07:12:17 +1100 Subject: [PATCH] [Glide64] Make alt_tex_size private --- Source/Glide64/Settings.cpp | 10 +++------- Source/Glide64/Settings.h | 4 ++-- Source/Glide64/TexCache.cpp | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Source/Glide64/Settings.cpp b/Source/Glide64/Settings.cpp index a50cb53a0..c4ccceee1 100644 --- a/Source/Glide64/Settings.cpp +++ b/Source/Glide64/Settings.cpp @@ -61,7 +61,7 @@ CSettings::CSettings() : // Special fixes m_fast_crc(false), -alt_tex_size(0), + m_alt_tex_size(false), use_sts1_only(0), flame_corona(0), //hack for zeldas flame's corona increase_texrect_edge(0), // add 1 to lower right corner coordinates of texrect @@ -97,10 +97,6 @@ m_FlushLogs(false) ReadSettings(); } -CSettings::~CSettings() -{ -} - void CSettings::RegisterSettings(void) { SetModuleName("default"); @@ -163,7 +159,7 @@ void CSettings::RegisterSettings(void) general_setting(Set_fb_get_info_default, "fb_get_info", false); general_setting(Set_fb_render_default, "fb_render", false); - game_setting(Set_alt_tex_size, "alt_tex_size", 0); + game_setting(Set_alt_tex_size, "alt_tex_size", false); game_setting(Set_use_sts1_only, "use_sts1_only", 0); game_setting(Set_force_calc_sphere, "force_calc_sphere", 0); game_setting(Set_correct_viewport, "correct_viewport", 0); @@ -716,7 +712,7 @@ void CSettings::ReadGameSettings(const char * name) m_hacks = (hacks_t)(m_hacks | CSettings::hack_Winback); } - g_settings->alt_tex_size = GetSetting(Set_alt_tex_size); + m_alt_tex_size = GetSetting(Set_alt_tex_size) != 0; g_settings->use_sts1_only = GetSetting(Set_use_sts1_only); g_settings->force_calc_sphere = GetSetting(Set_force_calc_sphere); g_settings->correct_viewport = GetSetting(Set_correct_viewport); diff --git a/Source/Glide64/Settings.h b/Source/Glide64/Settings.h index a7857a771..d529fc6b9 100644 --- a/Source/Glide64/Settings.h +++ b/Source/Glide64/Settings.h @@ -5,7 +5,6 @@ class CSettings { public: CSettings(); - ~CSettings(); //Frame buffer emulation options enum fb_bits_t @@ -236,7 +235,7 @@ public: // Special fixes inline bool fast_crc(void) const { return m_fast_crc; } - int alt_tex_size; + inline bool alt_tex_size(void) const { return m_alt_tex_size; } int use_sts1_only; int flame_corona; //hack for zeldas flame's corona int increase_texrect_edge; // add 1 to lower right corner coordinates of texrect @@ -355,6 +354,7 @@ private: wfmode_t m_wfmode; ucode_t m_ucode; bool m_fast_crc; + bool m_alt_tex_size; StippleMode_t m_stipple_mode; hacks_t m_hacks; }; diff --git a/Source/Glide64/TexCache.cpp b/Source/Glide64/TexCache.cpp index 3bad7dc4d..a6c0dcee8 100644 --- a/Source/Glide64/TexCache.cpp +++ b/Source/Glide64/TexCache.cpp @@ -200,7 +200,7 @@ void GetTexInfo(int id, int tile) mask_width = (rdp.tiles[tile].mask_s == 0) ? (tile_width) : (1 << rdp.tiles[tile].mask_s); mask_height = (rdp.tiles[tile].mask_t == 0) ? (tile_height) : (1 << rdp.tiles[tile].mask_t); - if (g_settings->alt_tex_size) + if (g_settings->alt_tex_size()) { // ** ALTERNATE TEXTURE SIZE METHOD ** // Helps speed in some games that loaded weird-sized textures, but could break other