[Scummvm-git-logs] scummvm master -> 71ce7292f0ae07af5eaa54919f78db160337659e
sev-
sev at scummvm.org
Mon Feb 20 20:28:08 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
71ce7292f0 DIRECTOR: Fix event processing
Commit: 71ce7292f0ae07af5eaa54919f78db160337659e
https://github.com/scummvm/scummvm/commit/71ce7292f0ae07af5eaa54919f78db160337659e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-20T20:27:45+01:00
Commit Message:
DIRECTOR: Fix event processing
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index b8e601e..4376ca5 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -504,34 +504,31 @@ void Score::loadActions(Common::SeekableSubReadStreamEndian &stream) {
byte id = stream.readByte();
- /*byte subId = */ stream.readByte(); // I couldn't find how it used in continuity (except print). Frame actionId = 1 byte.
+ byte subId = stream.readByte(); // I couldn't find how it used in continuity (except print). Frame actionId = 1 byte.
uint16 stringPos = stream.readUint16() + offset;
for (uint16 i = 0; i < count; i++) {
uint16 nextId = stream.readByte();
- byte subId = stream.readByte();
+ byte nextSubId = stream.readByte();
uint16 nextStringPos = stream.readUint16() + offset;
uint16 streamPos = stream.pos();
stream.seek(stringPos);
- if (_vm->getVersion() == 3) {
- id -= 1;
- }
-
for (uint16 j = stringPos; j < nextStringPos; j++) {
byte ch = stream.readByte();
if (ch == 0x0d) {
ch = '\n';
}
- _actions[id] += ch;
+ _actions[i + 1] += ch;
}
- warning("id: %d nextId: %d subId: %d, code: %s", id, nextId, subId, _actions[id].c_str());
+ debugC(3, kDebugLoading, "id: %d nextId: %d subId: %d, code: %s", id, nextId, subId, _actions[id].c_str());
stream.seek(streamPos);
id = nextId;
+ subId = nextSubId;
stringPos = nextStringPos;
if (stringPos == stream.size())
@@ -997,7 +994,7 @@ void Score::processEvents() {
_lingo->processEvent(kEventMouseUp, kSpriteScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId);
} else {
// D3 doesn't have cast member or sprite scripts. Just Frame Scripts.
- _lingo->processEvent(kEventMouseUp, kFrameScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId + 1);
+ _lingo->processEvent(kEventMouseUp, kFrameScript, _frames[_currentFrame]->_sprites[spriteId]->_scriptId);
}
}
More information about the Scummvm-git-logs
mailing list