[Scummvm-git-logs] scummvm master -> b560e61e46a11552687a81dd4a81c8e49f6ba6d3
sev-
noreply at scummvm.org
Tue Jun 3 10:53:42 UTC 2025
This automated email contains information about 14 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
fe9d179e13 DIRECTOR: Add Gus Goes to the Megarific Museum to detection list
05f12f193e DIRECTOR: Add TRIPITAKA to the detection table
bc973b7989 DIRECTOR: Fix transition math for fractional steps
9e1359c2d9 DIRECTOR: Always update sprites in Score::updateCurrentFrame
0590b6dcbb DIRECTOR: LINGO: Add XObject stubs for Puppet Motel
6ee75dd8ec DIRECTOR: Only apply gamma correction to Mac/Pippin for now
f03d232cd6 DIRECTOR: Always clear _firstMovie flag after initial load
aa3bd96403 DIRECTOR: Add thequest to detection table
e97646837b DIRECTOR: Fix "the cursor of sprite" to return an array
5e59b124b7 DIRECTOR: Fix looping flag in FilmLoopCastMember
3c70c486a9 DIRECTOR: Fix bounds check in Score::formatChannelInfo
0b44173921 DIRECTOR: LINGO: Trim input to b_value
266f7afd81 DIRECTOR: XTRA: Fix FileIO delete behaviour
b560e61e46 DIRECTOR: Don't call setCurrentWindow on movie load
Commit: fe9d179e13c763a74be24a4d168bfb2951832aaf
https://github.com/scummvm/scummvm/commit/fe9d179e13c763a74be24a4d168bfb2951832aaf
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Add Gus Goes to the Megarific Museum to detection list
Changed paths:
engines/director/detection_tables.h
diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index 0d07ad644ab..c9a2c8ba69d 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -224,6 +224,7 @@ static const PlainGameDescriptor directorGames[] = {
{ "grammarplaytime2", "Grammar Playtime Vol.2: Asking Questions" },
{ "gundam0079", "Gundam 0079: The War for Earth" },
{ "guscarn", "Gus Goes to the Kooky Carnival" },
+ { "gusmuse", "Gus Goes to the Megarific Museum" },
{ "gusolis", "Gus Goes to Cyberopolis" },
{ "guspark", "Gus Goes to CyberStone Park" },
{ "gussshc", "Gus and the CyberBuds Software SchoolHouse Collection" },
@@ -4407,11 +4408,23 @@ static const DirectorGameDescription gameDescriptions[] = {
MACGAME1("gusbuds", "", "MMV Product Demos for PowerMac", "r:692f6732b6d7deaa00c9b3df57bb30ce", 60068, 404),
WINGAME1("gusbuds", "", "MMVDEMOS.EXE", "d:71d4ad9e9dc92a81561476d4d9813492", 692037, 404),
- MACGAME1("guscarn", "", "Gus Goes to the Kooky Carnival", "r:e6833f1ce3b022f0128e4c80a55bcd46", 285310, 404),
- WINGAME1("guscarn", "", "CARNIVAL.EXE", "t:d0babe1503cdec2b3c45674f91911c13", 690553, 404),
- WINGAME1_l("guscarn", "", "PRETPARK.EXE", "t:d0babe1503cdec2b3c45674f91911c13", 690553, Common::NL_NLD, 404),
+ MACGAME2("guscarn", "", "Gus Goes to the Kooky Carnival", "r:e6833f1ce3b022f0128e4c80a55bcd46", 285310,
+ "Title.dxr", "t:ceadd61bd30a8602a6ed112a2cc31366", 202112, 404),
+ WINGAME2("guscarn", "", "CARNIVAL.EXE", "t:d0babe1503cdec2b3c45674f91911c13", 690553,
+ "TITLE.DIR", "t:182a0b3a7491f3d7816fe61cc7e6c20f", 199242, 404),
+ MACGAME2_l("guscarn", "", "Guus in het Pretpark", "r:e6833f1ce3b022f0128e4c80a55bcd46", 285310,
+ "Title.dir", "t:48d1c674927d573531d4693f0469eb61", 200576, Common::NL_NLD, 404),
+ WINGAME2_l("guscarn", "", "PRETPARK.EXE", "t:d0babe1503cdec2b3c45674f91911c13", 690553,
+ "TITLE.DIR", "t:572cfd8f36dbf42fe13d5f9f4bf59f73", 195306, Common::NL_NLD, 404),
MACDEMO1("guscarn", "Demo", "Carnival Demo 4 you", "r:67f572196550aedb1f9523d782022be0", 481226, 404),
+ MACGAME2("gusmuse", "", "Gus Goes to the Museum", "r:ccfbfc1a0ac231db40a250babaa6ad7c", 285282,
+ "Content/Intro.dir", "t:2b6830757b15dc6546a492df2c3fd032", 115390, 404),
+ WINGAME2("gusmuse", "", "MUSEUM.EXE", "t:a94c1f2c2bb45335edaed96cb99243f7", 697019,
+ "CONTENT/INTRO.DIR", "t:2b6830757b15dc6546a492df2c3fd032", 115390, 404),
+ WINGAME2_l("gusmuse", "", "MUSEUM.EXE", "t:a94c1f2c2bb45335edaed96cb99243f7", 697019,
+ "CONTENT/INTRO.DIR", "t:40fb23b25fd6e873338e9f52d10983f7", 217402, Common::NL_NLD, 404),
+
MACDEMO1("gusolis", "Demo", "Cyberopolis DEMO", "r:77f4098988d5386794d1530065f514cd", 303961, 404),
MACGAME1("guspark", "", "Gus goes to CyberStone Park", "r:ccfbfc1a0ac231db40a250babaa6ad7c", 285282, 404),
@@ -6571,8 +6584,8 @@ static const DirectorGameDescription gameDescriptions[] = {
WINGAME1("compconf", "Windows 3.1", "CCWIN311.EXE", "t:d2f5116b14bb8aaeaeae3d3d7e55d40b", 918905, 500),
WINGAME1("compconf", "Windows 95", "CCWIN95.EXE", "t:4cb9a6383932f6f11946a5692d82bcf0", 1395275, 500),
- WINGAME2tf("cracking", "", "crack.exe", "c2093c2b5dc9d3dc5b491e4df027e202", 1842361,
- "ufog8.dxr", "7c8222a010d40b59dd96a97f0b4fa974", 542472, 500, GF_32BPP),
+ WINGAME2tf("cracking", "", "crack.exe", "t:c2093c2b5dc9d3dc5b491e4df027e202", 1842361,
+ "ufog8.dxr", "t:7c8222a010d40b59dd96a97f0b4fa974", 542472, 501, GF_32BPP),
// Mac versions require installation
// Original Mac german filename is Kreuzzüge
Commit: 05f12f193eef15c8359a7ba10420769f2b25437c
https://github.com/scummvm/scummvm/commit/05f12f193eef15c8359a7ba10420769f2b25437c
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Add TRIPITAKA to the detection table
Changed paths:
engines/director/detection_tables.h
diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index c9a2c8ba69d..1761096c44b 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -1213,6 +1213,7 @@ static const PlainGameDescriptor directorGames[] = {
{ "timegal", "Time Gal" },
{ "tokimemotype1", "ã¨ãããã¡ã¢ãªã¢ã«ã¿ã¤ãã³ã°" }, // Tokimeki Memorial Typing
{ "tokimemotypegs", "ã¨ãã¡ã¢GSã¿ã¤ãã³ã°" }, // Tokimemo GS Typing (Girl's Side)
+ { "tripitaka", "TRIPITAKA çå¥ä¸èµæ±æ³ã®æ
" }, // TRIPITAKA - Xuanzang Sanzo's Dharma-Seeking Journey
{ "truegolf1", "TrueGolf Part I" },
{ "ttw", "Through the Window: In Search for the Lost Bag" },
{ "twinbeeparadise", "ãã¤ã³ãã¼PARADISE in ã©ãã¶ãå³¶" }, // TwinBee Paradise in Donburi Shima
@@ -8772,6 +8773,10 @@ static const DirectorGameDescription gameDescriptions[] = {
WINGAME1t("trekshipaddon", "", "addonpak/sscreate.exe", "68d5ccbfc4921c19d1d46b866ec4080d", 2753651, 602),
WINGAME1t("trekshipaddon", "Mission Watcher", "addonpak/ShipMain/MssnWchr.exe", "749923faa5cd1c281089a2143c4510ad", 1518003, 602),
+ // Sequel to Cosmology of Kyoto.
+ MACGAME1_l("tripitaka", "", "TRIPITAKA", "r:412d75e8fd005978b6c1b6240c36da47", 1035232, Common::JA_JPN, 602),
+ WINGAME1_l("tripitaka", "", "TRPTK_32.EXE", "t:f6ae72181e7ed6adc415b9833a121a9d", 1514121, Common::JA_JPN, 602),
+
// Overview of Tutti's Magical Stories series
WINGAME1_l("tutti", "", "TUTTI.EXE", "a593079aecf5bd938ce75264cac24b2d", 14715583, Common::RU_RUS, 600),
Commit: bc973b79899ef83653f17bb3643e8f78dcedbec8
https://github.com/scummvm/scummvm/commit/bc973b79899ef83653f17bb3643e8f78dcedbec8
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Fix transition math for fractional steps
Transitions can run over almost any time frame. This creates an issue
when xStepSize and yStepSize are used as increments; they are ints which
strip out fractions of a pixel, and the error will be compounded by the
number of steps. This is visible as e.g. sweep transitions stopping at the
3/4 mark.
An option would be to change xStepSize and yStepSize into floats,
but instead we do the cheaper calculation of premultiplying
xStepSize and yStepSize by TSTEP_FRAC to give 10 bits of precision.
Changed paths:
engines/director/transitions.cpp
diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index 85af591d334..db3948fbe49 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -67,6 +67,7 @@ enum {
};
#define TRANS(t,a,d) {t,#t,a,d}
+#define TSTEP_FRAC 1024
// cap transition framerate to 60fps
#define MAX_STEPS(duration) ((duration)*60/1000)
@@ -240,7 +241,7 @@ void Window::playTransition(uint frame, RenderMode mode, uint16 transDuration, u
uint32 transStartTime = g_system->getMillis();
- debugC(2, kDebugImages, "Window::playTransition(): type: %d, duration: %d, area: %d, chunkSize: %d, steps: %d, stepDuration: %d, xpos: %d, ypos: %d, xStepSize: %d, yStepSize: %d, stripSize: %d, clipRect: %d %d %d %d", t.type, t.duration, t.area, t.chunkSize, t.steps, t.stepDuration, t.xpos, t.ypos, t.xStepSize, t.yStepSize, t.stripSize, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
+ debugC(2, kDebugImages, "Window::playTransition(): type: %d, duration: %d, area: %d, chunkSize: %d, steps: %d, stepDuration: %d, xStepSize: %d, yStepSize: %d, stripSize: %d, clipRect: %d %d %d %d", t.type, t.duration, t.area, t.chunkSize, t.steps, t.stepDuration, t.xStepSize, t.yStepSize, t.stripSize, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
switch (transProps[t.type].algo) {
case kTransAlgoDissolve:
@@ -297,160 +298,167 @@ void Window::playTransition(uint frame, RenderMode mode, uint16 transDuration, u
switch (t.type) {
case kTransWipeRight: // 1
- rto.setWidth(MAX((int16)0, (int16)(t.xpos + t.xStepSize * i)));
+ rto.setWidth(MAX((int16)0, (int16)(t.xStepSize * i / TSTEP_FRAC)));
rfrom = rto;
break;
case kTransWipeLeft: // 2
- rto.setWidth(MAX((int16)0, (int16)(t.xpos + t.xStepSize * i)));
- rto.translate(w - t.xpos - t.xStepSize * i, 0);
+ rto.setWidth(MAX((int16)0, (int16)(t.xStepSize * i / TSTEP_FRAC)));
+ rto.translate(w - t.xStepSize * i / TSTEP_FRAC, 0);
rfrom = rto;
+ debugC(5, kDebugImages, "WipeLeft: %d %d %d %d", rto.left, rto.top, rto.right, rto.bottom);
break;
case kTransWipeDown: // 3
- rto.setHeight(MAX((int16)0, (int16)(t.ypos + t.yStepSize * i)));
+ rto.setHeight(MAX((int16)0, (int16)(t.yStepSize * i / TSTEP_FRAC)));
rfrom = rto;
break;
case kTransWipeUp: // 4
- rto.setHeight(MAX((int16)0, (int16)(t.ypos + t.yStepSize * i)));
- rto.translate(0, h - t.ypos - t.yStepSize * i);
+ rto.setHeight(MAX((int16)0, (int16)(t.yStepSize * i / TSTEP_FRAC)));
+ rto.translate(0, h - t.yStepSize * i / TSTEP_FRAC);
rfrom = rto;
break;
case kTransCenterOutHorizontal: // 5
- t.xpos += t.xStepSize;
- rto.setWidth(MAX((int16)0, (int16)(t.xpos * 2)));
- rto.translate(w / 2 - t.xpos, 0);
- rfrom = rto;
+ {
+ int x = (t.xStepSize * i / TSTEP_FRAC);
+ rto.setWidth(MAX((int16)0, (int16)(x * 2)));
+ rto.translate(w / 2 - x, 0);
+ rfrom = rto;
+ }
break;
case kTransEdgesInHorizontal: // 6
- rto.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i * 2)));
- rto.translate(t.xStepSize * i, 0);
+ rto.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i * 2 / TSTEP_FRAC)));
+ rto.translate(t.xStepSize * i / TSTEP_FRAC, 0);
rfrom = rto;
break;
case kTransCenterOutVertical: // 7
- t.ypos += t.yStepSize;
- rto.setHeight(MAX((int16)0, (int16)(t.ypos * 2)));
- rto.translate(0, h / 2 - t.ypos);
- rfrom = rto;
+ {
+ int y = (t.yStepSize * i / TSTEP_FRAC);
+ rto.setHeight(MAX((int16)0, (int16)(y * 2)));
+ rto.translate(0, h / 2 - y);
+ rfrom = rto;
+ }
break;
case kTransEdgesInVertical: // 8
- rto.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i * 2)));
- rto.translate(0, t.yStepSize * i);
+ rto.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i * 2 / TSTEP_FRAC)));
+ rto.translate(0, t.yStepSize * i / TSTEP_FRAC);
rfrom = rto;
break;
case kTransCenterOutSquare: // 9
- t.ypos += t.yStepSize;
- rto.setHeight(MAX((int16)0, (int16)(t.ypos * 2)));
- t.xpos += t.xStepSize;
- rto.setWidth(MAX((int16)0, (int16)(t.xpos * 2)));
- rto.translate(w / 2 - t.xpos, h / 2 - t.ypos);
- rfrom = rto;
+ {
+ int y = t.yStepSize * i / TSTEP_FRAC;
+ rto.setHeight(MAX((int16)0, (int16)(y * 2)));
+ int x = t.xStepSize * i / TSTEP_FRAC;
+ rto.setWidth(MAX((int16)0, (int16)(x * 2)));
+ rto.translate(w / 2 - x, h / 2 - y);
+ rfrom = rto;
+ }
break;
case kTransEdgesInSquare: // 10
- rto.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i * 2)));
- rto.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i * 2)));
- rto.moveTo(t.xStepSize * i, t.yStepSize * i);
+ rto.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i * 2 / TSTEP_FRAC)));
+ rto.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i * 2 / TSTEP_FRAC)));
+ rto.moveTo(t.xStepSize * i / TSTEP_FRAC, t.yStepSize * i / TSTEP_FRAC);
rfrom = rto;
break;
case kTransPushLeft: // 11
- rto.translate(w - t.xStepSize * i, 0);
+ rto.translate(w - t.xStepSize * i / TSTEP_FRAC, 0);
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
_composeSurface->blitFrom(nextFrame, rfrom, Common::Point(rto.left, rto.top));
- rfrom.translate(t.xStepSize * i, 0);
- rfrom.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i)));
+ rfrom.translate(t.xStepSize * i / TSTEP_FRAC, 0);
+ rfrom.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i / TSTEP_FRAC)));
rto.moveTo(clipRect.left, clipRect.top);
break;
case kTransPushRight: // 12
- rfrom.translate(w - t.xStepSize * i, 0);
- rfrom.setWidth(MAX((int16)0, (int16)(t.xStepSize * i)));
+ rfrom.translate(w - t.xStepSize * i / TSTEP_FRAC, 0);
+ rfrom.setWidth(MAX((int16)0, (int16)(t.xStepSize * i / TSTEP_FRAC)));
_composeSurface->blitFrom(nextFrame, rfrom, Common::Point(rto.left, rto.top));
- rto.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i)));
- rto.translate(t.xStepSize * i, 0);
+ rto.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i / TSTEP_FRAC)));
+ rto.translate(t.xStepSize * i / TSTEP_FRAC, 0);
rfrom.moveTo(clipRect.left, clipRect.top);
- rfrom.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i)));
+ rfrom.setWidth(MAX((int16)0, (int16)(w - t.xStepSize * i / TSTEP_FRAC)));
break;
case kTransPushDown: // 13
- rfrom.translate(0, h - t.yStepSize * i);
- rfrom.setHeight(MAX((int16)0, (int16)(t.yStepSize * i)));
+ rfrom.translate(0, h - t.yStepSize * i / TSTEP_FRAC);
+ rfrom.setHeight(MAX((int16)0, (int16)(t.yStepSize * i / TSTEP_FRAC)));
_composeSurface->blitFrom(nextFrame, rfrom, Common::Point(rto.left, rto.top));
- rto.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i)));
- rto.translate(0, t.yStepSize * i);
+ rto.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i / TSTEP_FRAC)));
+ rto.translate(0, t.yStepSize * i / TSTEP_FRAC);
rfrom.moveTo(clipRect.left, clipRect.top);
- rfrom.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i)));
+ rfrom.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i / TSTEP_FRAC)));
break;
case kTransPushUp: // 14
- rto.translate(0, h - t.yStepSize * i);
+ rto.translate(0, h - t.yStepSize * i / TSTEP_FRAC);
rfrom.bottom -= h - clipRect.findIntersectingRect(rto).height();
rto.clip(clipRect);
_composeSurface->blitFrom(nextFrame, rfrom, Common::Point(rto.left, rto.top));
- rfrom.translate(0, t.yStepSize * i);
- rfrom.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i)));
+ rfrom.translate(0, t.yStepSize * i / TSTEP_FRAC);
+ rfrom.setHeight(MAX((int16)0, (int16)(h - t.yStepSize * i / TSTEP_FRAC)));
rto.moveTo(clipRect.left, clipRect.top);
break;
case kTransRevealUp: // 15
- rto.translate(0, -t.yStepSize * i);
+ rto.translate(0, -t.yStepSize * i / TSTEP_FRAC);
rfrom.top += h - clipRect.findIntersectingRect(rto).height();
rto.clip(clipRect);
break;
case kTransRevealUpRight: // 16
- rto.translate(t.xStepSize * i, -t.yStepSize * i);
+ rto.translate(t.xStepSize * i / TSTEP_FRAC, -t.yStepSize * i / TSTEP_FRAC);
rfrom.top += h - clipRect.findIntersectingRect(rto).height();
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransRevealRight: // 17
- rto.translate(t.xStepSize * i, 0);
+ rto.translate(t.xStepSize * i / TSTEP_FRAC, 0);
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransRevealDownRight: // 18
- rto.translate(t.xStepSize * i, t.yStepSize * i);
+ rto.translate(t.xStepSize * i / TSTEP_FRAC, t.yStepSize * i / TSTEP_FRAC);
rfrom.bottom -= h - clipRect.findIntersectingRect(rto).height();
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransRevealDown: // 19
- rto.translate(0, t.yStepSize * i);
+ rto.translate(0, t.yStepSize * i / TSTEP_FRAC);
rfrom.bottom -= h - clipRect.findIntersectingRect(rto).height();
rto.clip(clipRect);
break;
case kTransRevealDownLeft: // 20
- rto.translate(-t.xStepSize * i, t.yStepSize * i);
+ rto.translate(-t.xStepSize * i / TSTEP_FRAC, t.yStepSize * i / TSTEP_FRAC);
rfrom.bottom -= h - clipRect.findIntersectingRect(rto).height();
rfrom.left += w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransRevealLeft: // 21
- rto.translate(-t.xStepSize * i, 0);
+ rto.translate(-t.xStepSize * i / TSTEP_FRAC, 0);
rfrom.left += w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransRevealUpLeft: // 22
- rto.moveTo(-t.xStepSize * i, -t.yStepSize * i);
+ rto.moveTo(-t.xStepSize * i / TSTEP_FRAC, -t.yStepSize * i / TSTEP_FRAC);
rfrom.top += h - clipRect.findIntersectingRect(rto).height();
rfrom.left += w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
@@ -467,52 +475,52 @@ void Window::playTransition(uint frame, RenderMode mode, uint16 transDuration, u
case kTransCoverDown: // 29
rto.setHeight(h);
- rto.translate(0, t.yStepSize * i - h);
+ rto.translate(0, -h + t.yStepSize * i / TSTEP_FRAC);
rfrom.top += h - clipRect.findIntersectingRect(rto).height();
rto.clip(clipRect);
break;
case kTransCoverDownLeft: // 30
- rto.translate(w - t.xStepSize * i, t.yStepSize * i - h);
+ rto.translate(w - t.xStepSize * i / TSTEP_FRAC, -h + t.yStepSize * i / TSTEP_FRAC);
rfrom.top += h - clipRect.findIntersectingRect(rto).height();
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransCoverDownRight: // 31
- rto.translate(t.xStepSize * i - w, t.yStepSize * i - h);
+ rto.translate(-w + t.xStepSize * i / TSTEP_FRAC, -h + t.yStepSize * i / TSTEP_FRAC);
rfrom.top += h - clipRect.findIntersectingRect(rto).height();
rfrom.left += w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransCoverLeft: // 32
- rto.translate(w - t.xStepSize * i, 0);
+ rto.translate(w - t.xStepSize * i / TSTEP_FRAC, 0);
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransCoverRight: // 33
- rto.translate(t.xStepSize * i - w, 0);
+ rto.translate(-w + t.xStepSize * i / TSTEP_FRAC, 0);
rfrom.left += w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransCoverUp: // 34
- rto.translate(0, h - t.yStepSize * i);
+ rto.translate(0, h - t.yStepSize * i / TSTEP_FRAC);
rfrom.bottom -= h - clipRect.findIntersectingRect(rto).height();
rto.clip(clipRect);
break;
case kTransCoverUpLeft: // 35
- rto.translate(w - t.xStepSize * i, h - t.yStepSize * i);
+ rto.translate(w - t.xStepSize * i / TSTEP_FRAC, h - t.yStepSize * i / TSTEP_FRAC);
rfrom.bottom -= h - clipRect.findIntersectingRect(rto).height();
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
break;
case kTransCoverUpRight: // 36
- rto.translate(t.xStepSize * i - w, h - t.yStepSize * i);
+ rto.translate(-w + t.xStepSize * i / TSTEP_FRAC, h - t.yStepSize * i / TSTEP_FRAC);
rfrom.bottom -= h - clipRect.findIntersectingRect(rto).height();
rfrom.right -= w - clipRect.findIntersectingRect(rto).width();
rto.clip(clipRect);
@@ -614,6 +622,7 @@ void Window::dissolveTrans(TransParams &t, Common::Rect &clipRect, Graphics::Man
memset(pixmask, 0, 8);
+ // This method treats xStepSize and yStepSize as pixel values, without TSTEP_FRAC.
t.xStepSize = 1;
t.yStepSize = 1;
@@ -1117,13 +1126,13 @@ void Window::transZoom(TransParams &t, Common::Rect &clipRect, Graphics::Managed
continue;
if (t.type == kTransZoomOpen) {
- r.setHeight(t.yStepSize * (i - s) * 2);
- r.setWidth(t.xStepSize * (i - s) * 2);
- r.moveTo(w / 2 - t.xStepSize * (i - s), h / 2 - t.yStepSize * (i - s));
+ r.setHeight(t.yStepSize * (i - s) * 2 / TSTEP_FRAC);
+ r.setWidth(t.xStepSize * (i - s) * 2 / TSTEP_FRAC);
+ r.moveTo(clipRect.left + w / 2 - t.xStepSize * (i - s) / TSTEP_FRAC, clipRect.top + h / 2 - t.yStepSize * (i - s) / TSTEP_FRAC);
} else {
- r.setHeight(h - t.yStepSize * (i - s) * 2);
- r.setWidth(w - t.xStepSize * (i - s) * 2);
- r.moveTo(t.xStepSize * (i - s), t.yStepSize * (i - s));
+ r.setHeight(h - t.yStepSize * (i - s) * 2 / TSTEP_FRAC);
+ r.setWidth(w - t.xStepSize * (i - s) * 2 / TSTEP_FRAC);
+ r.moveTo(clipRect.left + t.xStepSize * (i - s) / TSTEP_FRAC, clipRect.top + t.yStepSize * (i - s) / TSTEP_FRAC);
}
primitives->drawLine(r.left, r.top, r.right, r.top, _wm->_colorBlack, &pd);
@@ -1132,9 +1141,9 @@ void Window::transZoom(TransParams &t, Common::Rect &clipRect, Graphics::Managed
primitives->drawLine(r.left, r.top, r.left, r.bottom, _wm->_colorBlack, &pd);
}
- r.setHeight(t.yStepSize * i * 2);
- r.setWidth(t.xStepSize * i * 2);
- r.moveTo(w / 2 - t.xStepSize * i, h / 2 - t.yStepSize * i);
+ r.setHeight(t.yStepSize * i * 2 / TSTEP_FRAC);
+ r.setWidth(t.xStepSize * i * 2 / TSTEP_FRAC);
+ r.moveTo(clipRect.left + w / 2 - t.xStepSize * i / TSTEP_FRAC, clipRect.top + h / 2 - t.yStepSize * i / TSTEP_FRAC);
if (_vm->processEvents(true)) {
exitTransition(t, nextFrame, clipRect);
@@ -1177,25 +1186,22 @@ void Window::initTransParams(TransParams &t, Common::Rect &clipRect) {
switch (transProps[t.type].dir) {
case kTransDirHorizontal:
t.steps = MIN(MAX(w / t.chunkSize, (uint)1), maxSteps);
- t.xStepSize = w / t.steps;
- t.xpos = w % t.steps;
+ t.xStepSize = (w * TSTEP_FRAC) / t.steps;
break;
case kTransDirVertical:
t.steps = MIN(MAX(h / t.chunkSize, (uint)1), maxSteps);
- t.yStepSize = h / t.steps;
- t.ypos = h % t.steps;
+ t.yStepSize = (h * TSTEP_FRAC) / t.steps;
break;
case kTransDirBoth:
t.steps = MIN(MAX(m / t.chunkSize, (uint)1), maxSteps);
- t.xStepSize = w / t.steps;
- t.xpos = w % t.steps;
- t.yStepSize = h / t.steps;
- t.ypos = h % t.steps;
+ t.xStepSize = (w * TSTEP_FRAC) / t.steps;
+ t.yStepSize = (h * TSTEP_FRAC) / t.steps;
break;
+ // Multipass algorithms, using pixel sizing
case kTransDirStepsH:
{
uint minChunkSize = (w - 1)/((maxSteps/2) - 1);
Commit: 9e1359c2d96c7eb9b5dc9cf1ca868d7c7a8c08ab
https://github.com/scummvm/scummvm/commit/9e1359c2d96c7eb9b5dc9cf1ca868d7c7a8c08ab
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Always update sprites in Score::updateCurrentFrame
It's possible for a developer to make an exitFrame handler that checks
for a condition (e.g. rollOver), then changes a sprite member without
setting the puppet flag, then calls updateStage().
The result is the new graphic shows up while the condition is true, then
reverts back to whatever was in the frame when the condition goes false.
Fixes the cooked main menu screen in kidsbiblepaul.
Fixes the menu system in kyoto.
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 0037c5b57b4..24bdbf5a5af 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -494,6 +494,14 @@ void Score::updateCurrentFrame() {
// finally, update the channels and buffer any dirty rectangles
updateSprites(kRenderModeNormal, true);
+ } else if (!_vm->_playbackPaused) {
+ // Loading the same frame; e.g. "go to frame".
+ // This is mostly a no-op, however any sprite changes for
+ // non-puppet sprites will be reverted.
+
+ // If playback has been paused on a frame, the sprites aren't cleaned.
+ updateSprites(kRenderModeNormal, true);
+
}
return;
}
Commit: 0590b6dcbbf97adbfe5fd43aff561d908350d19b
https://github.com/scummvm/scummvm/commit/0590b6dcbbf97adbfe5fd43aff561d908350d19b
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: LINGO: Add XObject stubs for Puppet Motel
Changed paths:
A engines/director/lingo/xlibs/voyagerxsound.cpp
A engines/director/lingo/xlibs/voyagerxsound.h
A engines/director/lingo/xtras/masterapp.cpp
A engines/director/lingo/xtras/masterapp.h
engines/director/lingo/lingo-object.cpp
engines/director/lingo/xlibs/dllglue.cpp
engines/director/module.mk
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index 4a2fce87ed2..1e43eb9fdea 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -126,6 +126,7 @@
#include "director/lingo/xlibs/videodiscxobj.h"
#include "director/lingo/xlibs/vmisonxfcn.h"
#include "director/lingo/xlibs/volumelist.h"
+#include "director/lingo/xlibs/voyagerxsound.h"
#include "director/lingo/xlibs/widgetxobj.h"
#include "director/lingo/xlibs/window.h"
#include "director/lingo/xlibs/wininfo.h"
@@ -139,6 +140,7 @@
#include "director/lingo/xtras/directsound.h"
#include "director/lingo/xtras/filextra.h"
#include "director/lingo/xtras/keypoll.h"
+#include "director/lingo/xtras/masterapp.h"
#include "director/lingo/xtras/openurl.h"
#include "director/lingo/xtras/qtvrxtra.h"
#include "director/lingo/xtras/rtk.h"
@@ -209,9 +211,10 @@ void Lingo::cleanupMethods() {
}
#define XLIBDEF(class, flags, version) \
- { class::fileNames, class::open, class::close, flags, version }
+ { #class, class::fileNames, class::open, class::close, flags, version }
static const struct XLibProto {
+ const char *className;
const XlibFileDesc *names;
XLibOpenerFunc opener;
XLibCloserFunc closer;
@@ -279,6 +282,7 @@ static const struct XLibProto {
XLIBDEF(MMovieXObj, kXObj, 400), // D4
XLIBDEF(ManiacBgXObj, kXObj, 300), // D3
XLIBDEF(MapNavigatorXObj, kXObj, 400), // D4
+ XLIBDEF(MasterAppXtra, kXtraObj, 500), // D5
XLIBDEF(MemCheckXObj, kXObj, 400), // D4
XLIBDEF(MemoryXObj, kXObj, 300), // D3
XLIBDEF(Misc, kXObj, 400), // D4
@@ -323,6 +327,7 @@ static const struct XLibProto {
XLIBDEF(ValkyrieXObj, kXObj, 400), // D4
XLIBDEF(VideodiscXObj, kXObj, 200), // D2
XLIBDEF(VolumeList, kXObj, 300), // D3
+ XLIBDEF(VoyagerXSoundXObj, kXObj, 400), // D4
XLIBDEF(WinInfoXObj, kXObj, 400), // D4
XLIBDEF(WidgetXObj, kXObj, 400), // D4
XLIBDEF(WindowXObj, kXObj, 200), // D2
@@ -333,22 +338,36 @@ static const struct XLibProto {
XLIBDEF(XPlayAnim, kXObj, 300), // D3
XLIBDEF(XsoundXtra, kXtraObj, 500), // D5
XLIBDEF(Yasix, kXObj, 300), // D3
- { nullptr, nullptr, nullptr, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, 0, 0 }
};
void Lingo::initXLibs() {
+ Common::HashMap<Common::String, uint32, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> quirks;
for (const XLibProto *lib = xlibs; lib->names; lib++) {
if (lib->version > _vm->getVersion())
continue;
for (uint i = 0; lib->names[i].name; i++) {
- // If this entry belongs to a specific game, skip it unless matched
- if (lib->names[i].gameId && strcmp(lib->names[i].gameId, g_director->getGameId()))
+ bool isQuirk = false;
+ if (lib->names[i].gameId) {
+ isQuirk = strcmp(lib->names[i].gameId, g_director->getGameId()) == 0;
+ // If this entry belongs to a specific game, skip it unless matched
+ if (!isQuirk)
+ continue;
+ }
+
+ if (isQuirk) {
+ quirks[lib->names[i].name] = i;
+ } else if (quirks.contains(lib->names[i].name)) {
+ // Ignore new entries that conflict with per-game quirks
continue;
+ }
- if (_xlibOpeners.contains(lib->names[i].name))
+ if (!isQuirk && _xlibOpeners.contains(lib->names[i].name))
warning("Lingo::initXLibs(): Duplicate entry for %s", lib->names[i].name);
+ debugC(5, kDebugLingoExec, "Lingo::initXLibs(): %s -> %s", lib->names[i].name, lib->className);
+
_xlibOpeners[lib->names[i].name] = lib->opener;
_xlibClosers[lib->names[i].name] = lib->closer;
}
diff --git a/engines/director/lingo/xlibs/dllglue.cpp b/engines/director/lingo/xlibs/dllglue.cpp
index d6eb3c048d6..61c38855310 100644
--- a/engines/director/lingo/xlibs/dllglue.cpp
+++ b/engines/director/lingo/xlibs/dllglue.cpp
@@ -31,6 +31,7 @@
*
* USED IN:
* Virtual Nightclub
+ * Puppet Motel
*
**************************************************/
diff --git a/engines/director/lingo/xlibs/voyagerxsound.cpp b/engines/director/lingo/xlibs/voyagerxsound.cpp
new file mode 100644
index 00000000000..51e524ddbec
--- /dev/null
+++ b/engines/director/lingo/xlibs/voyagerxsound.cpp
@@ -0,0 +1,161 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xlibs/voyagerxsound.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Puppet Motel
+ *
+ **************************************************/
+
+/*
+-- Voyager Company XSound External Factory. 27October1995
+--XSound
+I mNew --Creates a new instance of XSound
+X mDispose --Disposes of XSound instance
+X init --Initializes the XSound library
+III open, numchan, monostereo --Opens the specified sound channel
+X close --Stops playback and closes all channels
+XI bufsize, kbytes --Sets buffer size to kbytes
+IS exists, name --Determines if AIFF file exists on disk
+II status, chan --Determines if the specified channel is busy
+XS path, pathname --Sets path used when opening sound files
+SS duration, name --Returns duration in secs for specified file
+SI curtime, chan --Returns current file location in seconds
+V playfile, chan, name, tstart, tend --Plays specified AIFF file
+IIS loadfile, chan, name -- preloads the specified AIFF file
+XI unloadfile, chan -- unloads a previously loaded file
+V playsnd, chan, name, tstart, tend --Plays specified WAVE file
+V extplayfile, chan, name, lstart, lend --Plays specified looped AIFF
+XI stop, chan --Stops playback on specified channel
+XII volume, chan, vol --Sets volume for specified channel
+XIII leftrightvol, chan, lvol, rvol --Sets volume of left and right
+V fade, chan, endvol, duration, autostop --Fades channel over duration
+XII frequency, chan, percent --Transposes pitch by percent
+XII pan, chan, panvalue --Sets the panning of a channel
+ISS startrecord, name, duration --Records new sound file
+X stoprecord --Stops any recording in process
+XS recordpath, path --Sets default record path
+ */
+
+namespace Director {
+
+const char *VoyagerXSoundXObj::xlibName = "XSound";
+const XlibFileDesc VoyagerXSoundXObj::fileNames[] = {
+ { "XSound", "puppetmotel" },
+ { "XSound32", "puppetmotel" },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", VoyagerXSoundXObj::m_new, 0, 0, 400 },
+ { "dispose", VoyagerXSoundXObj::m_dispose, 0, 0, 400 },
+ { "init", VoyagerXSoundXObj::m_init, 0, 0, 400 },
+ { "open", VoyagerXSoundXObj::m_open, 2, 2, 400 },
+ { "close", VoyagerXSoundXObj::m_close, 0, 0, 400 },
+ { "bufsize", VoyagerXSoundXObj::m_bufsize, 1, 1, 400 },
+ { "exists", VoyagerXSoundXObj::m_exists, 1, 1, 400 },
+ { "status", VoyagerXSoundXObj::m_status, 1, 1, 400 },
+ { "path", VoyagerXSoundXObj::m_path, 1, 1, 400 },
+ { "duration", VoyagerXSoundXObj::m_duration, 1, 1, 400 },
+ { "curtime", VoyagerXSoundXObj::m_curtime, 1, 1, 400 },
+ { "playfile", VoyagerXSoundXObj::m_playfile, 0, 0, 400 },
+ { "loadfile", VoyagerXSoundXObj::m_loadfile, 2, 2, 400 },
+ { "unloadfile", VoyagerXSoundXObj::m_unloadfile, 1, 1, 400 },
+ { "playsnd", VoyagerXSoundXObj::m_playsnd, 0, 0, 400 },
+ { "extplayfile", VoyagerXSoundXObj::m_extplayfile, 0, 0, 400 },
+ { "stop", VoyagerXSoundXObj::m_stop, 1, 1, 400 },
+ { "volume", VoyagerXSoundXObj::m_volume, 2, 2, 400 },
+ { "leftrightvol", VoyagerXSoundXObj::m_leftrightvol, 3, 3, 400 },
+ { "fade", VoyagerXSoundXObj::m_fade, 0, 0, 400 },
+ { "frequency", VoyagerXSoundXObj::m_frequency, 2, 2, 400 },
+ { "pan", VoyagerXSoundXObj::m_pan, 2, 2, 400 },
+ { "startrecord", VoyagerXSoundXObj::m_startrecord, 2, 2, 400 },
+ { "stoprecord", VoyagerXSoundXObj::m_stoprecord, 0, 0, 400 },
+ { "recordpath", VoyagerXSoundXObj::m_recordpath, 1, 1, 400 },
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+VoyagerXSoundXObject::VoyagerXSoundXObject(ObjectType ObjectType) :Object<VoyagerXSoundXObject>("XSound") {
+ _objType = ObjectType;
+}
+
+void VoyagerXSoundXObj::open(ObjectType type, const Common::Path &path) {
+ VoyagerXSoundXObject::initMethods(xlibMethods);
+ VoyagerXSoundXObject *xobj = new VoyagerXSoundXObject(type);
+ if (type == kXtraObj)
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void VoyagerXSoundXObj::close(ObjectType type) {
+ VoyagerXSoundXObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void VoyagerXSoundXObj::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("VoyagerXSoundXObj::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+// For some reason the game code calls all of these with ARGC, so always return something
+XOBJSTUBNR(VoyagerXSoundXObj::m_dispose)
+XOBJSTUBNR(VoyagerXSoundXObj::m_init)
+XOBJSTUB(VoyagerXSoundXObj::m_open, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_close, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_bufsize, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_exists, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_status, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_path, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_duration, "")
+XOBJSTUB(VoyagerXSoundXObj::m_curtime, "")
+XOBJSTUB(VoyagerXSoundXObj::m_playfile, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_loadfile, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_unloadfile, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_playsnd, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_extplayfile, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_stop, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_volume, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_leftrightvol, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_fade, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_frequency, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_pan, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_startrecord, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_stoprecord, 0)
+XOBJSTUB(VoyagerXSoundXObj::m_recordpath, 0)
+
+}
diff --git a/engines/director/lingo/xlibs/voyagerxsound.h b/engines/director/lingo/xlibs/voyagerxsound.h
new file mode 100644
index 00000000000..da9d7620224
--- /dev/null
+++ b/engines/director/lingo/xlibs/voyagerxsound.h
@@ -0,0 +1,70 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_VOYAGERXSOUND_H
+#define DIRECTOR_LINGO_XLIBS_VOYAGERXSOUND_H
+
+namespace Director {
+
+class VoyagerXSoundXObject : public Object<VoyagerXSoundXObject> {
+public:
+ VoyagerXSoundXObject(ObjectType objType);
+};
+
+namespace VoyagerXSoundXObj {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_new(int nargs);
+void m_dispose(int nargs);
+void m_init(int nargs);
+void m_open(int nargs);
+void m_close(int nargs);
+void m_bufsize(int nargs);
+void m_exists(int nargs);
+void m_status(int nargs);
+void m_path(int nargs);
+void m_duration(int nargs);
+void m_curtime(int nargs);
+void m_playfile(int nargs);
+void m_loadfile(int nargs);
+void m_unloadfile(int nargs);
+void m_playsnd(int nargs);
+void m_extplayfile(int nargs);
+void m_stop(int nargs);
+void m_volume(int nargs);
+void m_leftrightvol(int nargs);
+void m_fade(int nargs);
+void m_frequency(int nargs);
+void m_pan(int nargs);
+void m_startrecord(int nargs);
+void m_stoprecord(int nargs);
+void m_recordpath(int nargs);
+
+} // End of namespace VoyagerXSoundXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/masterapp.cpp b/engines/director/lingo/xtras/masterapp.cpp
new file mode 100644
index 00000000000..b915a53cb24
--- /dev/null
+++ b/engines/director/lingo/xtras/masterapp.cpp
@@ -0,0 +1,680 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xtras/masterapp.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * puppetmotel
+ *
+ **************************************************/
+
+/*
+-- xtra MasterApp
+-- MasterApp Xtra
+-- Copyright © 1996-1998 Glenn M. Picher, Dirigo Multimedia
+--
+-- Published and supported by:
+--
+-- updateStage
+-- 1341 Mass Ave., Suite 124
+-- Arlington, MA USA 02174
+-- Web: http://www.updatestage.com
+-- Email: sales at updatestage.com, support at updatestage.com
+-- Voice: 781-641-6043
+-- Fax: 781-641-7068
+-- Email/phone/fax support hours: 10AM - 6PM US EST
+--
+--
+-- Developed by:
+--
+-- Glenn M. Picher
+-- Dirigo Multimedia
+-- 50 Market St., Suite 1A-338
+-- South Portland, ME USA 04106
+-- Web: http://www.maine.com/shops/gpicher
+-- Email: gpicher at maine.com
+-- Voice: 207-767-8015
+-- Fax: 207-767-1018
+--
+-- Registered 32-bit version, April 22, 1998, v1.0.0.37
+--
+new object me
+-- Note: since the MasterApp Xtra only uses global handlers, there is no need
+-- to create a child object. Just use the handlers listed below.
+--
++ register object xtraReference, string serialNumber
+-- Note: you only get one chance per Director session to enter this correctly.
+-- There will be a beep and a five second delay if you get the serial number wrong.
+-- Subsequent attempts to register will have no effect, until restarting Director.
+--
+-- Note: check the return values of all handlers for a string with word 1 'Error:' !
+--
+-- TASK FUNCTIONS
+-- --------------
+* mappGetTaskList
+-- Returns a string listing of all currently running tasks, one per line,
+-- with the following info on each line, separated by commas:
+-- taskName, taskID, parentTaskID, instanceID, moduleID
+-- Note: the .x32 and Mac versions use the same numbers for taskID, instanceID,
+-- and moduleID. Under Windows NT with the .x32 version, parentTaskID is always 0.
+-- Note that Win32 sometimes reuses taskIDs; verify the taskName is still the same!
+* mappGetTaskIDs
+-- Get taskIDs for all running tasks, separated by ' '. Use 'word' to examine results.
+* mappTaskName integer taskID
+* mappTaskParent integer taskID
+* mappTaskInstance integer taskID
+* mappTaskModule integer taskID
+* mappTaskEvents integer taskID --Applies to Win 3.1 only; on Win95/NT, always returns '0'.
+* mappGetTaskWindowList integer taskID
+-- Gets a listing of all windows belonging to this taskID, in the form:
+-- windowName, windowID, parentWindowID, hasChildren, windowType
+* mappGetTaskWindowIDs integer taskID
+* mappGetWindowTask integer windowID
+* mappRudeQuitTask integer taskID, integer exitValue
+-- Rude way of quitting a program. Using mappCloseWindow is better! Returns
+-- 0 if the program's already quit, -4 if it's still running. It's not unusual
+-- to see -4 as a result. On Win32, -4 is *always* the result.
+* mappTaskIsRunning integer taskID
+* mappFeedTimeSlice integer taskID
+-- Note: on Win32, the taskID is ignored; has same effect as a generic time slice.
+* mappFeedGenericTimeSlice
+* mappHostAppTask
+-- Returns the taskID for this Xtra's host application.
+* mappDirectorTask
+* mappAuthorwareTask
+-- Synonyms for mappHostAppTask.
+* mappGetTaskOrder
+-- Reports taskIDs with visible windows, in front-to-back order. Note that Windows
+-- Explorer usually shows up first, due to the Windows task bar.
+--
+--
+-- THREAD FUNCTIONS (WIN32 ONLY)
+-- -----------------------------
+* mappGetThreadList
+-- .x32 version only; gets a listing of all threads, in the form:
+-- threadID, parentTaskID
+-- Primarily useful with mappGetThreadWindowList and 16-bit apps on NT.
+* mappGetTaskThreads integer taskID
+-- .x32 version only; gets a list of all threadIDs for this taskID, separated by ' '.
+* mappGetThreadWindowList integer threadID
+-- .x32 version only; gets a list of all windows for this threadID, in the form:
+-- windowName, windowID, parentWindowID, hasChildren, windowType
+* mappGetThreadWindowIDs integer threadID
+-- .x32 version only; reports only the thread's windowIDs, separated by spaces.
+--
+--
+-- MODULE FUNCTIONS
+-- ----------------
+* mappGetModuleList
+-- Returns a string listing of all currently running modules, one per line,
+-- with the following info on each line, separated by commas:
+-- moduleName, moduleID, moduleFileName
+-- Note: the .x32 and Mac versions use the same numbers for taskID, instanceID,
+-- and moduleID. Under Windows NT with the .x32 version, moduleFileName does not
+-- include the full path or the filename extension. Note that Win32 sometimes
+-- reuses moduleIDs; verify the moduleName is still the same!
+* mappGetModuleIDs
+-- Returns a string of moduleIDs, separated by spaces.
+* mappModuleTask integer moduleID
+* mappModuleFilename integer moduleID
+-- Note: on Windows NT, the answer does not include a full path or extension!
+* mappHostAppFilename
+* mappDirectorFilename
+* mappAuthorwareFilename
+-- Where is this program's executable file located? These are all synonyms.
+* mappModuleName integer moduleID
+-- Note: on Win32, this is a synonym for mappTaskName.
+* mappModuleIsRunning integer moduleID
+-- Is the indicated moduleID still running?
+* mappUnloadModule integer moduleID
+-- Note: on Win32, each task gets its own address space and thus unloading
+-- a module doesn't affect other tasks; so on Win32 and the Mac, this method is a
+-- synonym for mappRudeQuitTask().
+* mappHostAppModule
+* mappDirectorModule
+* mappAuthorwareModule
+-- Returns moduleID for the current program. All are synonyms.
+--
+--
+-- WINDOW FUNCTIONS
+-- ----------------
+* mappGetParentWindowList
+-- Gets a list of all parent windows, in the form:
+-- windowName, windowID, parentWindowID, hasChildren, windowType
+-- These are reported in front-to-back screen draw order, though not all of
+-- the reported windows may be visible or on-screen. Note the Windows 95/NT
+-- taskbar, or tooltip windows, are typically the first windows listed.
+* mappGetParentWindowIDs
+-- Gets all parent windowIDs, separated by spaces.
+* mappGetChildWindowList integer windowID
+-- Gets a list of all child windows of the supplied window, in the form:
+-- windowName, windowID, parentWindowID, hasChildren, windowType
+* mappGetChildWindowIDs integer windowID
+-- Gets a string of all windowIDs owned by the windowID, separated by ' '.
+* mappWindowParent integer windowID
+* mappGetWindowParent integer windowID
+-- Gets parent windowID of the supplied windowID. These are synonyms.
+* mappGetHighestWindowParent integer windowID
+* mappWindowName integer windowID
+* mappGetWindowName integer windowID
+-- Gets window name. These are synonyms.
+* mappSetWindowName integer windowID, string newName
+* mappWindowHasChildren integer windowID
+* mappWindowType integer windowID
+* mappGetWindowType integer windowID
+* mappWindowIsVisible integer windowID
+* mappFindWindow any windowName, any windowType
+-- Get a windowID for the first parent window matching the windowName and windowType.
+-- For windowName, supply a string to check a windowName, or 0 for all windowNames.
+-- For windowType, supply a string to check a windowType, or 0 for all windowTypes.
+-- Returns a string for an error, or an integer with the first found windowID.
+-- Example: see if Windows Paint accessory is running with syntax like this:
+-- set alreadyRunning = integerP(mappFindWindow(0,"MSPaintApp"))
+* mappGetActiveWindow
+-- Gets the currently active top level parent windowID. Applies only to the host app,
+-- not other apps. Generally the same as mappHostAppMainWindow(), but can be used with
+-- mappSetActiveWindow() to determine the current state.
+* mappSetActiveWindow integer windowID
+-- Sets the active window to the supplied top level parent windowID . Use with care-- can
+-- take over mouse and keyboard input! Returns the previously active windowID, or 0 if no
+-- window in the host app was previously active.
+* mappGetForegroundWindow
+-- Win32 only method! Returns the windowID that the user is currently working with.
+-- Can be easier to use than mappGetParentWindowList() or mappGetParentWindowIDs(),
+-- since it doesn't return floating Windows Explorer task bar windowIDs, etc.
+* mappSetForegroundWindow integer windowID
+-- Win32 only method! Changes front to back draw order and gives the window's task higher
+-- priority for processor time slices. Similar to mappWindowToFront, but more immediate.
+-- Returns TRUE or FALSE for success or failure.
+* mappGetKeyboardInputWindow
+-- What windowID is currently getting keyboard events?
+* mappSetKeyboardInputWindow integer windowID
+-- Set the windowID to receive keyboard events. Supply 0 if you want keyboard input to be
+-- ignored. Returns the windowID previously receiving keyboard events.
+* mappCaptureMouseInput integer windowID
+-- Directs mouse input to the specified window. For use with the host app's windows.
+-- Returns the previously set input window. The supplied windowID must already be
+-- frontmost. This allows a window to react to mouse movement outside its rectangle.
+-- This doesn't prevent other windows from being activated by mouse clicks.
+* mappReleaseMouseInput
+-- Frees mouse input to be received normally. Reverses effect of mappCaptureMouseInput().
+-- No return value.
+* mappGetParentWindowTopChild integer windowID
+-- Returns the topmost child window of the supplied parent windowID. May return a 'floating
+-- palette' window, such as Director's 'Control Panel' window. Supply 0 if you want
+-- the top window on the screen-- this can tell you if the Windows taskbar is showing, if
+-- the windowType of the returned top window is 'Shell_TrayWnd'.
+* mappGetDesktopWindow
+-- Gets a windowID for the desktop, the screen 'parent' of every parent window.
+* mappGetWindowOutsideRect integer windowID
+* mappGetWindowInsideRect integer windowID
+* mappSetWindowOutsideRect integer windowID, integer l, integer t, integer b, integer r
+* mappSetWindowRect integer windowID, integer l, integer t, integer b, integer r
+* mappCloseWindow integer windowID
+-- Closes a window. This is the normal way to quit an application. Returns
+-- -1 (bad windowID), 0 (windows has quit), or -2 (windows hasn't quit yet).
+-- Unlike the XObject and .x16 version, the .x32 version waits up to 3 seconds
+-- for the window to quit.
+* mappWindowExists integer windowID
+* mappWindowToFront integer windowID
+-- Brings the window to the front of the screen.
+* mappWindowToBack integer windowID
+-- Sends the window to the back.
+* mappHideWindow integer windowID
+* mappShowWindow integer windowID
+-- Controls the appearance of the window.
+* mappMinimizeWindow integer windowID
+* mappRestoreWindow integer windowID
+* mappMaximizeWindow integer windowID
+* mappDirectorStageWindow
+-- Returns the windowID of the stage. Director-only; doesn't work in Authorware.
+* mappHostAppMainWindow
+-- Returns the main windowID for this Xtra's host application.
+-- In the case of Director, this is the parent of the parent of the stage window.
+* mappDirectorMainWindow
+* mappAuthorwareMainWindow
+-- Synonyms for mappHostAppMainWindow.
+* mappKeepOnTop integer windowID
+-- Window is displayed on top of all other windows, even when other app's
+-- windows are activated. Useful for making floating control panels.
+* mappDontKeepOnTop integer windowID
+-- Reverses the results of mappKeepOnTop().
+--
+--
+-- LAUNCH FUNCTIONS
+-- ----------------
+* mappLaunch string theApp, string theCommandLineArguments
+-- Launch the program indicated by the full pathname 'theApp', possibly with command line
+-- arguments (supply EMPTY if there are no command line arguments). Returns an instanceID
+-- or a moduleID (which is the same number as a taskID with the .x32 and Mac versions).
+-- With the .x16 version, use mappInstanceTask() or mappModuleTask() to get a taskID.
+-- Note that Win32 sometimes reuses taskIDs, so verify the taskName is still what
+-- you expect; see mappGetTaskList() and mappTaskName().
+* mappLaunchButDontActivate string theApp, string theCommandLineArguments
+* mappLaunchHidden string theApp, string theCommandLineArguments
+* mappLaunchMinimized string theApp, string theCommandLineArguments
+* mappLaunchMaximized string theApp, string theCommandLineArguments
+-- Similar to mappLaunch, but with different initial appearance. Not every application
+-- respects the requested appearance-- testing is required.
+--
+--
+-- LAUNCH UTILITIES
+-- ----------------
+* mappLocateExecutable string theFile
+-- Locate the executable file registered to handle the document file indicated
+-- by the full pathname 'theFile'. Alternative syntax: supply a file name with no path
+-- and the DOS 'PATH' environment variable will be searched for the application.
+-- Note that mappGetWindowsRegistry() can also be used to find apps, even if they do
+-- not register any document types.
+* mappGetShortFileName string theFile
+* mappGetLongFileName string theFile
+-- Converts between MS-DOS 8.3 compliant short file names and long file names. Some
+-- programs require, or work more reliably with, short file names.
+* mappOpenDocument string theDocument
+-- Opens the document with the application registered to open that type of document.
+-- Supply a full pathname to the document. Returns 'OK', or a string with word 1 'Error:'.
+-- This is a difference from the XObject version, which returns an instanceID or moduleID;
+-- however, the 32-bit Windows API does not support this! Use mappGetTaskList(), etc. to
+-- identify the launched applications, or use mappLaunch() with the doc as the command line.
+* mappPrintDocument string theDocument
+-- Opens the document with the application registered to open that type of document
+-- and prints one copy to the default printer. Same return values as mappOpenDocument.
+* mappInstanceTask integer instanceID
+* mappInstanceIsRunning integer instanceID
+* mappUnloadInstance integer instanceID
+-- Note: on Win32, each instance gets its own address space and thus unloading
+-- an instance doesn't affect other tasks; so on Win32 and the Mac, this method is a
+-- synonym for mappRudeQuitTask().
+--
+--
+-- INPUT SIMULATION
+-- ----------------
+* mappFakeMouseClick integer windowID, integer x, integer y
+* mappFakeMouseClickWait integer windowID, integer x, integer y
+* mappFakeCharacter integer windowID, string theChar
+* mappFakeCharacterWait integer windowID, string theChar
+* mappFakeCharCode integer windowID, integer charNum, integer codeNum
+* mappFakeCharCodeWait integer windowID, integer charNum, integer codeNum
+-- Simulates a keypress of a special key in the window. Examples:
+-- Tab key = 9,15 ; Return key = 13,28; Escape key = 27,1;
+-- Ctrl-x (cut) = 24,45; Ctrl-c (copy) = 3,46; Ctrl-v (paste) =
+-- 22,47; for others, use a keyboard sniffer. See documentation.
+* mappShowMenu integer windowID
+* mappShowMenuWait integer windowID
+* mappAnyWindowAtPoint integer x, integer y
+-- What windowID is under point(x,y)? Use screen coordinates.
+* mappChildWindowAtPoint integer windowID, integer x, integer y
+-- What child window of the supplied parent windowID is under point(x,y)?
+-- Use screen coordinates. This can provide a windowID *within* a windowID
+-- returned by mappAnyWindowAtPoint().
+--
+--
+-- WINDOWS REGISTRY FUNCTIONS
+-- --------------------------
+* mappGetWindowsRegistry string theBase, string theKey, string theValue
+-- Gets the value theValue of registry key theKey, a subkey of key theBase.
+-- For the .x16 version, 'theBase' can only be 'HKEY_CLASSES_ROOT' and theValue
+-- must be EMPTY (because that's just how the 16-bit registry works). For the .x32
+-- version, theBase can also be 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE' or
+-- 'HKEY_USERS'. Note that theKey can specify multiple keys in the registry,
+-- separated by '\' characters. Suppy EMPTY for theValue if you want the '(Default)'
+-- value for theKey (the 16-bit registry only knows about the '(Default') key).
+-- See the read me info, and experiment with REGEDIT.EXE, to learn more!
+-- Returns a string, an integer, or binary data in the form of a list of bytes (as
+-- integers from 0 to 255), depending on what type of entry is present in the registry.
+* mappSetWindowsRegistry string theBase, string theKey, string theValue, any theData
+-- Sets a registry entry with new data. The key and its parent keys are created if needed.
+-- Supply a string, an integer, or binary data in the form of a list of bytes as integers
+-- from 0 to 255 (depending on what sort of entry you are making). The entry type will be
+-- changed if needed. Supply EMPTY for theValue to set the '(Default)' value (the default
+-- 16-bit registry value), which must be a string value. Note: while you can use all the
+-- keys for 'theBase' listed under mappGetWindowsRegistry(), it's inadvisable to create
+-- settings under 'HKEY_USERS'. NOTE: Be *careful* with this method!
+-- It can damage your registry data and prevent your computer from working right.
+-- Please back up your registry data before doing development work and testing.
+* mappGetWindowsRegistryEntries string theBase, string theKey
+-- Returns a string with all entries (subkeys and values) available under the
+-- supplied key; one entry per line. Subkeys are listed first, then values; but
+-- the order in which subkeys and values are reported may vary from call to call.
+-- The default 16-bit value is not included in the list of values; it's always available.
+* mappGetWindowsRegistryKeys string theBase, string theKey
+-- Returns a string with all subkeys available under the
+-- supplied key; one entry per line.
+* mappGetWindowsRegistryValues string theBase, string theKey
+-- Returns a string with all values available under the
+-- supplied key; one entry per line. Does not include 16-bit default value.
+* mappGetWindowsRegistryEntryType string theBase, string theKey, string theValue
+-- Returns the type of data in the indicated registry entry: 'string', 'integer',
+-- 'bytelist', 'unsupported' or 'subkey'.
+* mappDeleteWindowsRegistry string theBase, string theKey, string theValue
+-- Erases the registry key. On Windows 95, this also deletes any subkeys.
+-- On Windows NT, this won't work if subkeys exist, so use mappGetWindowsRegistryKeys()
+-- to detect and delete any subkeys first. NOTE: Be *careful* with this method!
+-- It can damage your registry data and prevent your computer from working right.
+-- Please back up your registry data before doing development work and testing.
+-- Note: supply 'EMPTY' for 'theValue' for 16-bit registry values.
+--
+--
+-- MISCELLANEOUS WINDOWS-ONLY FUNCTIONS
+-- ------------------------------------
+* mappGetDefaultPrinter
+-- What printer is set as the default printer?
+* mappSetDefaultPrinter string thePrinter
+-- Set this printer to be the default printer. Supply the exact results of either
+-- mappGetDefaultPrinter() or one of the lines returned by mappGetInstalledPrinters().
+* mappGetInstalledPrinters
+-- What are the installed printers which can be used with mappSetDefaultPrinter?
+* mappWindowsFlavor
+-- Which flavor of Windows is running? Returns 'win31', 'win95' or 'winNT'.
+-- Obviously the .x32 version never reports 'win31'.
+
+ */
+
+namespace Director {
+
+const char *MasterAppXtra::xlibName = "MasterApp";
+const XlibFileDesc MasterAppXtra::fileNames[] = {
+ { "masterapp", nullptr },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", MasterAppXtra::m_new, 0, 0, 500 },
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+ { "mappGetTaskList", MasterAppXtra::m_mappGetTaskList, 0, 0, 500, HBLTIN },
+ { "mappGetTaskIDs", MasterAppXtra::m_mappGetTaskIDs, 0, 0, 500, HBLTIN },
+ { "mappTaskName", MasterAppXtra::m_mappTaskName, 1, 1, 500, HBLTIN },
+ { "mappTaskParent", MasterAppXtra::m_mappTaskParent, 1, 1, 500, HBLTIN },
+ { "mappTaskInstance", MasterAppXtra::m_mappTaskInstance, 1, 1, 500, HBLTIN },
+ { "mappTaskModule", MasterAppXtra::m_mappTaskModule, 1, 1, 500, HBLTIN },
+ { "mappTaskEvents", MasterAppXtra::m_mappTaskEvents, 1, 1, 500, HBLTIN },
+ { "mappGetTaskWindowList", MasterAppXtra::m_mappGetTaskWindowList, 1, 1, 500, HBLTIN },
+ { "mappGetTaskWindowIDs", MasterAppXtra::m_mappGetTaskWindowIDs, 1, 1, 500, HBLTIN },
+ { "mappGetWindowTask", MasterAppXtra::m_mappGetWindowTask, 1, 1, 500, HBLTIN },
+ { "mappRudeQuitTask", MasterAppXtra::m_mappRudeQuitTask, 2, 2, 500, HBLTIN },
+ { "mappTaskIsRunning", MasterAppXtra::m_mappTaskIsRunning, 1, 1, 500, HBLTIN },
+ { "mappFeedTimeSlice", MasterAppXtra::m_mappFeedTimeSlice, 1, 1, 500, HBLTIN },
+ { "mappFeedGenericTimeSlice", MasterAppXtra::m_mappFeedGenericTimeSlice, 0, 0, 500, HBLTIN },
+ { "mappHostAppTask", MasterAppXtra::m_mappHostAppTask, 0, 0, 500, HBLTIN },
+ { "mappDirectorTask", MasterAppXtra::m_mappDirectorTask, 0, 0, 500, HBLTIN },
+ { "mappAuthorwareTask", MasterAppXtra::m_mappAuthorwareTask, 0, 0, 500, HBLTIN },
+ { "mappGetTaskOrder", MasterAppXtra::m_mappGetTaskOrder, 0, 0, 500, HBLTIN },
+ { "mappGetThreadList", MasterAppXtra::m_mappGetThreadList, 0, 0, 500, HBLTIN },
+ { "mappGetTaskThreads", MasterAppXtra::m_mappGetTaskThreads, 1, 1, 500, HBLTIN },
+ { "mappGetThreadWindowList", MasterAppXtra::m_mappGetThreadWindowList, 1, 1, 500, HBLTIN },
+ { "mappGetThreadWindowIDs", MasterAppXtra::m_mappGetThreadWindowIDs, 1, 1, 500, HBLTIN },
+ { "mappGetModuleList", MasterAppXtra::m_mappGetModuleList, 0, 0, 500, HBLTIN },
+ { "mappGetModuleIDs", MasterAppXtra::m_mappGetModuleIDs, 0, 0, 500, HBLTIN },
+ { "mappModuleTask", MasterAppXtra::m_mappModuleTask, 1, 1, 500, HBLTIN },
+ { "mappModuleFilename", MasterAppXtra::m_mappModuleFilename, 1, 1, 500, HBLTIN },
+ { "mappHostAppFilename", MasterAppXtra::m_mappHostAppFilename, 0, 0, 500, HBLTIN },
+ { "mappDirectorFilename", MasterAppXtra::m_mappDirectorFilename, 0, 0, 500, HBLTIN },
+ { "mappAuthorwareFilename", MasterAppXtra::m_mappAuthorwareFilename, 0, 0, 500, HBLTIN },
+ { "mappModuleName", MasterAppXtra::m_mappModuleName, 1, 1, 500, HBLTIN },
+ { "mappModuleIsRunning", MasterAppXtra::m_mappModuleIsRunning, 1, 1, 500, HBLTIN },
+ { "mappUnloadModule", MasterAppXtra::m_mappUnloadModule, 1, 1, 500, HBLTIN },
+ { "mappHostAppModule", MasterAppXtra::m_mappHostAppModule, 0, 0, 500, HBLTIN },
+ { "mappDirectorModule", MasterAppXtra::m_mappDirectorModule, 0, 0, 500, HBLTIN },
+ { "mappAuthorwareModule", MasterAppXtra::m_mappAuthorwareModule, 0, 0, 500, HBLTIN },
+ { "mappGetParentWindowList", MasterAppXtra::m_mappGetParentWindowList, 0, 0, 500, HBLTIN },
+ { "mappGetParentWindowIDs", MasterAppXtra::m_mappGetParentWindowIDs, 0, 0, 500, HBLTIN },
+ { "mappGetChildWindowList", MasterAppXtra::m_mappGetChildWindowList, 1, 1, 500, HBLTIN },
+ { "mappGetChildWindowIDs", MasterAppXtra::m_mappGetChildWindowIDs, 1, 1, 500, HBLTIN },
+ { "mappWindowParent", MasterAppXtra::m_mappWindowParent, 1, 1, 500, HBLTIN },
+ { "mappGetWindowParent", MasterAppXtra::m_mappGetWindowParent, 1, 1, 500, HBLTIN },
+ { "mappGetHighestWindowParent", MasterAppXtra::m_mappGetHighestWindowParent, 1, 1, 500, HBLTIN },
+ { "mappWindowName", MasterAppXtra::m_mappWindowName, 1, 1, 500, HBLTIN },
+ { "mappGetWindowName", MasterAppXtra::m_mappGetWindowName, 1, 1, 500, HBLTIN },
+ { "mappSetWindowName", MasterAppXtra::m_mappSetWindowName, 2, 2, 500, HBLTIN },
+ { "mappWindowHasChildren", MasterAppXtra::m_mappWindowHasChildren, 1, 1, 500, HBLTIN },
+ { "mappWindowType", MasterAppXtra::m_mappWindowType, 1, 1, 500, HBLTIN },
+ { "mappGetWindowType", MasterAppXtra::m_mappGetWindowType, 1, 1, 500, HBLTIN },
+ { "mappWindowIsVisible", MasterAppXtra::m_mappWindowIsVisible, 1, 1, 500, HBLTIN },
+ { "mappFindWindow", MasterAppXtra::m_mappFindWindow, 2, 2, 500, HBLTIN },
+ { "mappGetActiveWindow", MasterAppXtra::m_mappGetActiveWindow, 0, 0, 500, HBLTIN },
+ { "mappSetActiveWindow", MasterAppXtra::m_mappSetActiveWindow, 1, 1, 500, HBLTIN },
+ { "mappGetForegroundWindow", MasterAppXtra::m_mappGetForegroundWindow, 0, 0, 500, HBLTIN },
+ { "mappSetForegroundWindow", MasterAppXtra::m_mappSetForegroundWindow, 1, 1, 500, HBLTIN },
+ { "mappGetKeyboardInputWindow", MasterAppXtra::m_mappGetKeyboardInputWindow, 0, 0, 500, HBLTIN },
+ { "mappSetKeyboardInputWindow", MasterAppXtra::m_mappSetKeyboardInputWindow, 1, 1, 500, HBLTIN },
+ { "mappCaptureMouseInput", MasterAppXtra::m_mappCaptureMouseInput, 1, 1, 500, HBLTIN },
+ { "mappReleaseMouseInput", MasterAppXtra::m_mappReleaseMouseInput, 0, 0, 500, HBLTIN },
+ { "mappGetParentWindowTopChild", MasterAppXtra::m_mappGetParentWindowTopChild, 1, 1, 500, HBLTIN },
+ { "mappGetDesktopWindow", MasterAppXtra::m_mappGetDesktopWindow, 0, 0, 500, HBLTIN },
+ { "mappGetWindowOutsideRect", MasterAppXtra::m_mappGetWindowOutsideRect, 1, 1, 500, HBLTIN },
+ { "mappGetWindowInsideRect", MasterAppXtra::m_mappGetWindowInsideRect, 1, 1, 500, HBLTIN },
+ { "mappSetWindowOutsideRect", MasterAppXtra::m_mappSetWindowOutsideRect, 5, 5, 500, HBLTIN },
+ { "mappSetWindowRect", MasterAppXtra::m_mappSetWindowRect, 5, 5, 500, HBLTIN },
+ { "mappCloseWindow", MasterAppXtra::m_mappCloseWindow, 1, 1, 500, HBLTIN },
+ { "mappWindowExists", MasterAppXtra::m_mappWindowExists, 1, 1, 500, HBLTIN },
+ { "mappWindowToFront", MasterAppXtra::m_mappWindowToFront, 1, 1, 500, HBLTIN },
+ { "mappWindowToBack", MasterAppXtra::m_mappWindowToBack, 1, 1, 500, HBLTIN },
+ { "mappHideWindow", MasterAppXtra::m_mappHideWindow, 1, 1, 500, HBLTIN },
+ { "mappShowWindow", MasterAppXtra::m_mappShowWindow, 1, 1, 500, HBLTIN },
+ { "mappMinimizeWindow", MasterAppXtra::m_mappMinimizeWindow, 1, 1, 500, HBLTIN },
+ { "mappRestoreWindow", MasterAppXtra::m_mappRestoreWindow, 1, 1, 500, HBLTIN },
+ { "mappMaximizeWindow", MasterAppXtra::m_mappMaximizeWindow, 1, 1, 500, HBLTIN },
+ { "mappDirectorStageWindow", MasterAppXtra::m_mappDirectorStageWindow, 0, 0, 500, HBLTIN },
+ { "mappHostAppMainWindow", MasterAppXtra::m_mappHostAppMainWindow, 0, 0, 500, HBLTIN },
+ { "mappDirectorMainWindow", MasterAppXtra::m_mappDirectorMainWindow, 0, 0, 500, HBLTIN },
+ { "mappAuthorwareMainWindow", MasterAppXtra::m_mappAuthorwareMainWindow, 0, 0, 500, HBLTIN },
+ { "mappKeepOnTop", MasterAppXtra::m_mappKeepOnTop, 1, 1, 500, HBLTIN },
+ { "mappDontKeepOnTop", MasterAppXtra::m_mappDontKeepOnTop, 1, 1, 500, HBLTIN },
+ { "mappLaunch", MasterAppXtra::m_mappLaunch, 2, 2, 500, HBLTIN },
+ { "mappLaunchButDontActivate", MasterAppXtra::m_mappLaunchButDontActivate, 2, 2, 500, HBLTIN },
+ { "mappLaunchHidden", MasterAppXtra::m_mappLaunchHidden, 2, 2, 500, HBLTIN },
+ { "mappLaunchMinimized", MasterAppXtra::m_mappLaunchMinimized, 2, 2, 500, HBLTIN },
+ { "mappLaunchMaximized", MasterAppXtra::m_mappLaunchMaximized, 2, 2, 500, HBLTIN },
+ { "mappLocateExecutable", MasterAppXtra::m_mappLocateExecutable, 1, 1, 500, HBLTIN },
+ { "mappGetShortFileName", MasterAppXtra::m_mappGetShortFileName, 1, 1, 500, HBLTIN },
+ { "mappGetLongFileName", MasterAppXtra::m_mappGetLongFileName, 1, 1, 500, HBLTIN },
+ { "mappOpenDocument", MasterAppXtra::m_mappOpenDocument, 1, 1, 500, HBLTIN },
+ { "mappPrintDocument", MasterAppXtra::m_mappPrintDocument, 1, 1, 500, HBLTIN },
+ { "mappInstanceTask", MasterAppXtra::m_mappInstanceTask, 1, 1, 500, HBLTIN },
+ { "mappInstanceIsRunning", MasterAppXtra::m_mappInstanceIsRunning, 1, 1, 500, HBLTIN },
+ { "mappUnloadInstance", MasterAppXtra::m_mappUnloadInstance, 1, 1, 500, HBLTIN },
+ { "mappFakeMouseClick", MasterAppXtra::m_mappFakeMouseClick, 3, 3, 500, HBLTIN },
+ { "mappFakeMouseClickWait", MasterAppXtra::m_mappFakeMouseClickWait, 3, 3, 500, HBLTIN },
+ { "mappFakeCharacter", MasterAppXtra::m_mappFakeCharacter, 2, 2, 500, HBLTIN },
+ { "mappFakeCharacterWait", MasterAppXtra::m_mappFakeCharacterWait, 2, 2, 500, HBLTIN },
+ { "mappFakeCharCode", MasterAppXtra::m_mappFakeCharCode, 3, 3, 500, HBLTIN },
+ { "mappFakeCharCodeWait", MasterAppXtra::m_mappFakeCharCodeWait, 3, 3, 500, HBLTIN },
+ { "mappShowMenu", MasterAppXtra::m_mappShowMenu, 1, 1, 500, HBLTIN },
+ { "mappShowMenuWait", MasterAppXtra::m_mappShowMenuWait, 1, 1, 500, HBLTIN },
+ { "mappAnyWindowAtPoint", MasterAppXtra::m_mappAnyWindowAtPoint, 2, 2, 500, HBLTIN },
+ { "mappChildWindowAtPoint", MasterAppXtra::m_mappChildWindowAtPoint, 3, 3, 500, HBLTIN },
+ { "mappGetWindowsRegistry", MasterAppXtra::m_mappGetWindowsRegistry, 3, 3, 500, HBLTIN },
+ { "mappSetWindowsRegistry", MasterAppXtra::m_mappSetWindowsRegistry, 4, 4, 500, HBLTIN },
+ { "mappGetWindowsRegistryEntries", MasterAppXtra::m_mappGetWindowsRegistryEntries, 2, 2, 500, HBLTIN },
+ { "mappGetWindowsRegistryKeys", MasterAppXtra::m_mappGetWindowsRegistryKeys, 2, 2, 500, HBLTIN },
+ { "mappGetWindowsRegistryValues", MasterAppXtra::m_mappGetWindowsRegistryValues, 2, 2, 500, HBLTIN },
+ { "mappGetWindowsRegistryEntryType", MasterAppXtra::m_mappGetWindowsRegistryEntryType, 3, 3, 500, HBLTIN },
+ { "mappDeleteWindowsRegistry", MasterAppXtra::m_mappDeleteWindowsRegistry, 3, 3, 500, HBLTIN },
+ { "mappGetDefaultPrinter", MasterAppXtra::m_mappGetDefaultPrinter, 0, 0, 500, HBLTIN },
+ { "mappSetDefaultPrinter", MasterAppXtra::m_mappSetDefaultPrinter, 1, 1, 500, HBLTIN },
+ { "mappGetInstalledPrinters", MasterAppXtra::m_mappGetInstalledPrinters, 0, 0, 500, HBLTIN },
+ { "mappWindowsFlavor", MasterAppXtra::m_mappWindowsFlavor, 0, 0, 500, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+MasterAppXtraObject::MasterAppXtraObject(ObjectType ObjectType) :Object<MasterAppXtraObject>("MasterApp") {
+ _objType = ObjectType;
+}
+
+bool MasterAppXtraObject::hasProp(const Common::String &propName) {
+ return (propName == "name");
+}
+
+Datum MasterAppXtraObject::getProp(const Common::String &propName) {
+ if (propName == "name")
+ return Datum(MasterAppXtra::xlibName);
+ warning("MasterAppXtra::getProp: unknown property '%s'", propName.c_str());
+ return Datum();
+}
+
+void MasterAppXtra::open(ObjectType type, const Common::Path &path) {
+ MasterAppXtraObject::initMethods(xlibMethods);
+ MasterAppXtraObject *xobj = new MasterAppXtraObject(type);
+ if (type == kXtraObj)
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void MasterAppXtra::close(ObjectType type) {
+ MasterAppXtraObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void MasterAppXtra::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("MasterAppXtra::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(MasterAppXtra::m_register, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetTaskList, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetTaskIDs, 0)
+XOBJSTUB(MasterAppXtra::m_mappTaskName, 0)
+XOBJSTUB(MasterAppXtra::m_mappTaskParent, 0)
+XOBJSTUB(MasterAppXtra::m_mappTaskInstance, 0)
+XOBJSTUB(MasterAppXtra::m_mappTaskModule, 0)
+XOBJSTUB(MasterAppXtra::m_mappTaskEvents, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetTaskWindowList, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetTaskWindowIDs, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowTask, 0)
+XOBJSTUB(MasterAppXtra::m_mappRudeQuitTask, 0)
+XOBJSTUB(MasterAppXtra::m_mappTaskIsRunning, 0)
+XOBJSTUB(MasterAppXtra::m_mappFeedTimeSlice, 0)
+XOBJSTUB(MasterAppXtra::m_mappFeedGenericTimeSlice, 0)
+XOBJSTUB(MasterAppXtra::m_mappHostAppTask, 0)
+XOBJSTUB(MasterAppXtra::m_mappDirectorTask, 0)
+XOBJSTUB(MasterAppXtra::m_mappAuthorwareTask, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetTaskOrder, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetThreadList, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetTaskThreads, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetThreadWindowList, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetThreadWindowIDs, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetModuleList, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetModuleIDs, 0)
+XOBJSTUB(MasterAppXtra::m_mappModuleTask, 0)
+XOBJSTUB(MasterAppXtra::m_mappModuleFilename, 0)
+XOBJSTUB(MasterAppXtra::m_mappHostAppFilename, 0)
+XOBJSTUB(MasterAppXtra::m_mappDirectorFilename, 0)
+XOBJSTUB(MasterAppXtra::m_mappAuthorwareFilename, 0)
+XOBJSTUB(MasterAppXtra::m_mappModuleName, 0)
+XOBJSTUB(MasterAppXtra::m_mappModuleIsRunning, 0)
+XOBJSTUB(MasterAppXtra::m_mappUnloadModule, 0)
+XOBJSTUB(MasterAppXtra::m_mappHostAppModule, 0)
+XOBJSTUB(MasterAppXtra::m_mappDirectorModule, 0)
+XOBJSTUB(MasterAppXtra::m_mappAuthorwareModule, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetParentWindowList, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetParentWindowIDs, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetChildWindowList, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetChildWindowIDs, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowParent, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowParent, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetHighestWindowParent, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowName, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowName, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetWindowName, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowHasChildren, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowType, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowType, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowIsVisible, 0)
+XOBJSTUB(MasterAppXtra::m_mappFindWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetActiveWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetActiveWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetForegroundWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetForegroundWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetKeyboardInputWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetKeyboardInputWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappCaptureMouseInput, 0)
+XOBJSTUB(MasterAppXtra::m_mappReleaseMouseInput, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetParentWindowTopChild, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetDesktopWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowOutsideRect, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowInsideRect, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetWindowOutsideRect, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetWindowRect, 0)
+XOBJSTUB(MasterAppXtra::m_mappCloseWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowExists, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowToFront, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowToBack, 0)
+XOBJSTUB(MasterAppXtra::m_mappHideWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappShowWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappMinimizeWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappRestoreWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappMaximizeWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappDirectorStageWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappHostAppMainWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappDirectorMainWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappAuthorwareMainWindow, 0)
+XOBJSTUB(MasterAppXtra::m_mappKeepOnTop, 0)
+XOBJSTUB(MasterAppXtra::m_mappDontKeepOnTop, 0)
+XOBJSTUB(MasterAppXtra::m_mappLaunch, 0)
+XOBJSTUB(MasterAppXtra::m_mappLaunchButDontActivate, 0)
+XOBJSTUB(MasterAppXtra::m_mappLaunchHidden, 0)
+XOBJSTUB(MasterAppXtra::m_mappLaunchMinimized, 0)
+XOBJSTUB(MasterAppXtra::m_mappLaunchMaximized, 0)
+XOBJSTUB(MasterAppXtra::m_mappLocateExecutable, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetShortFileName, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetLongFileName, 0)
+XOBJSTUB(MasterAppXtra::m_mappOpenDocument, 0)
+XOBJSTUB(MasterAppXtra::m_mappPrintDocument, 0)
+XOBJSTUB(MasterAppXtra::m_mappInstanceTask, 0)
+XOBJSTUB(MasterAppXtra::m_mappInstanceIsRunning, 0)
+XOBJSTUB(MasterAppXtra::m_mappUnloadInstance, 0)
+XOBJSTUB(MasterAppXtra::m_mappFakeMouseClick, 0)
+XOBJSTUB(MasterAppXtra::m_mappFakeMouseClickWait, 0)
+XOBJSTUB(MasterAppXtra::m_mappFakeCharacter, 0)
+XOBJSTUB(MasterAppXtra::m_mappFakeCharacterWait, 0)
+XOBJSTUB(MasterAppXtra::m_mappFakeCharCode, 0)
+XOBJSTUB(MasterAppXtra::m_mappFakeCharCodeWait, 0)
+XOBJSTUB(MasterAppXtra::m_mappShowMenu, 0)
+XOBJSTUB(MasterAppXtra::m_mappShowMenuWait, 0)
+XOBJSTUB(MasterAppXtra::m_mappAnyWindowAtPoint, 0)
+XOBJSTUB(MasterAppXtra::m_mappChildWindowAtPoint, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowsRegistry, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetWindowsRegistry, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowsRegistryEntries, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowsRegistryKeys, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowsRegistryValues, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetWindowsRegistryEntryType, 0)
+XOBJSTUB(MasterAppXtra::m_mappDeleteWindowsRegistry, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetDefaultPrinter, 0)
+XOBJSTUB(MasterAppXtra::m_mappSetDefaultPrinter, 0)
+XOBJSTUB(MasterAppXtra::m_mappGetInstalledPrinters, 0)
+XOBJSTUB(MasterAppXtra::m_mappWindowsFlavor, 0)
+
+}
diff --git a/engines/director/lingo/xtras/masterapp.h b/engines/director/lingo/xtras/masterapp.h
new file mode 100644
index 00000000000..726c3c1df17
--- /dev/null
+++ b/engines/director/lingo/xtras/masterapp.h
@@ -0,0 +1,163 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XTRAS_MASTERAPP_H
+#define DIRECTOR_LINGO_XTRAS_MASTERAPP_H
+
+namespace Director {
+
+class MasterAppXtraObject : public Object<MasterAppXtraObject> {
+public:
+ MasterAppXtraObject(ObjectType objType);
+
+ bool hasProp(const Common::String &propName) override;
+ Datum getProp(const Common::String &propName) override;
+};
+
+namespace MasterAppXtra {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_new(int nargs);
+void m_register(int nargs);
+void m_mappGetTaskList(int nargs);
+void m_mappGetTaskIDs(int nargs);
+void m_mappTaskName(int nargs);
+void m_mappTaskParent(int nargs);
+void m_mappTaskInstance(int nargs);
+void m_mappTaskModule(int nargs);
+void m_mappTaskEvents(int nargs);
+void m_mappGetTaskWindowList(int nargs);
+void m_mappGetTaskWindowIDs(int nargs);
+void m_mappGetWindowTask(int nargs);
+void m_mappRudeQuitTask(int nargs);
+void m_mappTaskIsRunning(int nargs);
+void m_mappFeedTimeSlice(int nargs);
+void m_mappFeedGenericTimeSlice(int nargs);
+void m_mappHostAppTask(int nargs);
+void m_mappDirectorTask(int nargs);
+void m_mappAuthorwareTask(int nargs);
+void m_mappGetTaskOrder(int nargs);
+void m_mappGetThreadList(int nargs);
+void m_mappGetTaskThreads(int nargs);
+void m_mappGetThreadWindowList(int nargs);
+void m_mappGetThreadWindowIDs(int nargs);
+void m_mappGetModuleList(int nargs);
+void m_mappGetModuleIDs(int nargs);
+void m_mappModuleTask(int nargs);
+void m_mappModuleFilename(int nargs);
+void m_mappHostAppFilename(int nargs);
+void m_mappDirectorFilename(int nargs);
+void m_mappAuthorwareFilename(int nargs);
+void m_mappModuleName(int nargs);
+void m_mappModuleIsRunning(int nargs);
+void m_mappUnloadModule(int nargs);
+void m_mappHostAppModule(int nargs);
+void m_mappDirectorModule(int nargs);
+void m_mappAuthorwareModule(int nargs);
+void m_mappGetParentWindowList(int nargs);
+void m_mappGetParentWindowIDs(int nargs);
+void m_mappGetChildWindowList(int nargs);
+void m_mappGetChildWindowIDs(int nargs);
+void m_mappWindowParent(int nargs);
+void m_mappGetWindowParent(int nargs);
+void m_mappGetHighestWindowParent(int nargs);
+void m_mappWindowName(int nargs);
+void m_mappGetWindowName(int nargs);
+void m_mappSetWindowName(int nargs);
+void m_mappWindowHasChildren(int nargs);
+void m_mappWindowType(int nargs);
+void m_mappGetWindowType(int nargs);
+void m_mappWindowIsVisible(int nargs);
+void m_mappFindWindow(int nargs);
+void m_mappGetActiveWindow(int nargs);
+void m_mappSetActiveWindow(int nargs);
+void m_mappGetForegroundWindow(int nargs);
+void m_mappSetForegroundWindow(int nargs);
+void m_mappGetKeyboardInputWindow(int nargs);
+void m_mappSetKeyboardInputWindow(int nargs);
+void m_mappCaptureMouseInput(int nargs);
+void m_mappReleaseMouseInput(int nargs);
+void m_mappGetParentWindowTopChild(int nargs);
+void m_mappGetDesktopWindow(int nargs);
+void m_mappGetWindowOutsideRect(int nargs);
+void m_mappGetWindowInsideRect(int nargs);
+void m_mappSetWindowOutsideRect(int nargs);
+void m_mappSetWindowRect(int nargs);
+void m_mappCloseWindow(int nargs);
+void m_mappWindowExists(int nargs);
+void m_mappWindowToFront(int nargs);
+void m_mappWindowToBack(int nargs);
+void m_mappHideWindow(int nargs);
+void m_mappShowWindow(int nargs);
+void m_mappMinimizeWindow(int nargs);
+void m_mappRestoreWindow(int nargs);
+void m_mappMaximizeWindow(int nargs);
+void m_mappDirectorStageWindow(int nargs);
+void m_mappHostAppMainWindow(int nargs);
+void m_mappDirectorMainWindow(int nargs);
+void m_mappAuthorwareMainWindow(int nargs);
+void m_mappKeepOnTop(int nargs);
+void m_mappDontKeepOnTop(int nargs);
+void m_mappLaunch(int nargs);
+void m_mappLaunchButDontActivate(int nargs);
+void m_mappLaunchHidden(int nargs);
+void m_mappLaunchMinimized(int nargs);
+void m_mappLaunchMaximized(int nargs);
+void m_mappLocateExecutable(int nargs);
+void m_mappGetShortFileName(int nargs);
+void m_mappGetLongFileName(int nargs);
+void m_mappOpenDocument(int nargs);
+void m_mappPrintDocument(int nargs);
+void m_mappInstanceTask(int nargs);
+void m_mappInstanceIsRunning(int nargs);
+void m_mappUnloadInstance(int nargs);
+void m_mappFakeMouseClick(int nargs);
+void m_mappFakeMouseClickWait(int nargs);
+void m_mappFakeCharacter(int nargs);
+void m_mappFakeCharacterWait(int nargs);
+void m_mappFakeCharCode(int nargs);
+void m_mappFakeCharCodeWait(int nargs);
+void m_mappShowMenu(int nargs);
+void m_mappShowMenuWait(int nargs);
+void m_mappAnyWindowAtPoint(int nargs);
+void m_mappChildWindowAtPoint(int nargs);
+void m_mappGetWindowsRegistry(int nargs);
+void m_mappSetWindowsRegistry(int nargs);
+void m_mappGetWindowsRegistryEntries(int nargs);
+void m_mappGetWindowsRegistryKeys(int nargs);
+void m_mappGetWindowsRegistryValues(int nargs);
+void m_mappGetWindowsRegistryEntryType(int nargs);
+void m_mappDeleteWindowsRegistry(int nargs);
+void m_mappGetDefaultPrinter(int nargs);
+void m_mappSetDefaultPrinter(int nargs);
+void m_mappGetInstalledPrinters(int nargs);
+void m_mappWindowsFlavor(int nargs);
+
+} // End of namespace MasterAppXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index d996a619963..34e7b767ad6 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -156,6 +156,7 @@ MODULE_OBJS = \
lingo/xlibs/videodiscxobj.o \
lingo/xlibs/vmisonxfcn.o \
lingo/xlibs/volumelist.o \
+ lingo/xlibs/voyagerxsound.o \
lingo/xlibs/widgetxobj.o \
lingo/xlibs/window.o \
lingo/xlibs/winxobj.o \
@@ -169,6 +170,7 @@ MODULE_OBJS = \
lingo/xtras/directsound.o \
lingo/xtras/filextra.o \
lingo/xtras/keypoll.o \
+ lingo/xtras/masterapp.o \
lingo/xtras/openurl.o \
lingo/xtras/qtvrxtra.o \
lingo/xtras/rtk.o \
Commit: 6ee75dd8ec5461c895a64c31506588aec6241e05
https://github.com/scummvm/scummvm/commit/6ee75dd8ec5461c895a64c31506588aec6241e05
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Only apply gamma correction to Mac/Pippin for now
Changed paths:
engines/director/director.cpp
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 90dffb2af2b..2a75102d985 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -132,7 +132,13 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
// Enabled by default for Macintosh and Pippin games in the detection code.
// Right now only used in 8-bit mode to adjust the palette.
// FIXME: How do we add this to true color rendering without a heap of workarounds?
- _gammaCorrection = ConfMan.getBool("gamma_correction");
+ if ((getPlatform() == Common::kPlatformMacintosh) || (getPlatform() == Common::kPlatformPippin)) {
+ _gammaCorrection = ConfMan.getBool("gamma_correction");
+ } else {
+ // FIXME: It would be good if we could have this option for non-Mac, except not
+ // enabled by default.
+ _gammaCorrection = false;
+ }
switch (getPlatform()) {
case Common::kPlatformMacintoshII:
Commit: f03d232cd62ab32b6d101d8b77b86f378ccdbb92
https://github.com/scummvm/scummvm/commit/f03d232cd62ab32b6d101d8b77b86f378ccdbb92
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Always clear _firstMovie flag after initial load
Needed for 77365baab4c26b154cf8f009b7f5ff57bdf3770a to work properly.
Fixes palette regressions in The Seven Colors.
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 04a86e59025..5915aee59b0 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -602,6 +602,7 @@ bool Window::step() {
g_director->_firstMovie = false;
return true;
}
+ g_director->_firstMovie = false;
if (!goodMovie)
return false;
Commit: aa3bd964035f9c27b3df742c2c49a8c185360db8
https://github.com/scummvm/scummvm/commit/aa3bd964035f9c27b3df742c2c49a8c185360db8
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Add thequest 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 1761096c44b..c7462effb19 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -486,6 +486,7 @@ static const PlainGameDescriptor directorGames[] = {
{ "teamxtreme2", "Operation: Eco-Nightmare" },
{ "teazle", "Teazle" },
{ "the7colors", "The Seven Colors: Legend of PSYã»S City" }, // English fan translation
+ { "thequest", "The Quest" },
{ "timmysafari", "Timmy's Safari Adventure" },
{ "tkkg1", "A Case for TKKG 1: Jennifer is Missing" },
{ "tkkg2", "A Case for TKKG 2: Deadly Chocolate" },
@@ -5928,6 +5929,10 @@ static const DirectorGameDescription gameDescriptions[] = {
// Found on MACLIFE 09 #89
MACDEMO1_l("thetowerxmas", "Demo", "TowerXmasDiscDEMO", "b0fb747bd526bd4ba820a4072d009bd0", 481803, Common::JA_JPN, 404),
+ // Made by Cartoon Network in 1995, released by Kidsoft/AOL
+ WINGAME1("thequest", "", "movies/thequest.exe", "t:59e3f69b3b057b5a72e8063c5301f559", 726503, 404),
+ MACGAME1("thequest", "", "Mac Movie Folder/TheQuest", "r:e6833f1ce3b022f0128e4c80a55bcd46", 285310, 404),
+
// Mac version is not Director
// Found on Thinkin' Things Collection 1
WINGAME2("thinkinthingsdp", "", "PARENTS.EXE", "t:a6a792efd6524beec7e5ec1619600ecf", 1160899,
Commit: e97646837bee6f535b2b30adb731a12e014e27d7
https://github.com/scummvm/scummvm/commit/e97646837bee6f535b2b30adb731a12e014e27d7
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Fix "the cursor of sprite" to return an array
Fixes clickable hotspots in tkkg1.
Changed paths:
engines/director/cursor.cpp
engines/director/cursor.h
diff --git a/engines/director/cursor.cpp b/engines/director/cursor.cpp
index d6bf2e8d088..b0fb0e6ec1e 100644
--- a/engines/director/cursor.cpp
+++ b/engines/director/cursor.cpp
@@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "graphics/macgui/macwindowmanager.h"
#include "image/image_decoder.h"
#include "graphics/wincursor.h"
@@ -145,8 +146,16 @@ void Cursor::readFromCast(Datum cursorCasts) {
offX = 8;
offY = 8;
}
+ _cursorType = Graphics::kMacCursorCustom;
_hotspotX = (uint16)offX;
_hotspotY = (uint16)offY;
+ // Returned value will be a list of two multiplexed cast member IDs
+ _cursorResId = Datum();
+ _cursorResId.type = ARRAY;
+ _cursorResId.u.farr = new FArray();
+ _cursorResId.u.farr->arr.push_back(Datum(cursorId.toMultiplex()));
+ _cursorResId.u.farr->arr.push_back(Datum(maskId.toMultiplex()));
+
}
void Cursor::readBuiltinType(Datum resourceId) {
diff --git a/engines/director/cursor.h b/engines/director/cursor.h
index 0211713abbd..e8b4b1f3586 100644
--- a/engines/director/cursor.h
+++ b/engines/director/cursor.h
@@ -25,7 +25,8 @@
#include "graphics/macgui/macwindowmanager.h"
-#include "engines/director/lingo/lingo.h"
+#include "director/types.h"
+#include "director/lingo/lingo.h"
namespace Graphics {
class ManagedSurface;
@@ -48,7 +49,7 @@ class Cursor : public Graphics::MacCursor {
void readBuiltinType(Datum resourceId);
bool readFromArchive(Archive *archive, uint16 resourceId);
- bool isEmpty() {return Datum(0).equalTo(_cursorResId);}
+ bool isEmpty() {return _cursorResId.type != ARRAY && Datum(0).equalTo(_cursorResId);}
bool operator==(const Cursor &c);
bool operator==(const CursorRef &c);
Commit: 5e59b124b70a82c23389dfc64d1b73e2ddb3579f
https://github.com/scummvm/scummvm/commit/5e59b124b70a82c23389dfc64d1b73e2ddb3579f
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Fix looping flag in FilmLoopCastMember
Fixes wrongly-repeating animations in tkkg1.
Changed paths:
engines/director/castmember/filmloop.cpp
engines/director/score.cpp
diff --git a/engines/director/castmember/filmloop.cpp b/engines/director/castmember/filmloop.cpp
index 7f05d741163..4b17ed6a0a3 100644
--- a/engines/director/castmember/filmloop.cpp
+++ b/engines/director/castmember/filmloop.cpp
@@ -46,7 +46,7 @@ FilmLoopCastMember::FilmLoopCastMember(Cast *cast, uint16 castId, Common::Seekab
_crop = false;
_center = false;
- if (cast->_version >= kFileVer400) {
+ if (cast->_version >= kFileVer400 && cast->_version < kFileVer500) {
_initialRect = Movie::readRect(stream);
uint32 flags = stream.readUint32BE();
uint16 unk1 = stream.readUint16BE();
@@ -55,6 +55,15 @@ FilmLoopCastMember::FilmLoopCastMember(Cast *cast, uint16 castId, Common::Seekab
_enableSound = flags & 8 ? 1 : 0;
_crop = flags & 2 ? 0 : 1;
_center = flags & 1 ? 1 : 0;
+ } else if (cast->_version >= kFileVer500 && cast->_version < kFileVer600) {
+ _initialRect = Movie::readRect(stream);
+ uint32 flags = stream.readUint32BE();
+ uint16 unk1 = stream.readUint16BE();
+ debugC(5, kDebugLoading, "FilmLoopCastMember::FilmLoopCastMember(): flags: %d, unk1: %d", flags, unk1);
+ _looping = flags & 32 ? 0 : 1;
+ _enableSound = flags & 8 ? 1 : 0;
+ _crop = flags & 2 ? 0 : 1;
+ _center = flags & 1 ? 1 : 0;
}
}
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 24bdbf5a5af..f3f796c76ed 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -815,8 +815,12 @@ void Score::incrementFilmLoops() {
FilmLoopCastMember *fl = ((FilmLoopCastMember *)it->_sprite->_cast);
if (!fl->_frames.empty()) {
// increment the film loop counter
- it->_filmLoopFrame += 1;
- it->_filmLoopFrame %= fl->_frames.size();
+ if (fl->_looping) {
+ it->_filmLoopFrame += 1;
+ it->_filmLoopFrame %= fl->_frames.size();
+ } else if (it->_filmLoopFrame < (fl->_frames.size() - 1)) {
+ it->_filmLoopFrame += 1;
+ }
} else {
warning("Score::updateFilmLoops(): invalid film loop in castId %s", it->_sprite->_castId.asString().c_str());
}
Commit: 3c70c486a954d0aecfd7265c6d1bb4590aac57a9
https://github.com/scummvm/scummvm/commit/3c70c486a954d0aecfd7265c6d1bb4590aac57a9
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Fix bounds check in Score::formatChannelInfo
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index f3f796c76ed..dd2b25d224d 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -2016,7 +2016,7 @@ Common::String Score::formatChannelInfo() {
result += Common::String::format("SND: 2 sound2: %d, soundType2: %d\n", frame._mainChannels.sound2.member, frame._mainChannels.soundType2);
result += Common::String::format("LSCR: actionId: %s\n", frame._mainChannels.actionId.asString().c_str());
- for (int i = 0; i < frame._numChannels; i++) {
+ for (int i = 0; (i < frame._numChannels && ((i + 1) < (int)_channels.size())); i++) {
Channel &channel = *_channels[i + 1];
Sprite &sprite = *channel._sprite;
Common::Point position = channel.getPosition();
Commit: 0b441739217da256ed54ded6f78adb6df0c5bc57
https://github.com/scummvm/scummvm/commit/0b441739217da256ed54ded6f78adb6df0c5bc57
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: LINGO: Trim input to b_value
Real Director doesn't seem to care about surrounding
whitespace characters.
Fixes savegame parsing in Cracking the Conspiracy.
Changed paths:
engines/director/lingo/lingo-builtins.cpp
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index b8da9835a3e..401bcb9b299 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -623,6 +623,7 @@ void LB::b_value(int nargs) {
}
Common::String expr = d.asString();
+ expr.trim();
if (expr.empty()) {
g_lingo->push(Datum(0));
return;
Commit: 266f7afd81a78396001159dadee3f9b2a5f21a1d
https://github.com/scummvm/scummvm/commit/266f7afd81a78396001159dadee3f9b2a5f21a1d
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: XTRA: Fix FileIO delete behaviour
The original XObj version of FileIO will dispose of the object if
m_delete is called. The Xtra version does not.
Fixes savegame handler in Cracking the Conspiracy.
Changed paths:
engines/director/lingo/xlibs/fileio.cpp
diff --git a/engines/director/lingo/xlibs/fileio.cpp b/engines/director/lingo/xlibs/fileio.cpp
index de66d59efc1..7a5ac3781e1 100644
--- a/engines/director/lingo/xlibs/fileio.cpp
+++ b/engines/director/lingo/xlibs/fileio.cpp
@@ -713,7 +713,10 @@ void FileIO::m_delete(int nargs) {
if (me->_filename) {
Common::String filename = *me->_filename;
- me->dispose();
+ // Xtra version does not dispose handle on file delete
+ if (me->getObjType() == kXObj) {
+ me->dispose();
+ }
if (g_system->getSavefileManager()->removeSavefile(filename)) {
g_lingo->push(Datum(kErrorNone));
} else {
Commit: b560e61e46a11552687a81dd4a81c8e49f6ba6d3
https://github.com/scummvm/scummvm/commit/b560e61e46a11552687a81dd4a81c8e49f6ba6d3
Author: Scott Percival (code at moral.net.au)
Date: 2025-06-03T12:53:33+02:00
Commit Message:
DIRECTOR: Don't call setCurrentWindow on movie load
Window::loadNextMovie will get called if you create a new Window with
Lingo and then set it to visible. In this case, you don't want to call
setCurrentWindow; if you do, the current script will keep running but
in the context of the new Window, which collapses pretty quickly.
The main loop will call DirectorEngine::setCurrentWindow when
appropriate, so it's unlikely we need this.
Fixes opening the PDA in Cracking the Conspiracy.
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 5915aee59b0..d5ecf6a0c86 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -532,7 +532,6 @@ bool Window::loadNextMovie() {
debug(0, "@@@@ Switching to movie '%s' in '%s'", utf8ToPrintable(_currentMovie->getMacName()).c_str(), _currentPath.c_str());
debug(0, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
- g_director->setCurrentWindow(this);
if (g_director->getVersion() < 500)
loadNewSharedCast(previousSharedCast);
More information about the Scummvm-git-logs
mailing list