[Scummvm-git-logs] scummvm master -> 1c32aa7102b4cc8078a0476c27fc9c3ab3240e0a
stevenhoefel
stevenhoefel at hotmail.com
Sun Apr 5 12:08:58 UTC 2020
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:
1c32aa7102 DIRECTOR: Load full strings for D3 and listen to MouseDown events.
Commit: 1c32aa7102b4cc8078a0476c27fc9c3ab3240e0a
https://github.com/scummvm/scummvm/commit/1c32aa7102b4cc8078a0476c27fc9c3ab3240e0a
Author: stevenhoefel (stevenhoefel at hotmail.com)
Date: 2020-04-05T22:08:50+10:00
Commit Message:
DIRECTOR: Load full strings for D3 and listen to MouseDown events.
Changed paths:
engines/director/lingo/lingo-events.cpp
engines/director/lingo/lingo-the.cpp
engines/director/score.cpp
diff --git a/engines/director/lingo/lingo-events.cpp b/engines/director/lingo/lingo-events.cpp
index fd9716b2b7..b869856b9e 100644
--- a/engines/director/lingo/lingo-events.cpp
+++ b/engines/director/lingo/lingo-events.cpp
@@ -174,7 +174,7 @@ void Lingo::processInputEvent(LEvent event) {
processEvent(event, kCastScript, currentFrame->_sprites[spriteId]->_castId);
processEvent(event, kFrameScript, score->_frames[score->getCurrentFrame()]->_actionId);
// TODO: Is the kFrameScript call above correct?
- } else if (event == kEventMouseUp) {
+ } else if (event == kEventMouseUp || event == kEventMouseDown) {
// Frame script overrides sprite script
if (!currentFrame->_sprites[spriteId]->_scriptId) {
processEvent(kEventNone, kSpriteScript, currentFrame->_sprites[spriteId]->_castId + score->_castIDoffset);
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index a35e4eb8c2..aa56cd9384 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -714,6 +714,10 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
CastType castType;
CastInfo *castInfo;
+ if (id > score->_castIDoffset) {
+ id -= score->_castIDoffset;
+ }
+
if (!score->_loadedCast->contains(id)) {
if (field == kTheLoaded)
d.u.i = 0;
@@ -723,6 +727,10 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
castType = score->_loadedCast->getVal(id)->_type;
castInfo = score->_castsInfo[id];
+
+ //TODO: castInfo uses full offsets, so check the higher value.
+ if (castInfo == nullptr)
+ castInfo = score->_castsInfo[id + score->_castIDoffset];
switch (field) {
case kTheBackColor:
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 14e275f485..c67d92d39e 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1388,7 +1388,10 @@ Common::String Score::getString(Common::String str) {
return "";
}
- str.deleteChar(0);
+ //TODO: check if all versions need to cut off the first character.
+ if (_vm->getVersion() > 3) {
+ str.deleteChar(0);
+ }
if (str.lastChar() == '\x00') {
str.deleteLastChar();
More information about the Scummvm-git-logs
mailing list