hedgewars/uGears.pas
changeset 809 b33c2def1576
parent 803 3f73901a350a
child 814 7fb4417b7bc1
equal deleted inserted replaced
808:09ffccb9600a 809:b33c2def1576
   162 
   162 
   163 procedure RemoveGearFromList(Gear: PGear);
   163 procedure RemoveGearFromList(Gear: PGear);
   164 begin
   164 begin
   165 if Gear^.NextGear <> nil then Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
   165 if Gear^.NextGear <> nil then Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
   166 if Gear^.PrevGear <> nil then Gear^.PrevGear^.NextGear:= Gear^.NextGear
   166 if Gear^.PrevGear <> nil then Gear^.PrevGear^.NextGear:= Gear^.NextGear
   167    else begin
   167    else GearsList:= Gear^.NextGear
   168    GearsList:= Gear^.NextGear;
       
   169    if GearsList <> nil then GearsList^.PrevGear:= nil
       
   170    end;
       
   171 end;
   168 end;
   172 
   169 
   173 function AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
   170 function AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
   174 const Counter: Longword = 0;
   171 const Counter: Longword = 0;
   175 var Result: PGear;
   172 var Result: PGear;