From e74fbf491f730d6b15ea6985e75faaf0aae5701c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 27 Jul 2018 09:38:14 +0200 Subject: Play little tune during intro. --- assets/music/intro.ogg | Bin 0 -> 98534 bytes scenes/intro.scm | 8 +++++++- scripts/inevitable.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 assets/music/intro.ogg diff --git a/assets/music/intro.ogg b/assets/music/intro.ogg new file mode 100644 index 0000000..1725679 Binary files /dev/null and b/assets/music/intro.ogg differ 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 @@ ;;; . (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 ()) + #:export (intro)) (define-class ()) @@ -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 )) 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 )))) +(run-node (lambda () (make-shell intro)) #:window-title "Inevitable" #:window-width (* 2 640) #:window-height (* 2 480)) -- cgit v1.2.3