172 begin |
172 begin |
173 dec(Gear^.Frame); |
173 dec(Gear^.Frame); |
174 Gear^.FrameTicks:= cExplFrameTicks |
174 Gear^.FrameTicks:= cExplFrameTicks |
175 end |
175 end |
176 else dec(Gear^.FrameTicks, Steps) |
176 else dec(Gear^.FrameTicks, Steps) |
|
177 end; |
|
178 |
|
179 procedure doStepEgg(Gear: PVisualGear; Steps: Longword); |
|
180 begin |
|
181 Gear^.X:= Gear^.X + Gear^.dX * Steps; |
|
182 |
|
183 Gear^.Y:= Gear^.Y + Gear^.dY * Steps; |
|
184 Gear^.dY:= Gear^.dY + cGravity * Steps; |
|
185 |
|
186 Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle; |
|
187 |
|
188 if Gear^.FrameTicks <= Steps then |
|
189 DeleteVisualGear(Gear) |
|
190 else |
|
191 dec(Gear^.FrameTicks, Steps) |
177 end; |
192 end; |
178 |
193 |
179 procedure doStepFire(Gear: PVisualGear; Steps: Longword); |
194 procedure doStepFire(Gear: PVisualGear; Steps: Longword); |
180 begin |
195 begin |
181 Gear^.X:= Gear^.X + Gear^.dX * Steps; |
196 Gear^.X:= Gear^.X + Gear^.dX * Steps; |
542 dx.isNegative:= random(2) = 0; |
558 dx.isNegative:= random(2) = 0; |
543 dy:= AngleCos(t) * sp; |
559 dy:= AngleCos(t) * sp; |
544 dy.isNegative:= random(2) = 0; |
560 dy.isNegative:= random(2) = 0; |
545 FrameTicks:= 650 + random(250); |
561 FrameTicks:= 650 + random(250); |
546 Frame:= random(8) |
562 Frame:= random(8) |
|
563 end; |
|
564 vgtEgg: begin |
|
565 t:= random(1024); |
|
566 sp:= _0_001 * (random(85) + 95); |
|
567 dx:= AngleSin(t) * sp; |
|
568 dx.isNegative:= random(2) = 0; |
|
569 dy:= AngleCos(t) * sp; |
|
570 dy.isNegative:= random(2) = 0; |
|
571 FrameTicks:= 650 + random(250); |
|
572 Frame:= 1 |
547 end; |
573 end; |
548 vgtShell: FrameTicks:= 500; |
574 vgtShell: FrameTicks:= 500; |
549 vgtSmallDamageTag: begin |
575 vgtSmallDamageTag: begin |
550 gear^.FrameTicks:= 1100 |
576 gear^.FrameTicks:= 1100 |
551 end; |
577 end; |
739 glColor4f(1, 1, 1, Gear^.FrameTicks / 250); |
765 glColor4f(1, 1, 1, Gear^.FrameTicks / 250); |
740 DrawRotatedF(sprShell, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); |
766 DrawRotatedF(sprShell, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); |
741 if Gear^.FrameTicks < 250 then |
767 if Gear^.FrameTicks < 250 then |
742 glColor4f(1, 1, 1, 1); |
768 glColor4f(1, 1, 1, 1); |
743 end; |
769 end; |
|
770 vgtEgg: begin |
|
771 if Gear^.FrameTicks < 250 then |
|
772 glColor4f(1, 1, 1, Gear^.FrameTicks / 250); |
|
773 DrawRotatedF(sprEgg, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); |
|
774 if Gear^.FrameTicks < 250 then |
|
775 glColor4f(1, 1, 1, 1); |
|
776 end; |
744 vgtSplash: DrawSprite(sprSplash, hwRound(Gear^.X) + WorldDx - 64, hwRound(Gear^.Y) + WorldDy - 72, 19 - (Gear^.FrameTicks div 37)); |
777 vgtSplash: DrawSprite(sprSplash, hwRound(Gear^.X) + WorldDx - 64, hwRound(Gear^.Y) + WorldDy - 72, 19 - (Gear^.FrameTicks div 37)); |
745 vgtDroplet: DrawSprite(sprDroplet, hwRound(Gear^.X) + WorldDx - 8, hwRound(Gear^.Y) + WorldDy - 8, Gear^.Frame); |
778 vgtDroplet: DrawSprite(sprDroplet, hwRound(Gear^.X) + WorldDx - 8, hwRound(Gear^.Y) + WorldDy - 8, Gear^.Frame); |
746 vgtBeeTrace: begin |
779 vgtBeeTrace: begin |
747 if Gear^.FrameTicks < 250 then |
780 if Gear^.FrameTicks < 250 then |
748 glColor4f(1, 1, 1, Gear^.FrameTicks / 500) |
781 glColor4f(1, 1, 1, Gear^.FrameTicks / 500) |