revisions

This commit is contained in:
pls.153 2022-04-16 07:09:07 +02:00
parent 1444d1639b
commit 8e55e5b5ed
3 changed files with 7 additions and 4 deletions

View file

@ -5,6 +5,8 @@
(defvar *x*) ; ball x
(defvar *y*) ; ball y
(defvar *max-x* (* (1- *width*) +w+))
(defun move (x-rotation y-rotation) ; called from QML
(labels ((add (x)
(truncate (signum x)))
@ -19,6 +21,7 @@
(dy (min (* 0.2 x-rotation) (1- +w+)))
(add-x (add dx))
(add-y (add dy)))
(setf *x* (min *x* *max-x*)) ; don't lose ball (initial x)
(if (aref *maze*
(+ add-x (to-pos *x*))
(to-pos *y*))

View file

@ -51,7 +51,7 @@
(set-visible x y (aref *maze* x y)))))
(defun new-maze ()
(setf *maze* (make-array (list (1+ *width*) (1+ *height*))
(setf *maze* (make-array (list *width* *height*)
:initial-element t))
(display-maze)
(qlater 'generate-maze))

View file

@ -4,9 +4,9 @@ development, the simple `-auto` option of `lqml run.lisp` may be more
appropriate, because it allows for re-initialization (calling Lisp code) after
reloading QML.*
*The above method also works on mobile, please see example `swank-server`. It
doesn't depend on Swank, and should therefore also be stable (it uses a local
trivial web server).*
*The above method also works on mobile, please see example
`advanced-qml-auto-realod`. It doesn't depend on Swank, and should therefore
also be stable (it uses a local trivial web server).*
*You may even run both desktop and (one or more) mobile device auto reloads
simultaneously (`swank-server` example only), because they all watch/load the