From d0ff41fb7a33c096a792ab57f5bbf7992b1cc399 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 4 May 2014 14:03:00 -0400 Subject: 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. --- examples/common.scm | 8 ++++---- examples/coroutine.scm | 4 ++-- examples/font.scm | 2 +- examples/particles.scm | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/common.scm b/examples/common.scm index 0acb6c2..62ddd14 100644 --- a/examples/common.scm +++ b/examples/common.scm @@ -33,9 +33,9 @@ (add-hook! window-close-hook stop-game-loop) -(schedule-interval game-agenda - (lambda () - (format #t "FPS: ~d\n" (signal-ref fps))) - 60) +(schedule-interval + (lambda () + (format #t "FPS: ~d\n" (signal-ref fps))) + 60) (start-2d-repl) diff --git a/examples/coroutine.scm b/examples/coroutine.scm index 98dec16..7b4a1e6 100644 --- a/examples/coroutine.scm +++ b/examples/coroutine.scm @@ -38,9 +38,9 @@ sprite (vector2 (random window-width) (random window-height))) - (wait game-agenda 15) + (wait 15) (set-sprite-rotation! sprite (random 360)) - (wait game-agenda 15))) + (wait 15))) (add-hook! draw-hook (lambda (dt alpha) (draw-sprite sprite))) diff --git a/examples/font.scm b/examples/font.scm index 304070f..8bcd90d 100644 --- a/examples/font.scm +++ b/examples/font.scm @@ -44,7 +44,7 @@ (signal-map (lambda (p) (let ((text (format #f "Mouse: (~d, ~d)" (vx p) (vy p)))) (make-label font text (vector2 0 20)))) - (signal-throttle game-agenda 5 mouse-position))) + (signal-throttle 5 mouse-position))) (add-hook! draw-hook (lambda (dt alpha) (draw-label label) diff --git a/examples/particles.scm b/examples/particles.scm index d811eb7..4269b99 100644 --- a/examples/particles.scm +++ b/examples/particles.scm @@ -76,7 +76,7 @@ (define (update) (for-each update-particle! particles)) -(schedule-each game-agenda update) +(schedule-each update) (add-hook! draw-hook draw) (with-window (make-window #:title "Particles" -- cgit v1.2.3