diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-09-25 13:21:07 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-09-25 13:21:07 -0400 |
commit | 223b668fe1cb2eecbe9f7a18e2070c4ea0ab8d65 (patch) | |
tree | 60be4ff28f6a5c104e488a518285720390d8b16d | |
parent | d43fbadd2eebf8ad7886dd22c8ee94d3d1613c08 (diff) |
cli: play: Extract default modules to %default-modules variable.
-rw-r--r-- | chickadee/cli/play.scm | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/chickadee/cli/play.scm b/chickadee/cli/play.scm index 2b61e90..7bbdb35 100644 --- a/chickadee/cli/play.scm +++ b/chickadee/cli/play.scm @@ -30,7 +30,8 @@ #:use-module (system repl debug) #:use-module (system repl coop-server) #:use-module (system repl server) - #:export (chickadee-play)) + #:export (chickadee-play + %default-modules)) (define (display-help-and-exit) (format #t "Usage: chickadee play [OPTIONS] FILE~% @@ -98,24 +99,27 @@ Play the game defined in FILE.~%") (update-hz . 60) (repl . #f))) +(define %default-modules + '((chickadee) + (chickadee audio) + (chickadee graphics color) + (chickadee graphics engine) + (chickadee graphics font) + (chickadee graphics texture) + (chickadee math) + (chickadee math matrix) + (chickadee math rect) + (chickadee math vector) + (chickadee scripting))) + (define (make-user-module) (let ((module (resolve-module '(chickadee-user) #f))) (beautify-user-module! module) + ;; Automatically load commonly used modules for + ;; maximum convenience. (for-each (lambda (name) (module-use! module (resolve-interface name))) - ;; Automatically load commonly used modules for - ;; maximum convenience. - '((chickadee) - (chickadee audio) - (chickadee graphics color) - (chickadee graphics engine) - (chickadee graphics font) - (chickadee graphics texture) - (chickadee math) - (chickadee math matrix) - (chickadee math rect) - (chickadee math vector) - (chickadee scripting))) + %default-modules) (module-define! module 'quit-game (lambda () (abort-game))) module)) |