pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3154 - trunk/pingus/src


From: jsalmon3
Subject: [Pingus-CVS] r3154 - trunk/pingus/src
Date: Sat, 15 Sep 2007 06:29:35 +0200

Author: jsalmon3
Date: 2007-09-15 06:29:32 +0200 (Sat, 15 Sep 2007)
New Revision: 3154

Modified:
   trunk/pingus/src/blitter.cpp
Log:
Fixed bug scaling using the wrong masks

Modified: trunk/pingus/src/blitter.cpp
===================================================================
--- trunk/pingus/src/blitter.cpp        2007-09-15 03:53:35 UTC (rev 3153)
+++ trunk/pingus/src/blitter.cpp        2007-09-15 04:29:32 UTC (rev 3154)
@@ -84,23 +84,9 @@
     float fx, fy, fz;
     unsigned char *p1, *p2, *p3, *p4;
 
-    int Rmask, Gmask, Bmask, Amask;
-    if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {
-      Rmask = 0x000000FF;
-      Gmask = 0x0000FF00;
-      Bmask = 0x00FF0000;
-      Amask = (bpp == 4) ? 0xFF000000 : 0;
-    } else {
-      int s = (bpp == 4) ? 0 : 8;
-      Rmask = 0xFF000000 >> s;
-      Gmask = 0x00FF0000 >> s;
-      Bmask = 0x0000FF00 >> s;
-      Amask = 0x000000FF >> s;
-    }
+    new_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 
surface->format->BitsPerPixel,
+      surface->format->Rmask, surface->format->Gmask, surface->format->Bmask, 
surface->format->Amask);
 
-    new_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 8 * bpp,
-      Rmask, Gmask, Bmask, Amask);
-
     SDL_LockSurface(surface);
     SDL_LockSurface(new_surface);
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]