diff options
author | Filippos Karapetis | 2009-01-06 12:33:59 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-01-06 12:33:59 +0000 |
commit | de7721c63863018dc70aa5b7cf135d373c45892a (patch) | |
tree | de020ddc91751d24a27febc99abb7f54a4c764c3 /engines/made/sound.cpp | |
parent | e2463f77cdc4a11038843668988b388d03f06477 (diff) | |
download | scummvm-rg350-de7721c63863018dc70aa5b7cf135d373c45892a.tar.gz scummvm-rg350-de7721c63863018dc70aa5b7cf135d373c45892a.tar.bz2 scummvm-rg350-de7721c63863018dc70aa5b7cf135d373c45892a.zip |
Sound energy values are now stored in a list, to account for the fact that the original decompressed sounds on the fly, but we're decompressing them when the sound is being loaded
svn-id: r35752
Diffstat (limited to 'engines/made/sound.cpp')
-rw-r--r-- | engines/made/sound.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp index a88274f205..e397bd584f 100644 --- a/engines/made/sound.cpp +++ b/engines/made/sound.cpp @@ -24,13 +24,14 @@ */ #include "common/endian.h" +#include "common/list.h" #include "common/util.h" #include "made/sound.h" namespace Made { -int soundEnergy = 0; +Common::List<int> soundEnergy; void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCount) { @@ -68,8 +69,8 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou case 0: memset(soundBuffer, 0x80, workChunkSize); - workSample = 0; - soundEnergy = 0; + workSample = 0; + soundEnergy.push_back(0); break; case 1: @@ -96,14 +97,14 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou } } - soundEnergy = type - 1; + soundEnergy.push_back(type - 1); break; case 5: for (i = 0; i < workChunkSize; i++) soundBuffer[i] = *source++; workSample = soundBuffer[workChunkSize - 1] - 128; - soundEnergy = 4; + soundEnergy.push_back(type - 1); break; default: |