summaryrefslogtreecommitdiff
path: root/2d
diff options
context:
space:
mode:
Diffstat (limited to '2d')
-rw-r--r--2d/game.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/2d/game.scm b/2d/game.scm
index 09c3c11..befe784 100644
--- a/2d/game.scm
+++ b/2d/game.scm
@@ -64,15 +64,15 @@
"Call the update callback. The update callback will be called as
many times as tick-interval can divide LAG. The return value
is the unused accumulator time."
- (define (iter ticks)
+ (define (iter lag ticks)
(cond ((>= ticks max-ticks-per-frame)
lag)
((>= lag tick-interval)
(tick-agenda! game-agenda)
- (update (- lag tick-interval)))
+ (iter (- lag tick-interval) (1+ ticks)))
(else
lag)))
- (iter 0))
+ (iter lag 0))
(define (alpha lag)
"Calculate interpolation factor in the range [0, 1] for the