summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/soft.c6
-rw-r--r--plugins/peopsxgl/soft.c12
2 files changed, 15 insertions, 3 deletions
diff --git a/plugins/dfxvideo/soft.c b/plugins/dfxvideo/soft.c
index 0a55693a..04a4fbf4 100644
--- a/plugins/dfxvideo/soft.c
+++ b/plugins/dfxvideo/soft.c
@@ -1038,6 +1038,9 @@ void FillSoftwareAreaTrans(short x0,short y0,short x1, // FILL AREA TRANS
{
short j,i,dx,dy;
+ if(y0<0) y0=0;
+ if(x0<0) x0=0;
+
if(y0>y1) return;
if(x0>x1) return;
@@ -1129,6 +1132,9 @@ void FillSoftwareArea(short x0,short y0,short x1, // FILL AREA (BLK FILL)
{
short j,i,dx,dy;
+ if(y0<0) y0=0;
+ if(x0<0) x0=0;
+
if(y0>y1) return;
if(x0>x1) return;
diff --git a/plugins/peopsxgl/soft.c b/plugins/peopsxgl/soft.c
index 6df4e2b7..e577be8f 100644
--- a/plugins/peopsxgl/soft.c
+++ b/plugins/peopsxgl/soft.c
@@ -1035,6 +1035,9 @@ void FillSoftwareAreaTrans(short x0,short y0,short x1, // FILL AREA TRANS
{
short j,i,dx,dy;
+ if(y0<0) y0=0;
+ if(x0<0) x0=0;
+
if(y0>y1) return;
if(x0>x1) return;
@@ -1125,6 +1128,9 @@ void FillSoftwareArea(short x0,short y0,short x1, // FILL AREA (BLK FILL)
{
short j,i,dx,dy;
+ if(y0<0) y0=0;
+ if(x0<0) x0=0;
+
if(y0>y1) return;
if(x0>x1) return;
@@ -1169,7 +1175,7 @@ void FillSoftwareArea(short x0,short y0,short x1, // FILL AREA (BLK FILL)
////////////////////////////////////////////////////////////////////////
// EDGE INTERPOLATION
////////////////////////////////////////////////////////////////////////
-
+
typedef struct SOFTVTAG
{
int x,y;
@@ -1187,7 +1193,7 @@ static int right_u, delta_right_u, right_v, delta_right_v;
static int left_R, delta_left_R, right_R, delta_right_R;
static int left_G, delta_left_G, right_G, delta_right_G;
static int left_B, delta_left_B, right_B, delta_right_B;
-
+
__inline int shl10idiv(int x, int y)
{
long long int bi=x;
@@ -2447,7 +2453,7 @@ __inline BOOL SetupSections_GT4(short x1, short y1, short x2, short y2, short x3
__inline void drawPoly3Fi(short x1, short y1, short x2, short y2, short x3, short y3, int rgb)
{
int i,j,xmin,xmax,ymin,ymax;
- unsigned short color;
+ unsigned short color;
uint32_t lcolor;
if(x1>drawW && x2>drawW && x3>drawW) return;