Add level progression.
This commit is contained in:
parent
99d7643c47
commit
ce0c002e8b
8 changed files with 211 additions and 41 deletions
|
@ -550,7 +550,8 @@ the default ORIENTATION value of 'orthogonal' is supported."
|
|||
(define obj:player-spawn 3)
|
||||
(define obj:exit 4)
|
||||
(define obj:block:copper 5)
|
||||
(define obj:clock-emitter 6)
|
||||
(define obj:block:crate 6)
|
||||
(define obj:clock-emitter 7)
|
||||
|
||||
(define (compile-environment-layer tile-map layer-name)
|
||||
(let ((tw (tile-map-tile-width tile-map))
|
||||
|
@ -582,13 +583,14 @@ the default ORIENTATION value of 'orthogonal' is supported."
|
|||
(append-map (lambda (obj)
|
||||
(let* ((type (map-object-type obj))
|
||||
(properties (map-object-properties obj))
|
||||
(r (map-object-shape obj))
|
||||
(r (pk 'obj type (map-object-shape obj)))
|
||||
(x (/ (rect-x r) tw))
|
||||
(y (/ (rect-y r) th)))
|
||||
(match type
|
||||
('player-spawn (list x y obj:player-spawn))
|
||||
('block
|
||||
(match (assq-ref properties 'kind)
|
||||
("crate" (list x y obj:block:crate))
|
||||
("copper" (list x y obj:block:copper))
|
||||
(kind (error "unsupported block kind" kind))))
|
||||
(_ (error "unsupported object type" type)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue