[Scummvm-git-logs] scummvm master -> 2644f9a775fab4127b8c089e210c0fbdadeb320b
moralrecordings
noreply at scummvm.org
Sat Jan 6 09:33:39 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1ba8bdc353 DIRECTOR: Add The Dark Eye v1.0.3 to detection table
2644f9a775 DIRECTOR: Fix missing cast member field lookups
Commit: 1ba8bdc353b59818e576cdae887f7c2e05c7bef8
https://github.com/scummvm/scummvm/commit/1ba8bdc353b59818e576cdae887f7c2e05c7bef8
Author: Scott Percival (code at moral.net.au)
Date: 2024-01-06T17:32:28+08:00
Commit Message:
DIRECTOR: Add The Dark Eye v1.0.3 to detection table
Changed paths:
engines/director/detection_tables.h
diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index 9bcfd18c5fb..884e0554804 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -1772,9 +1772,11 @@ namespace Director {
#define WINDEMO1t_l(t,e,f,m,s,l,v) GENGAME1t_(t,e,f,m,s,l,Common::kPlatformWindows,ADGF_DEMO,v)
#define MACGAME2(t,e,f1,m1,s1,f2,m2,s2,v) GENGAME2_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformMacintosh,ADGF_MACRESFORK,v)
+#define MACGAME2tf(t,e,f1,m1,s1,f2,m2,s2,v,fl) GENGAME2t_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformMacintosh,(fl|ADGF_MACRESFORK),v)
#define PIPGAME2(t,e,f1,m1,s1,f2,m2,s2,v) GENGAME2_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformPippin,ADGF_MACRESFORK,v)
#define WINGAME2(t,e,f1,m1,s1,f2,m2,s2,v) GENGAME2_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformWindows,ADGF_NO_FLAGS,v)
#define WINGAME2t(t,e,f1,m1,s1,f2,m2,s2,v) GENGAME2t_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformWindows,ADGF_NO_FLAGS,v)
+#define WINGAME2tf(t,e,f1,m1,s1,f2,m2,s2,v,fl) GENGAME2t_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformWindows,(fl|ADGF_NO_FLAGS),v)
#define FMTGAME2(t,e,f1,m1,s1,f2,m2,s2,v) GENGAME2_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformFMTowns,ADGF_NO_FLAGS,v)
#define MACDEMO2(t,e,f1,m1,s1,f2,m2,s2,v) GENGAME2_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformMacintosh,(ADGF_MACRESFORK|ADGF_DEMO),v)
#define WINDEMO2(t,e,f1,m1,s1,f2,m2,s2,v) GENGAME2_(t,e,f1,m1,s1,f2,m2,s2,Common::EN_ANY,Common::kPlatformWindows,ADGF_DEMO,v)
@@ -2090,8 +2092,19 @@ static const DirectorGameDescription gameDescriptions[] = {
// Mac version has 68k, PowerPC, and a fat binary (default) as options in the installer
// Mac installer is a Stuffit installer
// Windows version in SETUP/DATA.Z
- MACGAME1tf("darkeye", "", "The Dark Eye (Universal)", "67f572196550aedb1f9523d782022be0", 486078, 404, GF_32BPP),
- WINGAME1tf("darkeye", "", "DARKEYE.EXE", "67ba8428573dba0c8e12e7f02e4ef1bc", 742326, 404, GF_32BPP),
+
+ // US release (v1.0, latest movie file dated 1995-10-22)
+ // Same as Expert Software re-release (8629.txt dated 1997-09-15)
+ MACGAME2tf("darkeye", "v1.0", "The Dark Eye (Universal)", "tr:44f401cffc52cdbc8300797fa7ac6136", 486078,
+ "DKYData/DirFiles/Shared.Dir", "t:cbf56f8c65958653e886c3a4a1bea482", 2548860, 404, GF_32BPP),
+ WINGAME2tf("darkeye", "v1.0", "DARKEYE.EXE", "t:67ba8428573dba0c8e12e7f02e4ef1bc", 742326,
+ "DKYDATA/DIRFILES/SHARED.DIR", "t:cbf56f8c65958653e886c3a4a1bea482", 2548860, 404, GF_32BPP),
+ // US release (v1.0.3, 1995-11-22 in setup/version.txt, latest movie file dated 1995-12-07)
+ MACGAME2tf("darkeye", "v1.0.3", "The Dark Eye (Universal)", "tr:44f401cffc52cdbc8300797fa7ac6136", 486078,
+ "DKYData/DirFiles/Shared.Dir", "t:d143a91bb2ab7f8553c472564f229d7e", 2539576, 404, GF_32BPP),
+ WINGAME2tf("darkeye", "v1.0.3", "DARKEYE.EXE", "t:67ba8428573dba0c8e12e7f02e4ef1bc", 742326,
+ "DKYDATA/DIRFILES/SHARED.DIR", "t:d143a91bb2ab7f8553c472564f229d7e", 2539576, 404, GF_32BPP),
+
// Standalone from CD dated 1995-08-30
MACGAME1f("darkeye", "", "DKY FAT", "r:01be45e7241194dad07938e7059b88e3", 483518, 404, GF_32BPP),
WINGAME1f("darkeye", "", "DARK_EYE.EXE", "t:8b319643334fc9f7dfee7acdd9d83812", 698353, 400, GF_32BPP),
Commit: 2644f9a775fab4127b8c089e210c0fbdadeb320b
https://github.com/scummvm/scummvm/commit/2644f9a775fab4127b8c089e210c0fbdadeb320b
Author: Scott Percival (code at moral.net.au)
Date: 2024-01-06T17:32:28+08:00
Commit Message:
DIRECTOR: Fix missing cast member field lookups
Director is quite permissive in terms of which fields you are allowed
to access on a missing cast member. Some will return undefined garbage
(if the cast ID is in range), some will return sensible defaults
(if the cast ID is out of range), and the rest will throw a scripting
error.
Fixes entering Henry's room on day 2 in The Dark Eye v1.0.3.
Changed paths:
engines/director/lingo/lingo-the.cpp
engines/director/lingo/lingo.cpp
engines/director/lingo/lingo.h
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 94c5edb0909..82c4ece96d4 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -21,6 +21,7 @@
#include "common/config-manager.h"
#include "common/fs.h"
+#include "director/types.h"
#include "graphics/macgui/macbutton.h"
#include "director/director.h"
@@ -1977,15 +1978,64 @@ void Lingo::getObjectProp(Datum &obj, Common::String &propName) {
CastMemberID id = *obj.u.cast;
CastMember *member = movie->getCastMember(id);
if (!member) {
- if (propName.equalsIgnoreCase("loaded")) {
- d = 0;
- } else if (propName.equalsIgnoreCase("filename")) {
- d = Datum(Common::String());
- } else if (id.member <= getMembersNum()) {
- warning("Lingo::getObjectProp(): %s not found", id.asString().c_str());
- } else {
- g_lingo->lingoError("Lingo::getObjectProp(): %s not found and out of range", id.asString().c_str());
+ // No matching cast member. Many of the fields are accessible
+ // to indicate the cast member is empty, however the
+ // rest will throw a Lingo error.
+ Common::String key = Common::String::format("%d%s", kTheCast, propName.c_str());
+ bool emptyAllowed = false;
+ if (_theEntityFields.contains(key)) {
+ emptyAllowed = true;
+ switch (_theEntityFields[key]->field) {
+ case kTheCastType:
+ d = Datum("empty");
+ d.type = SYMBOL;
+ break;
+ case kTheFileName:
+ case kTheScriptText:
+ d = Datum("");
+ break;
+ case kTheHeight:
+ case kTheLoaded:
+ case kTheModified:
+ case kThePurgePriority:
+ case kTheWidth:
+ case kTheCenter:
+ case kTheFrameRate:
+ case kThePausedAtStart:
+ case kThePreLoad:
+ case kTheDepth:
+ case kThePalette:
+ d = Datum(0);
+ break;
+ case kTheCrop:
+ case kTheVideo:
+ d = Datum(1);
+ break;
+ case kTheRect:
+ d = Datum(Common::Rect(0, 0, 0, 0));
+ break;
+ case kTheRegPoint:
+ d = Datum(Common::Point(0, 0));
+ break;
+ case kTheNumber:
+ d = Datum(id.member);
+ break;
+ default:
+ emptyAllowed = false;
+ break;
+ }
}
+
+ if (id.member <= getMembersNum()) {
+ // Cast member ID is within range (i.e. less than max)
+ // In real Director, accessing -any- of the properties will
+ // be allowed, but return garbage.
+ warning("Lingo::getObjectProp(): %s not found, but within cast ID range", id.asString().c_str());
+ } else if (!emptyAllowed) {
+ // Cast member ID is out of range, throw a Lingo error
+ g_lingo->lingoError("Lingo::getObjectProp(): %s not found and out of cast ID range", id.asString().c_str());
+ }
+
g_lingo->push(d);
return;
}
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index ac81bf5f6df..bd9000a7cf1 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -880,6 +880,16 @@ Datum::Datum(const CastMemberID &val) {
ignoreGlobal = false;
}
+Datum::Datum(const Common::Point &point) {
+ type = POINT;
+ u.farr = new FArray;
+ u.farr->arr.push_back(Datum(point.x));
+ u.farr->arr.push_back(Datum(point.y));
+ refCount = new int;
+ *refCount = 1;
+ ignoreGlobal = false;
+}
+
Datum::Datum(const Common::Rect &rect) {
type = RECT;
u.farr = new FArray;
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 858fe43e5cf..88ed62afae8 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -154,6 +154,7 @@ struct Datum { /* interpreter stack type */
Datum(const Common::String &val);
Datum(AbstractObject *val);
Datum(const CastMemberID &val);
+ Datum(const Common::Point &point);
Datum(const Common::Rect &rect);
void reset();
More information about the Scummvm-git-logs
mailing list