indexbase 0
include "window.inc"

Window "HAPPY MATHEMATICS 64 BIT", 640, 480, 2
Font 19,38,0,"courier"

Sub Cloud1(int x1,y1,r1,s1)
Circle x1+s1,y1,r1,250,250,250
Line x1+s1,y1,(x1+10)+s1,y1-6,4, 250,250,250
Line x1+s1,y1,(x1-10)+s1,y1-6,4, 250,250,250
End Sub 

Sub Cloud2(int x1,y1,r1,s1)
Circle x1+s1,y1,r1,240,240,240
Line x1+s1,y1,(x1+10)+s1,y1,4, 240,240,240
Line x1+s1,y1,(x1-10)+s1,y1,4, 240,240,240
End Sub

Sub Cloud3(int x1,y1,r1,s1)
Circle x1+s1,y1,r1,230,230,230
Line x1+s1,y1,(x1+10)+s1,y1+6,4, 230,230,230
Line x1+s1,y1,(x1-10)+s1,y1+6,4, 230,230,230
End Sub 
	
Dim Winkel(60) as single
Dim y(60) as single
string txt = "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
int TextL = Len(txt)
sys cx1=0, cy1=100, d1=1, v1=0, i=0, s1 
single r1=10

For i=1 To TextL
winkel(i) =360 - i*(360/TextL)
y(i) = 240 
Next

While AscKey=0 and WinExit=0
clsColor 105,133,63
int x
For x=1 To TextL
   winkel(x) = winkel(x) + .2
   iF winkel(x) =360 Then winkel(x) = -360
   string Letter = Mid(txt,x,1)
   y(x) = y(x) + Sin(winkel(x))*20
   Text x*10,y(x),Letter,255,255,255
Next
iF d1 =1 
   Cloud1 cx1,cy1,r1,s1
   s1 = s1 + 1
   r1 = cos(rad(r1))+Rand(1,40) 
   iF s1 >640 Then s1 = -1
   v1 = v1 +1
   iF v1 =7  
      v1 =0
      d1 =2 
   End iF
ElseiF d1 =2 
   Cloud2 cx1,cy1,r1,s1
   s1 = s1 + 1
   r1 = cos(rad(r1))+Rand(1,40) 
   iF s1 >640 Then s1 = -1
   v1 = v1 +1
   iF v1 =6  
      v1 =0
      d1 =3
   End iF
ElseiF d1 =3 
   Cloud3 cx1,cy1+6,r1,s1 
   s1 = s1 + 1
   r1 = cos(rad(r1))+Rand(1,40) 
   iF s1 >640 Then s1 = -1
   v1 = v1 +1
   iF v1 =5  
      v1 =0
      d1 =1
   End iF
End iF
Events
FlipBuffer
WaitFPS 24
Wend
WinEnd
