Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import graphics, sdl, sdl_image, colors
- import os, strutils
- var surface: graphics.PSurface = newScreenSurface(640, 480)
- withEvents(surface, event):
- var x:int
- x=x+1
- while true:
- x=x+1
- surface.FillRect((0,0,640,480), colBlack);
- surface.drawCircle((x, 100), 60, colRed)
- SDL.UpdateRect(surface.s, 0, 0, 640, 480)
- sleep(20)
- case event.kind
- of sdl.QUITEV:
- break
- else: nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement