summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-07-28 19:38:12 -0400
committerDavid Thompson <dthompson2@worcester.edu>2013-07-28 19:38:12 -0400
commit60f10e08308a6a8df543268db59f580ddc27c743 (patch)
tree3202ed51a2be4d832727fab1e51fab3cda4bd538 /examples
parentdb8d684650365a2e39e6607edcdb167fdf9f81b7 (diff)
Update examples.
Diffstat (limited to 'examples')
-rw-r--r--examples/animation.scm4
-rw-r--r--examples/coroutine.scm4
-rw-r--r--examples/particles.scm6
-rw-r--r--examples/simple.scm6
-rw-r--r--examples/tilemap.scm4
5 files changed, 12 insertions, 12 deletions
diff --git a/examples/animation.scm b/examples/animation.scm
index 72e0b80..1e478a3 100644
--- a/examples/animation.scm
+++ b/examples/animation.scm
@@ -22,8 +22,8 @@
(draw-sprite sprite))
;; Register callbacks.
-(set-render-callback (lambda () (render)))
-(set-key-down-callback (lambda (key mod unicode) (key-down key mod unicode)))
+(add-hook! on-render-hook (lambda () (render)))
+(add-hook! on-key-down-hook (lambda (key mod unicode) (key-down key mod unicode)))
;; Open the window.
(open-window window-width window-height)
diff --git a/examples/coroutine.scm b/examples/coroutine.scm
index 2791944..2bf7ecb 100644
--- a/examples/coroutine.scm
+++ b/examples/coroutine.scm
@@ -21,8 +21,8 @@
(draw-sprite sprite))
;; Register callbacks.
-(set-render-callback (lambda () (render)))
-(set-key-down-callback (lambda (key mod unicode) (key-down key mod unicode)))
+(add-hook! on-render-hook (lambda () (render)))
+(add-hook! on-key-down-hook (lambda (key mod unicode) (key-down key mod unicode)))
;; Open the window.
(open-window window-width window-height)
diff --git a/examples/particles.scm b/examples/particles.scm
index 53f9d54..a71bc13 100644
--- a/examples/particles.scm
+++ b/examples/particles.scm
@@ -60,9 +60,9 @@
(draw-sprite sprite)))
particles)))
-(set-render-callback (lambda () (render)))
-(set-update-callback (lambda () (update)))
-(set-key-down-callback (lambda (key mod unicode) (key-down key mod unicode)))
+(add-hook! on-render-hook (lambda () (render)))
+(add-hook! on-update-hook (lambda () (update)))
+(add-hook! on-key-down-hook (lambda (key mod unicode) (key-down key mod unicode)))
(define (key-down key mod unicode)
(cond ((any-equal? key 'escape 'q)
diff --git a/examples/simple.scm b/examples/simple.scm
index 09f9870..c55de6f 100644
--- a/examples/simple.scm
+++ b/examples/simple.scm
@@ -22,9 +22,9 @@
(draw-sprite sprite))
;; Register callbacks.
-(set-quit-callback (lambda () (quit)))
-(set-render-callback (lambda () (render)))
-(set-key-down-callback (lambda (key mod unicode) (key-down key mod unicode)))
+(add-hook! on-quit-hook (lambda () (quit-demo)))
+(add-hook! on-render-hook (lambda () (render)))
+(add-hook! on-key-down-hook (lambda (key mod unicode) (key-down key mod unicode)))
;; Open the window.
(open-window window-width window-height)
diff --git a/examples/tilemap.scm b/examples/tilemap.scm
index 72a1326..1f19eb3 100644
--- a/examples/tilemap.scm
+++ b/examples/tilemap.scm
@@ -85,8 +85,8 @@
(define window-width 800)
(define window-height 600)
-(set-key-down-callback (lambda (key mod unicode) (key-down key mod unicode)))
-(set-render-callback (lambda () (render)))
+(add-hook! on-key-down-hook (lambda (key mod unicode) (key-down key mod unicode)))
+(add-hook! on-render-hook (lambda () (render)))
(open-window window-width window-height)
;; Load tileset and build map layer