diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-07-26 19:37:35 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-07-27 17:15:48 +0200 |
commit | eb8b9c481dece17754dd670f37b29d9a8fa3dfad (patch) | |
tree | e1b4c5751149cc095385b6b64a455981b8ecd9ba /scenes | |
parent | 92a5dd6117d0653b20dfa2165c1d7eef7837652a (diff) |
Play error sound when talking is not possible.
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/game.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scenes/game.scm b/scenes/game.scm index 1e753cd..cb05f70 100644 --- a/scenes/game.scm +++ b/scenes/game.scm @@ -17,6 +17,7 @@ ;;; <http://www.gnu.org/licenses/>. (define-module (scenes game) + #:use-module (chickadee audio) #:use-module (chickadee input keyboard) #:use-module (chickadee math rect) #:use-module (chickadee math vector) @@ -52,6 +53,7 @@ (define-asset test-map (load-tile-map "assets/maps/01.tmx")) +(define-asset error-sample (load-sample "assets/sounds/error.ogg")) (define-class <game> (<scene>) (status #:accessor status #:init-form 'playing) @@ -324,7 +326,7 @@ conversation." (if (null? (available-messages player)) ;; nothing to say! Play error sound. (begin - (pk 'nothing-to-say) + (play-sample (asset-ref error-sample)) (stop-talking player)) ;; Prepare empty text bubble (let ((bubble (child-ref (parent (parent player)) 'text-bubble))) @@ -407,6 +409,8 @@ conversation." (let ((game (make <game> #:origin (vec2 (- (/ %width 2)) (- (/ %height 2)))))) + (set-music-volume! 1.0) + (set-sample-volume! 1.0) (with-agenda (agenda game) (schedule-every |