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/mult_v2.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/mult_v2.cpp')
-rw-r--r-- | engines/gob/mult_v2.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 087754f9a8..839649d1b2 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -181,7 +181,12 @@ void Mult_v2::loadMult(int16 resId) { _multData2->sndKeys = new Mult_SndKey[_multData2->sndKeysCount]; + warning("SoundKeyCount: %d", _multData2->sndKeysCount); + + // TODO: There's still something wrong here, preventing GOB2 floppy + // to start correctly for (i = 0; i < _multData2->sndKeysCount; i++) { + warning("-> %d", i); _multData2->sndKeys[i].frame = (int16)READ_LE_UINT16(_dataPtr); _multData2->sndKeys[i].cmd = (int16)READ_LE_UINT16(_dataPtr + 2); _multData2->sndKeys[i].freq = (int16)READ_LE_UINT16(_dataPtr + 4); @@ -213,9 +218,10 @@ void Mult_v2::loadMult(int16 resId) { if (i == j) { warning("GOB2 Stub! Mult_Data.sndSlot"); warning("GOB2 Stub! Game::interLoadSound() differs!"); - // _multData2->sndSlot[_multData2->sndSlotsCount] = _vm->_game->interLoadSound(1); + _multData2->sndSlot[_multData2->sndSlotsCount] = _vm->_inter->loadSound(1); + _vm->_inter->loadSound(1); // _multData2->sndKeys[i].soundIndex = _multData2->sndSlot[_multData2->sndSlotsCount] & 0x7FFF; - // _multData2->sndSlotsCount++; + _multData2->sndSlotsCount++; } break; @@ -260,4 +266,12 @@ void Mult_v2::loadMult(int16 resId) { delete[] extData; } +void Mult_v2::setMultData(uint16 multindex) { + if (multindex > 7) + error("Multindex out of range"); + + debug(4, "Switching to mult %d", multindex); + _multData2 = _multDatas[multindex]; +} + } // End of namespace Gob |