diff options
| author | Nolan Check <Nolan.Check@gmail.com> | 2009-07-15 00:51:24 +0000 |
|---|---|---|
| committer | Nolan Check <Nolan.Check@gmail.com> | 2009-07-15 00:51:24 +0000 |
| commit | f338d5c44c5f4b7f1dc063f98b0405f2a9d7959d (patch) | |
| tree | 9cb4e82b90f8bf644405d806c21c01b96e7e5a1a /Source/Core/VideoCommon/Src/BPStructs.cpp | |
| parent | 7a82ae09433ec2d2b2800a60f4461f0f187ca8ad (diff) | |
Code cleanup. Juggling rectangles. I'm about to investigate the problems with Real XFB's in PAL games, so I wanted to make sure all our rectangles were cleaned up and organized.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3794 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPStructs.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 3780edb0b3..c9c2cfc2ab 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -176,24 +176,13 @@ void BPWritten(const Bypass& bp) DVSTARTSUBPROFILE("LoadBPReg:swap"); // The bottom right is within the rectangle // The values in bpmem.copyTexSrcXY and bpmem.copyTexSrcWH are updated in case 0x49 and 0x4a in this function - TRectangle rc = { - (int)(bpmem.copyTexSrcXY.x), - (int)(bpmem.copyTexSrcXY.y), - (int)((bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x + 1)), - (int)((bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y + 1)) - }; - float MValueX = GetRendererTargetScaleX(); - float MValueY = GetRendererTargetScaleY(); + EFBRectangle rc; + rc.left = (int)bpmem.copyTexSrcXY.x; + rc.top = (int)bpmem.copyTexSrcXY.y; + rc.right = (int)(bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x + 1); + rc.bottom = (int)(bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y + 1); - // Need another rc here to get it to scale. - // Here the bottom right is the out of the rectangle. - TRectangle multirc = { - (int)(bpmem.copyTexSrcXY.x * MValueX), - (int)(bpmem.copyTexSrcXY.y * MValueY), - (int)((bpmem.copyTexSrcXY.x * MValueX + (bpmem.copyTexSrcWH.x + 1) * MValueX)), - (int)((bpmem.copyTexSrcXY.y * MValueY + (bpmem.copyTexSrcWH.y + 1) * MValueY)) - }; UPE_Copy PE_copy; PE_copy.Hex = bpmem.triggerEFBCopy; @@ -219,7 +208,7 @@ void BPWritten(const Bypass& bp) #endif const float yScale = bpmem.dispcopyyscale / 256.0f; const float xfbLines = ((bpmem.copyTexSrcWH.y + 1.0f) * yScale); - RenderToXFB(bp, multirc, yScale, xfbLines, + RenderToXFB(bp, rc, yScale, xfbLines, bpmem.copyTexDest << 5, bpmem.copyMipMapStrideChannels << 4, (u32)ceil(xfbLines)); @@ -227,7 +216,7 @@ void BPWritten(const Bypass& bp) // Clear the picture after it's done and submitted, to prepare for the next picture if (PE_copy.clear) - ClearScreen(bp, multirc); + ClearScreen(bp, rc); RestoreRenderState(bp); |
