28 function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0; Critical: Boolean = false): PVisualGear; |
28 function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0; Critical: Boolean = false): PVisualGear; |
29 procedure ProcessVisualGears(Steps: Longword); |
29 procedure ProcessVisualGears(Steps: Longword); |
30 procedure KickFlakes(Radius, X, Y: LongInt); |
30 procedure KickFlakes(Radius, X, Y: LongInt); |
31 procedure DrawVisualGears(Layer: LongWord); |
31 procedure DrawVisualGears(Layer: LongWord); |
32 procedure DeleteVisualGear(Gear: PVisualGear); |
32 procedure DeleteVisualGear(Gear: PVisualGear); |
|
33 function VisualGearByUID(uid : Longword) : PVisualGear; |
33 procedure AddClouds; |
34 procedure AddClouds; |
34 procedure AddDamageTag(X, Y, Damage, Color: LongWord); |
35 procedure AddDamageTag(X, Y, Damage, Color: LongWord); |
35 |
36 |
36 implementation |
37 implementation |
37 uses uSound, uMobile, uVariables, uTextures, uRender, Math, uRenderUtils; |
38 uses uSound, uMobile, uVariables, uTextures, uRender, Math, uRenderUtils; |
478 Gear:= Gear^.NextGear |
479 Gear:= Gear^.NextGear |
479 end |
480 end |
480 end |
481 end |
481 end; |
482 end; |
482 |
483 |
|
484 function VisualGearByUID(uid : Longword) : PVisualGear; |
|
485 var vg: PVisualGear; |
|
486 begin |
|
487 VisualGearByUID:= nil; |
|
488 vg:= VisualGearsList; |
|
489 while vg <> nil do |
|
490 begin |
|
491 if vg^.uid = uid then |
|
492 begin |
|
493 VisualGearByUID:= vg; |
|
494 exit |
|
495 end; |
|
496 vg:= vg^.NextGear |
|
497 end |
|
498 end; |
|
499 |
483 procedure AddClouds; |
500 procedure AddClouds; |
484 var i: LongInt; |
501 var i: LongInt; |
485 begin |
502 begin |
486 for i:= 0 to cCloudsNumber - 1 do |
503 for i:= 0 to cCloudsNumber - 1 do |
487 AddVisualGear(cLeftScreenBorder + i * cScreenSpace div (cCloudsNumber + 1), LAND_HEIGHT-1184, vgtCloud) |
504 AddVisualGear(cLeftScreenBorder + i * cScreenSpace div (cCloudsNumber + 1), LAND_HEIGHT-1184, vgtCloud) |