[Scummvm-git-logs] scummvm master -> 33cdefbfeddaf2d1b52ab3b979d19b58f971907a
sev-
noreply at scummvm.org
Sat Nov 29 09:01:10 UTC 2025
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
f599938bb6 DIRECTOR: Add full version of rednex to detection table
c53c1e5a74 DIRECTOR: Add guardrail for zero-rectangle transition area
d19a3ca4c6 DIRECTOR: XOBJ: Add Xtra stubs for Stay Tooned
5ce09111b0 DIRECTOR: Fix regression in score audio playback
33cdefbfed DIRECTOR: Improve accuracy of sound playback on movie switch
Commit: f599938bb63209b171ad0c320dadc18494e36854
https://github.com/scummvm/scummvm/commit/f599938bb63209b171ad0c320dadc18494e36854
Author: Scott Percival (code at moral.net.au)
Date: 2025-11-29T10:01:04+01:00
Commit Message:
DIRECTOR: Add full version of rednex 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 dd7aaf65246..18d7f4b3536 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -890,9 +890,9 @@ static const PlainGameDescriptor directorGames[] = {
{ "listen7up", "Listen 7UP! Music Mix CD: Volume 1" },
{ "nyack", "Nyack 11-Track Player" },
{ "princerave", "Prince: Rave Un2 the Joy Fantastic" },
+ { "rednex", "Inbred With REDNEX" },
{ "relaxation", "Solitudes: Natural Relaxation" },
{ "relaxplayer", "Solitudes: Natural Relaxation Audio Player" },
- { "rednex", "Inbred with Rednex" },
{ "royksoppam", "Röyksopp: Melody A.M." },
{ "sarahsurfacing", "Sarah McLachlan: Surfacing" },
{ "smashchillin", "Smash Hits: Chillin' Out Summer 2001" },
@@ -4836,10 +4836,8 @@ static const DirectorGameDescription gameDescriptions[] = {
WINGAME2_l("ios", "How To Game", "HOW.EXE", "a526a724f26e266b17815b4f7f7ae079", 1863309,
"HOW02", "86a19681ed45c043b5756f5a6ea189de", 2116536, Common::JA_JPN, 404),
- MACGAME1("isaslm", "", "install this stuff/VM folder/VMplay", "27519b873d23565470f627ad2f3d1b03", 322465, 400),
- // WINGAME1t("isaslm", "", "PLAY_IT.EXE", "ab30cc755f44ac3844fee3214cfc5ead", 691009, 400),
- WINGAME1t("isaslm", "", "VMCD.EXE", "02b7441caf27724af5d055259d0d8e30", 1104401, 400),
-
+ MACGAME1("isaslm", "", "install this stuff/VM folder/VMplay", "rt:1762dd0cfeef33753ccda4ef0a61544e", 322465, 404),
+ WINGAME1t("isaslm", "", "VMCD.EXE", "t:02b7441caf27724af5d055259d0d8e30", 1104401, 404),
MACGAME1("isis", "", "ISIS", "dedfabf9ee7bf5aab003bdab4137bca6", 777630, 404),
WINGAME2("isis", "", "ISIS.EXE", "59c1cb960199dd3f041262ab5271bb23", 14747213,
@@ -5848,6 +5846,8 @@ static const DirectorGameDescription gameDescriptions[] = {
// MacFormat #40
MACDEMO1("rednex", "Demo", "RedNex", "rt:99a4f9d7fb487053826c42e97aa96b33", 483490, 404),
WINDEMO1("rednex", "Demo", "REDNEX.EXE", "t:e1d181303fd8c2aed5cd1d69b0c985e7", 696877, 404),
+ MACGAME1("rednex", "", "RedNex PPC", "tr:00263777ffe8ac57a58fbc931d52ac51", 58292, 404),
+ WINGAME1("rednex", "", "REDNEX.EXE", "t:14fae6eca2a359b6b10ff9a98c217f65", 692585, 404),
MACDEMO1("redshift", "1994 Demo", "RSDEMO.MAC", "r:4f7ff33ce95ed9f42befdae4f9b6b690", 291988, 403),
// Sound / No Sound demos found on MacFormat August '94
Commit: c53c1e5a74e3eddea8eb92e73f8a651b3b3db428
https://github.com/scummvm/scummvm/commit/c53c1e5a74e3eddea8eb92e73f8a651b3b3db428
Author: Scott Percival (code at moral.net.au)
Date: 2025-11-29T10:01:04+01:00
Commit Message:
DIRECTOR: Add guardrail for zero-rectangle transition area
Fixes crash when starting rednex.
Changed paths:
engines/director/transitions.cpp
diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index d8168e519a8..7e0d6bbe87e 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -282,6 +282,10 @@ void Window::playTransition(uint frame, RenderMode mode, uint16 transDuration, u
uint w = clipRect.width();
uint h = clipRect.height();
+ if (w == 0 || h == 0) {
+ warning("Window::playTransition(): zero-sized clip rect, aborting");
+ return;
+ }
for (uint16 i = 1; i < t.steps + 1; i++) {
uint32 startTime = g_system->getMillis();
Commit: d19a3ca4c66526d2f4e36b6b3869bc136b402268
https://github.com/scummvm/scummvm/commit/d19a3ca4c66526d2f4e36b6b3869bc136b402268
Author: Scott Percival (code at moral.net.au)
Date: 2025-11-29T10:01:04+01:00
Commit Message:
DIRECTOR: XOBJ: Add Xtra stubs for Stay Tooned
Changed paths:
A engines/director/lingo/xtras/s/staytoonedball.cpp
A engines/director/lingo/xtras/s/staytoonedball.h
A engines/director/lingo/xtras/s/staytoonedglop.cpp
A engines/director/lingo/xtras/s/staytoonedglop.h
A engines/director/lingo/xtras/s/staytoonedhall.cpp
A engines/director/lingo/xtras/s/staytoonedhall.h
A engines/director/lingo/xtras/s/staytoonedhigh.cpp
A engines/director/lingo/xtras/s/staytoonedhigh.h
A engines/director/lingo/xtras/s/staytoonedober.cpp
A engines/director/lingo/xtras/s/staytoonedober.h
A engines/director/lingo/xtras/s/staytoonedtoon.cpp
A engines/director/lingo/xtras/s/staytoonedtoon.h
engines/director/game-quirks.cpp
engines/director/lingo/lingo-builtins.cpp
engines/director/lingo/lingo-object.cpp
engines/director/lingo/lingo.h
engines/director/lingo/xlibs/f/fileio.cpp
engines/director/lingo/xlibs/m/movutils.cpp
engines/director/module.mk
diff --git a/engines/director/game-quirks.cpp b/engines/director/game-quirks.cpp
index 30d548dd631..2362bbf63b5 100644
--- a/engines/director/game-quirks.cpp
+++ b/engines/director/game-quirks.cpp
@@ -306,6 +306,11 @@ const struct Quirk {
// in the projector as a resource. New edition expects Xtra, old edition is D4 and won't be affected.
{ "puppetmotel", Common::kPlatformWindows, &quirkForceFileIOXtra },
{ "puppetmotel", Common::kPlatformMacintosh, &quirkForceFileIOXtra },
+
+ // Stay Tooned is D5, but expects the XObject version to be used.
+ { "staytooned", Common::kPlatformWindows, &quirkForceFileIOXObj },
+ { "staytooned", Common::kPlatformMacintosh, &quirkForceFileIOXObj },
+
// Ingenious bundles both the Xtra and XObject editions in the Xtra folder, but expects the XObject
// version to be available.
{ "ingenious", Common::kPlatformWindows, &quirkForceFileIOXObj },
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index a4bfa867729..0e82e5caab1 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -1787,12 +1787,7 @@ void LB::b_openXlib(int nargs) {
xlibName = getFileName(d.asString());
- // TODO: Figure out a nicer way of differentiating Xtras from XLibs on Mac
- if (xlibName.hasSuffixIgnoreCase(".x16") || xlibName.hasSuffixIgnoreCase(".x32")) {
- g_lingo->openXLib(xlibName, kXtraObj, xlibPath);
- } else {
- g_lingo->openXLib(xlibName, kXObj, xlibPath);
- }
+ g_lingo->openXLib(xlibName, kNoneObj, xlibPath);
}
void LB::b_save(int nargs) {
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index 4bf4d0c0721..54209644d83 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -160,6 +160,12 @@
#include "director/lingo/xtras/rtk.h"
#include "director/lingo/xtras/scrnutil.h"
#include "director/lingo/xtras/s/smacker.h"
+#include "director/lingo/xtras/s/staytoonedhall.h"
+#include "director/lingo/xtras/s/staytoonedball.h"
+#include "director/lingo/xtras/s/staytoonedglop.h"
+#include "director/lingo/xtras/s/staytoonedhigh.h"
+#include "director/lingo/xtras/s/staytoonedober.h"
+#include "director/lingo/xtras/s/staytoonedtoon.h"
#include "director/lingo/xtras/timextra.h"
#include "director/lingo/xtras/xsound.h"
@@ -345,6 +351,12 @@ static const struct XLibProto {
XLIBDEF(SoundJam, kXObj, 400), // D4
XLIBDEF(SpaceMgr, kXObj, 400), // D4
XLIBDEF(StageTCXObj, kXObj, 400), // D4
+ XLIBDEF(StayToonedBallXtra, kXtraObj, 500), // D5
+ XLIBDEF(StayToonedGlopXtra, kXtraObj, 500), // D5
+ XLIBDEF(StayToonedHallXtra, kXtraObj, 500), // D5
+ XLIBDEF(StayToonedHighXtra, kXtraObj, 500), // D5
+ XLIBDEF(StayToonedOberXtra, kXtraObj, 500), // D5
+ XLIBDEF(StayToonedToonXtra, kXtraObj, 500), // D5
XLIBDEF(SysColorXObj, kXObj, 400), // D4
XLIBDEF(TenguXObj, kXObj, 400), // D4
XLIBDEF(TimextraXtra, kXtraObj, 500), // D5
@@ -399,6 +411,7 @@ void Lingo::initXLibs() {
_xlibOpeners[lib->names[i].name] = lib->opener;
_xlibClosers[lib->names[i].name] = lib->closer;
+ _xlibTypes[lib->names[i].name] = lib->type;
}
}
}
@@ -440,6 +453,19 @@ void Lingo::openXLib(Common::String name, ObjectType type, const Common::Path &p
if (_openXLibs.contains(name))
return;
+ if (type == 0 && _xlibTypes.contains(name)) {
+ type = (_xlibTypes[name] & kXtraObj) ? kXtraObj : kXObj;
+ }
+
+ // manual override for game quirks
+ if (name.equalsIgnoreCase("fileio")) {
+ if (g_director->_fileIOType == kXtraObj && g_director->getVersion() >= 500) {
+ type = kXtraObj;
+ } else if (g_director->_fileIOType == kXObj) {
+ type = kXObj;
+ }
+ }
+
_openXLibs[name] = type;
if (_xlibOpeners.contains(name)) {
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index a05bd2a1f26..93d8bbe7dd7 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -243,6 +243,7 @@ typedef void (*XLibOpenerFunc)(ObjectType, const Common::Path &);
typedef void (*XLibCloserFunc)(ObjectType);
typedef Common::HashMap<Common::String, XLibOpenerFunc, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> XLibOpenerFuncHash;
typedef Common::HashMap<Common::String, XLibCloserFunc, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> XLibCloserFuncHash;
+typedef Common::HashMap<Common::String, int, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> XLibTypeHash;
typedef Common::HashMap<Common::String, ObjectType, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> OpenXLibsHash;
typedef Common::HashMap<Common::String, AbstractObject *, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> OpenXLibsStateHash;
@@ -533,6 +534,7 @@ public:
SymbolHash _methods;
XLibOpenerFuncHash _xlibOpeners;
XLibCloserFuncHash _xlibClosers;
+ XLibTypeHash _xlibTypes;
OpenXLibsHash _openXLibs;
OpenXLibsStateHash _openXLibsState;
diff --git a/engines/director/lingo/xlibs/f/fileio.cpp b/engines/director/lingo/xlibs/f/fileio.cpp
index b57d6f9a4f3..28e501dd0a8 100644
--- a/engines/director/lingo/xlibs/f/fileio.cpp
+++ b/engines/director/lingo/xlibs/f/fileio.cpp
@@ -188,12 +188,6 @@ static const BuiltinProto xlibBuiltins[] = {
void FileIO::open(ObjectType type, const Common::Path &path) {
FileObject::initMethods(xlibMethods);
- // manual override for game quirks
- if (g_director->_fileIOType == kXtraObj && g_director->getVersion() >= 500) {
- type = kXtraObj;
- } else if (g_director->_fileIOType == kXObj) {
- type = kXObj;
- }
FileObject *xobj = new FileObject(type);
if (type == kXtraObj) {
g_lingo->_openXtras.push_back(xlibName);
diff --git a/engines/director/lingo/xlibs/m/movutils.cpp b/engines/director/lingo/xlibs/m/movutils.cpp
index b4c53cc79ca..98df94e46c2 100644
--- a/engines/director/lingo/xlibs/m/movutils.cpp
+++ b/engines/director/lingo/xlibs/m/movutils.cpp
@@ -35,6 +35,7 @@
* Momi no Ki no Shita de: The Day of St. Claus
* Virtual Nightclub
* Great Adventures by Fisher-Price: Pirate Ship
+ * Stay Tooned
*
**************************************************/
diff --git a/engines/director/lingo/xtras/s/staytoonedball.cpp b/engines/director/lingo/xtras/s/staytoonedball.cpp
new file mode 100644
index 00000000000..e87f3606feb
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedball.cpp
@@ -0,0 +1,122 @@
+/* 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/s/staytoonedball.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Stay Tooned
+ *
+ **************************************************/
+
+/*
+-- xtra Toon -- Fridge Fight 7/15/96 Programmer: Keith Laverty FunnyBone Interactive
+new object me
+* mInitRandom integer SomeThing -- feeds a number bewteen 1-100 to the Random# Array
+* mInitGame integer NUM1,integer NUM2 -- Cast Size
+* mOPERATEGAME integer NUM1, integer NUM2, integer NUM3, integer NUM4 -- feeds a number bewteen 1-100 to the Random# Array
+* mGactions -- feeds a number bewteen 1-100 to the Random# Array
+* mGetInfo integer NUM1, integer NUM2, integer NUM3 -- feeds a number bewteen 1-100 to the Random# Array
+* mSetSize integer NUM1,integer NUM2,integer NUM3,integer NUM4,integer NUM5,integer NUM6 -- Cast Size
+* mAddStuff integer NUM1,integer NUM2 -- feeds a number bewteen 1-100 to the Random# Array
+
+ */
+
+namespace Director {
+
+const char *StayToonedBallXtra::xlibName = "Toon";
+const XlibFileDesc StayToonedBallXtra::fileNames[] = {
+ { "ball", "staytooned" },
+ { "ball_mac", "staytooned" },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", StayToonedBallXtra::m_new, 0, 0, 500 },
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+ { "mInitRandom", StayToonedBallXtra::m_mInitRandom, 1, 1, 500, HBLTIN },
+ { "mInitGame", StayToonedBallXtra::m_mInitGame, 2, 2, 500, HBLTIN },
+ { "mOPERATEGAME", StayToonedBallXtra::m_mOPERATEGAME, 4, 4, 500, HBLTIN },
+ { "mGactions", StayToonedBallXtra::m_mGactions, 0, 0, 500, HBLTIN },
+ { "mGetInfo", StayToonedBallXtra::m_mGetInfo, 3, 3, 500, HBLTIN },
+ { "mSetSize", StayToonedBallXtra::m_mSetSize, 6, 6, 500, HBLTIN },
+ { "mAddStuff", StayToonedBallXtra::m_mAddStuff, 2, 2, 500, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+StayToonedBallXtraObject::StayToonedBallXtraObject(ObjectType ObjectType) :Object<StayToonedBallXtraObject>("StayToonedBall") {
+ _objType = ObjectType;
+}
+
+bool StayToonedBallXtraObject::hasProp(const Common::String &propName) {
+ return (propName == "name");
+}
+
+Datum StayToonedBallXtraObject::getProp(const Common::String &propName) {
+ if (propName == "name")
+ return Datum(StayToonedBallXtra::xlibName);
+ warning("StayToonedBallXtra::getProp: unknown property '%s'", propName.c_str());
+ return Datum();
+}
+
+void StayToonedBallXtra::open(ObjectType type, const Common::Path &path) {
+ StayToonedBallXtraObject::initMethods(xlibMethods);
+ StayToonedBallXtraObject *xobj = new StayToonedBallXtraObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void StayToonedBallXtra::close(ObjectType type) {
+ StayToonedBallXtraObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void StayToonedBallXtra::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("StayToonedBallXtra::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(StayToonedBallXtra::m_mInitRandom, 0)
+XOBJSTUB(StayToonedBallXtra::m_mInitGame, 0)
+XOBJSTUB(StayToonedBallXtra::m_mOPERATEGAME, 0)
+XOBJSTUB(StayToonedBallXtra::m_mGactions, 0)
+XOBJSTUB(StayToonedBallXtra::m_mGetInfo, 0)
+XOBJSTUB(StayToonedBallXtra::m_mSetSize, 0)
+XOBJSTUB(StayToonedBallXtra::m_mAddStuff, 0)
+
+}
diff --git a/engines/director/lingo/xtras/s/staytoonedball.h b/engines/director/lingo/xtras/s/staytoonedball.h
new file mode 100644
index 00000000000..f7ca030738a
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedball.h
@@ -0,0 +1,56 @@
+/* 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_S_STAYTOONEDBALL_H
+#define DIRECTOR_LINGO_XTRAS_S_STAYTOONEDBALL_H
+
+namespace Director {
+
+class StayToonedBallXtraObject : public Object<StayToonedBallXtraObject> {
+public:
+ StayToonedBallXtraObject(ObjectType objType);
+
+ bool hasProp(const Common::String &propName) override;
+ Datum getProp(const Common::String &propName) override;
+};
+
+namespace StayToonedBallXtra {
+
+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_mInitRandom(int nargs);
+void m_mInitGame(int nargs);
+void m_mOPERATEGAME(int nargs);
+void m_mGactions(int nargs);
+void m_mGetInfo(int nargs);
+void m_mSetSize(int nargs);
+void m_mAddStuff(int nargs);
+
+} // End of namespace StayToonedBallXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/s/staytoonedglop.cpp b/engines/director/lingo/xtras/s/staytoonedglop.cpp
new file mode 100644
index 00000000000..55e7ddd95b2
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedglop.cpp
@@ -0,0 +1,128 @@
+/* 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/s/staytoonedglop.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Stay Tooned
+ *
+ **************************************************/
+
+/*
+-- xtra Glop -- Fridge Fight 7/15/96 Programmer: Keith Laverty FunnyBone Interactive
+new object me
+* mInitRandom integer SomeThing -- feeds a number bewteen 1-100 to the Random# Array
+* mInitGame integer NUM1,integer NUM2,integer NUM3,integer NUM4 -- Cast Size
+* mInitLevel integer NUM1 -- feeds a number bewteen 1-100 to the Random# Array
+* mInitDoctor -- feeds a number bewteen 1-100 to the Random# Array
+* mOPERATEGAME integer NUM1, integer NUM2, integer NUM3 -- feeds a number bewteen 1-100 to the Random# Array
+* mReadData integer NUM1, integer NUM2, integer NUM3 -- feeds a number bewteen 1-100 to the Random# Array
+* mGactions -- feeds a number bewteen 1-100 to the Random# Array
+* mPassArray integer NUM1, integer NUM2, integer NUM3 -- feeds a number bewteen 1-100 to the Random# Array
+* mPassCastSize integer NUM1, integer NUM2, integer NUM3, integer NUM4, integer NUM5 -- feeds a number bewteen 1-100 to the Random# Array
+
+ */
+
+namespace Director {
+
+const char *StayToonedGlopXtra::xlibName = "Glop";
+const XlibFileDesc StayToonedGlopXtra::fileNames[] = {
+ { "glop", "staytooned" },
+ { "glop_mac", "staytooned" },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", StayToonedGlopXtra::m_new, 0, 0, 500 },
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+ { "mInitRandom", StayToonedGlopXtra::m_mInitRandom, 1, 1, 500, HBLTIN },
+ { "mInitGame", StayToonedGlopXtra::m_mInitGame, 4, 4, 500, HBLTIN },
+ { "mInitLevel", StayToonedGlopXtra::m_mInitLevel, 1, 1, 500, HBLTIN },
+ { "mInitDoctor", StayToonedGlopXtra::m_mInitDoctor, 0, 0, 500, HBLTIN },
+ { "mOPERATEGAME", StayToonedGlopXtra::m_mOPERATEGAME, 3, 3, 500, HBLTIN },
+ { "mReadData", StayToonedGlopXtra::m_mReadData, 3, 3, 500, HBLTIN },
+ { "mGactions", StayToonedGlopXtra::m_mGactions, 0, 0, 500, HBLTIN },
+ { "mPassArray", StayToonedGlopXtra::m_mPassArray, 3, 3, 500, HBLTIN },
+ { "mPassCastSize", StayToonedGlopXtra::m_mPassCastSize, 5, 5, 500, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+StayToonedGlopXtraObject::StayToonedGlopXtraObject(ObjectType ObjectType) :Object<StayToonedGlopXtraObject>("StayToonedGlop") {
+ _objType = ObjectType;
+}
+
+bool StayToonedGlopXtraObject::hasProp(const Common::String &propName) {
+ return (propName == "name");
+}
+
+Datum StayToonedGlopXtraObject::getProp(const Common::String &propName) {
+ if (propName == "name")
+ return Datum(StayToonedGlopXtra::xlibName);
+ warning("StayToonedGlopXtra::getProp: unknown property '%s'", propName.c_str());
+ return Datum();
+}
+
+void StayToonedGlopXtra::open(ObjectType type, const Common::Path &path) {
+ StayToonedGlopXtraObject::initMethods(xlibMethods);
+ StayToonedGlopXtraObject *xobj = new StayToonedGlopXtraObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void StayToonedGlopXtra::close(ObjectType type) {
+ StayToonedGlopXtraObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void StayToonedGlopXtra::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("StayToonedGlopXtra::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(StayToonedGlopXtra::m_mInitRandom, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mInitGame, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mInitLevel, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mInitDoctor, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mOPERATEGAME, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mReadData, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mGactions, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mPassArray, 0)
+XOBJSTUB(StayToonedGlopXtra::m_mPassCastSize, 0)
+
+}
diff --git a/engines/director/lingo/xtras/s/staytoonedglop.h b/engines/director/lingo/xtras/s/staytoonedglop.h
new file mode 100644
index 00000000000..6a9a71e2d02
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedglop.h
@@ -0,0 +1,58 @@
+/* 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_S_STAYTOONEDGLOP_H
+#define DIRECTOR_LINGO_XTRAS_S_STAYTOONEDGLOP_H
+
+namespace Director {
+
+class StayToonedGlopXtraObject : public Object<StayToonedGlopXtraObject> {
+public:
+ StayToonedGlopXtraObject(ObjectType objType);
+
+ bool hasProp(const Common::String &propName) override;
+ Datum getProp(const Common::String &propName) override;
+};
+
+namespace StayToonedGlopXtra {
+
+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_mInitRandom(int nargs);
+void m_mInitGame(int nargs);
+void m_mInitLevel(int nargs);
+void m_mInitDoctor(int nargs);
+void m_mOPERATEGAME(int nargs);
+void m_mReadData(int nargs);
+void m_mGactions(int nargs);
+void m_mPassArray(int nargs);
+void m_mPassCastSize(int nargs);
+
+} // End of namespace StayToonedGlopXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/s/staytoonedhall.cpp b/engines/director/lingo/xtras/s/staytoonedhall.cpp
new file mode 100644
index 00000000000..1881de4c1ff
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedhall.cpp
@@ -0,0 +1,125 @@
+/* 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/s/staytoonedhall.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Stay Tooned
+ *
+ **************************************************/
+
+/*
+-- xtra Hall -- Remote Combat Game 7/8/96 Programmer: Keith Laverty
+new object me
+* mInitRandom integer SomeThing -- feeds a number bewteen 1-100 to the Random# Array
+* mInitGame integer NUM1, integer NUM2, integer NUM3-- feeds a number bewteen 1-100 to the Random# Array
+* mInitLevel integer NUM1-- feeds a number bewteen 1-100 to the Random# Array
+* mOPERATEGAME integer NUM1, integer NUM2, integer NUM3-- feeds a number bewteen 1-100 to the Random# Array
+* mReadData integer NUM1, integer NUM2, integer NUM3-- feeds a number bewteen 1-100 to the Random# Array
+* mGactions -- feeds a number bewteen 1-100 to the Random# Array
+* mPassArray integer NUM1, integer NUM2, integer NUM3-- feeds a number bewteen 1-100 to the Random# Array
+* mPassCastSize integer NUM1, integer NUM2, integer NUM3, integer NUM4, integer NUM5-- feeds a number bewteen 1-100 to the Random# Array
+
+ */
+
+namespace Director {
+
+const char *StayToonedHallXtra::xlibName = "Hall";
+const XlibFileDesc StayToonedHallXtra::fileNames[] = {
+ { "hall", "staytooned" },
+ { "hall_mac", "staytooned" },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", StayToonedHallXtra::m_new, 0, 0, 500 },
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+ { "mInitRandom", StayToonedHallXtra::m_mInitRandom, 1, 1, 500, HBLTIN },
+ { "mInitGame", StayToonedHallXtra::m_mInitGame, 3, 3, 500, HBLTIN },
+ { "mInitLevel", StayToonedHallXtra::m_mInitLevel, 1, 1, 500, HBLTIN },
+ { "mOPERATEGAME", StayToonedHallXtra::m_mOPERATEGAME, 3, 3, 500, HBLTIN },
+ { "mReadData", StayToonedHallXtra::m_mReadData, 3, 3, 500, HBLTIN },
+ { "mGactions", StayToonedHallXtra::m_mGactions, 0, 0, 500, HBLTIN },
+ { "mPassArray", StayToonedHallXtra::m_mPassArray, 3, 3, 500, HBLTIN },
+ { "mPassCastSize", StayToonedHallXtra::m_mPassCastSize, 5, 5, 500, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+StayToonedHallXtraObject::StayToonedHallXtraObject(ObjectType ObjectType) :Object<StayToonedHallXtraObject>("StayToonedHall") {
+ _objType = ObjectType;
+}
+
+bool StayToonedHallXtraObject::hasProp(const Common::String &propName) {
+ return (propName == "name");
+}
+
+Datum StayToonedHallXtraObject::getProp(const Common::String &propName) {
+ if (propName == "name")
+ return Datum(StayToonedHallXtra::xlibName);
+ warning("StayToonedHallXtra::getProp: unknown property '%s'", propName.c_str());
+ return Datum();
+}
+
+void StayToonedHallXtra::open(ObjectType type, const Common::Path &path) {
+ StayToonedHallXtraObject::initMethods(xlibMethods);
+ StayToonedHallXtraObject *xobj = new StayToonedHallXtraObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void StayToonedHallXtra::close(ObjectType type) {
+ StayToonedHallXtraObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void StayToonedHallXtra::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("StayToonedHallXtra::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(StayToonedHallXtra::m_mInitRandom, 0)
+XOBJSTUB(StayToonedHallXtra::m_mInitGame, 0)
+XOBJSTUB(StayToonedHallXtra::m_mInitLevel, 0)
+XOBJSTUB(StayToonedHallXtra::m_mOPERATEGAME, 0)
+XOBJSTUB(StayToonedHallXtra::m_mReadData, 0)
+XOBJSTUB(StayToonedHallXtra::m_mGactions, 0)
+XOBJSTUB(StayToonedHallXtra::m_mPassArray, 0)
+XOBJSTUB(StayToonedHallXtra::m_mPassCastSize, 0)
+
+}
diff --git a/engines/director/lingo/xtras/s/staytoonedhall.h b/engines/director/lingo/xtras/s/staytoonedhall.h
new file mode 100644
index 00000000000..6bea1f8f67a
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedhall.h
@@ -0,0 +1,57 @@
+/* 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_S_STAYTOONEDHALL_H
+#define DIRECTOR_LINGO_XTRAS_S_STAYTOONEDHALL_H
+
+namespace Director {
+
+class StayToonedHallXtraObject : public Object<StayToonedHallXtraObject> {
+public:
+ StayToonedHallXtraObject(ObjectType objType);
+
+ bool hasProp(const Common::String &propName) override;
+ Datum getProp(const Common::String &propName) override;
+};
+
+namespace StayToonedHallXtra {
+
+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_mInitRandom(int nargs);
+void m_mInitGame(int nargs);
+void m_mInitLevel(int nargs);
+void m_mOPERATEGAME(int nargs);
+void m_mReadData(int nargs);
+void m_mGactions(int nargs);
+void m_mPassArray(int nargs);
+void m_mPassCastSize(int nargs);
+
+} // End of namespace StayToonedHallXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/s/staytoonedhigh.cpp b/engines/director/lingo/xtras/s/staytoonedhigh.cpp
new file mode 100644
index 00000000000..6a0327fd54f
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedhigh.cpp
@@ -0,0 +1,122 @@
+/* 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/s/staytoonedhigh.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Stay Tooned
+ *
+ **************************************************/
+
+/*
+-- xtra Toon -- Fridge Fight 7/15/96 Programmer: Keith Laverty FunnyBone Interactive
+new object me
+* mInitRandom integer SomeThing -- feeds a number bewteen 1-100 to the Random# Array
+* mInitGame integer NUM1,integer NUM2,integer NUM3,integer NUM4,integer NUM5 -- Cast Size
+* mInitLevel integer NUM1 -- feeds a number bewteen 1-100 to the Random# Array
+* mInitBall -- feeds a number bewteen 1-100 to the Random# Array
+* mOPERATEGAME integer NUM1, integer NUM2 -- feeds a number bewteen 1-100 to the Random# Array
+* mReturnData integer NUM1, integer NUM2, integer NUM3 -- feeds a number bewteen 1-100 to the Random# Array
+* mGactions -- feeds a number bewteen 1-100 to the Random# Array
+
+ */
+
+namespace Director {
+
+const char *StayToonedHighXtra::xlibName = "Toon";
+const XlibFileDesc StayToonedHighXtra::fileNames[] = {
+ { "high", nullptr },
+ { "high_mac", nullptr },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", StayToonedHighXtra::m_new, 0, 0, 500 },
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+ { "mInitRandom", StayToonedHighXtra::m_mInitRandom, 1, 1, 500, HBLTIN },
+ { "mInitGame", StayToonedHighXtra::m_mInitGame, 5, 5, 500, HBLTIN },
+ { "mInitLevel", StayToonedHighXtra::m_mInitLevel, 1, 1, 500, HBLTIN },
+ { "mInitBall", StayToonedHighXtra::m_mInitBall, 0, 0, 500, HBLTIN },
+ { "mOPERATEGAME", StayToonedHighXtra::m_mOPERATEGAME, 2, 2, 500, HBLTIN },
+ { "mReturnData", StayToonedHighXtra::m_mReturnData, 3, 3, 500, HBLTIN },
+ { "mGactions", StayToonedHighXtra::m_mGactions, 0, 0, 500, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+StayToonedHighXtraObject::StayToonedHighXtraObject(ObjectType ObjectType) :Object<StayToonedHighXtraObject>("StayToonedHigh") {
+ _objType = ObjectType;
+}
+
+bool StayToonedHighXtraObject::hasProp(const Common::String &propName) {
+ return (propName == "name");
+}
+
+Datum StayToonedHighXtraObject::getProp(const Common::String &propName) {
+ if (propName == "name")
+ return Datum(StayToonedHighXtra::xlibName);
+ warning("StayToonedHighXtra::getProp: unknown property '%s'", propName.c_str());
+ return Datum();
+}
+
+void StayToonedHighXtra::open(ObjectType type, const Common::Path &path) {
+ StayToonedHighXtraObject::initMethods(xlibMethods);
+ StayToonedHighXtraObject *xobj = new StayToonedHighXtraObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void StayToonedHighXtra::close(ObjectType type) {
+ StayToonedHighXtraObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void StayToonedHighXtra::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("StayToonedHighXtra::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(StayToonedHighXtra::m_mInitRandom, 0)
+XOBJSTUB(StayToonedHighXtra::m_mInitGame, 0)
+XOBJSTUB(StayToonedHighXtra::m_mInitLevel, 0)
+XOBJSTUB(StayToonedHighXtra::m_mInitBall, 0)
+XOBJSTUB(StayToonedHighXtra::m_mOPERATEGAME, 0)
+XOBJSTUB(StayToonedHighXtra::m_mReturnData, 0)
+XOBJSTUB(StayToonedHighXtra::m_mGactions, 0)
+
+}
diff --git a/engines/director/lingo/xtras/s/staytoonedhigh.h b/engines/director/lingo/xtras/s/staytoonedhigh.h
new file mode 100644
index 00000000000..1f7bfd139b7
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedhigh.h
@@ -0,0 +1,56 @@
+/* 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_S_STAYTOONEDHIGH_H
+#define DIRECTOR_LINGO_XTRAS_S_STAYTOONEDHIGH_H
+
+namespace Director {
+
+class StayToonedHighXtraObject : public Object<StayToonedHighXtraObject> {
+public:
+ StayToonedHighXtraObject(ObjectType objType);
+
+ bool hasProp(const Common::String &propName) override;
+ Datum getProp(const Common::String &propName) override;
+};
+
+namespace StayToonedHighXtra {
+
+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_mInitRandom(int nargs);
+void m_mInitGame(int nargs);
+void m_mInitLevel(int nargs);
+void m_mInitBall(int nargs);
+void m_mOPERATEGAME(int nargs);
+void m_mReturnData(int nargs);
+void m_mGactions(int nargs);
+
+} // End of namespace StayToonedHighXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/s/staytoonedober.cpp b/engines/director/lingo/xtras/s/staytoonedober.cpp
new file mode 100644
index 00000000000..4fe2557fac3
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedober.cpp
@@ -0,0 +1,125 @@
+/* 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/s/staytoonedober.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Stay Tooned
+ *
+ **************************************************/
+
+/*
+-- xtra Toon -- Fridge Fight 7/15/96 Programmer: Keith Laverty FunnyBone Interactive
+new object me
+* mInitRandom integer SomeThing -- feeds a number bewteen 1-100 to the Random# Array
+* mBuildTable integer SlotNum,integer XOff,integer YOff,integer XSize,integer YSize -- Cast Size
+* mInitGame integer NumOfGuns,integer NumOfNukes -- feeds a number bewteen 1-100 to the Random# Array
+* mInitGun -- feeds a number bewteen 1-100 to the Random# Array
+* mOPERATEGAME integer NUM1, integer NUM2, integer NUM3,integer NUM4 -- feeds a number bewteen 1-100 to the Random# Array
+* mReturnData integer NUM1, integer NUM2 -- feeds a number bewteen 1-100 to the Random# Array
+* mGactions -- feeds a number bewteen 1-100 to the Random# Array
+* mCastStarts integer NUM1 -- feeds a number bewteen 1-100 to the Random# Array
+
+ */
+
+namespace Director {
+
+const char *StayToonedOberXtra::xlibName = "Toon";
+const XlibFileDesc StayToonedOberXtra::fileNames[] = {
+ { "ober", "staytooned" },
+ { "ober_mac", "staytooned" },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", StayToonedOberXtra::m_new, 0, 0, 500 },
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+ { "mInitRandom", StayToonedOberXtra::m_mInitRandom, 1, 1, 500, HBLTIN },
+ { "mBuildTable", StayToonedOberXtra::m_mBuildTable, 5, 5, 500, HBLTIN },
+ { "mInitGame", StayToonedOberXtra::m_mInitGame, 2, 2, 500, HBLTIN },
+ { "mInitGun", StayToonedOberXtra::m_mInitGun, 0, 0, 500, HBLTIN },
+ { "mOPERATEGAME", StayToonedOberXtra::m_mOPERATEGAME, 4, 4, 500, HBLTIN },
+ { "mReturnData", StayToonedOberXtra::m_mReturnData, 2, 2, 500, HBLTIN },
+ { "mGactions", StayToonedOberXtra::m_mGactions, 0, 0, 500, HBLTIN },
+ { "mCastStarts", StayToonedOberXtra::m_mCastStarts, 1, 1, 500, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+StayToonedOberXtraObject::StayToonedOberXtraObject(ObjectType ObjectType) :Object<StayToonedOberXtraObject>("StayToonedOber") {
+ _objType = ObjectType;
+}
+
+bool StayToonedOberXtraObject::hasProp(const Common::String &propName) {
+ return (propName == "name");
+}
+
+Datum StayToonedOberXtraObject::getProp(const Common::String &propName) {
+ if (propName == "name")
+ return Datum(StayToonedOberXtra::xlibName);
+ warning("StayToonedOberXtra::getProp: unknown property '%s'", propName.c_str());
+ return Datum();
+}
+
+void StayToonedOberXtra::open(ObjectType type, const Common::Path &path) {
+ StayToonedOberXtraObject::initMethods(xlibMethods);
+ StayToonedOberXtraObject *xobj = new StayToonedOberXtraObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void StayToonedOberXtra::close(ObjectType type) {
+ StayToonedOberXtraObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void StayToonedOberXtra::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("StayToonedOberXtra::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(StayToonedOberXtra::m_mInitRandom, 0)
+XOBJSTUB(StayToonedOberXtra::m_mBuildTable, 0)
+XOBJSTUB(StayToonedOberXtra::m_mInitGame, 0)
+XOBJSTUB(StayToonedOberXtra::m_mInitGun, 0)
+XOBJSTUB(StayToonedOberXtra::m_mOPERATEGAME, 0)
+XOBJSTUB(StayToonedOberXtra::m_mReturnData, 0)
+XOBJSTUB(StayToonedOberXtra::m_mGactions, 0)
+XOBJSTUB(StayToonedOberXtra::m_mCastStarts, 0)
+
+}
diff --git a/engines/director/lingo/xtras/s/staytoonedober.h b/engines/director/lingo/xtras/s/staytoonedober.h
new file mode 100644
index 00000000000..64ca01c7cab
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedober.h
@@ -0,0 +1,57 @@
+/* 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_S_STAYTOONEDOBER_H
+#define DIRECTOR_LINGO_XTRAS_S_STAYTOONEDOBER_H
+
+namespace Director {
+
+class StayToonedOberXtraObject : public Object<StayToonedOberXtraObject> {
+public:
+ StayToonedOberXtraObject(ObjectType objType);
+
+ bool hasProp(const Common::String &propName) override;
+ Datum getProp(const Common::String &propName) override;
+};
+
+namespace StayToonedOberXtra {
+
+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_mInitRandom(int nargs);
+void m_mBuildTable(int nargs);
+void m_mInitGame(int nargs);
+void m_mInitGun(int nargs);
+void m_mOPERATEGAME(int nargs);
+void m_mReturnData(int nargs);
+void m_mGactions(int nargs);
+void m_mCastStarts(int nargs);
+
+} // End of namespace StayToonedOberXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/s/staytoonedtoon.cpp b/engines/director/lingo/xtras/s/staytoonedtoon.cpp
new file mode 100644
index 00000000000..38c555ca6b8
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedtoon.cpp
@@ -0,0 +1,125 @@
+/* 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/s/staytoonedtoon.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Stay Tooned
+ *
+ **************************************************/
+
+/*
+-- xtra ToonBoy -- ToonBoy 7/15/96 Programmer: Keith Laverty FunnyBone Interactive
+new object me
+* mInitRandom integer SomeThing -- feeds a number bewteen 1-100 to the Random# Array
+* mInitGame -- feeds a number bewteen 1-100 to the Random# Array
+* mInitScoop -- feeds a number bewteen 1-100 to the Random# Array
+* mOPERATEGAME integer NUM1 -- feeds a number bewteen 1-100 to the Random# Array
+* mReadData integer NUM1, integer NUM2, integer NUM3-- feeds a number bewteen 1-100 to the Random# Array
+* mGactions -- feeds a number bewteen 1-100 to the Random# Array
+* mPassArray integer NUM1, integer NUM2, integer NUM3-- feeds a number bewteen 1-100 to the Random# Array
+* mPassCastSize integer NUM1, integer NUM2, integer NUM3, integer NUM4, integer NUM5-- feeds a number bewteen 1-100 to the Random# Array
+
+ */
+
+namespace Director {
+
+const char *StayToonedToonXtra::xlibName = "ToonBoy";
+const XlibFileDesc StayToonedToonXtra::fileNames[] = {
+ { "toon", "staytooned" },
+ { "toon_mac", "staytooned" },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", StayToonedToonXtra::m_new, 0, 0, 500 },
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+ { "mInitRandom", StayToonedToonXtra::m_mInitRandom, 1, 1, 500, HBLTIN },
+ { "mInitGame", StayToonedToonXtra::m_mInitGame, 0, 0, 500, HBLTIN },
+ { "mInitScoop", StayToonedToonXtra::m_mInitScoop, 0, 0, 500, HBLTIN },
+ { "mOPERATEGAME", StayToonedToonXtra::m_mOPERATEGAME, 1, 1, 500, HBLTIN },
+ { "mReadData", StayToonedToonXtra::m_mReadData, 3, 3, 500, HBLTIN },
+ { "mGactions", StayToonedToonXtra::m_mGactions, 0, 0, 500, HBLTIN },
+ { "mPassArray", StayToonedToonXtra::m_mPassArray, 3, 3, 500, HBLTIN },
+ { "mPassCastSize", StayToonedToonXtra::m_mPassCastSize, 5, 5, 500, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+StayToonedToonXtraObject::StayToonedToonXtraObject(ObjectType ObjectType) :Object<StayToonedToonXtraObject>("StayToonedToon") {
+ _objType = ObjectType;
+}
+
+bool StayToonedToonXtraObject::hasProp(const Common::String &propName) {
+ return (propName == "name");
+}
+
+Datum StayToonedToonXtraObject::getProp(const Common::String &propName) {
+ if (propName == "name")
+ return Datum(StayToonedToonXtra::xlibName);
+ warning("StayToonedToonXtra::getProp: unknown property '%s'", propName.c_str());
+ return Datum();
+}
+
+void StayToonedToonXtra::open(ObjectType type, const Common::Path &path) {
+ StayToonedToonXtraObject::initMethods(xlibMethods);
+ StayToonedToonXtraObject *xobj = new StayToonedToonXtraObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void StayToonedToonXtra::close(ObjectType type) {
+ StayToonedToonXtraObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void StayToonedToonXtra::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("StayToonedToonXtra::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(StayToonedToonXtra::m_mInitRandom, 0)
+XOBJSTUB(StayToonedToonXtra::m_mInitGame, 0)
+XOBJSTUB(StayToonedToonXtra::m_mInitScoop, 0)
+XOBJSTUB(StayToonedToonXtra::m_mOPERATEGAME, 0)
+XOBJSTUB(StayToonedToonXtra::m_mReadData, 0)
+XOBJSTUB(StayToonedToonXtra::m_mGactions, 0)
+XOBJSTUB(StayToonedToonXtra::m_mPassArray, 0)
+XOBJSTUB(StayToonedToonXtra::m_mPassCastSize, 0)
+
+}
diff --git a/engines/director/lingo/xtras/s/staytoonedtoon.h b/engines/director/lingo/xtras/s/staytoonedtoon.h
new file mode 100644
index 00000000000..f0672eb4809
--- /dev/null
+++ b/engines/director/lingo/xtras/s/staytoonedtoon.h
@@ -0,0 +1,57 @@
+/* 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_S_STAYTOONEDTOON_H
+#define DIRECTOR_LINGO_XTRAS_S_STAYTOONEDTOON_H
+
+namespace Director {
+
+class StayToonedToonXtraObject : public Object<StayToonedToonXtraObject> {
+public:
+ StayToonedToonXtraObject(ObjectType objType);
+
+ bool hasProp(const Common::String &propName) override;
+ Datum getProp(const Common::String &propName) override;
+};
+
+namespace StayToonedToonXtra {
+
+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_mInitRandom(int nargs);
+void m_mInitGame(int nargs);
+void m_mInitScoop(int nargs);
+void m_mOPERATEGAME(int nargs);
+void m_mReadData(int nargs);
+void m_mGactions(int nargs);
+void m_mPassArray(int nargs);
+void m_mPassCastSize(int nargs);
+
+} // End of namespace StayToonedToonXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 8df82063a31..9e3d48ab560 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -191,6 +191,12 @@ MODULE_OBJS = \
lingo/xtras/rtk.o \
lingo/xtras/scrnutil.o \
lingo/xtras/s/smacker.o \
+ lingo/xtras/s/staytoonedhall.o \
+ lingo/xtras/s/staytoonedball.o \
+ lingo/xtras/s/staytoonedglop.o \
+ lingo/xtras/s/staytoonedhigh.o \
+ lingo/xtras/s/staytoonedober.o \
+ lingo/xtras/s/staytoonedtoon.o \
lingo/xtras/timextra.o \
lingo/xtras/xsound.o
Commit: 5ce09111b096e85be37c36d7b7eb6e0003f0430c
https://github.com/scummvm/scummvm/commit/5ce09111b096e85be37c36d7b7eb6e0003f0430c
Author: Scott Percival (code at moral.net.au)
Date: 2025-11-29T10:01:04+01:00
Commit Message:
DIRECTOR: Fix regression in score audio playback
This reverts commit 169fd65780d90e9208ba6b7f0c190fb424584a3d.
Fixes missing sound in the introduction (after picking up the furoshiki)
and clicking the nose of the big head in Eastern Mind.
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index b72becc0869..b573b303647 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -773,7 +773,7 @@ void Score::update() {
bool sound1Changed = true;
bool sound2Changed = true;
- if (!_firstRun) {
+ if (_version >= kFileVer600 && !_firstRun) {
// We check if the sound channels have changed, and only restart
// the sound if they have. Even if the sound was stopped
//
Commit: 33cdefbfeddaf2d1b52ab3b979d19b58f971907a
https://github.com/scummvm/scummvm/commit/33cdefbfeddaf2d1b52ab3b979d19b58f971907a
Author: Scott Percival (code at moral.net.au)
Date: 2025-11-29T10:01:04+01:00
Commit Message:
DIRECTOR: Improve accuracy of sound playback on movie switch
Fixes music playback in The Saboten Man. Confirmed to work with the
INTRO3.DXR/INTRO4.DXR cutscene switch in Elroy Goes Bugzerk.
Changed paths:
engines/director/score.cpp
engines/director/sound.cpp
engines/director/sound.h
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index b573b303647..de958d337e9 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -337,9 +337,6 @@ void Score::startPlay() {
_channels.push_back(new Channel(this, _currentFrame->_sprites[i], i));
updateSprites(kRenderForceUpdate, true);
-
- _soundManager->disablePuppetSound(1);
- _soundManager->disablePuppetSound(2);
}
void Score::step() {
diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp
index 0e93ad4fa8c..b8b03a25698 100644
--- a/engines/director/sound.cpp
+++ b/engines/director/sound.cpp
@@ -95,6 +95,7 @@ void DirectorSound::playFile(Common::String filename, int soundChannel) {
// Set the last played sound so that cast member 0 in the sound channel doesn't stop this file.
setLastPlayedSound(soundChannel, SoundID(), false);
+ _channels[soundChannel]->fromLastMovie = false;
}
void DirectorSound::playMCI(Audio::AudioStream &stream, uint32 from, uint32 to) {
@@ -143,6 +144,7 @@ void DirectorSound::playStream(Audio::AudioStream &stream, int soundChannel) {
if (_channels[soundChannel]->pitchShiftPercent != 100) {
_mixer->setChannelRate(_channels[soundChannel]->handle, _channels[soundChannel]->originalRate*_channels[soundChannel]->pitchShiftPercent/100);
}
+ _channels[soundChannel]->fromLastMovie = false;
}
void DirectorSound::playSound(SoundID soundID, int soundChannel, bool forPuppet) {
@@ -171,7 +173,7 @@ void DirectorSound::playCastMember(CastMemberID memberID, int soundChannel, bool
stopSound(soundChannel);
// Director 4 will stop after the current loop iteration, but
// Director 3 will continue looping until the sound is replaced.
- } else if (g_director->getVersion() >= 400) {
+ } else if (g_director->getVersion() >= 400 && !_channels[soundChannel]->fromLastMovie) {
// If there is a loopable stream specified, set the loop to expire by itself
if (_channels[soundChannel]->loopPtr) {
debugC(5, kDebugSound, "DirectorSound::playCastMember(): telling loop in channel %d to stop", soundChannel);
@@ -481,8 +483,11 @@ void DirectorSound::playExternalSound(uint16 menu, uint16 submenu, int soundChan
void DirectorSound::changingMovie() {
for (auto &it : _channels) {
it._value->movieChanged = true;
+
+ // When switching movies, the puppetSound flag is disabled. This means any sound (channel or script)
+ // can take over. Any existing sound that is playing (sample or loop) will continue to play until that happens.
if (isChannelPuppet(it._key)) {
- setPuppetSound(SoundID(), it._key); // disable puppet sound
+ disablePuppetSound(it._key); // disable puppet sound
}
if (isChannelActive(it._key)) {
@@ -498,6 +503,9 @@ void DirectorSound::changingMovie() {
_mixer->loopChannel(it._value->handle);
}
}
+
+ // Flag that this is from a previous movie, therefore looping should continue.
+ it._value->fromLastMovie = true;
}
}
unloadSampleSounds(); // TODO: we can possibly keep this between movies
@@ -527,6 +535,7 @@ void DirectorSound::stopSound(int soundChannel) {
cancelFade(soundChannel);
_mixer->stopHandle(_channels[soundChannel]->handle);
setLastPlayedSound(soundChannel, SoundID());
+ _channels[soundChannel]->fromLastMovie = false;
return;
}
@@ -542,6 +551,7 @@ void DirectorSound::stopSound() {
_mixer->stopHandle(it._value->handle);
setLastPlayedSound(it._key, SoundID());
+ it._value->fromLastMovie = false;
}
_mixer->stopHandle(_scriptSound);
diff --git a/engines/director/sound.h b/engines/director/sound.h
index fae22ba74a8..6c895163dc9 100644
--- a/engines/director/sound.h
+++ b/engines/director/sound.h
@@ -141,6 +141,7 @@ struct SoundChannel {
Audio::SoundHandle handle;
SoundID lastPlayedSound;
bool stopOnZero; // Should the sound be stopped when the channel contains cast member 0?
+ bool fromLastMovie; // Was this sound carried over from a movie switch?
byte volume;
int pitchShiftPercent;
int originalRate;
@@ -159,7 +160,7 @@ struct SoundChannel {
// a stop at the end of a loop.
Audio::LoopableAudioStream *loopPtr;
- SoundChannel(): handle(), lastPlayedSound(SoundID()), stopOnZero(true), volume(255), originalRate(-1),
+ SoundChannel(): handle(), lastPlayedSound(SoundID()), stopOnZero(true), fromLastMovie(false), volume(255), originalRate(-1),
pitchShiftPercent(100), fade(nullptr), puppet(SoundID()), newPuppet(false), movieChanged(false), loopPtr(nullptr),
lastCuePointIndex(-1) {}
};
More information about the Scummvm-git-logs
mailing list