diff options
-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)) |