summaryrefslogtreecommitdiff
path: root/examples/mines
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-04-05 19:46:26 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-04-05 19:49:36 -0400
commit076a01c36d01c71ffcce1737855b2928bc6165bc (patch)
treeb41de0b8edf27ee050a393ca47e5aa1a1130b263 /examples/mines
parent9ddc407ced2d57b716002711492133e048d4fa53 (diff)
render: model: Prefix procedures with 'model-'.
* sly/render/model.scm (paint, blend, group, group*, move, place): Renamed. (model-paint, model-blend, model-group, list->model, model-move, model-place): New procedures. * README.org (Example): s/move/model-move/ * examples/2048/2048.scm: Update example. * examples/mines/mines.scm: Likewise. * examples/animation.scm: Likewise. * examples/font.scm: Likewise. * examples/joystick.scm: Likewise. * examples/simple.scm: Likewise. * examples/tilemap.scm: Likewise.
Diffstat (limited to 'examples/mines')
-rw-r--r--examples/mines/mines.scm24
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/mines/mines.scm b/examples/mines/mines.scm
index e10fba5..126db24 100644
--- a/examples/mines/mines.scm
+++ b/examples/mines/mines.scm
@@ -350,24 +350,25 @@
(lambda (tile)
;; A tile may or may not have an overlay, so we do a little
;; quasiquoting magic to build the right list.
- (group*
+ (list->model
`(,(tile-base-sprite tile)
,@(let ((overlay (tile-overlay-sprite tile)))
(if overlay
- (list (place offset (group overlay)))
+ (list (model-place offset overlay))
'())))))))
(define-signal board-view
(signal-map (lambda (board)
(define (draw-column tile x)
- (move (vector2 (* x tile-size) 0)
- (draw-tile tile)))
+ (model-move (vector2 (* x tile-size) 0)
+ (draw-tile tile)))
(define (draw-row row y)
- (move (vector2 0 (* y tile-size))
- (group* (enumerate-map draw-column row))))
+ (chain (enumerate-map draw-column row)
+ (list->model)
+ (model-move (vector2 0 (* y tile-size)))))
- (group* (enumerate-map draw-row board)))
+ (list->model (enumerate-map draw-row board)))
board))
(define-signal status-message
@@ -375,9 +376,9 @@
(define (make-message message)
(label font message #:anchor 'center))
- (move
+ (model-move
(vector2 (/ (vx resolution) 2) (- (vy resolution) 64))
- (group*
+ (list->model
(cond
((board-lose? board)
(list (make-message "GAME OVER - Press N to play again")))
@@ -388,9 +389,8 @@
(define-signal scene
(signal-map (lambda (board-view status center-position)
- (group
- status
- (move center-position board-view)))
+ (model-group status
+ (model-move center-position board-view)))
board-view status-message center-position))
(define camera