summaryrefslogtreecommitdiff
path: root/examples/sprite-batch.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sprite-batch.scm')
-rw-r--r--examples/sprite-batch.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/sprite-batch.scm b/examples/sprite-batch.scm
index d4cccb5..30d8167 100644
--- a/examples/sprite-batch.scm
+++ b/examples/sprite-batch.scm
@@ -3,19 +3,19 @@
(chickadee math rect)
(chickadee math vector)
(chickadee graphics)
+ (chickadee graphics color)
(chickadee graphics font)
(chickadee graphics sprite)
(chickadee graphics texture)
(chickadee scripting)
(ice-9 format)
(ice-9 match)
- ((sdl2) #:select (sdl-ticks))
(srfi srfi-1)
(statprof))
(define texture #f)
(define batch #f)
-(define start-time (sdl-ticks))
+(define start-time 0.0)
(define avg-frame-time 16)
(define num-sprites 5000)
(define sprites
@@ -54,8 +54,8 @@
(sprite-batch-add* batch r matrix)))
sprites)
(draw-sprite-batch batch)
- (draw-text stats-text stats-text-pos)
- (let ((current-time (sdl-ticks)))
+ (draw-text stats-text stats-text-pos #:color black)
+ (let ((current-time (elapsed-time)))
(set! avg-frame-time
(+ (* (- current-time start-time) 0.1)
(* avg-frame-time 0.9)))