Some themers expressed desire to have translucent themes. While the current AA stuff in uLandGraphics won't really allow this to work with LandBackTex properly, seems to me it should be safe to allow alpha for LandTex. Our LandTex should all have alpha of 255 on the existing themes.
authornemo
Wed, 30 Dec 2015 23:30:00 -0500
changeset 11478 023db094b22d
parent 11477 c55b3e09a04e
child 11479 67ae276ba229
Some themers expressed desire to have translucent themes. While the current AA stuff in uLandGraphics won't really allow this to work with LandBackTex properly, seems to me it should be safe to allow alpha for LandTex. Our LandTex should all have alpha of 255 on the existing themes.
hedgewars/uLand.pas
--- a/hedgewars/uLand.pas	Wed Dec 30 23:20:57 2015 -0500
+++ b/hedgewars/uLand.pas	Wed Dec 30 23:30:00 2015 -0500
@@ -271,9 +271,9 @@
     for x:= 0 to LAND_WIDTH - 1 do
     if Land[y, x] <> 0 then
         if (cReducedQuality and rqBlurryLand) = 0 then
-            LandPixels[y, x]:= p^[x] or AMask
+            LandPixels[y, x]:= p^[x]// or AMask
         else
-            LandPixels[y div 2, x div 2]:= p^[x] or AMask;
+            LandPixels[y div 2, x div 2]:= p^[x];// or AMask;
 
     p:= PLongwordArray(@(p^[Surface^.pitch div 4]));
     end;
@@ -289,7 +289,7 @@
 begin
     AddProgress();
 
-    tmpsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, LAND_WIDTH, LAND_HEIGHT, 32, RMask, GMask, BMask, 0);
+    tmpsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, LAND_WIDTH, LAND_HEIGHT, 32, RMask, GMask, BMask, AMask);
 
     TryDo(tmpsurf <> nil, 'Error creating pre-land surface', true);
     ColorizeLand(tmpsurf);