From 076a01c36d01c71ffcce1737855b2928bc6165bc Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 5 Apr 2015 19:46:26 -0400 Subject: 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. --- examples/mines/mines.scm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'examples/mines') 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 -- cgit v1.2.3