Code:
Sub BltWeather()
Dim i As Long
If WeatherTick = 0 Then
WeatherTick = GetTickCount
End If
Call DDS_BackBuffer.SetForeColor(RGB(255, 255, 255))
If GameWeather = WEATHER_RAINING Then
For i = 1 To MAX_RAINDROPS
If DropRain(i).Randomized = False Then
If frmMirage.tmrRainDrop.Enabled = False Then
BLT_RAIN_DROPS = 1
frmMirage.tmrRainDrop.Enabled = True
If frmMirage.tmrRainDrop.Tag = "" Then
frmMirage.tmrRainDrop.Interval = 200
frmMirage.tmrRainDrop.Tag = "123"
End If
End If
End If
Next i
Else
If BLT_RAIN_DROPS > 0 And BLT_RAIN_DROPS <= RainIntensity Then
Call ClearRainDrop(BLT_RAIN_DROPS)
End If
frmMirage.tmrRainDrop.Tag = ""
End If
LeftRight = 0
'actually blt the rain
For i = 1 To MAX_RAINDROPS
If Not ((DropRain(i).X = 0) Or (DropRain(i).Y = 0)) Then
DropRain(i).X = DropRain(i).X + DropRain(i).speed
DropRain(i).Y = DropRain(i).Y + DropRain(i).speed
Call DDS_BackBuffer.DrawLine(ConvertMapX(DropRain(i).X), ConvertMapY(DropRain(i).Y), ConvertMapX(DropRain(i).X + DropRain(i).speed), ConvertMapY(DropRain(i).Y + DropRain(i).speed))
If (DropRain(i).X > (Map.MaxX + 1) * PIC_X) Or (DropRain(i).Y > (Map.MaxY + 1) * PIC_Y) Then
DropRain(i).Randomized = False
End If
End If
Next i
End Sub