aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorHenry Bush2009-02-15 19:52:44 +0000
committerHenry Bush2009-02-15 19:52:44 +0000
commitd7dea4ff17cd5ee6737cbe50e5d47c13e946f86c (patch)
tree25e670e1e6800c1a47c6161769443f8bc27f5583 /engines
parentc137d7578437b8bac9bc0e6f3965f37f0d9af17c (diff)
downloadscummvm-rg350-d7dea4ff17cd5ee6737cbe50e5d47c13e946f86c.tar.gz
scummvm-rg350-d7dea4ff17cd5ee6737cbe50e5d47c13e946f86c.tar.bz2
scummvm-rg350-d7dea4ff17cd5ee6737cbe50e5d47c13e946f86c.zip
T7G: Fix for #2511456. Volume is now only reset to 100 on playing a new track, and the background track starts on beginning of input loop (not at end of main track).
svn-id: r38284
Diffstat (limited to 'engines')
-rw-r--r--engines/groovie/music.cpp5
-rw-r--r--engines/groovie/script.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index c69ab69827..8ae97b175c 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -95,6 +95,8 @@ MusicPlayer::~MusicPlayer() {
void MusicPlayer::playSong(uint16 fileref) {
Common::StackLock lock(_mutex);
+ _fadingEndVolume = 100;
+ _gameVolume = 100;
// Play the referenced file once
play(fileref, false);
}
@@ -185,7 +187,6 @@ void MusicPlayer::startBackground() {
void MusicPlayer::endTrack() {
debugC(3, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: endTrack()");
unload();
- startBackground();
}
void MusicPlayer::applyFading() {
@@ -207,7 +208,6 @@ void MusicPlayer::applyFading() {
// If we were fading to 0, stop the playback and restore the volume
if (_fadingEndVolume == 0) {
debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: Faded to zero: end of song. _fadingEndVolume set to 100");
- _fadingEndVolume = 100;
unload();
}
}
@@ -239,7 +239,6 @@ bool MusicPlayer::play(uint16 fileref, bool loop) {
// Set the looping option
_midiParser->property(MidiParser::mpAutoLoop, loop);
- _gameVolume = 100;
_isPlaying = true;
// Load the new file
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 88b2d3e4d9..c36b331785 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -567,7 +567,7 @@ void Script::o_bf5on() { // 0x0A
_bitflags |= 1 << 5;
}
-void Script::o_inputloopstart() {
+void Script::o_inputloopstart() { //0x0B
debugScript(5, true, "Input loop start");
// Reset the input action and the mouse cursor
@@ -584,6 +584,8 @@ void Script::o_inputloopstart() {
// Save the current pressed character for the whole loop
_kbdChar = _eventKbdChar;
_eventKbdChar = 0;
+
+ _vm->_musicPlayer->startBackground();
}
void Script::o_keyboardaction() {