notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix missed double resolution change
[pcsx_rearmed.git]
/
plugins
/
dfxvideo
/
soft.c
diff --git
a/plugins/dfxvideo/soft.c
b/plugins/dfxvideo/soft.c
index
1b22ed5
..
5c71fd3
100644
(file)
--- a/
plugins/dfxvideo/soft.c
+++ b/
plugins/dfxvideo/soft.c
@@
-292,7
+292,7
@@
static inline void GetShadeTransCol32(uint32_t * pdest,uint32_t color)
{
int32_t sr,sb,sg,src,sbc,sgc,c;
src=XCOL1(color);sbc=XCOL2(color);sgc=XCOL3(color);
{
int32_t sr,sb,sg,src,sbc,sgc,c;
src=XCOL1(color);sbc=XCOL2(color);sgc=XCOL3(color);
- c=
GETLE32(pdest)>>16
;
+ c=
HIWORD(GETLE32(pdest))
;
sr=(XCOL1(c))-src; if(sr&0x8000) sr=0;
sb=(XCOL2(c))-sbc; if(sb&0x8000) sb=0;
sg=(XCOL3(c))-sgc; if(sg&0x8000) sg=0;
sr=(XCOL1(c))-src; if(sr&0x8000) sr=0;
sb=(XCOL2(c))-sbc; if(sb&0x8000) sb=0;
sg=(XCOL3(c))-sgc; if(sg&0x8000) sg=0;
@@
-327,8
+327,8
@@
static inline void GetShadeTransCol32(uint32_t * pdest,uint32_t color)
{
uint32_t ma=GETLE32(pdest);
PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask);//0x80008000;
{
uint32_t ma=GETLE32(pdest);
PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask);//0x80008000;
- if(ma&0x80000000) PUTLE32(pdest, (ma&0xFFFF0000)|(
*pdest
&0xFFFF));
- if(ma&0x00008000) PUTLE32(pdest, (ma&0xFFFF) |(
*pdest
&0xFFFF0000));
+ if(ma&0x80000000) PUTLE32(pdest, (ma&0xFFFF0000)|(
GETLE32(pdest)
&0xFFFF));
+ if(ma&0x00008000) PUTLE32(pdest, (ma&0xFFFF) |(
GETLE32(pdest)
&0xFFFF0000));
return;
}
PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask);//0x80008000;
return;
}
PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask);//0x80008000;
@@
-950,7
+950,7
@@
static void FillSoftwareAreaTrans(short x0,short y0,short x1, // FILL AREA TRANS
{
static int iCheat=0;
col+=iCheat;
{
static int iCheat=0;
col+=iCheat;
- i
f(iCheat==1) iCheat=0; else iCheat=
1;
+ i
Cheat ^=
1;
}
}
@@
-971,16
+971,17
@@
static void FillSoftwareAreaTrans(short x0,short y0,short x1, // FILL AREA TRANS
{
uint32_t *DSTPtr;
unsigned short LineOffset;
{
uint32_t *DSTPtr;
unsigned short LineOffset;
- uint32_t lcol
=lSetMask|(((uint32_t)(col))<<16)|
col;
+ uint32_t lcol
= lSetMask | ((uint32_t)col << 16) |
col;
dx>>=1;
DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0);
LineOffset = 512 - dx;
if(!bCheckMask && !DrawSemiTrans)
{
dx>>=1;
DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0);
LineOffset = 512 - dx;
if(!bCheckMask && !DrawSemiTrans)
{
+ lcol = HOST2LE32(lcol);
for(i=0;i<dy;i++)
{
for(i=0;i<dy;i++)
{
- for(j=0;j<dx;j++) {
PUTLE32(DSTPtr, lcol); DSTPtr++
; }
+ for(j=0;j<dx;j++) {
*DSTPtr++ = lcol
; }
DSTPtr += LineOffset;
}
}
DSTPtr += LineOffset;
}
}
@@
-1035,14
+1036,14
@@
static void FillSoftwareArea(short x0,short y0,short x1, // FILL AREA (BLK
{
uint32_t *DSTPtr;
unsigned short LineOffset;
{
uint32_t *DSTPtr;
unsigned short LineOffset;
- uint32_t lcol
=(((int32_t)col)<<16)|col
;
+ uint32_t lcol
= HOST2LE32((((uint32_t)(col)) << 16) | col)
;
dx>>=1;
DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0);
LineOffset = 512 - dx;
for(i=0;i<dy;i++)
{
dx>>=1;
DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0);
LineOffset = 512 - dx;
for(i=0;i<dy;i++)
{
- for(j=0;j<dx;j++) {
PUTLE32(DSTPtr, lcol); DSTPtr++
; }
+ for(j=0;j<dx;j++) {
*DSTPtr++ = lcol
; }
DSTPtr += LineOffset;
}
}
DSTPtr += LineOffset;
}
}
@@
-2401,7
+2402,7
@@
static inline void drawPoly3Fi(short x1,short y1,short x2,short y2,short x3,shor
if(!bCheckMask && !DrawSemiTrans)
{
if(!bCheckMask && !DrawSemiTrans)
{
-
color |=sSetMask
;
+
lcolor = HOST2LE32(lcolor)
;
for (i=ymin;i<=ymax;i++)
{
xmin=left_x >> 16; if(drawX>xmin) xmin=drawX;
for (i=ymin;i<=ymax;i++)
{
xmin=left_x >> 16; if(drawX>xmin) xmin=drawX;
@@
-2409,9
+2410,9
@@
static inline void drawPoly3Fi(short x1,short y1,short x2,short y2,short x3,shor
for(j=xmin;j<xmax;j+=2)
{
for(j=xmin;j<xmax;j+=2)
{
-
PUTLE32(((uint32_t *)&psxVuw[(i<<10)+j]), lcolor)
;
+
*(uint32_t *)&psxVuw[(i<<10)+j] = lcolor
;
}
}
- if(j==xmax)
PUTLE16(&psxVuw[(i<<10)+j], color)
;
+ if(j==xmax)
psxVuw[(i<<10)+j] = lcolor
;
if(NextRow_F()) return;
}
if(NextRow_F()) return;
}
@@
-2481,7
+2482,7
@@
static void drawPoly4F(int32_t rgb)
if(!bCheckMask && !DrawSemiTrans)
{
if(!bCheckMask && !DrawSemiTrans)
{
-
color |=sSetMask
;
+
lcolor = HOST2LE32(lcolor)
;
for (i=ymin;i<=ymax;i++)
{
xmin=left_x >> 16; if(drawX>xmin) xmin=drawX;
for (i=ymin;i<=ymax;i++)
{
xmin=left_x >> 16; if(drawX>xmin) xmin=drawX;
@@
-2489,9
+2490,9
@@
static void drawPoly4F(int32_t rgb)
for(j=xmin;j<xmax;j+=2)
{
for(j=xmin;j<xmax;j+=2)
{
-
PUTLE32(((uint32_t *)&psxVuw[(i<<10)+j]), lcolor)
;
+
*(uint32_t *)&psxVuw[(i<<10)+j] = lcolor
;
}
}
- if(j==xmax)
PUTLE16(&psxVuw[(i<<10)+j], color)
;
+ if(j==xmax)
psxVuw[(i<<10)+j] = lcolor
;
if(NextRow_F4()) return;
}
if(NextRow_F4()) return;
}