summaryrefslogtreecommitdiff
path: root/2d/scene.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-11-03 17:36:40 -0500
committerDavid Thompson <dthompson2@worcester.edu>2013-11-03 17:36:40 -0500
commite3e587806f7268fca5e074322670a2ddb1c1c653 (patch)
tree6b8ea230f5230e5ca6bc5d9d58738b15c0f78223 /2d/scene.scm
parentbdbf1c6141ccf9345102770486e4a744785912c8 (diff)
Add scene name field.
Diffstat (limited to '2d/scene.scm')
-rw-r--r--2d/scene.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/2d/scene.scm b/2d/scene.scm
index e67cdce..1814ab7 100644
--- a/2d/scene.scm
+++ b/2d/scene.scm
@@ -25,6 +25,7 @@
#:use-module (srfi srfi-9)
#:export (make-scene
scene?
+ scene-name
scene-init
scene-enter
scene-exit
@@ -37,8 +38,9 @@
update-scene))
(define-record-type <scene>
- (%make-scene init enter exit draw update)
+ (%make-scene name init enter exit draw update)
scene?
+ (name scene-name)
(init scene-init)
(enter scene-enter)
(exit scene-exit)
@@ -47,14 +49,15 @@
(define no-op (lambda args #f))
-(define* (make-scene #:optional #:key
+(define* (make-scene name
+ #:optional #:key
(init no-op)
(enter no-op)
(exit no-op)
(draw no-op)
(update no-op))
"Create a new scene object. All callbacks default to a no-op."
- (%make-scene init enter exit draw update))
+ (%make-scene name init enter exit draw update))
(define (init-scene scene)
"Return the value returned by the state constructor thunk for