aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2013-10-17 08:46:15 -0400
committerPaul Gilbert2013-10-17 08:46:15 -0400
commitc7ca276e101914066e972920229538747fa77298 (patch)
tree3ba1ad7ee1ed2a70b72f50cb19cb44137f8f931d /engines/tsage
parentee9e6b94ae73701f1c8f416464def62d905f2f9d (diff)
downloadscummvm-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/tsage')
-rw-r--r--engines/tsage/sound.cpp4
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;