mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Added projection hacks back and a "default: breal" on the switch-case of "event.getId()"
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1230 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
25e307c130
commit
601f65f071
@ -79,6 +79,8 @@ void Config::Load()
|
|||||||
|
|
||||||
|
|
||||||
iniFile.Get("Hacks", "EFBToTextureDisable", &bEBFToTextureDisable, 0);
|
iniFile.Get("Hacks", "EFBToTextureDisable", &bEBFToTextureDisable, 0);
|
||||||
|
iniFile.Get("Hacks", "ProjectionHax1", &bProjectionHax1, 0);
|
||||||
|
iniFile.Get("Hacks", "ProjectionHax2", &bProjectionHax2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Config::Save()
|
void Config::Save()
|
||||||
@ -112,6 +114,8 @@ void Config::Save()
|
|||||||
iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso);
|
iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso);
|
||||||
|
|
||||||
iniFile.Set("Hacks", "EFBToTextureDisable", bEBFToTextureDisable);
|
iniFile.Set("Hacks", "EFBToTextureDisable", bEBFToTextureDisable);
|
||||||
|
iniFile.Set("Hacks", "ProjectionHax1", bProjectionHax1);
|
||||||
|
iniFile.Set("Hacks", "ProjectionHax2", bProjectionHax2);
|
||||||
|
|
||||||
iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
|
iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,8 @@ struct Config
|
|||||||
|
|
||||||
// Hacks
|
// Hacks
|
||||||
bool bEBFToTextureDisable;
|
bool bEBFToTextureDisable;
|
||||||
|
bool bProjectionHax1;
|
||||||
|
bool bProjectionHax2;
|
||||||
|
|
||||||
int iLog; // CONF_ bits
|
int iLog; // CONF_ bits
|
||||||
int iSaveTargetId;
|
int iSaveTargetId;
|
||||||
|
@ -47,6 +47,8 @@ BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
|
|||||||
EVT_CHECKBOX(ID_DISABLELIGHTING, ConfigDialog::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DISABLELIGHTING, ConfigDialog::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DISABLETEXTURING, ConfigDialog::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DISABLETEXTURING, ConfigDialog::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_EFBTOTEXTUREDISABLE, ConfigDialog::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_EFBTOTEXTUREDISABLE, ConfigDialog::AdvancedSettingsChanged)
|
||||||
|
EVT_CHECKBOX(ID_PROJECTIONHACK1,ConfigDialog::AdvancedSettingsChanged)
|
||||||
|
EVT_CHECKBOX(ID_PROJECTIONHACK2,ConfigDialog::AdvancedSettingsChanged)
|
||||||
EVT_DIRPICKER_CHANGED(ID_TEXTUREPATH, ConfigDialog::TexturePathChange)
|
EVT_DIRPICKER_CHANGED(ID_TEXTUREPATH, ConfigDialog::TexturePathChange)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@ -190,6 +192,14 @@ void ConfigDialog::CreateGUIControls()
|
|||||||
m_EFBToTextureDisable->Enable(true);
|
m_EFBToTextureDisable->Enable(true);
|
||||||
m_EFBToTextureDisable->SetValue(g_Config.bEBFToTextureDisable);
|
m_EFBToTextureDisable->SetValue(g_Config.bEBFToTextureDisable);
|
||||||
|
|
||||||
|
m_ProjectionHax1 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK1, wxT("Projection before R945"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
m_ProjectionHax1->Enable(true);
|
||||||
|
m_ProjectionHax1->SetValue(g_Config.bProjectionHax1);
|
||||||
|
|
||||||
|
m_ProjectionHax2 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK2, wxT("Projection hack of R844"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
m_ProjectionHax2->Enable(true);
|
||||||
|
m_ProjectionHax2->SetValue(g_Config.bProjectionHax2);
|
||||||
|
|
||||||
sAdvanced = new wxBoxSizer(wxVERTICAL);
|
sAdvanced = new wxBoxSizer(wxVERTICAL);
|
||||||
sInfo = new wxGridBagSizer(0, 0);
|
sInfo = new wxGridBagSizer(0, 0);
|
||||||
sInfo->Add(m_ShowFPS, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
sInfo->Add(m_ShowFPS, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
@ -216,6 +226,8 @@ void ConfigDialog::CreateGUIControls()
|
|||||||
|
|
||||||
sHacks = new wxGridBagSizer(0, 0);
|
sHacks = new wxGridBagSizer(0, 0);
|
||||||
sHacks->Add(m_EFBToTextureDisable, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
sHacks->Add(m_EFBToTextureDisable, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||||
|
sHacks->Add(m_ProjectionHax1, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||||
|
sHacks->Add(m_ProjectionHax2, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
sbHacks->Add(sHacks);
|
sbHacks->Add(sHacks);
|
||||||
sAdvanced->Add(sbHacks, 0, wxEXPAND|wxALL, 5);
|
sAdvanced->Add(sbHacks, 0, wxEXPAND|wxALL, 5);
|
||||||
m_PageAdvanced->SetSizer(sAdvanced);
|
m_PageAdvanced->SetSizer(sAdvanced);
|
||||||
@ -343,6 +355,14 @@ void ConfigDialog::AdvancedSettingsChanged(wxCommandEvent& event)
|
|||||||
case ID_EFBTOTEXTUREDISABLE:
|
case ID_EFBTOTEXTUREDISABLE:
|
||||||
g_Config.bEBFToTextureDisable = m_EFBToTextureDisable->IsChecked();
|
g_Config.bEBFToTextureDisable = m_EFBToTextureDisable->IsChecked();
|
||||||
break;
|
break;
|
||||||
|
case ID_PROJECTIONHACK1:
|
||||||
|
g_Config.bProjectionHax1 = m_ProjectionHax1->IsChecked();
|
||||||
|
break;
|
||||||
|
case ID_PROJECTIONHACK2:
|
||||||
|
g_Config.bProjectionHax2 = m_ProjectionHax2->IsChecked();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,6 +94,8 @@ class ConfigDialog : public wxDialog
|
|||||||
wxCheckBox *m_DumpTextures;
|
wxCheckBox *m_DumpTextures;
|
||||||
wxDirPickerCtrl *m_TexturePath;
|
wxDirPickerCtrl *m_TexturePath;
|
||||||
wxCheckBox *m_EFBToTextureDisable;
|
wxCheckBox *m_EFBToTextureDisable;
|
||||||
|
wxCheckBox *m_ProjectionHax1;
|
||||||
|
wxCheckBox *m_ProjectionHax2;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -134,6 +136,8 @@ class ConfigDialog : public wxDialog
|
|||||||
ID_TEXTUREPATH,
|
ID_TEXTUREPATH,
|
||||||
|
|
||||||
ID_EFBTOTEXTUREDISABLE,
|
ID_EFBTOTEXTUREDISABLE,
|
||||||
|
ID_PROJECTIONHACK1,
|
||||||
|
ID_PROJECTIONHACK2
|
||||||
};
|
};
|
||||||
|
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
|
@ -441,7 +441,20 @@ void VertexShaderMngr::SetConstants()
|
|||||||
g_fProjectionMatrix[8] = 0.0f;
|
g_fProjectionMatrix[8] = 0.0f;
|
||||||
g_fProjectionMatrix[9] = 0.0f;
|
g_fProjectionMatrix[9] = 0.0f;
|
||||||
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
|
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
|
||||||
g_fProjectionMatrix[11] = xfregs.rawProjection[5];
|
|
||||||
|
//---------Projection[11]---------
|
||||||
|
// No hacks
|
||||||
|
if ((!g_Config.bProjectionHax1 && !g_Config.bProjectionHax2) || (g_Config.bProjectionHax1 && g_Config.bProjectionHax2))
|
||||||
|
g_fProjectionMatrix[11] = -(0.0f - xfregs.rawProjection[5]);
|
||||||
|
|
||||||
|
// Before R945 Hack
|
||||||
|
if(g_Config.bProjectionHax1 && !g_Config.bProjectionHax2)
|
||||||
|
g_fProjectionMatrix[11] = -(1.0f - xfregs.rawProjection[5]);
|
||||||
|
|
||||||
|
// R844 Hack
|
||||||
|
if(!g_Config.bProjectionHax1 && g_Config.bProjectionHax2)
|
||||||
|
g_fProjectionMatrix[11] = xfregs.rawProjection[5];
|
||||||
|
//--------------------------------
|
||||||
|
|
||||||
g_fProjectionMatrix[12] = 0.0f;
|
g_fProjectionMatrix[12] = 0.0f;
|
||||||
g_fProjectionMatrix[13] = 0.0f;
|
g_fProjectionMatrix[13] = 0.0f;
|
||||||
@ -464,7 +477,21 @@ void VertexShaderMngr::SetConstants()
|
|||||||
g_fProjectionMatrix[8] = 0.0f;
|
g_fProjectionMatrix[8] = 0.0f;
|
||||||
g_fProjectionMatrix[9] = 0.0f;
|
g_fProjectionMatrix[9] = 0.0f;
|
||||||
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
|
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
|
||||||
g_fProjectionMatrix[11] = 1.0f + xfregs.rawProjection[5];
|
|
||||||
|
//---------Projection[11]---------
|
||||||
|
// No hacks
|
||||||
|
if ((!g_Config.bProjectionHax1 && !g_Config.bProjectionHax2) || (g_Config.bProjectionHax1 && g_Config.bProjectionHax2))
|
||||||
|
g_fProjectionMatrix[11] = -(-1.0f - xfregs.rawProjection[5]);
|
||||||
|
|
||||||
|
// Before R945 Hack
|
||||||
|
if (g_Config.bProjectionHax1 && !g_Config.bProjectionHax2)
|
||||||
|
g_fProjectionMatrix[11] = -(0.0f - xfregs.rawProjection[5]);
|
||||||
|
|
||||||
|
// R844 Hack
|
||||||
|
if (!g_Config.bProjectionHax1 && g_Config.bProjectionHax2)
|
||||||
|
g_fProjectionMatrix[11] = -xfregs.rawProjection[5];
|
||||||
|
|
||||||
|
//--------------------------------
|
||||||
|
|
||||||
g_fProjectionMatrix[12] = 0;
|
g_fProjectionMatrix[12] = 0;
|
||||||
g_fProjectionMatrix[13] = 0;
|
g_fProjectionMatrix[13] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user