From ad59e35254c0a563a7e9c387916c5a1547097c70 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Wed, 14 Apr 2010 13:09:43 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@45311 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfxvideo/soft.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'plugins') diff --git a/plugins/dfxvideo/soft.c b/plugins/dfxvideo/soft.c index 0a55693a..21625664 100644 --- a/plugins/dfxvideo/soft.c +++ b/plugins/dfxvideo/soft.c @@ -16,7 +16,7 @@ ***************************************************************************/ #define _IN_SOFT - + #include "externals.h" #include "soft.h" @@ -26,7 +26,6 @@ #include "menu.h" #include "swap.h" - //////////////////////////////////////////////////////////////////////////////////// // "NO EDGE BUFFER" POLY VERSION... FUNCS BASED ON FATMAP.TXT FROM MRI / Doomsday //////////////////////////////////////////////////////////////////////////////////// @@ -8330,7 +8329,7 @@ void HorzLineFlat(int y, int x0, int x1, unsigned short colour) x1 = drawW; for (x = x0; x <= x1; x++) - GetShadeTransCol(&psxVuw[(y<<10)+x], colour); + GetShadeTransCol(&psxVuw[(y << 10) + x], colour); } /////////////////////////////////////////////////////////////////////// @@ -8342,12 +8341,12 @@ void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1) int32_t rgbt; double m, dy, dx; - if(lx0>drawW && lx1>drawW) return; - if(ly0>drawH && ly1>drawH) return; - if(lx0=drawH) return; - if(drawX>=drawW) return; + if (lx0 > drawW && lx1 > drawW) return; + if (ly0 > drawH && ly1 > drawH) return; + if (lx0 < drawX && lx1 < drawX) return; + if (ly0 < drawY && ly1 < drawY) return; + if (drawY >= drawH) return; + if (drawX >= drawW) return; x0 = lx0; y0 = ly0; @@ -8384,13 +8383,13 @@ void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1) rgb0 = rgb1; x1 = xt; y1 = yt; - rgb1 = rgb0; + rgb1 = rgbt; dx = x1 - x0; dy = y1 - y0; } - m = dy/dx; + m = dy / dx; if (m >= 0) { @@ -8415,14 +8414,14 @@ void DrawSoftwareLineFlat(int32_t rgb) double m, dy, dx; unsigned short colour = 0; - if(lx0>drawW && lx1>drawW) return; - if(ly0>drawH && ly1>drawH) return; - if(lx0=drawH) return; - if(drawX>=drawW) return; - - colour = ((rgb & 0x00f80000)>>9) | ((rgb & 0x0000f800)>>6) | ((rgb & 0x000000f8)>>3); + if (lx0 > drawW && lx1 > drawW) return; + if (ly0 > drawH && ly1 > drawH) return; + if (lx0 < drawX && lx1 < drawX) return; + if (ly0 < drawY && ly1 < drawY) return; + if (drawY >= drawH) return; + if (drawX >= drawW) return; + + colour = ((rgb & 0x00f80000) >> 9) | ((rgb & 0x0000f800) >> 6) | ((rgb & 0x000000f8) >> 3); x0 = lx0; y0 = ly0; -- cgit v1.2.3