summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-07-28 06:58:47 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-07-28 06:58:47 +0000
commitf219e592a3b6fdc897f31f28ee94bbccd2160e02 (patch)
tree986565b0742f78acfa93fdc1ea12122b3a2298b0 /plugins
parent490883f1ee71bd58b52719ad6d3337b5122a3127 (diff)
downloadpcsxr-f219e592a3b6fdc897f31f28ee94bbccd2160e02.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@24086 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/prim.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/plugins/dfxvideo/prim.c b/plugins/dfxvideo/prim.c
index 883bf1af..6f5cfafa 100644
--- a/plugins/dfxvideo/prim.c
+++ b/plugins/dfxvideo/prim.c
@@ -569,33 +569,6 @@ void primStoreImage(unsigned char * baseAddr)
}
////////////////////////////////////////////////////////////////////////
-// Used in Blk Fill
-////////////////////////////////////////////////////////////////////////
-
-void ClampToPSXScreenOffset(short *x0, short *y0, short *x1, short *y1)
-{
- if (*x0 < 0)
- { *x1 += *x0; *x0 = 0; }
- else
- if (*x0 > 1023)
- { *x0 = 1023; *x1 = 0; }
-
- if (*y0 < 0)
- { *y1 += *y0; *y0 = 0; }
- else
- if (*y0 > iGPUHeightMask)
- { *y0 = iGPUHeightMask; *y1 = 0; }
-
- if (*x1 < 0) *x1 = 0;
-
- if ((*x1 + *x0) > 1024) *x1 = (1024 - *x0);
-
- if (*y1 < 0) *y1 = 0;
-
- if ((*y1 + *y0) > iGPUHeight) *y1 = (iGPUHeight - *y0);
-}
-
-////////////////////////////////////////////////////////////////////////
// cmd: blkfill - NO primitive! Doesn't care about draw areas...
////////////////////////////////////////////////////////////////////////
@@ -603,7 +576,7 @@ void primBlkFill(unsigned char * baseAddr)
{
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
-
+
short sX = GETLEs16(&sgpuData[2]);
short sY = GETLEs16(&sgpuData[3]);
short sW = GETLEs16(&sgpuData[4]) & 0x3ff;
@@ -619,7 +592,8 @@ void primBlkFill(unsigned char * baseAddr)
sW+=sX;
sH+=sY;
- ClampToPSXScreenOffset(&sX, &sY, &sW, &sH);
+ if (sX < 0) { sX = 0; sW += sX; }
+ if (sY < 0) { sY = 0; sH += sX; }
FillSoftwareArea(sX, sY, sW, sH, BGR24to16(GETLE32(&gpuData[0])));
bDoVSyncUpdate=TRUE;