diff options
Diffstat (limited to 'chickadee')
-rw-r--r-- | chickadee/cli/play.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chickadee/cli/play.scm b/chickadee/cli/play.scm index db2c0d6..f7c03b5 100644 --- a/chickadee/cli/play.scm +++ b/chickadee/cli/play.scm @@ -21,6 +21,8 @@ #:use-module (chickadee async-repl) #:use-module (chickadee cli) #:use-module (chickadee config) + #:use-module (chickadee graphics color) + #:use-module (chickadee graphics viewport) #:use-module (ice-9 exceptions) #:use-module (ice-9 format) #:use-module (ice-9 match) @@ -53,6 +55,8 @@ Play the game defined in FILE.~%") (display " -u, --update-hz=N set update rate to N times per second") (display " + -c, --clear-color=RGB set the clear color to hex color code RGB") + (display " --repl start REPL in this terminal") (display " --repl-server=[PORT] start REPL server on PORT or 37146 by default") @@ -85,6 +89,9 @@ Play the game defined in FILE.~%") (option '(#\u "update-hz") #t #f (lambda (opt name arg result) (alist-cons 'update-hz (string->number arg) result))) + (option '(#\c "clear-color") #t #f + (lambda (opt name arg result) + (alist-cons 'clear-color (string->color arg) result))) (option '("repl") #f #f (lambda (opt name arg result) (alist-cons 'repl #t result))) @@ -103,12 +110,13 @@ Play the game defined in FILE.~%") (alist-cons 'extension arg result))))) (define %default-options - '((title . "chickadee") + `((title . "chickadee") (width . 640) (height . 480) (fullscreen? . #f) (resizable? . #f) (update-hz . 60) + (clear-color . ,%default-clear-color) (repl . #f) (language . scheme))) @@ -244,6 +252,7 @@ Resume the game loop without entering a debugger." #:window-fullscreen? (assq-ref opts 'fullscreen?) #:window-resizable? (assq-ref opts 'resizable?) #:update-hz (assq-ref opts 'update-hz) + #:clear-color (assq-ref opts 'clear-color) #:load load-game #:update (let ((update* (trampoline update dt))) (lambda (dt) |