diff -r 458d9854c679 -r 68f9b331014a hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Fri Dec 31 00:37:39 2010 +0100 +++ b/hedgewars/uVisualGears.pas Fri Dec 31 01:05:23 2010 +0100 @@ -32,6 +32,7 @@ procedure DeleteVisualGear(Gear: PVisualGear); function VisualGearByUID(uid : Longword) : PVisualGear; procedure AddClouds; +procedure ChangeToSDClouds; procedure AddDamageTag(X, Y, Damage, Color: LongWord); implementation @@ -558,6 +559,24 @@ AddVisualGear(cLeftScreenBorder + i * cScreenSpace div (cCloudsNumber + 1), LAND_HEIGHT-1184, vgtCloud) end; +procedure ChangeToSDClouds; +var i: LongInt; + vg, tmp: PVisualGear; +begin +if cCloudsNumber = cSDCloudsNumber then exit; +vg:= VisualGearsList; +while vg <> nil do + if vg^.Kind = vgtCloud then + begin + tmp:= vg^.NextGear; + DeleteVisualGear(vg); + vg:= tmp + end + else vg:= vg^.NextGear; +for i:= 0 to cSDCloudsNumber - 1 do + AddVisualGear(cLeftScreenBorder + i * cScreenSpace div (cSDCloudsNumber + 1), LAND_HEIGHT-1184, vgtCloud) +end; + procedure initModule; begin VisualGearsList:= nil;