diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/06-sprite.lisp | 7 | ||||
-rw-r--r-- | examples/08-pong.lisp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/06-sprite.lisp b/examples/06-sprite.lisp index 2addfd7..abb5043 100644 --- a/examples/06-sprite.lisp +++ b/examples/06-sprite.lisp @@ -14,9 +14,9 @@ (defun set-key-if-not (sprite key ) "Sets the frame kyey for sprite if that key is not already set. Also sets the frameset's RUNNINGP to T if it is not already." - (unless (eql key (ww::frameset-key sprite)) + (unless (eql key (ww::sprite-frameset-key sprite)) (setf (ww::runningp (ww::current-frameset sprite)) nil) - (setf (ww::frameset-key sprite) key)) + (setf (ww::sprite-frameset-key sprite) key)) (unless (ww::runningp (ww::current-frameset sprite)) (setf (ww::runningp (ww::current-frameset sprite)) t))) @@ -27,7 +27,7 @@ "When the sprite is walking, adjust its position." (with-slots (walkingp walking-speed) sprite (when walkingp - (case (ww::frameset-key sprite) + (case (ww::sprite-frameset-key sprite) (:left (decf (ww::x sprite) walking-speed)) (:right @@ -71,7 +71,6 @@ (setf (ww::runningp current) nil (ww::frameset-index current) 0)))) - (defmethod ww::boot ((app sprite-example)) (let* ((front (ww::make-frameset diff --git a/examples/08-pong.lisp b/examples/08-pong.lisp index eae6843..51de28d 100644 --- a/examples/08-pong.lisp +++ b/examples/08-pong.lisp @@ -121,7 +121,7 @@ on which boundary VAL is outside of." (ww::defhandler pong-mousemove (ww::on-mousemotion (app) "Just sets the position of the paddle, and updates the paddles dx" - (setf (ww::x (paddle app)) + (setf (ww::x (paddle app)) (- x (* 0.5 (ww::width (paddle app)))) ;; using dx to store some motion informaton ;; used to chagne dx and dr in the ball |