Merge branch 'master' of /Volumes/game/Git

This commit is contained in:
Ruben Müller 2011-08-20 21:43:19 +02:00
commit 1f5db54fce
2 changed files with 14 additions and 1 deletions

View file

@ -29,5 +29,7 @@ Global GFXTileset.i
Global Dim Tileset.i(2)
; Sounds
Global MenuSoundStarted = 0
LoadSound(0, #DATA_PATH + "sound/menu_change.wav")
LoadSound(1, #DATA_PATH + "sound/menu_select.wav")
LoadSound(1, #DATA_PATH + "sound/menu_select.wav")
LoadSound(2, #DATA_PATH + "sound/title_song.wav")

View file

@ -83,6 +83,17 @@ If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCent
Define Event = WindowEvent()
Until Event = 0
; Handle the background music
If CurrentState = "MAIN_MENU" Or CurrentState = "RLY_QUIT"
If MenuSoundStarted = 0
MenuSoundStarted = PlaySound(2, #PB_Sound_MultiChannel|#PB_Sound_Loop)
SoundVolume(2, 70, MenuSoundStarted)
EndIf
Else
StopSound(2, MenuSoundStarted)
MenuSoundStarted = 0
EndIf
; Handle global events
ExamineKeyboard()
If KeyboardReleased(#PB_Key_F)