include "sdl.inc"  

SetDisplay 340,360,1
SetCaption "NEWTON BANANA"
SetColorKey 255,0,255

sys p1,p2
single yacc=.98, yvel=-10, xvel=10, x=20, y=100, r=40

p1= LoadImage "bmp/font16x.bmp",94
p2= LoadImage "bmp/weed.bmp",1

While Key(27)=0
ClsColor 0,0,255
yvel = yvel + yacc
y = y + yvel
x = x + xvel
iF  y >289 
yvel = -0.9 * yvel 
y =289 
xvel = xvel * 0.9 
End iF
iF x >285 
xvel = -xvel
x =285 
End iF
iF x<10 
xvel = -xvel 
x = 10 
End iF
FillCircle x, y, r, 255,255,255
Ellipse x,y,r+1,r+1,255,0,0
iF xvel * xvel <0.0001 Then Exit While 
DrawImage p2,0,312,0
Flip
SetFps 24
Wend
DrawImage p2,0,312,0
DrawText p1,90,100,"HIT ESCAPE"
WaitKey(27)
Ends