summaryrefslogtreecommitdiff
path: root/examples/particles.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-11-18 17:23:29 -0500
committerDavid Thompson <dthompson2@worcester.edu>2020-11-18 17:23:29 -0500
commit683c6ea4b7572f82dda5b9371afc94108eef31de (patch)
treef3cbd90c61b5df801b2a33d069551983c8bc784a /examples/particles.scm
parentdafddcdb4c867f40b625c149345e4d3c3841f645 (diff)
examples: Replace calls to sdl-ticks with elapsed-time.
Diffstat (limited to 'examples/particles.scm')
-rw-r--r--examples/particles.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/particles.scm b/examples/particles.scm
index 5b42025..97cdb1d 100644
--- a/examples/particles.scm
+++ b/examples/particles.scm
@@ -8,8 +8,7 @@
(chickadee graphics sprite)
(chickadee graphics texture)
(chickadee scripting)
- (ice-9 format)
- ((sdl2) #:select (sdl-ticks)))
+ (ice-9 format))
(define window-width 800)
(define window-height 600)
@@ -17,7 +16,7 @@
(define emitter #f)
(define particle-texture #f)
(define sprite-texture #f)
-(define start-time (sdl-ticks))
+(define start-time 0.0)
(define avg-frame-time 0)
(define stats-text "")
@@ -58,7 +57,7 @@
(draw-particles particles)
(draw-sprite sprite-texture sprite-position)
(draw-text stats-text stats-text-pos)
- (let ((current-time (sdl-ticks)))
+ (let ((current-time (elapsed-time)))
(set! avg-frame-time
(+ (* (- current-time start-time) 0.1)
(* avg-frame-time 0.9)))