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 c8fca18 186/237: FIXED extr


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 c8fca18 186/237: FIXED extro
Date: Mon, 25 Jul 2016 18:15:11 +0000 (UTC)

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

    FIXED extro
    ADDED audio schedule
    FIXED installation of music
---
 audio/Makefile.am                        |    2 +-
 configure.in                             |    1 +
 scripts/init.py                          |    1 +
 scripts/schedules/Makefile.am            |    2 +-
 scripts/schedules/audio/Makefile.am      |   12 ++++++++++++
 scripts/schedules/audio/in_game.py       |   29 +++++++++++++++++++++++++++++
 scripts/schedules/mapcharacters/extro.py |    8 +++++---
 scripts/schedules/mapcharacters/intro.py |    9 +++++++++
 8 files changed, 59 insertions(+), 5 deletions(-)

diff --git a/audio/Makefile.am b/audio/Makefile.am
index 051d21a..2cee353 100755
--- a/audio/Makefile.am
+++ b/audio/Makefile.am
@@ -1,6 +1,6 @@
 pkgdatadir = $(gamedatadir)/audio
 
 pkgdata_DATA = at-demo-1.ogg at-demo-2.ogg at-demo-3.ogg at-demo-4.ogg \
-       at-menu-5.ogg at-menu-6.ogg select.wav switch.wav
+       at-demo-5.ogg at-demo-6.ogg select.wav switch.wav
 
 EXTRA_DIST = $(pkgdata_DATA)
diff --git a/configure.in b/configure.in
index 15bdfb9..b73ee11 100755
--- a/configure.in
+++ b/configure.in
@@ -76,6 +76,7 @@ scripts/dialogues/Makefile
 scripts/events/Makefile
 scripts/modules/Makefile
 scripts/schedules/Makefile
+scripts/schedules/audio/Makefile
 scripts/schedules/mapcharacters/Makefile
 scripts/schedules/mapviews/Makefile
 scripts/Makefile
diff --git a/scripts/init.py b/scripts/init.py
index cd3c994..af59c59 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -96,6 +96,7 @@ class title_screen:
         if self.draw_func != None:
             # -- Skip intro sequence
             if input_has_been_pushed (SDLK_ESCAPE):
+                audio_fade_out_background (500)
                 self.bag_t.set_visible (0)
                 self.bag_c.set_visible (0)
                 self.bag_o.set_visible (1)
diff --git a/scripts/schedules/Makefile.am b/scripts/schedules/Makefile.am
index 673c9fa..71d97db 100755
--- a/scripts/schedules/Makefile.am
+++ b/scripts/schedules/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = mapcharacters mapviews
+SUBDIRS = audio mapcharacters mapviews
 
 pkgdatadir = $(gamedatadir)/scripts/schedules
 
diff --git a/scripts/schedules/audio/Makefile.am 
b/scripts/schedules/audio/Makefile.am
new file mode 100644
index 0000000..d6b598b
--- /dev/null
+++ b/scripts/schedules/audio/Makefile.am
@@ -0,0 +1,12 @@
+pkgdatadir = $(gamedatadir)/scripts/schedules/audio
+
+pkgdata_DATA = *.pyc
+
+EXTRA_DIST = in_game.py
+
+all:
+       $(adonthell_binary) -c
+
+*.pyc: *.py
+
+CLEANFILES = *.pyc
diff --git a/scripts/schedules/audio/in_game.py 
b/scripts/schedules/audio/in_game.py
new file mode 100644
index 0000000..cb2778f
--- /dev/null
+++ b/scripts/schedules/audio/in_game.py
@@ -0,0 +1,29 @@
+#
+#  $Id$
+#
+#  (C) Copyright 2001 Kai Sterker <address@hidden>
+#  Part of the Adonthell Project http://adonthell.linuxgames.com
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License.
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY.
+#
+#  See the COPYING file for more details
+#
+
+# -- Schedule for the in game music
+
+import adonthell
+
+class in_game:
+    def __init__ (self):
+        self.playing = adonthell.audio_get_current_background ()
+        
+    def music_finished (self, song):
+        if song == 0:
+            adonthell.audio_play_background (1)
+            self.playing = 1
+        else:
+            adonthell.audio_play_background (0)
+            self.playing = 0
diff --git a/scripts/schedules/mapcharacters/extro.py 
b/scripts/schedules/mapcharacters/extro.py
index 8f9fa44..eede5a7 100644
--- a/scripts/schedules/mapcharacters/extro.py
+++ b/scripts/schedules/mapcharacters/extro.py
@@ -125,7 +125,6 @@ class extro:
         
         # -- Talan bursts in
         elif self.index == 23 and self.done == 0:
-            self.bubble = None
             bjarn = self.text[2][0]
             bjarn.go_south ()
             bjarn.load ('bjarn_crying.mchar')
@@ -355,9 +354,12 @@ class extro:
             if self.bubble == None: self.step = self.step + 1
             
         elif self.step == 801:
-            self.done = 0
+            if self.bubble != None: 
+                adonthell.win_manager_get_active ().remove (self.bubble)
+                self.bubble = None
             adonthell.gamedata_engine ().main_quit ()
             adonthell.gamedata_player ().set_schedule_active (1)
+            self.done = 0
         
     # -- forest sequence
     def fade_to_forest (self):
@@ -394,7 +396,7 @@ class extro:
         self.label = adonthell.win_label ()
         self.label.set_font (adonthell.win_manager_get_font ("white"))
         self.label.resize (240, 90)
-        self.label.move (40, 20)
+        self.label.move (40, 30)
         self.label.thisown = 0
         self.label.pack ()
         
diff --git a/scripts/schedules/mapcharacters/intro.py 
b/scripts/schedules/mapcharacters/intro.py
index 9915267..7cd468f 100644
--- a/scripts/schedules/mapcharacters/intro.py
+++ b/scripts/schedules/mapcharacters/intro.py
@@ -37,6 +37,14 @@ class intro:
 
         # -- open the gate
         elif talk == 2:
+        
+            # -- start music
+            adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
+            adonthell.audio_load_background (1, "audio/at-demo-6.ogg")
+            adonthell.audio_set_schedule ("in_game")
+            adonthell.audio_set_schedule_active (1)
+            adonthell.audio_play_background (0)
+                        
             self.open_gate ()
 
             adonthell.gamedata_get_quest ("demo").set_val ("intro_on", 0)
@@ -48,6 +56,7 @@ class intro:
                 myself.set_schedule ("keyboard_control")
                 self.close_gate ()
                 myself.go_east ()
+                
 
 
     # -- Opens the gate



reply via email to

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