Merge branch 'master' of /Volumes/game/Git
This commit is contained in:
commit
1f5db54fce
2 changed files with 14 additions and 1 deletions
|
@ -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(2, #DATA_PATH + "sound/title_song.wav")
|
||||
|
|
11
src/Main.pb
11
src/Main.pb
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue