270 DeleteVisualGear(Gear) |
270 DeleteVisualGear(Gear) |
271 else |
271 else |
272 dec(Gear^.FrameTicks, Steps); |
272 dec(Gear^.FrameTicks, Steps); |
273 end; |
273 end; |
274 |
274 |
|
275 procedure doStepDroplet(Gear: PVisualGear; Steps: Longword); |
|
276 begin |
|
277 Gear^.X:= Gear^.X + Gear^.dX * Steps; |
|
278 |
|
279 Gear^.Y:= Gear^.Y + Gear^.dY * Steps; |
|
280 Gear^.dY:= Gear^.dY + cGravity * Steps; |
|
281 |
|
282 if hwRound(Gear^.Y) > cWaterLine then begin |
|
283 DeleteVisualGear(Gear); |
|
284 PlaySound(TSound(ord(sndDroplet1) + Random(3))); |
|
285 end; |
|
286 end; |
|
287 |
275 //////////////////////////////////////////////////////////////////////////////// |
288 //////////////////////////////////////////////////////////////////////////////// |
276 const cSorterWorkTime = 640; |
289 const cSorterWorkTime = 640; |
277 var thexchar: array[0..cMaxTeams] of |
290 var thexchar: array[0..cMaxTeams] of |
278 record |
291 record |
279 dy, ny, dw: LongInt; |
292 dy, ny, dw: LongInt; |
629 DrawRotatedF(sprShell, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); |
651 DrawRotatedF(sprShell, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); |
630 if Gear^.FrameTicks < 250 then |
652 if Gear^.FrameTicks < 250 then |
631 glColor4f(1, 1, 1, 1); |
653 glColor4f(1, 1, 1, 1); |
632 end; |
654 end; |
633 vgtSplash: DrawSprite(sprSplash, hwRound(Gear^.X) + WorldDx - 64, hwRound(Gear^.Y) + WorldDy - 72, 19 - (Gear^.FrameTicks div 37)); |
655 vgtSplash: DrawSprite(sprSplash, hwRound(Gear^.X) + WorldDx - 64, hwRound(Gear^.Y) + WorldDy - 72, 19 - (Gear^.FrameTicks div 37)); |
|
656 vgtDroplet: DrawSprite(sprDroplet, hwRound(Gear^.X) + WorldDx - 8, hwRound(Gear^.Y) + WorldDy - 8, Gear^.Frame); |
634 end; |
657 end; |
635 case Gear^.Kind of |
658 case Gear^.Kind of |
636 vgtSmallDamageTag: DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex); |
659 vgtSmallDamageTag: DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex); |
637 vgtSpeechBubble: if Gear^.Tex <> nil then DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex); |
660 vgtSpeechBubble: if Gear^.Tex <> nil then DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex); |
638 end; |
661 end; |