hedgewars/uGears.pas
changeset 78 66bb79dd248d
parent 75 d2b737858ff7
child 79 29b477319854
equal deleted inserted replaced
77:51eb4c197ec3 78:66bb79dd248d
   114                                                                doStepExplosion,
   114                                                                doStepExplosion,
   115                                                                doStepMine,
   115                                                                doStepMine,
   116                                                                doStepCase,
   116                                                                doStepCase,
   117                                                                doStepDEagleShot,
   117                                                                doStepDEagleShot,
   118                                                                doStepDynamite,
   118                                                                doStepDynamite,
   119                                                                doStepTeamHealthSorter
   119                                                                doStepTeamHealthSorter,
       
   120                                                                doStepBomb,
       
   121                                                                doStepCluster
   120                                                                );
   122                                                                );
   121 
   123 
   122 function AddGear(X, Y: integer; Kind: TGearType; State: Cardinal; const dX: real=0.0; dY: real=0.0; Timer: LongWord=0): PGear;
   124 function AddGear(X, Y: integer; Kind: TGearType; State: Cardinal; const dX: real=0.0; dY: real=0.0; Timer: LongWord=0): PGear;
   123 begin
   125 begin
   124 {$IFDEF DEBUGFILE}AddFileLog('AddGear: ('+inttostr(x)+','+inttostr(y)+')');{$ENDIF}
   126 {$IFDEF DEBUGFILE}AddFileLog('AddGear: ('+inttostr(x)+','+inttostr(y)+')');{$ENDIF}
   207     gtDynamite: begin
   209     gtDynamite: begin
   208                 Result.Radius:= 3;
   210                 Result.Radius:= 3;
   209                 Result.Elasticity:= 0.55;
   211                 Result.Elasticity:= 0.55;
   210                 Result.Friction:= 0.03;
   212                 Result.Friction:= 0.03;
   211                 Result.Timer:= 5000;
   213                 Result.Timer:= 5000;
       
   214                 end;
       
   215  gtClusterBomb: begin
       
   216                 Result.Radius:= 4;
       
   217                 Result.Elasticity:= 0.6;
       
   218                 Result.Friction:= 0.995;
       
   219                 Result.Timer:= Timer
   212                 end;
   220                 end;
   213      end;
   221      end;
   214 if GearsList = nil then GearsList:= Result
   222 if GearsList = nil then GearsList:= Result
   215                    else begin
   223                    else begin
   216                    GearsList.PrevGear:= Result;
   224                    GearsList.PrevGear:= Result;
   497         gtDynamite: DrawSprite2(sprDynamite, Round(Gear.X) - 16 + WorldDx, Round(Gear.Y) - 25 + WorldDy, Gear.Tag and 1, Gear.Tag shr 1, Surface);
   505         gtDynamite: DrawSprite2(sprDynamite, Round(Gear.X) - 16 + WorldDx, Round(Gear.Y) - 25 + WorldDy, Gear.Tag and 1, Gear.Tag shr 1, Surface);
   498             gtCase: case Gear.Pos of
   506             gtCase: case Gear.Pos of
   499                          posCaseAmmo  : DrawSprite(sprCase, Round(Gear.X) - 16 + WorldDx, Round(Gear.Y) - 16 + WorldDy, 0, Surface);
   507                          posCaseAmmo  : DrawSprite(sprCase, Round(Gear.X) - 16 + WorldDx, Round(Gear.Y) - 16 + WorldDy, 0, Surface);
   500                          posCaseHealth: DrawSprite(sprFAid, Round(Gear.X) - 24 + WorldDx, Round(Gear.Y) - 24 + WorldDy, (GameTicks shr 6) mod 13, Surface);
   508                          posCaseHealth: DrawSprite(sprFAid, Round(Gear.X) - 24 + WorldDx, Round(Gear.Y) - 24 + WorldDy, (GameTicks shr 6) mod 13, Surface);
   501                          end;
   509                          end;
       
   510      gtClusterBomb: DrawSprite(sprClusterBomb, Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, trunc(Gear.DirAngle), Surface);
       
   511          gtCluster: DrawSprite(sprClusterParticle, Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, 0, Surface);
   502               end;
   512               end;
   503       Gear:= Gear.NextGear
   513       Gear:= Gear.NextGear
   504       end;
   514       end;
   505 end;
   515 end;
   506 
   516