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 22057de 206/237: ADDED new


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 22057de 206/237: ADDED new music
Date: Mon, 25 Jul 2016 18:15:13 +0000 (UTC)

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

    ADDED new music
    FIXED music on game loading bug
---
 scripts/events/brn_to_silverhair.py      |    1 +
 scripts/events/fst_to_silverhair.py      |    1 +
 scripts/events/silverhair_to_brn.py      |    1 +
 scripts/events/silverhair_to_fst.py      |    1 +
 scripts/init.py                          |    2 +-
 scripts/schedules/audio/in_game.py       |   29 ++++++++++++++++++++++-------
 scripts/schedules/mapcharacters/extro.py |   10 ++++++++--
 7 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/scripts/events/brn_to_silverhair.py 
b/scripts/events/brn_to_silverhair.py
index a84ec5c..db09241 100644
--- a/scripts/events/brn_to_silverhair.py
+++ b/scripts/events/brn_to_silverhair.py
@@ -33,6 +33,7 @@ class brn_to_silverhair:
         p.set_val ("came_from_barn", 1)
 
         events.switch_submap (p, self.smdest, self.xdest, self.ydest, 
self.destdir)
+        adonthell.audio_fade_out_background (500)
         p.stand ()
         p.go_west ()
         adonthell.gamedata_get_character ("Imoen Silverhair").launch_action (p)
diff --git a/scripts/events/fst_to_silverhair.py 
b/scripts/events/fst_to_silverhair.py
index d69ad28..1922a6e 100644
--- a/scripts/events/fst_to_silverhair.py
+++ b/scripts/events/fst_to_silverhair.py
@@ -47,3 +47,4 @@ class fst_to_silverhair:
             p.set_val ("at_silverhairs_door", 0)
         else:
             events.switch_submap (p, self.smdest, self.xdest, self.ydest, 
self.destdir)
+            adonthell.audio_fade_out_background (500)
\ No newline at end of file
diff --git a/scripts/events/silverhair_to_brn.py 
b/scripts/events/silverhair_to_brn.py
index dd5ef4b..4b5dc4f 100644
--- a/scripts/events/silverhair_to_brn.py
+++ b/scripts/events/silverhair_to_brn.py
@@ -34,3 +34,4 @@ class silverhair_to_brn:
         if p.get_val ("came_from_barn") == 1:
             p.set_val ("came_from_barn", 0)
             events.switch_submap (p, self.smdest, self.xdest, self.ydest, 
self.destdir)
+            adonthell.audio_fade_out_background (500)
\ No newline at end of file
diff --git a/scripts/events/silverhair_to_fst.py 
b/scripts/events/silverhair_to_fst.py
index 9a84dc8..a05e73d 100644
--- a/scripts/events/silverhair_to_fst.py
+++ b/scripts/events/silverhair_to_fst.py
@@ -38,3 +38,4 @@ class silverhair_to_fst:
             p.speak ("I better leave the way I came.")
         else:
             events.switch_submap (p, self.smdest, self.xdest, self.ydest, 
self.destdir)
+            adonthell.audio_fade_out_background (500)
\ No newline at end of file
diff --git a/scripts/init.py b/scripts/init.py
index 554f553..478e65e 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -209,7 +209,7 @@ class title_screen:
         del self.bag_c
         del self.bag_t
 
-        audio_pause_music ()
+        audio_fade_out_background (500)
         audio_unload_background (0)
 
 
diff --git a/scripts/schedules/audio/in_game.py 
b/scripts/schedules/audio/in_game.py
index 0c3aafd..43ae5fb 100644
--- a/scripts/schedules/audio/in_game.py
+++ b/scripts/schedules/audio/in_game.py
@@ -18,16 +18,31 @@ import adonthell
 
 class in_game:
     def __init__ (self):
-        pass
-    
+        self.next_song = -1
+
     # -- 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)
+        # -- if we're in Silverhair's room, play special tune
+        if adonthell.gamedata_player ().submap () == 13:
+            # -- resume with the song that played before entering
+            if self.next_song != 2 and song != 2: self.next_song = song
+
+            adonthell.audio_load_background (2, "audio/at-demo-7.ogg")
+            adonthell.audio_play_background (2)
+
+        # -- right after leaving Silverhair's room
+        elif self.next_song >= 0:
+            adonthell.audio_fade_in_background (self.next_song, 500)
+            self.next_song = -1
+
+        # -- otherwise just loop at-demo-5 and at-demo-6
         else:
-            adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
-            adonthell.audio_play_background (0)
+            if song == 0:
+                adonthell.audio_load_background (1, "audio/at-demo-6.ogg")
+                adonthell.audio_play_background (1)
+            else:
+                adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
+                adonthell.audio_play_background (0)
             
diff --git a/scripts/schedules/mapcharacters/extro.py 
b/scripts/schedules/mapcharacters/extro.py
index 4b60ed3..6bf7395 100644
--- a/scripts/schedules/mapcharacters/extro.py
+++ b/scripts/schedules/mapcharacters/extro.py
@@ -141,7 +141,7 @@ class extro:
             ("John Havard", 1), \
             ("James Nash", 3), \
             ("soundtrack available on:", 1), \
-            ("http://www.zhaytee.com/...";, 3), \
+            ("http://zhaymusic.com/...";, 3), \
             ("the Adonthell team whishes to thank:", 2), \
             ("Al Koskelin", 1), \
             ("Andrew Henderson", 1), \
@@ -522,7 +522,7 @@ class extro:
         # -- misc stuff
         self.step = 0       # -- for the extro control
         self.anim = 0       # -- for the forest animation control
-        self.index = 0      # -- index in the typeover array       
+        self.index = 0      # -- index in the typeover array
         self.delay = 0      # -- delay before adding new text
         self.cursor = 0     # -- cursor in the typeover text
         self.x = [0, 0, 0]  # -- offsets of the 3 forest pics
@@ -530,6 +530,7 @@ class extro:
         adonthell.gamedata_engine ().main (self.window, 'fmv')
         
         # -- quit!
+        adonthell.audio_fade_out_background (500)
         adonthell.gamedata_engine ().main_quit ()
         
     def forest_animation (self):
@@ -621,6 +622,11 @@ class extro:
 
     # -- prepare credits
     def make_credits (self):
+        # -- audio
+        adonthell.audio_fade_out_background (500)
+        adonthell.audio_load_background (0, "audio/at-demo-8.ogg")
+        adonthell.audio_play_background (0)
+
         # -- window
         self.window = adonthell.win_container ()
         self.window.move (0, 30)



reply via email to

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