mail[Wesnoth-commits] r33358 - /trunk/src/font.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on March 05, 2009 - 15:10:
Author: alink
Date: Thu Mar  5 15:10:11 2009
New Revision: 33358

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33358&view=rev
Log:
Fix (IMHO) bug #12938: In-game MP chat is ugly in 1.5.x 
Use an alpha boost of 1.13 instead of 2.0 to compensate the darkening of the
anti-aliased part. Feel free to tweak it more, if you still notice a 
difference
with 1.4 chat

Modified:
    trunk/src/font.cpp

Modified: trunk/src/font.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/font.cpp?rev=33358&r1=33357&r2=33358&view=diff
==============================================================================
--- trunk/src/font.cpp (original)
+++ trunk/src/font.cpp Thu Mar  5 15:10:11 2009
@@ -984,14 +984,17 @@
 
                        Uint32 color = SDL_MapRGBA(foreground->format, 
bgcolour_.r,bgcolour_.g, bgcolour_.b, bgalpha_);
                        SDL_FillRect(background,NULL, color);
-
-                       // we make the text less transparent, because the 
blitting on the dark background
-                       // will darken the aliased part. This also make it 
more readable
-                       foreground = adjust_surface_alpha(foreground, 
ftofxp(2.0), false);
+       
+                       // we make the text less transparent, because the 
blitting on the
+                       // dark background will darken the anti-aliased part.
+                       // This 1.13 value seems to restore the brightness of 
version 1.4
+                       // (where the text was blitted directly on screen)
+                       foreground = adjust_surface_alpha(foreground, 
ftofxp(1.13), false);
 
                        SDL_Rect r = { border_, border_, 0, 0 };
                        
SDL_SetAlpha(foreground,SDL_SRCALPHA,SDL_ALPHA_OPAQUE);
                        blit_surface(foreground, NULL, background, &r);
+
                        surf_ = create_optimized_surface(background);
                        // RLE compression seems less efficient for big 
semi-transparent area
                        // so, remove it for this case, but keep the 
optimized display format




Related Messages


Powered by MHonArc, Updated Thu Mar 05 20:40:26 2009