Background music files in bashit are now optional.

This commit is contained in:
Storm Dragon 2014-05-06 00:12:51 -04:00
parent 12dd76a901
commit 41a151349e
2 changed files with 2 additions and 0 deletions

View File

@ -83,8 +83,10 @@ EOF
play_stop_bgm()
{
if [ "$1" == "play" ] ; then
if [ -f "$2/bgm.ogg" ] ; then
play -qV0 $2/bgm.ogg repeat 9999&
__bgmPID="$(echo "$!")"
fi
elif [ "$1" == "stop" ] ; then
if [[ "$__bgmPID" =~ ^[0-9]+$ ]] ; then
kill $__bgmPID

Binary file not shown.