Guest User

Untitled

a guest
Apr 8th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 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. var pause:bool = false
  8.  
  9. x=x+1
  10. while true:
  11. x=x+1
  12. surface.FillRect((0,0,640,480), colBlack);
  13. surface.drawCircle((x, 100), 60, colRed)
  14. SDL.UpdateRect(surface.s, 0, 0, 640, 480)
  15. sleep(5)
  16.  
  17. if event.kind==sdl.QUITEV:
  18. break
  19. else: nil
Add Comment
Please, Sign In to add comment