aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-07-08 10:13:16 -0500
committerColin Okay <colin@cicadas.surf>2022-07-08 10:13:16 -0500
commit7bf212df6c3cf0d16b7145ddb18b97f504717230 (patch)
tree51fc74e31f577884c6ec09e64a97f309832a6df2 /examples
parent9106f3adb796f2c7fb0127fb8e0a66799a214c9b (diff)
[add] exports to pacage; [rename] frameset-key/sprite-frameset-key
Diffstat (limited to 'examples')
-rw-r--r--examples/06-sprite.lisp7
-rw-r--r--examples/08-pong.lisp2
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