mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-05 18:20:33 -08:00
revisions
This commit is contained in:
parent
1444d1639b
commit
8e55e5b5ed
3 changed files with 7 additions and 4 deletions
|
|
@ -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*))
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue