diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-12-13 13:33:33 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-12-13 13:37:32 -0500 |
commit | 171ee79bc610e400123775f7993cc1501b826d6a (patch) | |
tree | 8be079b1ae939acd09b638fc8e8c9e47a3f4d683 | |
parent | cd56361421ff460768fbe4e9eaf1080a5507c5c3 (diff) |
agenda: Rename procedures.
* sly/agenda.scm (tick-agenda!, clear-agenda!): Rename.
(agenda-tick!, agenda-clear!): New procedures.
* sly/game.scm (start-game-loop): Use agenda-tick!.
* sly/repl.scm (start-sly-repl): Likewise.
-rw-r--r-- | sly/agenda.scm | 16 | ||||
-rw-r--r-- | sly/game.scm | 2 | ||||
-rw-r--r-- | sly/repl.scm | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sly/agenda.scm b/sly/agenda.scm index e0f6114..a4073a6 100644 --- a/sly/agenda.scm +++ b/sly/agenda.scm @@ -32,8 +32,8 @@ agenda-time current-agenda with-agenda - tick-agenda! - clear-agenda! + agenda-tick! + agenda-clear! schedule schedule-interval schedule-each @@ -119,7 +119,7 @@ and enqueue CALLBACK." ((deq! q)) ;; Execute scheduled procedure (flush-queue! q))) -(define (%tick-agenda! agenda) +(define (%agenda-tick! agenda) "Move AGENDA forward in time and run scheduled procedures." (set-agenda-time! agenda (1+ (%agenda-time agenda))) (let next-segment () @@ -132,7 +132,7 @@ and enqueue CALLBACK." (set-agenda-segments! agenda (rest-segments agenda)) (next-segment)))))) -(define (%clear-agenda! agenda) +(define (%agenda-clear! agenda) "Remove all scheduled procedures from AGENDA." (set-agenda-segments! agenda '())) @@ -174,14 +174,14 @@ and enqueue CALLBACK." "Return the time of the current agenda." (%agenda-time (current-agenda))) -(define (tick-agenda!) +(define (agenda-tick!) "Increment time for the current agenda and run scheduled procedures." - (%tick-agenda! (current-agenda))) + (%agenda-tick! (current-agenda))) -(define (clear-agenda!) +(define (agenda-clear!) "Remove all scheduled procedures from the current agenda." - (%clear-agenda! (current-agenda))) + (%agenda-clear! (current-agenda))) (define* (schedule thunk #:optional (delay 1)) "Schedule THUNK to be applied after DELAY ticks of the current diff --git a/sly/game.scm b/sly/game.scm index 1191f20..a0dbcdc 100644 --- a/sly/game.scm +++ b/sly/game.scm @@ -89,7 +89,7 @@ unused accumulator time." (cond ((>= ticks max-ticks-per-frame) lag) ((>= lag tick-interval) - (tick-agenda!) + (agenda-tick!) (iter (- lag tick-interval) (1+ ticks))) (else lag))) diff --git a/sly/repl.scm b/sly/repl.scm index 0e22ade..c1ab982 100644 --- a/sly/repl.scm +++ b/sly/repl.scm @@ -47,7 +47,7 @@ poll the REPL server upon every tick of the game loop." (with-agenda error-agenda (while #t (poll-coop-repl-server server) - (tick-agenda!) + (agenda-tick!) (usleep 10)))) (lambda (cont) ;; Discard the continuation |