fixed sprite-batch size for bigger levels

This commit is contained in:
Peter Tillemans 2024-05-21 13:55:12 +02:00
parent ca177bd570
commit 67ad81d9f7

View file

@ -22,7 +22,7 @@
(set! tile-texture (load-image "assets/images/simples_pimples.png"
#:transparent-color black))
(set! tile-atlas (split-texture tile-texture 16 16))
(set! sprite-batch (make-sprite-batch tile-texture #:capacity 1000))
(set! sprite-batch (make-sprite-batch tile-texture #:capacity 1200))
)
@ -51,7 +51,7 @@
(y (* 16 row))
(tile (level-tile-at level x y))
(texture-region (texture-atlas-ref tile-atlas (level-tile-index tile))))
(format #f "tile ~a at ~a ~a~%" (level-tile-index tile) x y)
(display (format #f "tile ~a at ~a ~a~%" (level-tile-index tile) row column))
(sprite-batch-add! sprite-batch (vec2 x y)
#:texture-region texture-region)))
(iota (level-width level) 0)))