fixed sprite-batch size for bigger levels
This commit is contained in:
parent
ca177bd570
commit
67ad81d9f7
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@
|
||||||
(set! tile-texture (load-image "assets/images/simples_pimples.png"
|
(set! tile-texture (load-image "assets/images/simples_pimples.png"
|
||||||
#:transparent-color black))
|
#:transparent-color black))
|
||||||
(set! tile-atlas (split-texture tile-texture 16 16))
|
(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))
|
(y (* 16 row))
|
||||||
(tile (level-tile-at level x y))
|
(tile (level-tile-at level x y))
|
||||||
(texture-region (texture-atlas-ref tile-atlas (level-tile-index tile))))
|
(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)
|
(sprite-batch-add! sprite-batch (vec2 x y)
|
||||||
#:texture-region texture-region)))
|
#:texture-region texture-region)))
|
||||||
(iota (level-width level) 0)))
|
(iota (level-width level) 0)))
|
||||||
|
|
Loading…
Reference in a new issue