Advertisement
Guest User

Untitled

a guest
Apr 7th, 2014
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import graphics, sdl, sdl_image, colors
  2. import os, strutils
  3.  
  4. var surface: graphics.PSurface = newScreenSurface(640, 480)
  5. withEvents(surface, event):
  6. var x:int
  7. x=x+1
  8. while true:
  9. x=x+1
  10. surface.FillRect((0,0,640,480), colBlack);
  11. surface.drawCircle((x, 100), 60, colRed)
  12. SDL.UpdateRect(surface.s, 0, 0, 640, 480)
  13. sleep(20)
  14.  
  15. case event.kind
  16. of sdl.QUITEV:
  17. break
  18. else: nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement