More work on ast stand. Put in final version of the background music code. (hopefully).

This commit is contained in:
Storm Dragon 2014-05-26 13:04:07 -04:00
parent 0c82129cc4
commit 58ad87a5bb
4 changed files with 5 additions and 2 deletions

View File

@ -104,7 +104,7 @@ play_stop_bgm()
{ {
if [ "$1" == "play" ] ; then if [ "$1" == "play" ] ; then
if [ -f "$2/bgm.ogg" ] ; then if [ -f "$2/bgm.ogg" ] ; then
play -qV0 $2/bgm.ogg repeat 9999& play -qV0 $(shuf -n 1 -e $2/bgm*ogg) repeat 9999&
__bgmPID="$(echo "$!")" __bgmPID="$(echo "$!")"
fi fi
elif [ "$1" == "stop" ] ; then elif [ "$1" == "stop" ] ; then
@ -164,7 +164,7 @@ clear
speed="1.00" speed="1.00"
continue="true" continue="true"
play -qV0 $sound/intro.ogg play -qV0 $sound/intro.ogg
play_stop_bgm play sounds/ play_stop_bgm play sounds
level=1 level=1
oldLevel=1 oldLevel=1
playerHitpoints=3 playerHitpoints=3
@ -220,6 +220,7 @@ if [ $cpuHitpoints -le 0 ] ; then
finish_cpu finish_cpu
let slain++ let slain++
let level++ let level++
play_stop_bgm stop
generate_enemy cpuInfo $level generate_enemy cpuInfo $level
cpuName="$(echo "$cpuInfo" | cut -d ':' -f 1)" cpuName="$(echo "$cpuInfo" | cut -d ':' -f 1)"
cpuHitpoints="$(echo "$cpuInfo" | cut -d ':' -f 2)" cpuHitpoints="$(echo "$cpuInfo" | cut -d ':' -f 2)"
@ -229,6 +230,8 @@ cpuVoice="$(echo "$cpuInfo" | cut -d ':' -f 5)"
speed="$(echo "$cpuInfo" | cut -d ':' -f 6)" speed="$(echo "$cpuInfo" | cut -d ':' -f 6)"
speak_verses "$cpuName" $cpuVoice speak_verses "$cpuName" $cpuVoice
key="" key=""
sleep 0.5
play_stop_bgm play sounds
fi fi
else else
playerSound="blocked" playerSound="blocked"

Binary file not shown.

BIN
last-stand/sounds/bgm1.ogg Normal file

Binary file not shown.

BIN
last-stand/sounds/bgm2.ogg Normal file

Binary file not shown.