• R/O
  • SSH

rulp: Commit

The main repository for rulp in Mercurial


Commit MetaInfo

Revisionc3ae3418f43ed3091329d20c3ea875bc9fbfbf76 (tree)
Time2021-04-24 17:28:37
AuthorGiulio De Stasio <giuliods@user...>
CommiterGiulio De Stasio

Log Message

mouse movement of actors

Change Summary

Incremental Difference

diff -r 54ad4ac56910 -r c3ae3418f43e actors.lisp
--- a/actors.lisp Sat Apr 24 09:51:48 2021 +0200
+++ b/actors.lisp Sat Apr 24 10:28:37 2021 +0200
@@ -33,9 +33,9 @@
3333 :initform "test.bmp"
3434 :type string)
3535 (coordinate :accessor entity-coordinate
36- :initarg :coordinate
37- :initform (make-array '(2) :initial-contents '(0 0))
38- :type simple-vector)))
36+ :initarg :coordinate
37+ :initform (make-array '(2) :initial-contents '(0 0))
38+ :type simple-vector)))
3939
4040
4141 (defmethod e-x ((object entity))
diff -r 54ad4ac56910 -r c3ae3418f43e sdl.lisp
--- a/sdl.lisp Sat Apr 24 09:51:48 2021 +0200
+++ b/sdl.lisp Sat Apr 24 10:28:37 2021 +0200
@@ -47,7 +47,9 @@
4747 (point-to-find-y (floor (/ s-y grid)))
4848 (point-to-find-coo (make-array '(2) :initial-contents (list point-to-find-x point-to-find-y))))
4949 (setf pointer (position-if #'(lambda (x) (compare x point-to-find-coo)) coordinate-list))
50- (if (not pointer) (setf pointer actual-pointer)))
50+ (when (not pointer)
51+ (setf (entity-coordinate (layer-actor (nth actual-pointer actor-layer-list))) point-to-find-coo)
52+ (setf pointer actual-pointer)))
5153 (setf *renderize* t))
5254 (:idle ()
5355 (when *renderize*
Show on old repository browser