diff options
author | David Thompson <dthompson@member.fsf.org> | 2013-07-06 18:58:10 -0400 |
---|---|---|
committer | David Thompson <dthompson@member.fsf.org> | 2013-07-06 18:58:10 -0400 |
commit | 107ac54f43dc24f1067e17a57a6599b089d17d04 (patch) | |
tree | 72d34b999faf017ef376fe4c6009df5ed4e3b0da /examples | |
parent | fcb5ed27346ceef1e94acbdb53e1b78e0b42f2de (diff) |
Change sprite-batch-draw parameter list to use optional keyword arguments.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/tilemap.scm | 14 |
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)) |