diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-27 15:59:58 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-27 15:59:58 -0500 |
commit | ce3b427a65824e5213b501eacbb2f4048c4af6d2 (patch) | |
tree | 9946a66af71e050b0605a0da435bb371043ece8f | |
parent | 478012fb74c754d16f19714972d99da11147e02f (diff) |
[example] modified example 2 to use scale-by
-rw-r--r-- | examples/02-moving-bitmp.lisp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp index e656367..3cc731a 100644 --- a/examples/02-moving-bitmp.lisp +++ b/examples/02-moving-bitmp.lisp @@ -21,11 +21,9 @@ (:scancode-up (incf (ww::unit-y target) (ww::unit-height target))) (:scancode-equals (when (or (member :lshift modifiers) (member :rshift modifiers)) - (incf (ww::unit-height target) 20.0) - (incf (ww::unit-width target) 20.0))) + (ww::scale-by target 1.10))) (:scancode-minus - (decf (ww::unit-height target) 20.0) - (decf (ww::unit-width target) 20.0))) + (ww::scale-by target 0.9))) (format t "ghoul pos: ~a,~a~%" (ww::unit-x target) (ww::unit-y target)))) |