minor visual tweaks to snow
authornemo
Wed, 22 Dec 2010 01:11:48 -0500
changeset 4617 42aad2cd981e
parent 4615 44393fe7378d
child 4619 f9356de370bb
minor visual tweaks to snow
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
hedgewars/uGearsRender.pas
hedgewars/uLandObjects.pas
--- a/hedgewars/GSHandlers.inc	Wed Dec 22 00:58:00 2010 -0500
+++ b/hedgewars/GSHandlers.inc	Wed Dec 22 01:11:48 2010 -0500
@@ -574,7 +574,7 @@
         yy:= hwRound(Y);
         if vobVelocity <> 0 then
             begin
-            DirAngle := DirAngle + (Angle / 12500000);
+            DirAngle := DirAngle + (Angle / 125000000);
             if DirAngle < 0 then DirAngle := DirAngle + 360
             else if 360 < DirAngle then DirAngle := DirAngle - 360;
             end;
--- a/hedgewars/uGears.pas	Wed Dec 22 00:58:00 2010 -0500
+++ b/hedgewars/uGears.pas	Wed Dec 22 01:11:48 2010 -0500
@@ -1113,7 +1113,7 @@
 if (GameFlags and gfArtillery) <> 0 then
     cArtillery:= true;
 
-if (Theme = 'Snow') or (Theme = 'Hell') then
+if (Theme = 'Snow') then// or (Theme = 'Hell') then
     for i:= 0 to Pred(vobCount) do
         AddGear(GetRandom(LAND_WIDTH+1024)-512, LAND_HEIGHT - GetRandom(1024), gtFlake, 0, _0, _0, 0);
 end;
--- a/hedgewars/uGearsRender.pas	Wed Dec 22 00:58:00 2010 -0500
+++ b/hedgewars/uGearsRender.pas	Wed Dec 22 01:11:48 2010 -0500
@@ -1017,12 +1017,15 @@
                     Tint($FF, $FF, $FF, $FF);
                     end;
       gtNapalmBomb: DrawRotated(sprNapalmBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
-           gtFlake: if vobVelocity = 0 then
-                  //DrawSprite(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer)
-                  DrawSprite(sprFlake, x, y, Gear^.Timer)
-              else
-                  //DrawRotatedF(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer, 1, Gear^.DirAngle);
-                  DrawRotatedF(sprFlake, x, y, Gear^.Timer, 1, Gear^.DirAngle);
+           gtFlake: if not isInLag then
+                   begin
+                        if vobVelocity = 0 then
+                      //DrawSprite(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer)
+                      DrawSprite(sprFlake, x, y, Gear^.Timer)
+                  else
+                      //DrawRotatedF(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer, 1, Gear^.DirAngle);
+                      DrawRotatedF(sprFlake, x, y, Gear^.Timer, 1, Gear^.DirAngle)
+                  end;
 
          end;
       if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex);
--- a/hedgewars/uLandObjects.pas	Wed Dec 22 00:58:00 2010 -0500
+++ b/hedgewars/uLandObjects.pas	Wed Dec 22 01:11:48 2010 -0500
@@ -461,9 +461,12 @@
 if (cReducedQuality and rqKillFlakes) <> 0 then
     vobCount:= 0;
 
-
-for i:= 0 to Pred(vobCount) do
-    AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake);
+if Theme <> 'Snow' then
+    for i:= 0 to Pred(vobCount) do
+        AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake)
+else
+    for i:= 0 to Pred(vobCount div 3) do
+        AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake);
 
 Close(f);
 {$I+}