summaryrefslogtreecommitdiff
path: root/examples/grid.scm
diff options
context:
space:
mode:
authorAlex McGrath <alexmcgrath@fastmail.com>2019-05-28 21:43:49 +0100
committerDavid Thompson <dthompson2@worcester.edu>2019-05-28 18:03:40 -0400
commit12ac60e9caecb5e6ababdded9ba9f8e73c7cb742 (patch)
tree538ef0aea175d6f5eae46fa3033e12c45b61b01c /examples/grid.scm
parent834c25dbbf705a5541bd83d97bf29f711087ddc4 (diff)
Update a couple of examples to use new sprite batch API.
* examples/game-controller.scm: Use new sprite batch API. * examples/grid.scm: Ditto.
Diffstat (limited to 'examples/grid.scm')
-rw-r--r--examples/grid.scm13
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/grid.scm b/examples/grid.scm
index f20f64d..e9fe2cc 100644
--- a/examples/grid.scm
+++ b/examples/grid.scm
@@ -67,13 +67,12 @@
(set-rect-y! %cell-rect (* y size))
(draw-filled-rect %cell-rect cell-color))
grid)
- (with-batched-sprites
- (for-each-cell (lambda (cell x y)
- (set-vec2-x! %cell-count-pos (+ (* x size) (/ size 2)))
- (set-vec2-y! %cell-count-pos (+ (* y size) (/ size 2)))
- (draw-text (number->string* (cell-count cell))
- %cell-count-pos))
- grid)))
+ (for-each-cell (lambda (cell x y)
+ (set-vec2-x! %cell-count-pos (+ (* x size) (/ size 2)))
+ (set-vec2-y! %cell-count-pos (+ (* y size) (/ size 2)))
+ (draw-text (number->string* (cell-count cell))
+ %cell-count-pos))
+ grid))
(for-each-item (lambda (item rect)
(if (eq? item 'player)
(draw-filled-rect rect player-color)