summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-07-06 18:58:10 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-07-06 18:58:10 -0400
commit107ac54f43dc24f1067e17a57a6599b089d17d04 (patch)
tree72d34b999faf017ef376fe4c6009df5ed4e3b0da /examples
parentfcb5ed27346ceef1e94acbdb53e1b78e0b42f2de (diff)
Change sprite-batch-draw parameter list to use optional keyword arguments.
Diffstat (limited to 'examples')
-rw-r--r--examples/tilemap.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/tilemap.scm b/examples/tilemap.scm
index 259bfed..070793e 100644
--- a/examples/tilemap.scm
+++ b/examples/tilemap.scm
@@ -69,13 +69,13 @@
(define map #f)
(define (tiles->texture-regions width height tileset tiles)
- (list->array
- 2
- (list-ec
- (: y height)
- (list-ec
- (: x width)
- (vector-ref tileset (array-ref tiles y x))))))
+ (define (texture-region-at x y)
+ (vector-ref tileset (array-ref tiles y x)))
+
+ (let ((regions (list-ec (: y height)
+ (list-ec (: x width)
+ (texture-region-at x y)))))
+ (list->array 2 regions)))
(define (key-down key mod unicode)
(cond ((any-equal? key (keycode escape) (keycode q))