Update of /project/pal/cvsroot/pal/examples In directory clnet:/tmp/cvs-serv6234/examples
Modified Files: hello.lisp images.lisp swarm.lisp teddy.lisp Log Message: Some polishing. Version 1.1
--- /project/pal/cvsroot/pal/examples/hello.lisp 2007/07/27 21:25:40 1.9 +++ /project/pal/cvsroot/pal/examples/hello.lisp 2007/10/31 12:51:23 1.10 @@ -18,7 +18,7 @@ 2))))) (pal:set-blend-color 0 0 0 255) (pal:draw-text "Hello from PAL" (pal:v+ midpoint (pal:v 5 5)) font) - (pal:reset-blend-mode) + (pal:reset-blend) (pal:draw-text "Hello from PAL" midpoint font))) (pal:wait-keypress)))
--- /project/pal/cvsroot/pal/examples/images.lisp 2007/09/07 07:55:15 1.8 +++ /project/pal/cvsroot/pal/examples/images.lisp 2007/10/31 12:51:23 1.9 @@ -57,7 +57,7 @@
;; Press left mousebutton to capture part of the screen as a new cursor. ;; Note that altough the allocated images are released when PAL is closed we really should manually release - ;; the old cursor image with FREE-RESOURCE if we keep allocating lots of new images. + ;; the old cursor image with FREE-RESOURCE if we keep allocating lots of new images. (when (key-pressed-p :key-mouse-1) (set-cursor (image-from-array nil --- /project/pal/cvsroot/pal/examples/swarm.lisp 2007/07/21 16:34:16 1.5 +++ /project/pal/cvsroot/pal/examples/swarm.lisp 2007/10/31 12:51:23 1.6 @@ -1,5 +1,6 @@ ;; NOTE: the following example is intentionally slow and somewhat obfuscated
+ (defun swarm () (let ((vectors nil)) (pal:with-pal (:width 1024 :height 768) @@ -9,7 +10,7 @@ (setf vectors (append vectors (loop repeat 50 collecting (cons (pal:get-mouse-pos) (pal:v-random 5.0)))))))) (pal:draw-rectangle (pal:v 0 0) 1024 768 0 0 0 128) - (pal:with-blend (:color '(255 128 128 255)) + (pal:with-blend (:color (pal:color 255 128 128)) (pal:draw-text "Use left mousekey to add particles." (pal:v 0 0)))
(let ((midpoint (pal:v/ (reduce 'pal:v+ vectors :initial-value (pal:v 0 0) :key 'car) --- /project/pal/cvsroot/pal/examples/teddy.lisp 2007/09/07 07:55:15 1.10 +++ /project/pal/cvsroot/pal/examples/teddy.lisp 2007/10/31 12:51:23 1.11 @@ -121,7 +121,7 @@ ;; then the sprites, first the shadows ;; sorting the sprites and their shadows according to their altitude is left as an exercise to the reader
- (with-blend (:color '(0 0 0 128)) + (with-blend (:color (color 0 0 0 128)) (dolist (i *sprites*) (with-transformation (:pos (v (alt-of i) (alt-of i))) (draw i)))) @@ -148,6 +148,7 @@
(draw-fps) ;; Draw the frames/second counter to the top left corner. (draw-text "Press key to select blend-mode:" (v 200 (* 0 (get-font-height)))) - (draw-text "1=nil 2=:blend 3=:additive" (v 200 (* 1 (get-font-height))))))) + (draw-text "1=nil 2=:blend 3=:additive" (v 200 (* 1 (get-font-height)))) + (draw-text "Press F to fade out the music." (v 200 (* 2 (get-font-height)))))))
;; (example) \ No newline at end of file