From 78c1667a9c3b70935d2ad5f9185ebf409eda04c1 Mon Sep 17 00:00:00 2001 From: gabest11 Date: Wed, 15 Feb 2012 18:57:52 +0000 Subject: [PATCH] GSdx: Yakuza fix. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5100 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSState.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 9580097db4..da5ae92911 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -780,13 +780,31 @@ template void GSState::GIFRegHandlerTEX0(const GIFReg* RESTRICT r) { GIFRegTEX0 TEX0 = r->TEX0; - // Tokyo Xtreme Racer Drift 2, TW/TH == 0, PRIM->FST == 1 - // Just setting the max texture size to make the texture cache allocate some surface. - // The vertex trace will narrow the updated area down to the minimum, upper-left 8x8 - // for a single letter, but it may address the whole thing if it wants to. + int tw = (int)TEX0.TW; + int th = (int)TEX0.TH; - if(TEX0.TW > 10 || TEX0.TW == 0) TEX0.TW = 10; - if(TEX0.TH > 10 || TEX0.TH == 0) TEX0.TH = 10; + if(tw > 10) tw = 10; + if(th > 10) th = 10; + + if(PRIM->FST) + { + // Tokyo Xtreme Racer Drift 2, TW/TH == 0 + // Just setting the max texture size to make the texture cache allocate some surface. + // The vertex trace will narrow the updated area down to the minimum, upper-left 8x8 + // for a single letter, but it may address the whole thing if it wants to. + + if(tw == 0) tw = 10; + if(th == 0) th = 10; + } + else + { + // Yakuza, TW/TH == 0 + // The minimap is drawn using solid colors, the texture is really a 1x1 white texel, + // modulated by the vertex color. Cannot change the dimension because S/T are normalized. + } + + TEX0.TW = tw; + TEX0.TH = th; if((TEX0.TBW & 1) && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT4)) {