aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v1.cpp
diff options
context:
space:
mode:
authorSven Hesse2012-06-11 06:11:53 +0200
committerSven Hesse2012-06-11 06:20:34 +0200
commitfe44939eba096bad083254b1c5152ef070ac4dc8 (patch)
treeab0d015edcf4234f6ffe6903dce14699178fc938 /engines/gob/inter_v1.cpp
parent385bd7c6a045b1a4c7b64ebef4471805020bdadd (diff)
downloadscummvm-rg350-fe44939eba096bad083254b1c5152ef070ac4dc8.tar.gz
scummvm-rg350-fe44939eba096bad083254b1c5152ef070ac4dc8.tar.bz2
scummvm-rg350-fe44939eba096bad083254b1c5152ef070ac4dc8.zip
GOB: Play the music on the title screen of Gob1 EGA
The EGA version of Gobliiins comes with an MDY track. While the original doesn't play it, we thought it might be a nice idea to play it nevertheless.
Diffstat (limited to 'engines/gob/inter_v1.cpp')
-rw-r--r--engines/gob/inter_v1.cpp34
1 files changed, 32 insertions, 2 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 4aa54f720b..6fc472a0ac 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -286,10 +286,40 @@ void Inter_v1::o1_loadMult() {
}
void Inter_v1::o1_playMult() {
- int16 checkEscape;
+ // NOTE: The EGA version of Gobliiins has an MDY tune.
+ // While the original doesn't play it, we do.
+ bool isGob1EGAIntro = _vm->getGameType() == kGameTypeGob1 &&
+ _vm->isEGA() &&
+ _vm->_game->_script->pos() == 1010 &&
+ _vm->isCurrentTot("intro.tot") &&
+ VAR(57) != 0xFFFFFFFF &&
+ _vm->_dataIO->hasFile("goblins.mdy") &&
+ _vm->_dataIO->hasFile("goblins.tbr");
+
+ int16 checkEscape = _vm->_game->_script->readInt16();
+
+ if (isGob1EGAIntro) {
+ _vm->_sound->adlibLoadTBR("goblins.tbr");
+ _vm->_sound->adlibLoadMDY("goblins.mdy");
+ _vm->_sound->adlibSetRepeating(-1);
+
+ _vm->_sound->adlibPlay();
+ }
- checkEscape = _vm->_game->_script->readInt16();
_vm->_mult->playMult(VAR(57), -1, checkEscape, 0);
+
+ if (isGob1EGAIntro) {
+
+ // User didn't escape the intro mult, wait for an escape here
+ if (VAR(57) != 0xFFFFFFFF) {
+ while (_vm->_util->getKey() != kKeyEscape) {
+ _vm->_util->processInput();
+ _vm->_util->longDelay(1);
+ }
+ }
+
+ _vm->_sound->adlibUnload();
+ }
}
void Inter_v1::o1_freeMultKeys() {