summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2014-04-24 21:57:50 -0400
committerDavid Thompson <dthompson@member.fsf.org>2014-04-24 21:57:50 -0400
commitc9bb5b91b82900294413786f75b6ef021a59bb5a (patch)
tree45b612a76ec1d90db4a26b496b2ba2c8ae972ac8 /examples
parent42b7951d5a5104b16b1dd547fc98130b6232ca04 (diff)
Rename game loop procedures and remove parameter.
* 2d/game.scm (tick-interval): No longer a parameter. (run-game-loop, start-game-loop): Rename. (quit-game, stop-game-loop): Rename. * examples/animation.scm: Use start-game-loop and stop-game-loop. * examples/common.scm: Use start-game-loop and stop-game-loop. * examples/coroutine.scm: Use start-game-loop and stop-game-loop. * examples/font.scm: Use start-game-loop and stop-game-loop. * examples/guile-2048/guile-2048.scm: Use start-game-loop and stop-game-loop. * examples/particles.scm: Use start-game-loop and stop-game-loop. * examples/simple.scm: Use start-game-loop and stop-game-loop. * examples/tilemap.scm: Use start-game-loop and stop-game-loop.
Diffstat (limited to 'examples')
-rw-r--r--examples/animation.scm2
-rw-r--r--examples/common.scm4
-rw-r--r--examples/coroutine.scm2
-rw-r--r--examples/font.scm2
-rwxr-xr-xexamples/guile-2048/guile-2048.scm4
-rw-r--r--examples/particles.scm2
-rw-r--r--examples/simple.scm2
-rw-r--r--examples/tilemap.scm2
8 files changed, 10 insertions, 10 deletions
diff --git a/examples/animation.scm b/examples/animation.scm
index d72637c..8be77ef 100644
--- a/examples/animation.scm
+++ b/examples/animation.scm
@@ -44,4 +44,4 @@ sprite out of it."
(add-hook! draw-hook (lambda (dt alpha) (draw-sprite sprite)))
(with-window (make-window #:title "Animation")
- (run-game-loop))
+ (start-game-loop))
diff --git a/examples/common.scm b/examples/common.scm
index b26186a..0acb6c2 100644
--- a/examples/common.scm
+++ b/examples/common.scm
@@ -29,9 +29,9 @@
(add-hook! key-press-hook (lambda (key unicode)
(when (eq? key 'escape)
- (quit-game))))
+ (stop-game-loop))))
-(add-hook! window-close-hook quit-game)
+(add-hook! window-close-hook stop-game-loop)
(schedule-interval game-agenda
(lambda ()
diff --git a/examples/coroutine.scm b/examples/coroutine.scm
index cb2f929..98dec16 100644
--- a/examples/coroutine.scm
+++ b/examples/coroutine.scm
@@ -47,4 +47,4 @@
(with-window (make-window #:title "Coroutines"
#:resolution (vector2 window-width
window-height))
- (run-game-loop))
+ (start-game-loop))
diff --git a/examples/font.scm b/examples/font.scm
index a48bc37..304070f 100644
--- a/examples/font.scm
+++ b/examples/font.scm
@@ -52,4 +52,4 @@
(draw-label (signal-ref mouse-label))))
(with-window (make-window #:title "Fonts")
- (run-game-loop))
+ (start-game-loop))
diff --git a/examples/guile-2048/guile-2048.scm b/examples/guile-2048/guile-2048.scm
index d5ded0a..637650b 100755
--- a/examples/guile-2048/guile-2048.scm
+++ b/examples/guile-2048/guile-2048.scm
@@ -475,8 +475,8 @@
(start-2d-repl)
-(add-hook! window-close-hook quit-game)
+(add-hook! window-close-hook stop-game-loop)
(add-hook! draw-hook (lambda (dt alpha) (render)))
(with-window (make-window #:title "2048")
- (run-game-loop))
+ (start-game-loop))
diff --git a/examples/particles.scm b/examples/particles.scm
index 648bab7..d811eb7 100644
--- a/examples/particles.scm
+++ b/examples/particles.scm
@@ -82,4 +82,4 @@
(with-window (make-window #:title "Particles"
#:resolution (vector2 window-width
window-height))
- (run-game-loop))
+ (start-game-loop))
diff --git a/examples/simple.scm b/examples/simple.scm
index 2cc85f9..a2c1fa4 100644
--- a/examples/simple.scm
+++ b/examples/simple.scm
@@ -28,4 +28,4 @@
(add-hook! draw-hook (lambda (dt alpha) (draw-sprite sprite)))
(with-window (make-window #:title "Simple Sprite Demo")
- (run-game-loop))
+ (start-game-loop))
diff --git a/examples/tilemap.scm b/examples/tilemap.scm
index 9125abf..284c760 100644
--- a/examples/tilemap.scm
+++ b/examples/tilemap.scm
@@ -104,4 +104,4 @@
(add-hook! draw-hook (lambda (dt alpha) (draw-map-layer layer)))
(with-window (make-window #:title "Tilemap")
- (run-game-loop))
+ (start-game-loop))