GSdx: GoW2 fix, 16 bit drawing that caused the green overlay is skipped (character shadow)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@950 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11 2009-04-10 19:55:05 +00:00
parent 653286a692
commit cf995d0716
2 changed files with 46 additions and 1 deletions

View File

@ -507,6 +507,35 @@ protected:
#pragma endregion
#pragma region GoW2 z buffer clear
if(m_game.title == CRC::GodOfWar2)
{
DWORD FBP = m_context->FRAME.Block();
DWORD FBW = m_context->FRAME.FBW;
DWORD FPSM = m_context->FRAME.PSM;
if(FBP == 0x00f00 && FPSM == PSM_PSMZ24)
{
GIFRegTEX0 TEX0;
TEX0.TBP0 = FBP;
TEX0.TBW = FBW;
TEX0.PSM = FPSM;
if(GSTextureCache<Device>::GSDepthStencil* ds = m_tc->GetDepthStencil(TEX0, m_width, m_height))
{
m_dev.ClearDepth(ds->m_texture, 0);
}
return false;
}
return true;
}
#pragma endregion
return true;
}

View File

@ -2081,6 +2081,22 @@ bool GSC_GodOfWar(const GSFrameInfo& fi, int& skip)
return true;
}
bool GSC_GodOfWar2(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(fi.TME && fi.FBP == 0x00100 && fi.FPSM == PSM_PSMCT16 && fi.TBP0 == 0x00100 && fi.TPSM == PSM_PSMCT16)
{
skip = 30; // shadows
}
}
else
{
}
return true;
}
bool GSC_GiTS(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
@ -2172,7 +2188,7 @@ bool GSState::IsBadFrame(int& skip)
map[CRC::Tekken5] = GSC_Tekken5;
map[CRC::IkkiTousen] = GSC_IkkiTousen;
map[CRC::GodOfWar] = GSC_GodOfWar;
map[CRC::GodOfWar2] = GSC_GodOfWar;
map[CRC::GodOfWar2] = GSC_GodOfWar2;
map[CRC::GiTS] = GSC_GiTS;
map[CRC::Onimusha3] = GSC_Onimusha3;
map[CRC::TalesOfAbyss] = GSC_TalesOfAbyss;