summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2019-06-20 07:51:27 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2019-06-20 07:51:27 -0400
commit1b1fce7c0b21887a45dce29796300bd034c583a8 (patch)
treed3f8ad731b271ddadcaed5181808a449584efbec
parent35d80cc6bba66b05d0cd8fa945fdbb70d406ffdd (diff)
kernel: Add reboot-current-scene convenience method.
-rw-r--r--starling/kernel.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/starling/kernel.scm b/starling/kernel.scm
index 2325cdc..6e07edc 100644
--- a/starling/kernel.scm
+++ b/starling/kernel.scm
@@ -57,7 +57,8 @@
current-kernel
boot-kernel
elapsed-time
- fps)
+ fps
+ reboot-current-scene)
#:re-export (abort-game))
(define-class <window-config> ()
@@ -283,6 +284,11 @@
(deactivate kernel)
(close-window! (window kernel))))))
+(define (reboot-current-scene)
+ "Reboot the currently active scene being managed by the game engine
+kernel. A convenient procedure for developers."
+ (reboot (current-scene (current-kernel))))
+
(define-meta-command ((debug-game starling) repl)
"debug-game
Enter a debugger for the current game loop error."