From 543704f0f54cbb1de78754ad8a323c482ab6829c Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 14 Dec 2024 12:29:29 -0800 Subject: Loop style nits --- src/interactive/sprite.lisp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/interactive/sprite.lisp') diff --git a/src/interactive/sprite.lisp b/src/interactive/sprite.lisp index dd9b2a1..c212418 100644 --- a/src/interactive/sprite.lisp +++ b/src/interactive/sprite.lisp @@ -15,8 +15,9 @@ (defmethod initialize-instance :after ((sprite sprite) &key) (with-slots (framesets frameset-key) sprite - (loop for (name fs . more) on framesets by #'cddr - do (setf (unit-in-scene-p fs) sprite)) + (loop :for (name fs . more) :on framesets :by #'cddr :do + (setf (unit-in-scene-p fs) sprite)) + (unless frameset-key (setf frameset-key (first framesets))))) @@ -30,15 +31,15 @@ (macrolet ((def-sprite-accessors (&rest accessor-names) (let ((defs - (loop for accessor-name in accessor-names - collect + (loop :for accessor-name :in accessor-names + :collect `(defmethod ,accessor-name ((sprite sprite)) (,accessor-name (current-frameset sprite))) - collect + :collect `(defmethod (setf ,accessor-name) (newval (sprite sprite)) - (loop for (key fs . more) on (sprite-framesets sprite) by #'cddr - do (setf (,accessor-name fs) newval)) + (loop :for (key fs . more) :on (sprite-framesets sprite) :by #'cddr + :do (setf (,accessor-name fs) newval)) newval)))) `(progn ,@defs)))) -- cgit v1.2.3