hedgewars/uVisualGears.pas
changeset 12707 0dfb49261cab
parent 12470 c8ee50955fae
child 13053 9dd724e8d620
equal deleted inserted replaced
12706:79e13080b9db 12707:0dfb49261cab
   470 for i:= 0 to cCloudsNumber - 1 do
   470 for i:= 0 to cCloudsNumber - 1 do
   471     AddVisualGear(cLeftScreenBorder + i * LongInt(cScreenSpace div (cCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud)
   471     AddVisualGear(cLeftScreenBorder + i * LongInt(cScreenSpace div (cCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud)
   472 end;
   472 end;
   473 
   473 
   474 procedure ChangeToSDClouds;
   474 procedure ChangeToSDClouds;
   475 var       i: LongInt;
   475 var       i, j: LongInt;
   476     vg, tmp: PVisualGear;
   476     vg, tmp: PVisualGear;
   477 begin
   477 begin
   478 if cCloudsNumber = cSDCloudsNumber then
   478 if cCloudsNumber = cSDCloudsNumber then
   479     exit;
   479     exit;
   480 vg:= VisualGearLayers[0];
   480 for i:= 0 to 6 do
   481 while vg <> nil do
   481     begin
   482     if vg^.Kind = vgtCloud then
   482     vg:= VisualGearLayers[i];
   483         begin
   483     while vg <> nil do
   484         tmp:= vg^.NextGear;
   484         if vg^.Kind = vgtCloud then
   485         DeleteVisualGear(vg);
   485             begin
   486         vg:= tmp
   486             tmp:= vg^.NextGear;
   487         end
   487             DeleteVisualGear(vg);
   488     else vg:= vg^.NextGear;
   488             vg:= tmp
   489 for i:= 0 to cSDCloudsNumber - 1 do
   489             end
   490     AddVisualGear(cLeftScreenBorder + i * LongInt(cScreenSpace div (cSDCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud)
   490         else vg:= vg^.NextGear;
       
   491     for j:= 0 to cSDCloudsNumber - 1 do
       
   492         AddVisualGear(cLeftScreenBorder + j * LongInt(cScreenSpace div (cSDCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud)
       
   493     end;
   491 end;
   494 end;
   492 
   495 
   493 procedure AddFlakes;
   496 procedure AddFlakes;
   494 var i: LongInt;
   497 var i: LongInt;
   495 begin
   498 begin