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 save state compatibility that was broken by my CDrom timing changes.
[pcsx_rearmed.git]
/
plugins
/
dfxvideo
/
soft.c
diff --git
a/plugins/dfxvideo/soft.c
b/plugins/dfxvideo/soft.c
index
160b0c4
..
1b22ed5
100644
(file)
--- a/
plugins/dfxvideo/soft.c
+++ b/
plugins/dfxvideo/soft.c
@@
-6316,6
+6316,7
@@
static void DrawSoftwareSpriteMirror(unsigned char * baseAddr,int32_t w,int32_t
sprtYa=(sprtY<<10);
clutP=(clutY0<<10)+clutX0;
for (sprCY=0;sprCY<sprtH;sprCY++)
sprtYa=(sprtY<<10);
clutP=(clutY0<<10)+clutX0;
for (sprCY=0;sprCY<sprtH;sprCY++)
+ {
for (sprCX=0;sprCX<sprtW;sprCX++)
{
tC= psxVub[((textY0+(sprCY*lYDir))<<11) + textX0 +(sprCX*lXDir)];
for (sprCX=0;sprCX<sprtW;sprCX++)
{
tC= psxVub[((textY0+(sprCY*lYDir))<<11) + textX0 +(sprCX*lXDir)];
@@
-6323,28
+6324,33
@@
static void DrawSoftwareSpriteMirror(unsigned char * baseAddr,int32_t w,int32_t
GetTextureTransColG_SPR(&psxVuw[sprA],GETLE16(&psxVuw[clutP+((tC>>4)&0xf)]));
GetTextureTransColG_SPR(&psxVuw[sprA+1],GETLE16(&psxVuw[clutP+(tC&0xf)]));
}
GetTextureTransColG_SPR(&psxVuw[sprA],GETLE16(&psxVuw[clutP+((tC>>4)&0xf)]));
GetTextureTransColG_SPR(&psxVuw[sprA+1],GETLE16(&psxVuw[clutP+(tC&0xf)]));
}
+ }
return;
case 1:
clutP>>=1;
for(sprCY=0;sprCY<sprtH;sprCY++)
return;
case 1:
clutP>>=1;
for(sprCY=0;sprCY<sprtH;sprCY++)
+ {
for(sprCX=0;sprCX<sprtW;sprCX++)
{
tC = psxVub[((textY0+(sprCY*lYDir))<<11)+(GlobalTextAddrX<<1) + textX0 + (sprCX*lXDir)] & 0xff;
GetTextureTransColG_SPR(&psxVuw[((sprtY+sprCY)<<10)+sprtX + sprCX],psxVuw[clutP+tC]);
}
for(sprCX=0;sprCX<sprtW;sprCX++)
{
tC = psxVub[((textY0+(sprCY*lYDir))<<11)+(GlobalTextAddrX<<1) + textX0 + (sprCX*lXDir)] & 0xff;
GetTextureTransColG_SPR(&psxVuw[((sprtY+sprCY)<<10)+sprtX + sprCX],psxVuw[clutP+tC]);
}
- return;
+ }
+ return;
case 2:
for (sprCY=0;sprCY<sprtH;sprCY++)
case 2:
for (sprCY=0;sprCY<sprtH;sprCY++)
+ {
for (sprCX=0;sprCX<sprtW;sprCX++)
{
GetTextureTransColG_SPR(&psxVuw[((sprtY+sprCY)<<10)+sprtX+sprCX],
GETLE16(&psxVuw[((textY0+(sprCY*lYDir))<<10)+GlobalTextAddrX + textX0 +(sprCX*lXDir)]));
}
for (sprCX=0;sprCX<sprtW;sprCX++)
{
GetTextureTransColG_SPR(&psxVuw[((sprtY+sprCY)<<10)+sprtX+sprCX],
GETLE16(&psxVuw[((textY0+(sprCY*lYDir))<<10)+GlobalTextAddrX + textX0 +(sprCX*lXDir)]));
}
- return;
+ }
+ return;
}
}
}
}
@@
-7092,7
+7098,7
@@
static void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1)
{
short x0, y0, x1, y1, xt, yt;
int32_t rgbt;
{
short x0, y0, x1, y1, xt, yt;
int32_t rgbt;
-
double m,
dy, dx;
+
int
dy, dx;
if (lx0 > drawW && lx1 > drawW) return;
if (ly0 > drawH && ly1 > drawH) return;
if (lx0 > drawW && lx1 > drawW) return;
if (ly0 > drawH && ly1 > drawH) return;
@@
-7142,17
+7148,15
@@
static void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1)
dy = y1 - y0;
}
dy = y1 - y0;
}
- m = dy / dx;
-
- if (m >= 0)
+ if ((dx >= 0 && dy >= 0) || (dx < 0 && dy < 0))
{
{
- if (
m > 1
)
+ if (
abs(dy) > abs(dx)
)
Line_S_SE_Shade(x0, y0, x1, y1, rgb0, rgb1);
else
Line_E_SE_Shade(x0, y0, x1, y1, rgb0, rgb1);
}
else
Line_S_SE_Shade(x0, y0, x1, y1, rgb0, rgb1);
else
Line_E_SE_Shade(x0, y0, x1, y1, rgb0, rgb1);
}
else
- if (
m < -1
)
+ if (
abs(dy) > abs(dx)
)
Line_N_NE_Shade(x0, y0, x1, y1, rgb0, rgb1);
else
Line_E_NE_Shade(x0, y0, x1, y1, rgb0, rgb1);
Line_N_NE_Shade(x0, y0, x1, y1, rgb0, rgb1);
else
Line_E_NE_Shade(x0, y0, x1, y1, rgb0, rgb1);
@@
-7164,7
+7168,7
@@
static void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1)
static void DrawSoftwareLineFlat(int32_t rgb)
{
short x0, y0, x1, y1, xt, yt;
static void DrawSoftwareLineFlat(int32_t rgb)
{
short x0, y0, x1, y1, xt, yt;
-
double m,
dy, dx;
+
int
dy, dx;
unsigned short colour = 0;
if (lx0 > drawW && lx1 > drawW) return;
unsigned short colour = 0;
if (lx0 > drawW && lx1 > drawW) return;
@@
-7216,17
+7220,15
@@
static void DrawSoftwareLineFlat(int32_t rgb)
dy = y1 - y0;
}
dy = y1 - y0;
}
- m = dy/dx;
-
- if (m >= 0)
+ if ((dx >= 0 && dy >= 0) || (dx < 0 && dy < 0))
{
{
- if (
m > 1
)
+ if (
abs(dy) > abs(dx)
)
Line_S_SE_Flat(x0, y0, x1, y1, colour);
else
Line_E_SE_Flat(x0, y0, x1, y1, colour);
}
else
Line_S_SE_Flat(x0, y0, x1, y1, colour);
else
Line_E_SE_Flat(x0, y0, x1, y1, colour);
}
else
- if (
m < -1
)
+ if (
abs(dy) > abs(dx)
)
Line_N_NE_Flat(x0, y0, x1, y1, colour);
else
Line_E_NE_Flat(x0, y0, x1, y1, colour);
Line_N_NE_Flat(x0, y0, x1, y1, colour);
else
Line_E_NE_Flat(x0, y0, x1, y1, colour);