adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-wastesedge-commits] Release_0-3-1 febb1af 187/237: ADDED in-g


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 febb1af 187/237: ADDED in-game music!
Date: Mon, 25 Jul 2016 18:15:11 +0000 (UTC)

tag: Release_0-3-1
commit febb1afefb5530e5ad78482f9976a9d72dc82e27
Author: adondev <adondev>
Commit: adondev <adondev>

    ADDED in-game music!
---
 scripts/schedules/audio/in_game.py       |   12 ++++++++----
 scripts/schedules/mapcharacters/intro.py |    3 +--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/scripts/schedules/audio/in_game.py 
b/scripts/schedules/audio/in_game.py
index cb2778f..0c3aafd 100644
--- a/scripts/schedules/audio/in_game.py
+++ b/scripts/schedules/audio/in_game.py
@@ -18,12 +18,16 @@ import adonthell
 
 class in_game:
     def __init__ (self):
-        self.playing = adonthell.audio_get_current_background ()
-        
+        pass
+    
+    # -- method called everytime a song has finished playing
+    #    load song before playing, as the mixer seems to discard it
+    #    after it's been played once
     def music_finished (self, song):
         if song == 0:
+            adonthell.audio_load_background (1, "audio/at-demo-6.ogg")
             adonthell.audio_play_background (1)
-            self.playing = 1
         else:
+            adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
             adonthell.audio_play_background (0)
-            self.playing = 0
+            
diff --git a/scripts/schedules/mapcharacters/intro.py 
b/scripts/schedules/mapcharacters/intro.py
index 7cd468f..6da7791 100644
--- a/scripts/schedules/mapcharacters/intro.py
+++ b/scripts/schedules/mapcharacters/intro.py
@@ -40,10 +40,9 @@ class intro:
         
             # -- start music
             adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
-            adonthell.audio_load_background (1, "audio/at-demo-6.ogg")
+            adonthell.audio_play_background (0)
             adonthell.audio_set_schedule ("in_game")
             adonthell.audio_set_schedule_active (1)
-            adonthell.audio_play_background (0)
                         
             self.open_gate ()
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]