From 2cbb8e4114c860e1774efd40d18661aee8ab2a72 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 6 Aug 2023 09:06:43 -0700 Subject: Fix frameset initialization --- src/interactive/canvas.lisp | 2 +- src/interactive/frameset.lisp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/interactive') diff --git a/src/interactive/canvas.lisp b/src/interactive/canvas.lisp index 9a3515f..af54634 100644 --- a/src/interactive/canvas.lisp +++ b/src/interactive/canvas.lisp @@ -198,7 +198,7 @@ e.g., drawing a line in a particular color." (gl:bind-framebuffer :framebuffer 0))) (defun blit (canvas) - "Blits a canvas to the its texture" + "Blits a canvas to its texture" (with-slots (fbo texture data pixel-width pixel-height) canvas (gl:bind-framebuffer :framebuffer fbo) (gl:bind-texture :texture-2d (texture-id texture)) diff --git a/src/interactive/frameset.lisp b/src/interactive/frameset.lisp index 25812f0..c866d04 100644 --- a/src/interactive/frameset.lisp +++ b/src/interactive/frameset.lisp @@ -32,12 +32,17 @@ (defmethod initialize-instance :after ((fs frameset) &key) (add-handler fs #'check-advance-frameset-index) - (with-slots (index sequence count frames) fs + (with-slots (index sequence count frames x y scale-x scale-y rotation) fs (setf index 0 count (length sequence)) (loop for frame across frames when frame - do (setf (unit-in-scene-p frame) fs)))) + do (setf (unit-in-scene-p frame) fs + (x frame) x + (y frame) y + (scale-x frame) scale-x + (scale-y frame) scale-y + (rotation frame) rotation)))) (defun current-frame-unit (fs) "Returns the unit be currently displaayed as the animation's frame." -- cgit v1.2.3