diff options
author | Sven Hesse | 2007-01-06 11:17:20 +0000 |
---|---|---|
committer | Sven Hesse | 2007-01-06 11:17:20 +0000 |
commit | 6e0835da114d23673ce456f18db5995b22a35da7 (patch) | |
tree | 2379335dedd2f014c51b4d34121dd8232745e431 /engines/gob/inter_v2.cpp | |
parent | 61d741514e72d12d62248d6523cb149c37f7d51e (diff) | |
download | scummvm-rg350-6e0835da114d23673ce456f18db5995b22a35da7.tar.gz scummvm-rg350-6e0835da114d23673ce456f18db5995b22a35da7.tar.bz2 scummvm-rg350-6e0835da114d23673ce456f18db5995b22a35da7.zip |
- Fixed cut off and missing sounds
- Fixed a crash/static reported in the forums (sending Winkle to the vulture)
- (Hopefully) fixed the immediately-closing notepad heisenbug (#1621089)
- Fixed using unitialised values after allocating the variables
svn-id: r25025
Diffstat (limited to 'engines/gob/inter_v2.cpp')
-rw-r--r-- | engines/gob/inter_v2.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 47b3b77ffa..7fce867982 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -933,7 +933,7 @@ void Inter_v2::o2_stub0x85(void) { int16 Inter_v2::loadSound(int16 search) { int16 id; // si int16 slot; // di - int32 i; + uint32 i; bool isADL; char sndfile[14]; char *extData; @@ -1003,21 +1003,25 @@ int16 Inter_v2::loadSound(int16 search) { _vm->_game->_soundSamples[slot] = soundDesc; _vm->_game->_soundFromExt[slot] = 1; } else { // loc_99BC - extData = _vm->_game->loadExtData(id, 0, 0); + uint32 dataSize; + + extData = _vm->_game->loadExtData(id, 0, 0, &dataSize); if (extData == 0) return slot; _vm->_game->_soundTypes[slot] = 1; if (!isADL) - _vm->_game->loadSound(slot, extData); + _vm->_game->loadSound(slot, extData, dataSize); else // TODO: This is very ugly _vm->_game->_soundSamples[slot] = (Snd::SoundDesc *) extData; _vm->_game->_soundFromExt[slot] = 1; } } else { // loc_9A13 - extData = _vm->_game->loadTotResource(id); + int16 dataSize; + + extData = _vm->_game->loadTotResource(id, &dataSize); if (!isADL) - _vm->_game->loadSound(slot, extData); + _vm->_game->loadSound(slot, extData, dataSize); else // TODO: This is very ugly _vm->_game->_soundSamples[slot] = (Snd::SoundDesc *) extData; |