diff options
author | Sven Hesse | 2006-02-24 21:58:03 +0000 |
---|---|---|
committer | Sven Hesse | 2006-02-24 21:58:03 +0000 |
commit | ca504aca4fc270b277297973a2ce459c998192c5 (patch) | |
tree | 94139c847d243700024a0af6f4e3e6e46817603a /engines/gob/inter_v1.cpp | |
parent | 4aaf6fec8d26f5f8a78c674b50464b3956d49002 (diff) | |
download | scummvm-rg350-ca504aca4fc270b277297973a2ce459c998192c5.tar.gz scummvm-rg350-ca504aca4fc270b277297973a2ce459c998192c5.tar.bz2 scummvm-rg350-ca504aca4fc270b277297973a2ce459c998192c5.zip |
Adding GOB2's CD handling opcodes, the CD version of GOB2 now starts
correctly; playMult() doesn't work yet, though
svn-id: r20844
Diffstat (limited to 'engines/gob/inter_v1.cpp')
-rw-r--r-- | engines/gob/inter_v1.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 8e32e766db..1022d2cf48 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1973,7 +1973,7 @@ bool Inter_v1::o1_setBackDelta(char &cmdCount, int16 &counter, int16 &retFlag) { } bool Inter_v1::o1_loadSound(char &cmdCount, int16 &counter, int16 &retFlag) { - _vm->_game->interLoadSound(-1); + loadSound(-1); return false; } @@ -2689,4 +2689,29 @@ void Inter_v1::o1_initGoblin(int16 &extraData, int32 *retVarPtr, Goblin::Gob_Obj _vm->_util->beep(50); } +int16 Inter_v1::loadSound(int16 slot) { + char *dataPtr; + int16 id; + + if (slot == -1) + slot = _vm->_parse->parseValExpr(); + + id = load16(); + if (id == -1) { + _vm->_global->_inter_execPtr += 9; + return 0; + } + + if (id >= 30000) { + dataPtr = _vm->_game->loadExtData(id, 0, 0); + _vm->_game->_soundFromExt[slot] = 1; + } else { + dataPtr = _vm->_game->loadTotResource(id); + _vm->_game->_soundFromExt[slot] = 0; + } + + _vm->_game->loadSound(slot, dataPtr); + return 0; +} + } // End of namespace Gob |