include "sdl.inc"

SetCaption "SDLTEST"
SetDisplay 640,480,1
SetColorKey 255,0,255 

sys x, y, c,font, alien, color, rc,gc,bc

c    = LoadImage "bmp/baum.bmp",1
font = LoadImage "bmp/font16x.bmp",94
alien= LoadImage "bmp/pumpa.bmp",1

While Key(27)=0     
ClsColor 55,0,255
DrawImage c,200,200,0
 DrawImage c,100,100,0
  DrawImage c,300,300,0
   DrawImage alien,340,180,0

DrawText font,0,0,  "xMouse:" + xMouse
 DrawText font,0,24, "yMouse:" + yMouse
  DrawText font,0,48, "MouseButton:" + MouseButton
   DrawText font,0,440,"Frames:" + ShowFps
    DrawText font,0,72, "Screen=" + video.w + ":" + video.h

iF MouseButton=1 and MouseZone (340,180,340+86,180+86) =1 
   DrawText font,xMouse,yMouse," An Alien!"
End iF   

Ellipse 400,100,60,10, 255,220,0
Ellipse 400,100,10,60, 255,220,0
Line 0,460,640,460, 0, 200,100
FillCircle 480,300,25, 255,0,0
Ellipse 540,300,25,25, 255,0,0
Rectangle 500,350,40,40, 0,255,255
Paint 560,350,40,40, 255,gc,255
iF MouseButton =1
   color = GetPixel xMouse,yMouse
   rc = getColorR color
   gc = getColorG color
   bc = getColorB color
   Paint 501,351,38,38,rc,gc,bc
End iF   
DrawText font,250,0,"PixelColor: " + rc + "," + gc + "," + bc   
Flip

SetFps 60
Wend 
Ends
