aboutsummaryrefslogtreecommitdiff
path: root/demo/sandbox.scm
diff options
context:
space:
mode:
Diffstat (limited to 'demo/sandbox.scm')
-rw-r--r--demo/sandbox.scm27
1 files changed, 14 insertions, 13 deletions
diff --git a/demo/sandbox.scm b/demo/sandbox.scm
index e23584f..ef71053 100644
--- a/demo/sandbox.scm
+++ b/demo/sandbox.scm
@@ -2,6 +2,7 @@
(chicken base)
(chicken random)
(only srfi-1 iota take)
+ (only (list-utils alist) plist->alist)
(prefix sdl2 "sdl2:")
(prefix sdl2-ttf "ttf:")
(prefix sdl2-image "img:")
@@ -49,12 +50,12 @@
;; ── Entity factories ─────────────────────────────────────────────────────────
(define (make-box x y tw th)
- (list #:type 'box
- #:x x #:y y #:width tw #:height th
- #:vx 0 #:vy 0
- #:gravity? #t #:on-ground? #f
- #:solid? #t #:immovable? #f
- #:tile-id 29))
+ (plist->alist (list #:type 'box
+ #:x x #:y y #:width tw #:height th
+ #:vx 0 #:vy 0
+ #:gravity? #t #:on-ground? #f
+ #:solid? #t #:immovable? #f
+ #:tile-id 29)))
(define (spawn-boxes tw th)
(map (lambda (i)
@@ -64,13 +65,13 @@
(iota 8)))
(define (make-demo-bot x y tw th id)
- (list #:type 'demo-bot
- #:x x #:y y #:width tw #:height th
- #:vx 0 #:vy 0
- #:gravity? #t #:on-ground? #f
- #:solid? #t #:immovable? #f
- #:tile-id 1
- #:demo-id id #:demo-since-jump 0))
+ (plist->alist (list #:type 'demo-bot
+ #:x x #:y y #:width tw #:height th
+ #:vx 0 #:vy 0
+ #:gravity? #t #:on-ground? #f
+ #:solid? #t #:immovable? #f
+ #:tile-id 1
+ #:demo-id id #:demo-since-jump 0)))
;; ── Per-entity intent ───────────────────────────────────────────────────────