pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r3133 - in trunk/pingus: . src


From: jsalmon3
Subject: [Pingus-CVS] r3133 - in trunk/pingus: . src
Date: Wed, 12 Sep 2007 05:46:33 +0200

Author: jsalmon3
Date: 2007-09-12 05:46:28 +0200 (Wed, 12 Sep 2007)
New Revision: 3133

Modified:
   trunk/pingus/TODO
   trunk/pingus/src/sprite.cpp
Log:
Fixed transparency with 8bpp images

Modified: trunk/pingus/TODO
===================================================================
--- trunk/pingus/TODO   2007-09-12 03:22:12 UTC (rev 3132)
+++ trunk/pingus/TODO   2007-09-12 03:46:28 UTC (rev 3133)
@@ -80,10 +80,6 @@
 
 - add some SConscript checks (for compiler missing)
 
-- fix graphic gliches caused by all Sprites being optimized (some
-  actions are in large part transparent now, see bomber, armageddon
-  button when pressed)
-
 - document the mouse-trap, fullscreen, etc. shortcuts somewhere
 
 - some people like auto-scrolling in window mode, in 0.6.0 it worked

Modified: trunk/pingus/src/sprite.cpp
===================================================================
--- trunk/pingus/src/sprite.cpp 2007-09-12 03:22:12 UTC (rev 3132)
+++ trunk/pingus/src/sprite.cpp 2007-09-12 03:46:28 UTC (rev 3133)
@@ -132,10 +132,10 @@
         // FIXME: Could add a check to check if the surface is already 
optimized
         SDL_Surface* old_surface = surface;
 
-        if (surface->format->Amask == 0)
+        if (surface->format->Amask != 0 || (surface->flags & SDL_SRCCOLORKEY))
+          surface = SDL_DisplayFormatAlpha(old_surface);
+        else
           surface = SDL_DisplayFormat(old_surface);
-        else
-          surface = SDL_DisplayFormatAlpha(old_surface);
   
         SDL_FreeSurface(old_surface);
 





reply via email to

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