Enlightenment CVS committal

Author  : mej
Project : eterm
Module  : Eterm

Dir     : eterm/Eterm/src


Modified Files:
        mmx_cmod.S pixmap.c 


Log Message:
Sun May  8 21:13:45 2005                        Michael Jennings (mej)

Patch from Tres Melton <[EMAIL PROTECTED]> to fix 15bpp shading
routines.
----------------------------------------------------------------------

===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/mmx_cmod.S,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- mmx_cmod.S  11 Jan 2004 22:10:29 -0000      1.6
+++ mmx_cmod.S  9 May 2005 01:17:25 -0000       1.7
@@ -198,6 +198,7 @@
         paddusw %mm3, %mm1      /* ff eg */
         paddusw %mm3, %mm2      /* ff eb */
 
+        psubw %mm3, %mm0        /* 00 0r */
         psubw %mm3, %mm1        /* 00 0g */
         psubw %mm3, %mm2        /* 00 0b */
         
@@ -234,6 +235,7 @@
         paddusw %mm3, %mm1      /* ff eg */
         paddusw %mm3, %mm2      /* ff eb */
 
+        psubw %mm3, %mm0        /* 00 0r */
         psubw %mm3, %mm1        /* 00 0g */
         psubw %mm3, %mm2        /* 00 0b */
         
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/pixmap.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -3 -r1.110 -r1.111
--- pixmap.c    7 May 2005 06:33:36 -0000       1.110
+++ pixmap.c    9 May 2005 01:17:25 -0000       1.111
@@ -21,7 +21,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-static const char cvs_ident[] = "$Id: pixmap.c,v 1.110 2005/05/07 06:33:36 mej 
Exp $";
+static const char cvs_ident[] = "$Id: pixmap.c,v 1.111 2005/05/09 01:17:25 mej 
Exp $";
 
 #include "config.h"
 #include "feature.h"
@@ -1578,16 +1578,13 @@
             for (x = -w; x < 0; x++) {
                 int r, g, b;
 
-                b = ((DATA16 *) ptr)[x];
-                r = (b & 0x7c00) * rm;
-                g = (b & 0x3e0) * gm;
-                b = (b & 0x1f) * bm;
-                r |= (!(r >> 15) - 1);
-                g |= (!(g >> 10) - 1);
-                b |= (!(b >> 5) - 1);
-                ((DATA16 *) ptr)[x] = ((r >> 8) & 0x7c00)
-                    | ((g >> 8) & 0x3e0)
-                    | ((b >> 8) & 0x1f);
+                r = ( (b >> 10 )            * rm ) >> 8;
+                r = ( r > 0x001f ) ? 0xfc00 : ( r << 10 );
+                g = (((b >>  5 ) & 0x003f ) * gm ) >> 8;
+                g = ( g > 0x001f ) ? 0x03e0 : ( g << 5 );
+                b = (( b         & 0x001f ) * bm ) >> 8;
+                b = ( b > 0x001f ) ? 0x001f : b;
+                ((DATA16 *) ptr)[x] = (r|g|b);
             }
             ptr += bpl;
         }




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to