Sad losing music or so
authorNeil <neil@dip.sun.ac.za>
Sat, 17 May 2014 15:22:10 +0000 (17:22 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 17 May 2014 15:22:48 +0000 (17:22 +0200)
data/music/SOURCES.txt
data/music/lost.ogg [new file with mode: 0644]
naja/scenes/lose.py

index e56f304e8bed1dfa5c1fa426b040e492da074667..9e5b961dc02a0cd14c6d47c4afe8929faeb2b2f2 100644 (file)
@@ -55,3 +55,12 @@ Music files by Rolemusic:
       Converted to ogg via:
           mpg123 -w test.wav A_ninja.mp3
           sox test.wav A_ninja.ogg vol 0.25 amplitude channels 1
+
+   lost.ogg
+      ayVentura
+      http://freemusicarchive.org/music/Rolemusic/gigs_n_contest/rolemusic_-_gigs_n_contest_-_02_ayVentura
+      License: Creative Commons Attribution (CC-BY) (http://creativecommons.org/licenses/by/4.0/)
+      # This is delibrately slowed down and dropped a semitone for a less upbeat feel
+      Converted to ogg via and transformed by:
+          mpg123 -w test.wav ayVentura.mp3
+          sox test.wav lost.ogg vol 0.25 amplitude channels 1 tempo 0.75 pitch 100
diff --git a/data/music/lost.ogg b/data/music/lost.ogg
new file mode 100644 (file)
index 0000000..40f806a
Binary files /dev/null and b/data/music/lost.ogg differ
index ccd0accd2bcf1a46628f527b0350b42bb6cc5f05..8dea59a788ebb303bd688049e1e40437a9324450 100644 (file)
@@ -6,6 +6,7 @@ import pygame.locals as pgl
 
 from naja.constants import KEYS, PALETTE
 from naja.scenes.scene import Scene
+from naja.sound import sound
 from naja.widgets.image_box import ImageBox
 from naja.widgets.text import TextWidget, TextBoxWidget
 from naja.events import SceneChangeEvent, LoadGameEvent
@@ -41,10 +42,12 @@ class LoseScene(Scene):
             colour='white', padding=1, border=1,
             bg_colour='black', border_colour='black',
             box_width=300))
+        sound.play_music('lost.ogg')
 
     def handle_scene_event(self, ev):
         from naja.scenes.menu import MenuScene
         if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
+            sound.stop()
             # drop current state
             LoadGameEvent.post(None)
             SceneChangeEvent.post(MenuScene)