changeset 3102 | 3435cdc1e557 |
parent 3100 | 5fe9c4ac4c99 |
child 3104 | 6cdc45b3b8a6 |
3101:e128eff95fca | 3102:3435cdc1e557 |
---|---|
183 @doStepJetpack, |
183 @doStepJetpack, |
184 @doStepMolotov, |
184 @doStepMolotov, |
185 @doStepCase, |
185 @doStepCase, |
186 @doStepBirdy, |
186 @doStepBirdy, |
187 @doStepBigExplosion, |
187 @doStepBigExplosion, |
188 @doStepEggWork |
188 @doStepEggWork |
189 ); |
189 ); |
190 |
190 |
191 procedure InsertGearToList(Gear: PGear); |
191 procedure InsertGearToList(Gear: PGear); |
192 var tmp, ptmp: PGear; |
192 var tmp, ptmp: PGear; |
193 begin |
193 begin |
447 gear^.Radius:= 6; |
447 gear^.Radius:= 6; |
448 end; |
448 end; |
449 gtBirdy: begin |
449 gtBirdy: begin |
450 gear^.Radius:= 16; // todo: check |
450 gear^.Radius:= 16; // todo: check |
451 gear^.Timer:= 500; |
451 gear^.Timer:= 500; |
452 gear^.Health := 2000; |
452 gear^.Health := 2000; |
453 gear^.FlightTime := 2; |
453 gear^.FlightTime := 2; |
454 end; |
454 end; |
455 gtBigExplosion: begin |
455 gtBigExplosion: begin |
456 gear^.Angle:= random(360); |
456 gear^.Angle:= random(360); |
457 end; |
457 end; |
458 gtEgg: begin |
458 gtEgg: begin |
459 gear^.Radius:= 4; |
459 gear^.Radius:= 4; |
460 gear^.Elasticity:= _0_6; |
460 gear^.Elasticity:= _0_6; |
461 gear^.Friction:= _0_96; |
461 gear^.Friction:= _0_96; |
462 gear^.RenderTimer:= true; |
|
463 if gear^.Timer = 0 then gear^.Timer:= 3000 |
462 if gear^.Timer = 0 then gear^.Timer:= 3000 |
464 end; |
463 end; |
465 end; |
464 end; |
466 InsertGearToList(gear); |
465 InsertGearToList(gear); |
467 AddGear:= gear; |
466 AddGear:= gear; |
1688 gtBigExplosion: begin |
1687 gtBigExplosion: begin |
1689 glColor4f(1, 1, 1, 1.0 * (power(2, -5 * (Gear^.Timer-200)/200))); |
1688 glColor4f(1, 1, 1, 1.0 * (power(2, -5 * (Gear^.Timer-200)/200))); |
1690 DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -4 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle); |
1689 DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -4 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle); |
1691 glColor4f(1, 1, 1, 1); |
1690 glColor4f(1, 1, 1, 1); |
1692 end; |
1691 end; |
1693 gtEgg: DrawRotated(sprBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle); |
1692 gtEgg: DrawRotated(sprEgg, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle); |
1694 end; |
1693 end; |
1695 if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex); |
1694 if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex); |
1696 Gear:= Gear^.NextGear |
1695 Gear:= Gear^.NextGear |
1697 end; |
1696 end; |
1698 end; |
1697 end; |