[Glide64] Make ghq_hirs private
This commit is contained in:
parent
1412f2a705
commit
6148544a93
|
@ -106,14 +106,6 @@ void ConfigCleanup(void)
|
||||||
|
|
||||||
void CloseConfig();
|
void CloseConfig();
|
||||||
|
|
||||||
uint32_t texhirs[] =
|
|
||||||
{
|
|
||||||
NO_HIRESTEXTURES, //"Do not use"
|
|
||||||
RICE_HIRESTEXTURES, //"Rice format"
|
|
||||||
// GHQ_HIRESTEXTURES, //"GlideHQ format"
|
|
||||||
// JABO_HIRESTEXTURES, //"Jabo format"
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
template < class T, class TT = CToolTipCtrl >
|
template < class T, class TT = CToolTipCtrl >
|
||||||
|
@ -620,9 +612,9 @@ public:
|
||||||
TTSetTxt(IDC_TXT_FORMAT_CHOICES, tooltip.c_str());
|
TTSetTxt(IDC_TXT_FORMAT_CHOICES, tooltip.c_str());
|
||||||
TTSetTxt(IDC_CMB_FORMAT_CHOICES, tooltip.c_str());
|
TTSetTxt(IDC_CMB_FORMAT_CHOICES, tooltip.c_str());
|
||||||
m_cmbHrsFormat.Attach(GetDlgItem(IDC_CMB_FORMAT_CHOICES));
|
m_cmbHrsFormat.Attach(GetDlgItem(IDC_CMB_FORMAT_CHOICES));
|
||||||
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString("None"), 0);
|
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString("None"), CSettings::HiResPackFormat_None);
|
||||||
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString("Rice format"), 1);
|
m_cmbHrsFormat.SetItemData(m_cmbHrsFormat.AddString("Rice format"), CSettings::HiResPackFormat_Riceformat);
|
||||||
SetComboBoxIndex(m_cmbHrsFormat, g_settings->ghq_hirs);
|
SetComboBoxIndex(m_cmbHrsFormat, g_settings->ghq_hirs());
|
||||||
|
|
||||||
m_cmbTextureCompression.Attach(GetDlgItem(IDC_CMB_TEX_COMPRESS_MEHTOD));
|
m_cmbTextureCompression.Attach(GetDlgItem(IDC_CMB_TEX_COMPRESS_MEHTOD));
|
||||||
m_cmbTextureCompression.SetItemData(m_cmbTextureCompression.AddString("S3TC"), 0);
|
m_cmbTextureCompression.SetItemData(m_cmbTextureCompression.AddString("S3TC"), 0);
|
||||||
|
@ -701,7 +693,7 @@ public:
|
||||||
g_settings->ghq_enht_nobg = (int)m_cbxEnhIgnoreBG.GetCheck() == BST_CHECKED;
|
g_settings->ghq_enht_nobg = (int)m_cbxEnhIgnoreBG.GetCheck() == BST_CHECKED;
|
||||||
g_settings->ghq_enht_cmpr = (int)m_cbxEnhTexCompression.GetCheck() == BST_CHECKED;
|
g_settings->ghq_enht_cmpr = (int)m_cbxEnhTexCompression.GetCheck() == BST_CHECKED;
|
||||||
g_settings->ghq_enht_gz = (int)m_cbxEnhCompressCache.GetCheck() == BST_CHECKED;
|
g_settings->ghq_enht_gz = (int)m_cbxEnhCompressCache.GetCheck() == BST_CHECKED;
|
||||||
g_settings->ghq_hirs = m_cmbHrsFormat.GetItemData(m_cmbHrsFormat.GetCurSel());
|
g_settings->SetGhqHirs((CSettings::HiResPackFormat_t)m_cmbHrsFormat.GetItemData(m_cmbHrsFormat.GetCurSel()));
|
||||||
g_settings->ghq_hirs_tile = (int)m_cbxHrsTile.GetCheck() == BST_CHECKED;
|
g_settings->ghq_hirs_tile = (int)m_cbxHrsTile.GetCheck() == BST_CHECKED;
|
||||||
g_settings->ghq_hirs_f16bpp = (int)m_cbxHrsForce16.GetCheck() == BST_CHECKED;
|
g_settings->ghq_hirs_f16bpp = (int)m_cbxHrsForce16.GetCheck() == BST_CHECKED;
|
||||||
g_settings->ghq_hirs_dump = (int)m_cbxHrsTexEdit.GetCheck() == BST_CHECKED;
|
g_settings->ghq_hirs_dump = (int)m_cbxHrsTexEdit.GetCheck() == BST_CHECKED;
|
||||||
|
|
|
@ -655,11 +655,11 @@ int InitGfx()
|
||||||
|
|
||||||
if (!g_settings->ghq_use)
|
if (!g_settings->ghq_use)
|
||||||
{
|
{
|
||||||
g_settings->ghq_use = g_settings->ghq_fltr() != CSettings::TextureFilter_None || g_settings->ghq_enht() != CSettings::TextureEnht_None || g_settings->ghq_hirs;
|
g_settings->ghq_use = g_settings->ghq_fltr() != CSettings::TextureFilter_None || g_settings->ghq_enht() != CSettings::TextureEnht_None || g_settings->ghq_hirs() != CSettings::HiResPackFormat_None;
|
||||||
if (g_settings->ghq_use)
|
if (g_settings->ghq_use)
|
||||||
{
|
{
|
||||||
/* Plugin path */
|
/* Plugin path */
|
||||||
int options = g_settings->ghq_fltr() | g_settings->ghq_enht() | g_settings->ghq_cmpr() | texhirs[g_settings->ghq_hirs];
|
int options = g_settings->ghq_fltr() | g_settings->ghq_enht() | g_settings->ghq_cmpr() | g_settings->ghq_hirs();
|
||||||
if (g_settings->ghq_enht_cmpr)
|
if (g_settings->ghq_enht_cmpr)
|
||||||
{
|
{
|
||||||
options |= COMPRESS_TEX;
|
options |= COMPRESS_TEX;
|
||||||
|
|
|
@ -39,7 +39,7 @@ CSettings::CSettings() :
|
||||||
m_ghq_fltr(TextureFilter_None),
|
m_ghq_fltr(TextureFilter_None),
|
||||||
m_ghq_enht(TextureEnht_None),
|
m_ghq_enht(TextureEnht_None),
|
||||||
m_ghq_cmpr(TextureCompression_S3TC),
|
m_ghq_cmpr(TextureCompression_S3TC),
|
||||||
ghq_hirs(0),
|
m_ghq_hirs(HiResPackFormat_None),
|
||||||
ghq_use(0),
|
ghq_use(0),
|
||||||
ghq_enht_cmpr(0),
|
ghq_enht_cmpr(0),
|
||||||
ghq_enht_f16bpp(0),
|
ghq_enht_f16bpp(0),
|
||||||
|
@ -139,7 +139,7 @@ void CSettings::RegisterSettings(void)
|
||||||
general_setting(Set_ghq_fltr, "ghq_fltr", TextureFilter_None);
|
general_setting(Set_ghq_fltr, "ghq_fltr", TextureFilter_None);
|
||||||
general_setting(Set_ghq_cmpr, "ghq_cmpr", TextureCompression_S3TC);
|
general_setting(Set_ghq_cmpr, "ghq_cmpr", TextureCompression_S3TC);
|
||||||
general_setting(Set_ghq_enht, "ghq_enht", TextureEnht_None);
|
general_setting(Set_ghq_enht, "ghq_enht", TextureEnht_None);
|
||||||
general_setting(Set_ghq_hirs, "ghq_hirs", 0);
|
general_setting(Set_ghq_hirs, "ghq_hirs", HiResPackFormat_None);
|
||||||
general_setting(Set_ghq_enht_cmpr, "ghq_enht_cmpr", 0);
|
general_setting(Set_ghq_enht_cmpr, "ghq_enht_cmpr", 0);
|
||||||
general_setting(Set_ghq_enht_f16bpp, "ghq_enht_f16bpp", 0);
|
general_setting(Set_ghq_enht_f16bpp, "ghq_enht_f16bpp", 0);
|
||||||
general_setting(Set_ghq_enht_gz, "ghq_enht_gz", 1);
|
general_setting(Set_ghq_enht_gz, "ghq_enht_gz", 1);
|
||||||
|
@ -353,6 +353,15 @@ void CSettings::SetGhqCmpr(TextureCompression_t value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSettings::SetGhqHirs(HiResPackFormat_t value)
|
||||||
|
{
|
||||||
|
if (value != m_ghq_hirs)
|
||||||
|
{
|
||||||
|
m_ghq_hirs = value;
|
||||||
|
m_dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CSettings::UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove)
|
void CSettings::UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove)
|
||||||
{
|
{
|
||||||
uint32_t frame_buffer_original = m_frame_buffer;
|
uint32_t frame_buffer_original = m_frame_buffer;
|
||||||
|
@ -458,7 +467,7 @@ void CSettings::ReadSettings()
|
||||||
m_ghq_fltr = (TextureFilter_t)GetSetting(Set_ghq_fltr);
|
m_ghq_fltr = (TextureFilter_t)GetSetting(Set_ghq_fltr);
|
||||||
m_ghq_cmpr = (TextureCompression_t)GetSetting(Set_ghq_cmpr);
|
m_ghq_cmpr = (TextureCompression_t)GetSetting(Set_ghq_cmpr);
|
||||||
m_ghq_enht = (TextureEnhancement_t)GetSetting(Set_ghq_enht);
|
m_ghq_enht = (TextureEnhancement_t)GetSetting(Set_ghq_enht);
|
||||||
this->ghq_hirs = (uint8_t)GetSetting(Set_ghq_hirs);
|
m_ghq_hirs = (HiResPackFormat_t)GetSetting(Set_ghq_hirs);
|
||||||
this->ghq_enht_cmpr = GetSetting(Set_ghq_enht_cmpr);
|
this->ghq_enht_cmpr = GetSetting(Set_ghq_enht_cmpr);
|
||||||
this->ghq_enht_f16bpp = GetSetting(Set_ghq_enht_f16bpp);
|
this->ghq_enht_f16bpp = GetSetting(Set_ghq_enht_f16bpp);
|
||||||
this->ghq_enht_gz = GetSetting(Set_ghq_enht_gz);
|
this->ghq_enht_gz = GetSetting(Set_ghq_enht_gz);
|
||||||
|
@ -727,7 +736,7 @@ void CSettings::WriteSettings(void)
|
||||||
SetSetting(Set_ghq_fltr, m_ghq_fltr);
|
SetSetting(Set_ghq_fltr, m_ghq_fltr);
|
||||||
SetSetting(Set_ghq_cmpr, m_ghq_cmpr);
|
SetSetting(Set_ghq_cmpr, m_ghq_cmpr);
|
||||||
SetSetting(Set_ghq_enht, m_ghq_enht);
|
SetSetting(Set_ghq_enht, m_ghq_enht);
|
||||||
SetSetting(Set_ghq_hirs, g_settings->ghq_hirs);
|
SetSetting(Set_ghq_hirs, m_ghq_hirs);
|
||||||
SetSetting(Set_ghq_enht_cmpr, g_settings->ghq_enht_cmpr);
|
SetSetting(Set_ghq_enht_cmpr, g_settings->ghq_enht_cmpr);
|
||||||
SetSetting(Set_ghq_enht_f16bpp, g_settings->ghq_enht_f16bpp);
|
SetSetting(Set_ghq_enht_f16bpp, g_settings->ghq_enht_f16bpp);
|
||||||
SetSetting(Set_ghq_enht_gz, g_settings->ghq_enht_gz);
|
SetSetting(Set_ghq_enht_gz, g_settings->ghq_enht_gz);
|
||||||
|
|
|
@ -113,6 +113,12 @@ public:
|
||||||
TextureCompression_FXT1 = 0x1000,
|
TextureCompression_FXT1 = 0x1000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum HiResPackFormat_t
|
||||||
|
{
|
||||||
|
HiResPackFormat_None = 0,
|
||||||
|
HiResPackFormat_Riceformat = 0x00020000,
|
||||||
|
};
|
||||||
|
|
||||||
enum SwapMode_t
|
enum SwapMode_t
|
||||||
{
|
{
|
||||||
SwapMode_Old = 0,
|
SwapMode_Old = 0,
|
||||||
|
@ -200,7 +206,7 @@ public:
|
||||||
inline TextureFilter_t ghq_fltr(void) const { return m_ghq_fltr; }
|
inline TextureFilter_t ghq_fltr(void) const { return m_ghq_fltr; }
|
||||||
inline TextureEnhancement_t ghq_enht(void) const { return m_ghq_enht; }
|
inline TextureEnhancement_t ghq_enht(void) const { return m_ghq_enht; }
|
||||||
inline TextureCompression_t ghq_cmpr(void) const { return m_ghq_cmpr; }
|
inline TextureCompression_t ghq_cmpr(void) const { return m_ghq_cmpr; }
|
||||||
int ghq_hirs;
|
inline HiResPackFormat_t ghq_hirs(void) const { return m_ghq_hirs; }
|
||||||
int ghq_use;
|
int ghq_use;
|
||||||
int ghq_enht_cmpr;
|
int ghq_enht_cmpr;
|
||||||
int ghq_enht_f16bpp;
|
int ghq_enht_f16bpp;
|
||||||
|
@ -270,6 +276,7 @@ public:
|
||||||
void SetGhqFltr(TextureFilter_t value);
|
void SetGhqFltr(TextureFilter_t value);
|
||||||
void SetGhqEnht(TextureEnhancement_t value);
|
void SetGhqEnht(TextureEnhancement_t value);
|
||||||
void SetGhqCmpr(TextureCompression_t value);
|
void SetGhqCmpr(TextureCompression_t value);
|
||||||
|
void SetGhqHirs(HiResPackFormat_t value);
|
||||||
void UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove);
|
void UpdateFrameBufferBits(uint32_t BitsToAdd, uint32_t BitsToRemove);
|
||||||
ucode_t DetectUCode(uint32_t uc_crc);
|
ucode_t DetectUCode(uint32_t uc_crc);
|
||||||
void SetUcode(ucode_t value);
|
void SetUcode(ucode_t value);
|
||||||
|
@ -313,6 +320,7 @@ private:
|
||||||
TextureFilter_t m_ghq_fltr;
|
TextureFilter_t m_ghq_fltr;
|
||||||
TextureEnhancement_t m_ghq_enht;
|
TextureEnhancement_t m_ghq_enht;
|
||||||
TextureCompression_t m_ghq_cmpr;
|
TextureCompression_t m_ghq_cmpr;
|
||||||
|
HiResPackFormat_t m_ghq_hirs;
|
||||||
ucode_t m_ucode;
|
ucode_t m_ucode;
|
||||||
StippleMode_t m_stipple_mode;
|
StippleMode_t m_stipple_mode;
|
||||||
hacks_t m_hacks;
|
hacks_t m_hacks;
|
||||||
|
|
|
@ -1569,7 +1569,7 @@ void load_palette(uint32_t addr, uint16_t start, uint16_t count)
|
||||||
|
|
||||||
WriteTrace(TraceTLUT, TraceDebug, "%d: %08lx", i, *(uint16_t *)(gfx.RDRAM + (addr ^ 2)));
|
WriteTrace(TraceTLUT, TraceDebug, "%d: %08lx", i, *(uint16_t *)(gfx.RDRAM + (addr ^ 2)));
|
||||||
}
|
}
|
||||||
if (g_settings->ghq_hirs)
|
if (g_settings->ghq_hirs() != CSettings::HiResPackFormat_None)
|
||||||
{
|
{
|
||||||
memcpy((uint8_t*)(rdp.pal_8_rice + start), spal, count << 1);
|
memcpy((uint8_t*)(rdp.pal_8_rice + start), spal, count << 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,6 @@ typedef struct {
|
||||||
uint32_t lr_y;
|
uint32_t lr_y;
|
||||||
} SCISSOR;
|
} SCISSOR;
|
||||||
|
|
||||||
extern uint32_t texhirs[];
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t tile_ul_s;
|
uint16_t tile_ul_s;
|
||||||
|
|
Loading…
Reference in New Issue