hedgewars/VGSHandlers.inc
branchhedgeroid
changeset 5932 5164d17b6374
parent 5874 5cd329cf2460
child 6005 3470f3f547ca
--- a/hedgewars/VGSHandlers.inc	Fri Sep 16 17:36:05 2011 +0200
+++ b/hedgewars/VGSHandlers.inc	Fri Sep 16 18:17:16 2011 +0200
@@ -174,7 +174,10 @@
 if Gear^.FrameTicks <= Steps then
     DeleteVisualGear(Gear)
 else
-    dec(Gear^.FrameTicks, Steps)
+    dec(Gear^.FrameTicks, Steps);
+
+if Gear^.FrameTicks < $FF then
+   Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or Gear^.FrameTicks
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -587,23 +590,15 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepBigExplosionWork(Gear: PVisualGear; Steps: Longword);
-//var maxMovement: LongInt;
+var maxMovement: LongInt;
 begin
 
 inc(Gear^.Timer, Steps);
-(*
-FIXME - This block desyncs due to the way WorldDx is important for various things network related.
-One possible solution is, instead of using WorldDx, to use straight gl/SDL calls to jitter the screen a bit.
-
-// a comment by unC0Rr: instead of changing WorldDx shake cursor coordinates, that should be safe
-// ... seems to still desync, and I tried banning when targetting too
-
 if (Gear^.Timer and 5) = 0 then
     begin
     maxMovement := max(1, 13 - ((Gear^.Timer * 15) div 250));
     ShakeCamera(maxMovement);
     end;
-*)
 
 if Gear^.Timer > 250 then DeleteVisualGear(Gear);
 end;
@@ -613,9 +608,9 @@
     gX,gY: LongInt;
     vg: PVisualGear;
 begin
-ScreenFade:= sfFromWhite;
-ScreenFadeValue:= 250;
-ScreenFadeSpeed:= 5;
+//ScreenFade:= sfFromWhite;
+//ScreenFadeValue:= round(60 * zoom * zoom);
+//ScreenFadeSpeed:= 5;
 gX:= round(Gear^.X);
 gY:= round(Gear^.Y);
 AddVisualGear(gX, gY, vgtSmokeRing);