From e3e587806f7268fca5e074322670a2ddb1c1c653 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 3 Nov 2013 17:36:40 -0500 Subject: Add scene name field. --- 2d/scene.scm | 9 ++++++--- 1 file 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 - (%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 -- cgit v1.2.3