;; this file: ;; https://dataswamp.org/~incal/common-lisp/2d-demo/rect.lisp (require :sdl2) (defun draw-rect (rend x y w h &optional r g b (a 255)) (when (and r g b a) (sdl2:set-render-draw-color rend r g b a) ) (sdl2:render-draw-rect rend (sdl2:make-rect x y w h) )) (defun tile (rend tx ty &optional r g b (a 255) (side 32)) (when (and r g b a) (sdl2:set-render-draw-color rend r g b a) ) (draw-rect rend (* tx side) (* ty side) side side) ) (provide :rect)