From ce3b427a65824e5213b501eacbb2f4048c4af6d2 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 27 Jun 2022 15:59:58 -0500 Subject: [example] modified example 2 to use scale-by --- examples/02-moving-bitmp.lisp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'examples') 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)))) -- cgit v1.2.3