diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-07-27 09:38:14 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-07-27 17:15:49 +0200 |
commit | e74fbf491f730d6b15ea6985e75faaf0aae5701c (patch) | |
tree | 1b2da9fdda0aa4cd669cfc71c0295daff2669645 | |
parent | b523a5ee8fe4368381eea28483c725f4a178497d (diff) |
Play little tune during intro.
-rw-r--r-- | assets/music/intro.ogg | bin | 0 -> 98534 bytes | |||
-rw-r--r-- | scenes/intro.scm | 8 | ||||
-rw-r--r-- | scripts/inevitable.in | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/assets/music/intro.ogg b/assets/music/intro.ogg Binary files differnew file mode 100644 index 0000000..1725679 --- /dev/null +++ b/assets/music/intro.ogg diff --git a/scenes/intro.scm b/scenes/intro.scm index 0592eed..cc6c5a0 100644 --- a/scenes/intro.scm +++ b/scenes/intro.scm @@ -16,6 +16,7 @@ ;;; <http://www.gnu.org/licenses/>. (define-module (scenes intro) + #:use-module (chickadee audio) #:use-module (chickadee math rect) #:use-module (chickadee math vector) #:use-module (chickadee render font) @@ -27,7 +28,7 @@ #:use-module (config) #:use-module (scenes game) #:use-module (oop goops) - #:export (<intro>)) + #:export (intro)) (define-class <intro> (<scene>)) @@ -88,3 +89,8 @@ to dry.")) (when (eq? key 'return) (switch-scene (root-node) (game)))) + +(define (intro) + (set-music-volume! 1.0) + (play-music (load-music "assets/music/intro.ogg") #:loop? #f) + (make <intro>)) diff --git a/scripts/inevitable.in b/scripts/inevitable.in index 618926e..463717a 100644 --- a/scripts/inevitable.in +++ b/scripts/inevitable.in @@ -23,7 +23,7 @@ (engine shell) (oop goops)) -(run-node (lambda () (make-shell (lambda () (make <intro>)))) +(run-node (lambda () (make-shell intro)) #:window-title "Inevitable" #:window-width (* 2 640) #:window-height (* 2 480)) |