'This function is called whenever a ball hits water.
Dim j As Integer
If CFGWaves = 0 Then Exit Sub
For j = 1 To WAVEMAX
If Waves(j).Enabled = False Then
'We'll put the splash at j.
Waves(j).Enabled = True
Waves(j).Frame = 0
Waves(j).Count = 0
Waves(j).Speed = Rnd(1) * 5 + 1
Waves(j).Shape = Int(Rnd(1) * 2) + 8
Waves(j).Xpos = xxx
Waves(j).Ypos = yyy
Exit For
End If
Next j
End Sub
Public Sub ClearAllBalls()
Dim i As Integer
'This sub cleans out the whole ball array.
For i = 1 To BALLMAX
Set Balls(i) = New Ball
Balls(i).Enabled = False
Next i
End Sub
Public Sub ClearAllWaves()
Dim i As Integer
'Clean out the wave array.
For i = 1 To WAVEMAX
Set Waves(i) = New Wave
Waves(i).Enabled = False
Next i
End Sub
Public Sub BuildBalls(StartNum As Long, Xstart As Long, Ystart As Long, Intensity As Long, Spread As Long, AbsorbPct As Long, Size As Integer, Color As Integer)
'This sub creates an explosion!
Dim i As Integer
Dim j As Integer
'Leave unless we know we're making a selection arrow.
If (CFGExplosions = 0) And ((Size < 5) Or (Size > 6)) Then Exit Sub
'Do this for each new ball.
For j = 1 To StartNum
'Find an empty ball slot and fill it up with info.