[Scummvm-git-logs] scummvm-tools master -> e6938d434fe2273a87d66f16b7767a32a05b65ec
bonki
bonki at users.noreply.github.com
Thu May 31 22:28:25 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .
Summary:
e6938d434f TOOLS: fix sound file offset
Commit: e6938d434fe2273a87d66f16b7767a32a05b65ec
https://github.com/scummvm/scummvm-tools/commit/e6938d434fe2273a87d66f16b7767a32a05b65ec
Author: Giovanni Bajo (rasky at develer.com)
Date: 2018-05-31T20:28:22Z
Commit Message:
TOOLS: fix sound file offset
The file offset and tag size were wrongly disassembled. They are
32-bit values composed by two words. In the existing code,
shifts were wrong and also sign extension crept in.
Changed paths:
engines/scumm/descumm-common.cpp
diff --git a/engines/scumm/descumm-common.cpp b/engines/scumm/descumm-common.cpp
index 6c980d3..895ad10 100644
--- a/engines/scumm/descumm-common.cpp
+++ b/engines/scumm/descumm-common.cpp
@@ -314,19 +314,19 @@ char *get_string(char *buf) {
// positions 10, 11, 14, 15 are the VCTL block size (LE).
{
// show the voice's position in the MONSTER.SOU
- int p = 0;
- p += get_word();
+ unsigned int p = 0;
+ p += get_word() & 0xFFFF;
g_scriptCurPos += 2; // skip the next "0xFF 0x0A"
- p += get_word() << 2;
+ p += (get_word() & 0xFFFF) << 16;
e += sprintf(e, "0x%X, ", p);
g_scriptCurPos += 2; // skip the next "0xFF 0x0A"
// show the size of the VCTL chunk/lip-synch tags
p = 0;
- p += get_word();
+ p += get_word() & 0xFFFF;
g_scriptCurPos += 2; // skip the next "0xFF 0x0A"
- p += get_word() << 2;
+ p += (get_word() & 0xFFFF) << 16;
e += sprintf(e, "0x%X)", p);
}
break;
More information about the Scummvm-git-logs
mailing list