Clean up of OpenGL hacks.

Removed now useless code.
Also fixed a problem with the iso properties.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3215 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid
2009-05-13 13:28:49 +00:00
parent 0f9214bce5
commit 03b0936fa1
10 changed files with 13 additions and 68 deletions

View File

@ -80,9 +80,7 @@ void Config::Load()
iniFile.Get("Hacks", "EFBCopyDisable", &bEFBCopyDisable, 0);
iniFile.Get("Hacks", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
//iniFile.Get("Hacks", "ProjectionHax1", &bProjectionHax1, 0);
iniFile.Get("Hacks", "EFBToTextureEnable", &bCopyEFBToRAM, 0);
//iniFile.Get("Hacks", "Hack", &bHack, false);
}
void Config::GameIniLoad() {
@ -102,18 +100,12 @@ void Config::GameIniLoad() {
if (iniFile->Exists("Video", "EFBCopyDisableHotKey"))
iniFile->Get("Video", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
//if (iniFile->Exists("Video", "ProjectionHax1"))
// iniFile->Get("Video", "ProjectionHax1", &bProjectionHax1, 0);
if (iniFile->Exists("Video", "EFBToTextureEnable"))
iniFile->Get("Video", "EFBToTextureEnable", &bCopyEFBToRAM, 0);
if (iniFile->Exists("Video", "SafeTextureCache"))
iniFile->Get("Video", "SafeTextureCache", &bSafeTextureCache, false);
// if (iniFile->Exists("Video", "SMGhack"))
// iniFile->Get("Video", "SMGhack", &bSMGhack, false);
if (iniFile->Exists("Video", "MSAA"))
iniFile->Get("Video", "MSAA", &iMultisampleMode, 0);
@ -173,9 +165,7 @@ void Config::Save()
iniFile.Set("Hacks", "EFBCopyDisable", bEFBCopyDisable);
iniFile.Set("Hacks", "EFBCopyDisableHotKey", bEFBCopyDisableHotKey);
//iniFile.Set("Hacks", "ProjectionHax1", bProjectionHax1);
iniFile.Set("Hacks", "EFBToTextureEnable", bCopyEFBToRAM);
//iniFile.Set("Hacks", "SMGhack", bSMGhack);
iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
}

View File

@ -93,7 +93,6 @@ struct Config
// Hacks
bool bEFBCopyDisable;
bool bEFBCopyDisableHotKey;
bool bProjectionHax1;
bool bHack;
bool bCopyEFBToRAM;
bool bSafeTextureCache;

View File

@ -364,12 +364,10 @@ void ConfigDialog::CreateGUIControls()
// Hacks controls
m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
//m_ProjectionHax1 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK1, wxT("ZTP Bloom hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
//m_Hack = new wxCheckBox(m_PageAdvanced, ID_HACK, wxT("Mario Galaxy Hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_PhackvalueCB = new wxChoice(m_PageAdvanced, ID_PHACKVALUE, wxDefaultPosition, wxDefaultSize, arrayStringFor_PhackvalueCB, 0, wxDefaultValidator);
m_PhackvalueCB->Append(wxT("None"));
m_PhackvalueCB->Append(wxT("Zelda Twighlight Princess Bloom hack"));
m_PhackvalueCB->Append(wxT("Zelda Twilight Princess Bloom hack"));
m_PhackvalueCB->Append(wxT("Super Mario Galaxy"));
m_PhackvalueCB->Append(wxT("Mario Kart Wii"));
m_PhackvalueCB->Append(wxT("Sonic and the Black Knight"));
@ -379,25 +377,19 @@ void ConfigDialog::CreateGUIControls()
// Default values
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
//m_ProjectionHax1->SetValue(g_Config.bProjectionHax1);
//m_Hack->SetValue(g_Config.bHack);
// Tool tips
m_SafeTextureCache->SetToolTip(wxT("This is useful to prevent Metroid Prime from crashing, but can cause problems in other games."
"\n[This option will apply immediately and does not require a restart. However it may not"
" be entirely safe to change it midgames.]"));
//m_ProjectionHax1->SetToolTip(wxT("This should get ZTP's Bloom to show"));
m_DstAlphaPass->SetToolTip(wxT("This renders a second time to set alpha to a constant value,"
"\nDisabling it may speed up some games, but could also cause glitches."));
m_DisableFog->SetToolTip(wxT("This option should not require a restart."));
//m_SMGh->SetToolTip(wxT("SMG hack for Super Mario Galaxy, Mario Kart Wii and other game probably it will be disable for other game and during SMG ending sequence or movies use the M key to turn this option on or off"));
// Sizers
sHacks = new wxGridBagSizer(0, 0);
//sHacks->Add(m_ProjectionHax1, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
sHacks->Add(m_SafeTextureCache, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
//sHacks->Add(m_Hack, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
sHacks->Add(m_PhackvalueCB, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
sbHacks = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Hacks"));
@ -601,9 +593,6 @@ void ConfigDialog::AdvancedSettingsChanged(wxCommandEvent& event)
g_Config.bEFBCopyDisableHotKey = m_EFBCopyDisableHotKey->IsChecked();
break;
// Hacks
/*case ID_PROJECTIONHACK1:
g_Config.bProjectionHax1 = m_ProjectionHax1->IsChecked();
break;*/
case ID_SAFETEXTURECACHE:
g_Config.bSafeTextureCache = m_SafeTextureCache->IsChecked();
break;

View File

@ -125,7 +125,6 @@ class ConfigDialog : public wxDialog
wxCheckBox *m_CheckBox_DisableCopyEFB;
wxRadioButton *m_Radio_CopyEFBToRAM, *m_Radio_CopyEFBToGL;
wxCheckBox *m_EFBCopyDisableHotKey;
//wxCheckBox *m_ProjectionHax1;
wxCheckBox *m_Hack;
wxCheckBox *m_SafeTextureCache;
// Screen size

View File

@ -281,7 +281,7 @@ void Flush()
Renderer::SetRenderMode(Renderer::RM_Normal);
// set global constants
VertexShaderManager::SetConstants(g_Config.bProjectionHax1, g_Config.bPhackvalue1, g_Config.fhackvalue1, g_Config.bPhackvalue2, g_Config.fhackvalue2, g_Config.bFreeLook);
VertexShaderManager::SetConstants(g_Config.bPhackvalue1, g_Config.fhackvalue1, g_Config.bPhackvalue2, g_Config.fhackvalue2, g_Config.bFreeLook);
PixelShaderManager::SetConstants();
// finally bind