A attempt for a fix for the Zelda TP Bloom hack
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3228 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4f0fbacd78
commit
d0653aa53a
|
@ -77,7 +77,7 @@ void VertexShaderManager::Shutdown()
|
|||
// =======================================================================================
|
||||
// Syncs the shader constant buffers with xfmem
|
||||
// ----------------
|
||||
void VertexShaderManager::SetConstants(bool Hack_hack1 ,float Hack_value1 ,bool Hack_hack2 ,float Hack_value2 ,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;
|
||||
|
@ -262,7 +262,7 @@ void VertexShaderManager::SetConstants(bool Hack_hack1 ,float Hack_value1 ,bool
|
|||
g_fProjectionMatrix[8] = 0.0f;
|
||||
g_fProjectionMatrix[9] = 0.0f;
|
||||
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]);
|
||||
g_fProjectionMatrix[11] = (Hack_hack2 ? -(Hack_value2 + xfregs.rawProjection[5]) : xfregs.rawProjection[5]) + (proj_hax_1 ? 0.1f : 0.0f);
|
||||
|
||||
g_fProjectionMatrix[12] = 0.0f;
|
||||
g_fProjectionMatrix[13] = 0.0f;
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
static void Shutdown();
|
||||
|
||||
// constant management
|
||||
static void SetConstants(bool Hack_hack1, float Hack_value1, bool Hack_hack2, float Hack_value2, 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();
|
||||
|
|
|
@ -359,14 +359,9 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize)
|
|||
k=0;
|
||||
}
|
||||
|
||||
|
||||
const u16 updpar = Memory_Read_U16(updaddr + k);
|
||||
const u16 upddata = Memory_Read_U16(updaddr + k + 2);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// some safety checks, I hope it's enough
|
||||
if(updaddr > 0x80000000 && updaddr < 0x817fffff
|
||||
&& updpar < 63 && updpar > 3 && upddata >= 0 // updpar > 3 because we don't want to change
|
||||
|
|
|
@ -235,7 +235,7 @@ void Flush()
|
|||
if (numVertices)
|
||||
{
|
||||
// set global constants
|
||||
VertexShaderManager::SetConstants( false, 0, false, 0, false);
|
||||
VertexShaderManager::SetConstants(false, false, 0, false, 0, false);
|
||||
PixelShaderManager::SetConstants();
|
||||
|
||||
PixelShaderCache::SetShader();
|
||||
|
|
|
@ -99,6 +99,7 @@ struct Config
|
|||
int iPhackvalue;
|
||||
bool bPhackvalue1, bPhackvalue2;
|
||||
float fhackvalue1, fhackvalue2;
|
||||
bool bProjHack1;
|
||||
|
||||
int iLog; // CONF_ bits
|
||||
int iSaveTargetId;
|
||||
|
|
|
@ -644,42 +644,48 @@ void ConfigDialog::UpdateGUI()
|
|||
void Config::UpdateHack()
|
||||
{
|
||||
switch(g_Config.iPhackvalue)
|
||||
{
|
||||
case OGL_HACK_NONE:
|
||||
g_Config.bPhackvalue1 = false;
|
||||
g_Config.bPhackvalue2 = false;
|
||||
{
|
||||
case OGL_HACK_NONE:
|
||||
g_Config.bProjHack1 = 0;
|
||||
g_Config.bPhackvalue1 = 0;
|
||||
g_Config.bPhackvalue2 = 0;
|
||||
break;
|
||||
case OGL_HACK_ZELDA_TP_BLOOM_HACK:
|
||||
g_Config.bPhackvalue1 = 1;
|
||||
g_Config.bProjHack1 = 1;
|
||||
break;
|
||||
case OGL_HACK_SUPER_MARIO_GALAXY:
|
||||
g_Config.bPhackvalue1 = 1;
|
||||
g_Config.fhackvalue1 = 0.00006f;
|
||||
g_Config.bPhackvalue2 = 0;
|
||||
g_Config.bProjHack1 = 0;
|
||||
break;
|
||||
case OGL_HACK_MARIO_KART_WII:
|
||||
g_Config.bPhackvalue1 = 1;
|
||||
g_Config.fhackvalue1 = 0.00006f;
|
||||
g_Config.bPhackvalue2 = 0;
|
||||
g_Config.bProjHack1 = 0;
|
||||
break;
|
||||
case OGL_HACK_SONIC_AND_THE_BLACK_KNIGHT:
|
||||
g_Config.bPhackvalue1 = 1;
|
||||
g_Config.fhackvalue1 = 0.00002f;
|
||||
g_Config.bPhackvalue2 = 1;
|
||||
g_Config.fhackvalue2 = 1.999980f;
|
||||
break;
|
||||
case OGL_HACK_ZELDA_TP_BLOOM_HACK:
|
||||
g_Config.bPhackvalue1 = true;
|
||||
case OGL_HACK_BLEACH_VERSUS_CRUSADE:
|
||||
g_Config.bPhackvalue2 = 1;
|
||||
g_Config.fhackvalue2 = 0.5f;
|
||||
g_Config.bPhackvalue1 = 0;
|
||||
g_Config.bProjHack1 = 0;
|
||||
break;
|
||||
case OGL_HACK_SUPER_MARIO_GALAXY:
|
||||
g_Config.bPhackvalue1 = true;
|
||||
g_Config.fhackvalue1 = 0.00006f;
|
||||
g_Config.bPhackvalue2 = false;
|
||||
case OGL_HACK_FINAL_FANTASY_CC_ECHO_OF_TIME:
|
||||
g_Config.bPhackvalue1 = 1;
|
||||
g_Config.fhackvalue1 = 0.8f;
|
||||
g_Config.bPhackvalue2 = 1;
|
||||
g_Config.fhackvalue2 = 1.2f;
|
||||
g_Config.bProjHack1 = 0;
|
||||
break;
|
||||
case OGL_HACK_MARIO_KART_WII:
|
||||
g_Config.bPhackvalue1 = true;
|
||||
g_Config.fhackvalue1 = 0.00006f;
|
||||
g_Config.bPhackvalue2 = false;
|
||||
break;
|
||||
case OGL_HACK_SONIC_AND_THE_BLACK_KNIGHT:
|
||||
g_Config.bPhackvalue1 = true;
|
||||
g_Config.fhackvalue1 = 0.00002f;
|
||||
g_Config.bPhackvalue2 = true;
|
||||
g_Config.fhackvalue2 = 1.999980f;
|
||||
break;
|
||||
case OGL_HACK_BLEACH_VERSUS_CRUSADE:
|
||||
g_Config.bPhackvalue2 = true;
|
||||
g_Config.fhackvalue2 = 0.5f;
|
||||
g_Config.bPhackvalue1 = false;
|
||||
break;
|
||||
case OGL_HACK_FINAL_FANTASY_CC_ECHO_OF_TIME:
|
||||
g_Config.bPhackvalue1 = true;
|
||||
g_Config.fhackvalue1 = 0.8f;
|
||||
g_Config.bPhackvalue2 = true;
|
||||
g_Config.fhackvalue2 = 1.2f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ void Flush()
|
|||
Renderer::SetRenderMode(Renderer::RM_Normal);
|
||||
|
||||
// set global constants
|
||||
VertexShaderManager::SetConstants(g_Config.bPhackvalue1, g_Config.fhackvalue1, g_Config.bPhackvalue2, g_Config.fhackvalue2, g_Config.bFreeLook);
|
||||
VertexShaderManager::SetConstants(g_Config.bProjHack1,g_Config.bPhackvalue1, g_Config.fhackvalue1, g_Config.bPhackvalue2, g_Config.fhackvalue2, g_Config.bFreeLook);
|
||||
PixelShaderManager::SetConstants();
|
||||
|
||||
// finally bind
|
||||
|
|
Loading…
Reference in New Issue