summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-02-15 20:27:09 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-02-15 20:27:09 -0500
commit74dd2eb94d8aebe74da9c21bd0175140a6afedb0 (patch)
tree4a1cc4be272b80739e85d7085988d7ff7e6a182c
parent012f2b0acd0157f8e87397bce7a71d0dd5e00234 (diff)
Print FPS to stdout in examples.
* examples/common.scm: Use (2d fps) module.
-rw-r--r--examples/common.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/common.scm b/examples/common.scm
index 0c380f2..760ce2f 100644
--- a/examples/common.scm
+++ b/examples/common.scm
@@ -1,5 +1,7 @@
-(use-modules (2d keyboard)
+(use-modules (2d agenda)
+ (2d fps)
(2d game)
+ (2d keyboard)
(2d window)
(2d repl server))
@@ -10,3 +12,9 @@
(quit-game))))
(add-hook! window-close-hook quit-game)
+
+(schedule-interval game-agenda
+ (lambda ()
+ (display (fps))
+ (newline))
+ 60)