aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray2003-05-19 08:04:47 +0000
committerJonathan Gray2003-05-19 08:04:47 +0000
commit6cb61537f4749e83b7bbdd2294a28f07eb6eeb15 (patch)
treebe138c109324aa1a0ebf94c7ee733ac48da87e79
parent29fb3e308f32c853155c9400bc9df7d850c9b9b2 (diff)
downloadscummvm-rg350-6cb61537f4749e83b7bbdd2294a28f07eb6eeb15.tar.gz
scummvm-rg350-6cb61537f4749e83b7bbdd2294a28f07eb6eeb15.tar.bz2
scummvm-rg350-6cb61537f4749e83b7bbdd2294a28f07eb6eeb15.zip
enable midi for non puttdemo humongous games. need to properly return the result of whether music is running though...
svn-id: r7673
-rw-r--r--scumm/scummvm.cpp7
-rw-r--r--scumm/sound.cpp14
2 files changed, 15 insertions, 6 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 036a99a3d7..c7e5da7cfb 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -687,6 +687,7 @@ void Scumm::scummInit() {
if (!(_features & GF_SMALL_NAMES) && !(_features & GF_AFTER_V8))
loadCharset(1);
+
if (_features & GF_OLD_BUNDLE)
loadCharset(0); // FIXME - HACK ?
@@ -818,9 +819,9 @@ void Scumm::initScummVars() {
VAR(VAR_VIDEOMODE) = 0x13;
VAR(VAR_HEAPSPACE) = 1400;
VAR(VAR_MOUSEPRESENT) = true; // FIXME - used to be 0, but that seems odd?!?
-// if (_features & GF_HUMONGOUS) // FIXME uncomment when XMI support is added
-// VAR(VAR_SOUNDPARAM) = 1; // soundblaster for music
-// else
+ if ((_features & GF_HUMONGOUS) && (_gameId != GID_PUTTDEMO))
+ VAR(VAR_SOUNDPARAM) = 1; // soundblaster for music
+ else
VAR(VAR_SOUNDPARAM) = 0;
VAR(VAR_SOUNDPARAM2) = 0;
VAR(VAR_SOUNDPARAM3) = 0;
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 7210d989bd..07b93c0486 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -234,7 +234,7 @@ void Sound::playSound(int soundID) {
_scumm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
return;
}
- // XMI MIDI
+ // XMIDI
else if ((READ_UINT32_UNALIGNED(ptr) == MKID('MIDI')) && (_scumm->_features & GF_HUMONGOUS)) {
// skip HSHD
ptr += 8 + READ_BE_UINT32_UNALIGNED(ptr+12);
@@ -244,8 +244,8 @@ void Sound::playSound(int soundID) {
size = READ_BE_UINT32_UNALIGNED(ptr+4) - 8;
ptr += 8; // don't need SDAT block anymore
- // XMI playing stuff goes here
- // ptr should be pointing to XMI file in memory
+ // XMIDI playing stuff goes here
+ // ptr should be pointing to XMIDI file in memory
// HACK (Jamieson630): Just to see if it works.
static MidiParser *parser = 0;
@@ -633,6 +633,14 @@ int Sound::isSoundRunning(int sound) {
if (sound == _scumm->current_cd_sound)
return pollCD();
+ if (_scumm->_features & GF_HUMONGOUS) {
+ if (sound == -2) {
+ return isSfxFinished();
+ // FIXME are we playing music?
+ } else if (sound == -1)
+ return 1;
+ }
+
_scumm->_mixer->stopID(sound);
i = _soundQue2Pos;