summaryrefslogtreecommitdiff
path: root/2d/helpers.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-05-04 14:03:00 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-05-04 14:39:38 -0400
commitd0ff41fb7a33c096a792ab57f5bbf7992b1cc399 (patch)
tree4b9bd31e0fd6ae71245892a353af83628372e63e /2d/helpers.scm
parentc2a7defe0d13b20e50dbaf8aa48ffef5f65de65b (diff)
Add current-agenda parameter.
* 2d/agenda.scm (current-agenda): New variable. (with-agenda): New macro. (agenda-time, tick-agenda!, clear-agenda!, schedule) (schedule-interval, schedule-each, wait): Remove agenda parameter. * 2d/game.scm (game-agenda): Delete it. (update): Tick current agenda. * 2d/helpers.scm (define-guardian): Remove agenda argument. * 2d/repl.scm (start-2d-repl): Remove agenda argument to schedule-each. * 2d/signal.scm (signal-sample, signal-delay, signal-throttle): Remove agenda parameter. * 2d/sprite.scm: * examples/common.scm: * examples/coroutine.scm: * examples/font.scm: * examples/particles.scm: Remove mention of game-agenda. * README.org: Update example snippets.
Diffstat (limited to '2d/helpers.scm')
-rw-r--r--2d/helpers.scm13
1 files changed, 6 insertions, 7 deletions
diff --git a/2d/helpers.scm b/2d/helpers.scm
index 18bf8fa..59633d6 100644
--- a/2d/helpers.scm
+++ b/2d/helpers.scm
@@ -45,10 +45,9 @@ within the guardian is GC'd. Reaping is ensured to happen from the
same thread that is running the game loop."
(begin
(define name (make-guardian))
- (schedule-interval game-agenda
- (lambda ()
- (let reap ((obj (name)))
- (when obj
- (reaper obj)
- (reap (name)))))
- 1)))
+ (schedule-each
+ (lambda ()
+ (let reap ((obj (name)))
+ (when obj
+ (reaper obj)
+ (reap (name))))))))