diff options
author | Paul Gilbert | 2013-10-17 08:46:15 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-10-17 08:46:15 -0400 |
commit | c7ca276e101914066e972920229538747fa77298 (patch) | |
tree | 3ba1ad7ee1ed2a70b72f50cb19cb44137f8f931d /engines | |
parent | ee9e6b94ae73701f1c8f416464def62d905f2f9d (diff) | |
download | scummvm-rg350-c7ca276e101914066e972920229538747fa77298.tar.gz scummvm-rg350-c7ca276e101914066e972920229538747fa77298.tar.bz2 scummvm-rg350-c7ca276e101914066e972920229538747fa77298.zip |
TSAGE: Fix error in calculating voice file offsets
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/sound.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp index f985650b7a..02abc58178 100644 --- a/engines/tsage/sound.cpp +++ b/engines/tsage/sound.cpp @@ -2654,14 +2654,14 @@ uint32 PlayStream::getFileOffset(const uint16 *data, int count, int voiceNum) { if (!v) return 0; - // Loop to figure out offsets from indexes skipped over + // Loop to figure out offsets from index words skipped over for (int i = 0; i < (voiceNum >> 3); ++i) { for (int bit = 0; bit < 16; bit += 2) offset += ((data[i] >> bit) & 3) * count; } // Bit index loop - for (int i = 0; i < bitsIndex; --i) + for (int i = 0; i < bitsIndex; ++i) offset += ((data[byteIndex] >> (i * 2)) & 3) * count; return offset; |