hedgewars/uGearsRender.pas
changeset 11529 58b4e357bcbf
parent 11506 24bef86e3f3a
child 11806 2af936302bab
equal deleted inserted replaced
11528:8826ee0afe01 11529:58b4e357bcbf
  1266                     else if Gear^.State and gsttmpFlag = 0 then
  1266                     else if Gear^.State and gsttmpFlag = 0 then
  1267                         DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle)
  1267                         DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle)
  1268                     else
  1268                     else
  1269                         DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle)
  1269                         DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle)
  1270                     end;
  1270                     end;
  1271         gtDynamite: DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
  1271         gtDynamite: begin
       
  1272                     DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
       
  1273                     if (random(3) = 0) then
       
  1274                         begin
       
  1275                         vg:= AddVisualGear(hwRound(Gear^.X)+12-(Gear^.Tag shr 1), hwRound(Gear^.Y)-16, vgtStraightShot);
       
  1276                         if vg <> nil then
       
  1277                             with vg^ do
       
  1278                                 begin
       
  1279                                 Tint:= $FFCC00FF;
       
  1280                                 Angle:= random(360);
       
  1281                                 dx:= 0.0005 * (random(200));
       
  1282                                 dy:= 0.0005 * (random(200));
       
  1283                                 if random(2) = 0 then
       
  1284                                     dx := -dx;
       
  1285                                 if random(2) = 0 then
       
  1286                                     dy := -dy;
       
  1287                                 FrameTicks:= 100+random(300);
       
  1288                                 Scale:= 0.1+1/(random(3)+3);
       
  1289                                 State:= ord(sprStar)
       
  1290                                 end
       
  1291                         end;
       
  1292 
       
  1293                     end;
  1272      gtClusterBomb: DrawSpriteRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle);
  1294      gtClusterBomb: DrawSpriteRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle);
  1273          gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0);
  1295          gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0);
  1274            gtFlame: if Gear^.Tag and 1 = 0 then
  1296            gtFlame: if Gear^.Tag and 1 = 0 then
  1275                          DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16)
  1297                          DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16)
  1276                     else DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, -1, 16, 16);
  1298                     else DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, -1, 16, 16);