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
- var pause:bool = false
- 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)
- SDL.delay(5)
- if event.kind==sdl.QUITEV:
- break
- else: nil
Add Comment
Please, Sign In to add comment