Make sky, horizon, flakes and clouds optional, replace repeated strips of skyL/skyR with 2x2 transparent PNGs instead of larger images of variable dimensions, remove a number of empty unused images
authornemo
Tue, 21 Jun 2011 18:28:34 -0400
changeset 5285 af4dc03dd60d
parent 5284 34abd278344e
child 5287 ffc1475a4afd
Make sky, horizon, flakes and clouds optional, replace repeated strips of skyL/skyR with 2x2 transparent PNGs instead of larger images of variable dimensions, remove a number of empty unused images
hedgewars/uStore.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Themes/Art/Clouds.png
share/hedgewars/Data/Themes/Art/Flake.png
share/hedgewars/Data/Themes/Bamboo/SkyL.png
share/hedgewars/Data/Themes/Bamboo/SkyR.png
share/hedgewars/Data/Themes/Blox/Flake.png
share/hedgewars/Data/Themes/Blox/Sky.png
share/hedgewars/Data/Themes/Blox/plant1.png
share/hedgewars/Data/Themes/Blox/plant2.png
share/hedgewars/Data/Themes/Blox/plant3.png
share/hedgewars/Data/Themes/Blox/plant4.png
share/hedgewars/Data/Themes/Cake/Clouds.png
share/hedgewars/Data/Themes/Cake/plant4.png
share/hedgewars/Data/Themes/Cake/theme.cfg
share/hedgewars/Data/Themes/Cheese/Flake.png
share/hedgewars/Data/Themes/CrazyMission/Flake.png
share/hedgewars/Data/Themes/CrazyMission/horizont.png
share/hedgewars/Data/Themes/Deepspace/Clouds.png
share/hedgewars/Data/Themes/Deepspace/horizont.png
share/hedgewars/Data/Themes/EarthRise/Clouds.png
share/hedgewars/Data/Themes/EarthRise/horizontL.png
share/hedgewars/Data/Themes/EarthRise/horizontR.png
share/hedgewars/Data/Themes/Halloween/SkyL.png
share/hedgewars/Data/Themes/Halloween/SkyR.png
share/hedgewars/Data/Themes/Jungle/SkyL.png
share/hedgewars/Data/Themes/Jungle/SkyR.png
share/hedgewars/Data/Themes/Planes/Flake.png
--- a/hedgewars/uStore.pas	Tue Jun 21 17:28:53 2011 -0400
+++ b/hedgewars/uStore.pas	Tue Jun 21 18:28:34 2011 -0400
@@ -283,10 +283,12 @@
         if (((cReducedQuality and (rqNoBackground or rqLowRes)) = 0) or   // why rqLowRes?
                 (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]))) and
            (((cReducedQuality and rqPlainSplash) = 0) or ((not (ii in [sprSplash, sprDroplet, sprSDSplash, sprSDDroplet])))) and
-           (((cReducedQuality and rqKillFlakes) = 0) or (Theme = 'Snow') or (Theme = 'Christmas') or ((not (ii in [sprFlake, sprSDFlake])))) then
+           (((cReducedQuality and rqKillFlakes) = 0) or (Theme = 'Snow') or (Theme = 'Christmas') or ((not (ii in [sprFlake, sprSDFlake])))) and
+           ((cCloudsNumber > 0) or (ii <> sprCloud)) and
+           ((vobCount > 0) or (ii <> sprFlake)) then
         begin
             if AltPath = ptNone then
-                if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR, sprChunk] then // FIXME: hack
+                if ii in [sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR, sprChunk] then // FIXME: hack
                     begin
                     tmpsurf:= LoadImage(UserPathz[Path] + '/' + FileName, ifAlpha or ifTransparent);
                     if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent)
--- a/hedgewars/uWorld.pas	Tue Jun 21 17:28:53 2011 -0400
+++ b/hedgewars/uWorld.pas	Tue Jun 21 18:28:34 2011 -0400
@@ -528,8 +528,8 @@
 var i, w, h, lw, lh, rw, rh, sw: LongInt;
 begin
     sw:= round(cScreenWidth / cScaleFactor);
-    if (SpritesData[sprL].Texture = nil) or (SpritesData[sprR].Texture = nil) then
-    begin
+    if ((SpritesData[sprL].Texture = nil) or (SpritesData[sprR].Texture = nil)) and (SpritesData[spr].Texture <> nil) then
+        begin
         w:= SpritesData[spr].Width * SpritesData[spr].Texture^.Scale;
         h:= SpritesData[spr].Height * SpritesData[spr].Texture^.Scale;
         i:= Shift mod w;
@@ -539,9 +539,9 @@
             DrawTexture(i, WorldDy + LAND_HEIGHT + OffsetY - h, SpritesData[spr].Texture, SpritesData[spr].Texture^.Scale);
             inc(i, w)
         until i > sw
-    end
-    else
-    begin
+        end
+    else if SpritesData[spr].Texture <> nil then
+        begin
         w:= SpritesData[spr].Width * SpritesData[spr].Texture^.Scale;
         h:= SpritesData[spr].Height * SpritesData[spr].Texture^.Scale;
         lw:= SpritesData[sprL].Width * SpritesData[spr].Texture^.Scale;
@@ -553,18 +553,18 @@
 
         i:= Shift - lw;
         while i >= -sw - lw do
-        begin
+            begin
             DrawTexture(i, WorldDy + LAND_HEIGHT + OffsetY - lh, SpritesData[sprL].Texture, SpritesData[sprL].Texture^.Scale);
             dec(i, lw);
-        end;
+            end;
 
         i:= Shift + w;
         while i <= sw do
-        begin
+            begin
             DrawTexture(i, WorldDy + LAND_HEIGHT + OffsetY - rh, SpritesData[sprR].Texture, SpritesData[sprR].Texture^.Scale);
             inc(i, rw)
+            end
         end
-    end
 end;
 
 
Binary file share/hedgewars/Data/Themes/Art/Clouds.png has changed
Binary file share/hedgewars/Data/Themes/Art/Flake.png has changed
Binary file share/hedgewars/Data/Themes/Bamboo/SkyL.png has changed
Binary file share/hedgewars/Data/Themes/Bamboo/SkyR.png has changed
Binary file share/hedgewars/Data/Themes/Blox/Flake.png has changed
Binary file share/hedgewars/Data/Themes/Blox/Sky.png has changed
Binary file share/hedgewars/Data/Themes/Blox/plant1.png has changed
Binary file share/hedgewars/Data/Themes/Blox/plant2.png has changed
Binary file share/hedgewars/Data/Themes/Blox/plant3.png has changed
Binary file share/hedgewars/Data/Themes/Blox/plant4.png has changed
Binary file share/hedgewars/Data/Themes/Cake/Clouds.png has changed
Binary file share/hedgewars/Data/Themes/Cake/plant4.png has changed
--- a/share/hedgewars/Data/Themes/Cake/theme.cfg	Tue Jun 21 17:28:53 2011 -0400
+++ b/share/hedgewars/Data/Themes/Cake/theme.cfg	Tue Jun 21 18:28:34 2011 -0400
@@ -8,5 +8,4 @@
 object = plant1, 3, 83, 215, 92, 35, 1, 0, 0, 250, 190
 object = plant2, 3, 118, 115, 41, 20, 1, 0, 0, 159, 110
 object = plant3, 3, 0, 115, 70, 40, 1, 8, 0, 60, 100
-object = plant4, 3, 20, 200, 25, 5, 1, 0, 0, 70, 150
 flakes = 20, 100, 0, 30, 250
Binary file share/hedgewars/Data/Themes/Cheese/Flake.png has changed
Binary file share/hedgewars/Data/Themes/CrazyMission/Flake.png has changed
Binary file share/hedgewars/Data/Themes/CrazyMission/horizont.png has changed
Binary file share/hedgewars/Data/Themes/Deepspace/Clouds.png has changed
Binary file share/hedgewars/Data/Themes/Deepspace/horizont.png has changed
Binary file share/hedgewars/Data/Themes/EarthRise/Clouds.png has changed
Binary file share/hedgewars/Data/Themes/EarthRise/horizontL.png has changed
Binary file share/hedgewars/Data/Themes/EarthRise/horizontR.png has changed
Binary file share/hedgewars/Data/Themes/Halloween/SkyL.png has changed
Binary file share/hedgewars/Data/Themes/Halloween/SkyR.png has changed
Binary file share/hedgewars/Data/Themes/Jungle/SkyL.png has changed
Binary file share/hedgewars/Data/Themes/Jungle/SkyR.png has changed
Binary file share/hedgewars/Data/Themes/Planes/Flake.png has changed