Image noise: Difference between revisions

Content added Content deleted
(Initial PL/I example)
No edit summary
Line 738: Line 738:
(dotimes (h height)
(dotimes (h height)
(dotimes (w width)
(dotimes (w width)
;;(sdl:draw-pixel-* w h :surface s :color (if (zerop (random 2)) sdl:*white* sdl:*black*)))))
(sdl-base::write-pixel s w h (if (zerop (random 2))
(sdl-base::write-pixel s w h (if (zerop (random 2))
i-white i-black ))))))
i-white i-black ))))))
Line 750: Line 749:


(defun main ()
(defun main ()
"main function, creates initializes the library and creates de display window"
"main function, initializes the library and creates de display window"
(setf *random-state* (make-random-state))
(setf *random-state* (make-random-state))
(sdl:with-init (SDL:SDL-INIT-VIDEO SDL:SDL-INIT-TIMER)
(sdl:with-init (SDL:SDL-INIT-VIDEO SDL:SDL-INIT-TIMER)