From f219e592a3b6fdc897f31f28ee94bbccd2160e02 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Tue, 28 Jul 2009 06:58:47 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@24086 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfxvideo/prim.c | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) (limited to 'plugins') 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 @@ -568,33 +568,6 @@ void primStoreImage(unsigned char * baseAddr) lGPUstatusRet |= GPUSTATUS_READYFORVRAM; } -//////////////////////////////////////////////////////////////////////// -// 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; -- cgit v1.2.3