aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-06-30 07:45:23 -0500
committerColin Okay <colin@cicadas.surf>2022-06-30 07:45:23 -0500
commit099c3f927c11fe7ae4d12933d6f72abc0b53e973 (patch)
treeb8d497bcffd98459e6b510d2b2541269218df6b5 /examples
parente0fc8f0f7a8b4756226cfb5e1c7581e411420228 (diff)
[modify] changed unit-width/height to just width/height. made defun
Diffstat (limited to 'examples')
-rw-r--r--examples/02-moving-bitmp.lisp10
-rw-r--r--examples/03-font-render.lisp8
2 files changed, 9 insertions, 9 deletions
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp
index bb6ae8f..7cb03d3 100644
--- a/examples/02-moving-bitmp.lisp
+++ b/examples/02-moving-bitmp.lisp
@@ -19,7 +19,7 @@
(:scancode-right (incf (ww::x target) ))
(:scancode-down (decf (ww::y target) ))
(:scancode-up (incf (ww::y target) ))
- (:scancode-w (incf (ww::unit-width target) 20))
+ (:scancode-w (incf (ww::width target) 20))
(:scancode-r (incf (ww::rotation target) (/ pi 3)))
(:scancode-l (decf (ww::rotation target) (/ pi 3)))
(:scancode-equals
@@ -44,10 +44,10 @@
(dx 0)
(dy 0))
(case scancode
- (:scancode-down (setf dy -1 desty (- ty (ww::unit-height target))))
- (:scancode-up (setf dy 1 desty (+ ty (ww::unit-height target))))
- (:scancode-left (setf dx -1 destx (- tx (ww::unit-width target))))
- (:scancode-right (setf dx 1 destx (+ tx (ww::unit-width target)))))
+ (:scancode-down (setf dy -1 desty (- ty (ww::height target))))
+ (:scancode-up (setf dy 1 desty (+ ty (ww::height target))))
+ (:scancode-left (setf dx -1 destx (- tx (ww::width target))))
+ (:scancode-right (setf dx 1 destx (+ tx (ww::width target)))))
(ww::add-handler
target
(ww::on-perframe ()
diff --git a/examples/03-font-render.lisp b/examples/03-font-render.lisp
index e36dc44..bdd1c6e 100644
--- a/examples/03-font-render.lisp
+++ b/examples/03-font-render.lisp
@@ -16,7 +16,7 @@
(format t "Pressed a key, changing the color~%")
(setf (ww::text-color target) (random-text-color))
- (with-accessors ((x ww::x) (y ww::y) (w ww::unit-width) (h ww::unit-height)) target
+ (with-accessors ((x ww::x) (y ww::y) (w ww::width) (h ww::height)) target
(format t "x:~a,y:~a,width:~a,height:~a~%" x y w h))))
(ww::defhandler marquee
@@ -61,8 +61,8 @@
(ww::scale-by hello 3.0)
(setf
- (ww::x hello) (* 0.5 (- 800 (ww::unit-width hello)))
- (ww::y hello) (* 0.5 (- 600 (ww::unit-height hello))))
+ (ww::x hello) (* 0.5 (- 800 (ww::width hello)))
+ (ww::y hello) (* 0.5 (- 600 (ww::height hello))))
(ww::add-handler hello #'marquee)
(ww::add-handler hello #'change-text-color)
(ww::add-handler hello #'twirl-on-click)
@@ -71,7 +71,7 @@
(ww::scale-by instructions 2.0)
(setf
- (ww::x instructions) (* 0.5 (- 800 (ww::unit-width instructions))))
+ (ww::x instructions) (* 0.5 (- 800 (ww::width instructions))))
(ww::add-unit app instructions)))