Newer version OpenGL game hacks by val532.(Has a lot better way of handling specific game hacks)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3196 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid
2009-05-11 06:40:03 +00:00
parent 8d19e264b9
commit 7011b9c1e4
9 changed files with 102 additions and 41 deletions

View File

@ -77,7 +77,7 @@ void VertexShaderManager::Shutdown()
// =======================================================================================
// Syncs the shader constant buffers with xfmem
// ----------------
void VertexShaderManager::SetConstants(bool proj_hax_1,bool SMG_hack, bool freeLook)
void VertexShaderManager::SetConstants(bool proj_hax_1 ,bool Hack_hack1 ,float Hack_value1 ,bool Hack_hack2 ,float Hack_value2 ,bool freeLook)
{
//nTransformMatricesChanged[0] = 0; nTransformMatricesChanged[1] = 256;
//nNormalMatricesChanged[0] = 0; nNormalMatricesChanged[1] = 96;
@ -261,10 +261,10 @@ void VertexShaderManager::SetConstants(bool proj_hax_1,bool SMG_hack, bool freeL
g_fProjectionMatrix[8] = 0.0f;
g_fProjectionMatrix[9] = 0.0f;
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
g_fProjectionMatrix[10] = (Hack_hack1 ? -(Hack_value1 + xfregs.rawProjection[4]) : xfregs.rawProjection[4]);
g_fProjectionMatrix[11] = (Hack_hack2 ? -(Hack_value2 + xfregs.rawProjection[5]) : xfregs.rawProjection[5]) + (proj_hax_1 ? 0.1f : 0.0f);
g_fProjectionMatrix[11] = (SMG_hack ? -(0.512505f + xfregs.rawProjection[5]) : xfregs.rawProjection[5]) + (proj_hax_1 ? 0.1f : 0.0f);
g_fProjectionMatrix[12] = 0.0f;
g_fProjectionMatrix[13] = 0.0f;
g_fProjectionMatrix[14] = 0.0f;

View File

@ -28,7 +28,7 @@ public:
static void Shutdown();
// constant management
static void SetConstants(bool proj_hax_1, bool SMG_hack, bool freeLook);
static void SetConstants(bool proj_hax_1, bool Hack_hack1, float Hack_value1, bool Hack_hack2, float Hack_value2, bool freeLook);
static void SetViewport(float* _Viewport);
static void SetViewportChanged();