Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
/* 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/>.
*
*/
/*************************************
*
* USED IN:
* Secrets of the Pyramids (Mac)
* Mindscape's Wonder Land (Mac)
* Grackon's Curse (Mac)
* Return to Jurassic (Mac)
* Ednovation demos (Mac)
*
*************************************/
#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/d/darkenscreen.h"
namespace Director {
const char *const DarkenScreen::xlibName = "darkenScreen";
const XlibFileDesc DarkenScreen::fileNames[] = {
{ "darkenScreen", nullptr },
{ nullptr, nullptr },
};
static const BuiltinProto builtins[] = {
{ "darkenScreen", DarkenScreen::m_darkenscreen, 0, 0, 300, HBLTIN },
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
void DarkenScreen::open(ObjectType type, const Common::Path &path) {
g_lingo->initBuiltIns(builtins);
}
void DarkenScreen::close(ObjectType type) {
g_lingo->cleanupBuiltIns(builtins);
}
XOBJSTUBNR(DarkenScreen::m_darkenscreen)
} // End of namespace Director

View File

@@ -0,0 +1,41 @@
/* 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_DARKENSCREEN_H
#define DIRECTOR_LINGO_XLIBS_DARKENSCREEN_H
namespace Director {
namespace DarkenScreen {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_darkenscreen(int nargs);
} // End of namespace DarkenScreen
} // End of namespace Director
#endif

View File

@@ -0,0 +1,145 @@
/* 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/d/dateutil.h"
/**************************************************
*
* USED IN:
* Amusement Planet Phantasmagoria
*
**************************************************/
/*
-- DateUtil v1.0
I mNew --Make a new instance
S mGetTime --Get current Time String
S mGetDate --Get current Date String
S mGetDateTime -- Get concatnated Date and Time String
I mGetSecond -- Second in number
*/
namespace Director {
const char *const DateUtilXObj::xlibName = "DateUtil";
const XlibFileDesc DateUtilXObj::fileNames[] = {
{ "DateUtil", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "new", DateUtilXObj::m_new, 0, 0, 400 },
{ "getTime", DateUtilXObj::m_getTime, 0, 0, 400 },
{ "getDate", DateUtilXObj::m_getDate, 0, 0, 400 },
{ "getDateTime", DateUtilXObj::m_getDateTime, 0, 0, 400 },
{ "getSecond", DateUtilXObj::m_getSecond, 0, 0, 400 },
{ nullptr, nullptr, 0, 0, 0 }
};
static const BuiltinProto xlibBuiltins[] = {
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
DateUtilXObject::DateUtilXObject(ObjectType ObjectType) :Object<DateUtilXObject>("DateUtil") {
_objType = ObjectType;
}
void DateUtilXObj::open(ObjectType type, const Common::Path &path) {
DateUtilXObject::initMethods(xlibMethods);
DateUtilXObject *xobj = new DateUtilXObject(type);
if (type == kXtraObj)
g_lingo->_openXtras.push_back(xlibName);
g_lingo->exposeXObject(xlibName, xobj);
g_lingo->initBuiltIns(xlibBuiltins);
}
void DateUtilXObj::close(ObjectType type) {
DateUtilXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
void DateUtilXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("DateUtilXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
// Amusement Planet Phantasmagoria calls this method, treating its return
// value as a single string, and reading chars 1-4, 6-7, 9-10, and 12-14
// as the values we set here.
void DateUtilXObj::m_getDate(int nargs) {
TimeDate time;
g_system->getTimeAndDate(time);
Common::String day;
switch (time.tm_wday) {
case 0:
day = Common::String("SUN");
break;
case 1:
day = Common::String("MON");
break;
case 2:
day = Common::String("TUE");
break;
case 3:
day = Common::String("WED");
break;
case 4:
day = Common::String("THU");
break;
case 5:
day = Common::String("FRI");
break;
case 6:
day = Common::String("SAT");
break;
}
// Phantasmagoria's get_season() suggests months start from 1.
Common::String out = Common::String::format("%04d:%02d:%02d:%s", time.tm_year + 1900, time.tm_mon + 1, time.tm_mday, day.c_str());
g_lingo->push(Datum(out));
}
// Amusement Planet Phantasmagoria calls this method, treating its return
// value as a single string, and reading chars 1-2, 4-5 and 7-8 as the
// values we set here.
void DateUtilXObj::m_getTime(int nargs) {
TimeDate time;
g_system->getTimeAndDate(time);
Common::String out = Common::String::format("%02d:%02d:%02d", time.tm_hour, time.tm_min, time.tm_sec);
g_lingo->push(Datum(out));
}
// These two methods are never called in Phantasmagoria.
XOBJSTUB(DateUtilXObj::m_getDateTime, "")
XOBJSTUB(DateUtilXObj::m_getSecond, 0)
}

View File

@@ -0,0 +1,50 @@
/* 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_DATEUTIL_H
#define DIRECTOR_LINGO_XLIBS_DATEUTIL_H
namespace Director {
class DateUtilXObject : public Object<DateUtilXObject> {
public:
DateUtilXObject(ObjectType objType);
};
namespace DateUtilXObj {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_new(int nargs);
void m_getTime(int nargs);
void m_getDate(int nargs);
void m_getDateTime(int nargs);
void m_getSecond(int nargs);
} // End of namespace DateUtilXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,164 @@
/* 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 "audio/mixer.h"
#include "director/director.h"
#include "director/lingo/lingo.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/xlibs/d/developerStack.h"
/*************************************
*
* USED IN:
* overringunder: Over-Ring-Under
*
*************************************/
/*************************************
*
* Developer Stack 1.3r
* Issue date 11/05/88
*
* This stack is © 1987,88 Steve Drazga & AnalytX. The individual XCMDs
* and scripts are copyrighted by the original authors as stated their description.
*
* This issue of Developer Stack may be freely distributed by individuals in its
* original form with all original messages. DO NOT DISTRIBUTE MODIFIED COPIES!
* User groups may distribute it for regular disk fees. Other organizations
* desiring to charge for the distribution of Developer Stack should contact AnalytX.
*
* Developer Stack is intended for educational & training purposes only and
* no warranty is made as to the suitablity of anything included in this stack
* for any specific purpose. For support on any individual contributions, please
* contact the creator directly.
*
*/
/*
* XMCDs:
*
* Alert
* BarButton
* ChangeMenu
* CheckMenu
* ClipToPICTRes
* Color
* CombineFile
* CommInit
* CommWrite
* DeleteFile2
* DeProtect
* DispPict
* DoList
* doRestart
* DragOn
* DrawPict
* Ejector
* EnableMenu
* GetDANames
* HyperSND
* Import
* ImportPict
* InitMidi
* MungeMCTB
* OSErr
* PrintClip
* Progress
* ResCopy
* ResetMIDI
* ResetPrinter
* sendSerial
* SetVolume -- Done
* ShowMenu
* ShutDown
* SoundCapToRes
* Speak
* StdFile
* Stripper
* Tabs2Spaces
* Talk
* TitleBar
* TxMIDI
*/
/*
* This XCMD sets the current volume level of the Macintosh.
*
* This XCMD is ©1988 by Steve Drazga and all rights are reserved.
* It may be used in any non-commercial, shareware, or commercial stacks
* as long as the following conditions are met:
*
* 1) Within the credits of the stack the phrase 'Portions © 1988 Steve Drazga" should be included.
*
* 2) Send a copy of your finished stack to me at:
* Steve Drazga
* AnalytX
* Box 388
* Southampton, PA 18966
*
* If you need custom XCMDs/XFCNs, stacks, or HyperCard training for your organization contact:
* AnalytX at (215) 750-0792.
*
*
* Syntax:
* SetVolume "©1988SDrazga",<newVolume>
* The first parameter must be the copyright notice (the © symbol is option-g).
* The second parameter is the new volume level (0-7)
*
* Example usage: SetVolume "©1988SDrazga",
*
*************************************/
namespace Director {
const char *const DeveloperStack::xlibName = "SetVolume";
const XlibFileDesc DeveloperStack::fileNames[] = {
{ "SetVolume", nullptr },
{ nullptr, nullptr },
};
static const BuiltinProto builtins[] = {
{ "SetVolume", DeveloperStack::b_setvolume, 2, 2, 300, HBLTIN },
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
void DeveloperStack::open(ObjectType type, const Common::Path &path) {
g_lingo->initBuiltIns(builtins);
}
void DeveloperStack::close(ObjectType type) {
g_lingo->cleanupBuiltIns(builtins);
}
void DeveloperStack::b_setvolume(int nargs) {
int volume = g_lingo->pop().asInt();
Common::String copyright = g_lingo->pop().asString();
debug(5, "LB::b_setvolume: copyright: %s vol: %d", copyright.c_str(), volume);
volume = CLIP<int>(volume, 0, 7);
g_director->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, Audio::Mixer::kMaxMixerVolume / 7 * volume);
}
} // End of namespace Director

View File

@@ -0,0 +1,41 @@
/* 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_DEVELOPERSTACK_H
#define DIRECTOR_LINGO_XLIBS_DEVELOPERSTACK_H
namespace Director {
namespace DeveloperStack {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void b_setvolume(int nargs);
} // End of namespace DeveloperStack
} // End of namespace Director
#endif

View File

@@ -0,0 +1,142 @@
/* 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/>.
*
*/
/*************************************
*
* USED IN:
* Total Distortion
*
*************************************/
/*
* -- Dialogs XObject. Written by Scott Kildall. Copyright (c) Red Eye Software, December 11th, 1994.
* Compuserve:72703,451 AOL:KILDALL APPLELINK:S.KILDALL
* Internet:72703.451@compuserve.com
* Licensed for the MediaBook CD for Director
* Published by gray matter design (415) 243-0394
*
* Dialogs
* X mNew --Creates a new instance of the XObject
* SSSS mPutFile, Dialog Title, Default Name, Default Extension --Displays a save dialog box
* SSSS mGetFile, Dialog Title, Default Name, Default Extension --Displays an open dialog box
*
* -- How it is called:
* set GameFileFULLPATH to gDialogsObj(mPutFile, "Save your Total Distortion Game File!", "TDGame", "TDG")
* set GameFileFULLPATH to gDialogsObj(mGetFile, "Find your Total Distortion Game File!", "*.TDG", "TDG")
*/
#include "gui/filebrowser-dialog.h"
#include "director/director.h"
#include "director/lingo/lingo.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/xlibs/d/dialogsxobj.h"
namespace Director {
const char *const DialogsXObj::xlibNames[] = {
"DialogS",
nullptr
};
const XlibFileDesc DialogsXObj::fileNames[] = {
{ "DialogS", nullptr },
{ "shaREQUE", nullptr }, // TD loads this up using openXLib("@:shaREQUE.DLL")
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "new", DialogsXObj::m_new, 0, 0, 400 }, // D4
{ "GetFile", DialogsXObj::m_getFile, 3, 3, 400 }, // D4
{ "PutFile", DialogsXObj::m_putFile, 3, 3, 400 }, // D4
{ nullptr, nullptr, 0, 0, 0 }
};
void DialogsXObj::open(ObjectType type, const Common::Path &path) {
if (type == kXObj) {
DialogsXObject::initMethods(xlibMethods);
DialogsXObject *xobj = new DialogsXObject(kXObj);
for (uint i = 0; xlibNames[i]; i++) {
g_lingo->exposeXObject(xlibNames[i], xobj);
}
}
}
void DialogsXObj::close(ObjectType type) {
if (type == kXObj) {
DialogsXObject::cleanupMethods();
for (uint i = 0; xlibNames[i]; i++) {
g_lingo->_globalvars[xlibNames[i]] = Datum();
}
}
}
DialogsXObject::DialogsXObject(ObjectType ObjectType) : Object<DialogsXObject>("DialogS") {
_objType = ObjectType;
}
void DialogsXObj::m_new(int nargs) {
g_lingo->push(g_lingo->_state->me);
}
void DialogsXObj::m_putFile(int nargs) {
Common::String extn = g_lingo->pop().asString();
Common::String name = g_lingo->pop().asString();
Common::String title = g_lingo->pop().asString();
Common::String prefix = savePrefix();
Common::String mask = prefix + "*." + extn + ".txt";
Common::String filename = name;
GUI::FileBrowserDialog browser(title.c_str(), "txt", GUI::kFBModeSave, mask.c_str());
if (browser.runModal() > 0) {
filename = browser.getResult();
if (!filename.matchString(mask)) // If user choose to create new file (rather than overwriting existing one)
filename = Common::String::format("C:\\%s%s", prefix.c_str(), filename.c_str());
else {
// Here user chose existing save file to be overwritten, so format it before sending! (To prevent duplicate extensions)
const Common::String suffx = "." + extn;
Common::replace(filename, suffx, "");
}
}
warning("DialogsXObj::m_putFile return filename: %s", filename.c_str());
g_lingo->push(Datum(filename));
}
void DialogsXObj::m_getFile(int nargs) {
Common::String extn = g_lingo->pop().asString();
Common::String name = g_lingo->pop().asString();
Common::String title = g_lingo->pop().asString();
Common::String prefix = savePrefix();
Common::String mask = prefix + "*." + extn + ".txt";
Common::String fileName = name;
GUI::FileBrowserDialog browser(title.c_str(), "txt", GUI::kFBModeLoad, mask.c_str());
if (browser.runModal() > 0) {
Common::String path = browser.getResult();
fileName = Common::String::format("C:\\%s", path.c_str()); // Create fullpath from this name, as: C:\filename.TDG.txt!
}
warning("DialogsXObj::m_getFile return filename: %s", fileName.c_str());
g_lingo->push(Datum(fileName));
}
} // End of namespace Director

View File

@@ -0,0 +1,47 @@
/* 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_DIALOGSXOBJ_H
#define DIRECTOR_LINGO_XLIBS_DIALOGSXOBJ_H
namespace Director {
class DialogsXObject : public Object<DialogsXObject> {
public:
DialogsXObject(ObjectType objType);
};
namespace DialogsXObj {
extern const char *const xlibNames[];
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_new(int nargs);
void m_putFile(int nargs);
void m_getFile(int nargs);
} // End of namespace DialogsXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,114 @@
/* 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/d/dirutil.h"
/*
-- DIRUTIL External Factory. 16Feb93 PTM
DIRUTIL
I mNew --Creates a new instance of the XObject
X mDispose --Disposes of XObject instance
S mName --Returns the XObject name (dirutil)
I mStatus --Returns an integer status code
SI mError, code --Returns an error string
S mLastError --Returns last error string
ISI mSetAttrib,filename,attrib --Sets the Attibute of attr
IS mGetAttrib,filename --Gets the Attibute of filename
II mGetDriveType,drivenumber --Gets the type of a drive selected
I mQTVersion --Returns an integer status code
S mQTVersionStr --Returns version as a string
II mIsCdrom,drivenumber --Return true if drive CDROM
S mAuthors --Information on authors
XI mSetErrorMode,mode --sets windoze error mode
*/
namespace Director {
const char *const DirUtilXObj::xlibName = "DirUtil";
const XlibFileDesc DirUtilXObj::fileNames[] = {
{ "dirutil", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "new", DirUtilXObj::m_new, 0, 0, 400 }, // D4
{ "dispose", DirUtilXObj::m_dispose, 0, 0, 400 }, // D4
{ "name", DirUtilXObj::m_name, 0, 0, 400 }, // D4
{ "status", DirUtilXObj::m_status, 0, 0, 400 }, // D4
{ "error", DirUtilXObj::m_error, 1, 1, 400 }, // D4
{ "lastError", DirUtilXObj::m_lastError, 0, 0, 400 }, // D4
{ "setAttrib", DirUtilXObj::m_setAttrib, 2, 2, 400 }, // D4
{ "getAttrib", DirUtilXObj::m_getAttrib, 1, 1, 400 }, // D4
{ "getDriveType", DirUtilXObj::m_getDriveType, 1, 1, 400 }, // D4
{ "qTVersion", DirUtilXObj::m_qTVersion, 0, 0, 400 }, // D4
{ "qTVersionStr", DirUtilXObj::m_qTVersionStr, 0, 0, 400 }, // D4
{ "isCdrom", DirUtilXObj::m_isCdrom, 1, 1, 400 }, // D4
{ "authors", DirUtilXObj::m_authors, 0, 0, 400 }, // D4
{ "setErrorMode", DirUtilXObj::m_setErrorMode, 1, 1, 400 }, // D4
{ nullptr, nullptr, 0, 0, 0 }
};
DirUtilXObject::DirUtilXObject(ObjectType ObjectType) :Object<DirUtilXObject>("DirUtil") {
_objType = ObjectType;
}
void DirUtilXObj::open(ObjectType type, const Common::Path &path) {
if (type == kXObj) {
DirUtilXObject::initMethods(xlibMethods);
DirUtilXObject *xobj = new DirUtilXObject(kXObj);
g_lingo->exposeXObject(xlibName, xobj);
}
}
void DirUtilXObj::close(ObjectType type) {
if (type == kXObj) {
DirUtilXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
}
void DirUtilXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("DirUtilXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUBNR(DirUtilXObj::m_dispose)
XOBJSTUB(DirUtilXObj::m_name, "")
XOBJSTUB(DirUtilXObj::m_status, 0)
XOBJSTUB(DirUtilXObj::m_error, "")
XOBJSTUB(DirUtilXObj::m_lastError, "")
XOBJSTUB(DirUtilXObj::m_setAttrib, 0)
XOBJSTUB(DirUtilXObj::m_getAttrib, 0)
XOBJSTUB(DirUtilXObj::m_getDriveType, 0)
XOBJSTUB(DirUtilXObj::m_qTVersion, 0)
XOBJSTUB(DirUtilXObj::m_qTVersionStr, "2.03.51")
XOBJSTUB(DirUtilXObj::m_isCdrom, 0)
XOBJSTUB(DirUtilXObj::m_authors, "")
XOBJSTUBNR(DirUtilXObj::m_setErrorMode)
}

View File

@@ -0,0 +1,59 @@
/* 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_DIRUTIL_H
#define DIRECTOR_LINGO_XLIBS_DIRUTIL_H
namespace Director {
class DirUtilXObject : public Object<DirUtilXObject> {
public:
DirUtilXObject(ObjectType objType);
};
namespace DirUtilXObj {
extern const char *const 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_name(int nargs);
void m_status(int nargs);
void m_error(int nargs);
void m_lastError(int nargs);
void m_setAttrib(int nargs);
void m_getAttrib(int nargs);
void m_getDriveType(int nargs);
void m_qTVersion(int nargs);
void m_qTVersionStr(int nargs);
void m_isCdrom(int nargs);
void m_authors(int nargs);
void m_setErrorMode(int nargs);
} // End of namespace DirUtilXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,110 @@
/* 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/d/dllglue.h"
/**************************************************
*
* USED IN:
* Virtual Nightclub
* Puppet Motel
*
**************************************************/
/*
-- DLLGlue External Factory. Dec 1994 PTH (P.HAMILTON@APPLELINK.COM)
--DLLGlue
ISSSS mNew lib, proc, ret, args --Creates a new instance of the XObject
S mName --Returns the XObject name (DLLGlue)
V mCall --Returns an integer status code
I mStatus --Returns an integer status code
SI mError, code --Returns an error string (for above codes)
S mLastError --Returns last error string
I mWindowHandle --Returns handle for DPW stage window
S mComment --Return UserCode comment
X mDebug --write debugging info to message window
*/
namespace Director {
const char *const DLLGlueXObj::xlibName = "DLLGlue";
const XlibFileDesc DLLGlueXObj::fileNames[] = {
{ "DLLGLUE", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "new", DLLGlueXObj::m_new, 4, 4, 400 },
{ "name", DLLGlueXObj::m_name, 0, 0, 400 },
{ "call", DLLGlueXObj::m_call, 0, 0, 400 },
{ "status", DLLGlueXObj::m_status, 0, 0, 400 },
{ "error", DLLGlueXObj::m_error, 1, 1, 400 },
{ "lastError", DLLGlueXObj::m_lastError, 0, 0, 400 },
{ "windowHandle", DLLGlueXObj::m_windowHandle, 0, 0, 400 },
{ "comment", DLLGlueXObj::m_comment, 0, 0, 400 },
{ "debug", DLLGlueXObj::m_debug, 0, 0, 400 },
{ nullptr, nullptr, 0, 0, 0 }
};
static const BuiltinProto xlibBuiltins[] = {
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
DLLGlueXObject::DLLGlueXObject(ObjectType ObjectType) :Object<DLLGlueXObject>("DLLGlue") {
_objType = ObjectType;
}
void DLLGlueXObj::open(ObjectType type, const Common::Path &path) {
DLLGlueXObject::initMethods(xlibMethods);
DLLGlueXObject *xobj = new DLLGlueXObject(type);
g_lingo->exposeXObject(xlibName, xobj);
g_lingo->initBuiltIns(xlibBuiltins);
}
void DLLGlueXObj::close(ObjectType type) {
DLLGlueXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
void DLLGlueXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("DLLGlueXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUB(DLLGlueXObj::m_name, "")
XOBJSTUB(DLLGlueXObj::m_call, 0)
XOBJSTUB(DLLGlueXObj::m_status, 0)
XOBJSTUB(DLLGlueXObj::m_error, "")
XOBJSTUB(DLLGlueXObj::m_lastError, "")
XOBJSTUB(DLLGlueXObj::m_windowHandle, 0)
XOBJSTUB(DLLGlueXObj::m_comment, "")
XOBJSTUBNR(DLLGlueXObj::m_debug)
}

View File

@@ -0,0 +1,54 @@
/* 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_DLLGLUE_H
#define DIRECTOR_LINGO_XLIBS_DLLGLUE_H
namespace Director {
class DLLGlueXObject : public Object<DLLGlueXObject> {
public:
DLLGlueXObject(ObjectType objType);
};
namespace DLLGlueXObj {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_new(int nargs);
void m_name(int nargs);
void m_call(int nargs);
void m_status(int nargs);
void m_error(int nargs);
void m_lastError(int nargs);
void m_windowHandle(int nargs);
void m_comment(int nargs);
void m_debug(int nargs);
} // End of namespace DLLGlueXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,97 @@
/* 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/d/dpwavi.h"
/**************************************************
*
* USED IN:
* jman-win
* hellcab-win
*
**************************************************/
/*
-- AVI External Factory. 02oct92 JT
--DPWAVI
X +mStartup -- First time init
X +mQuit -- Major bye bye
XI mNew qtPacket -- create a window
X mDispose -- close and dispose window
XII mVerb msg, qtPacker -- do something
*/
namespace Director {
const char *const DPWAVIXObj::xlibName = "DPWAVI";
const XlibFileDesc DPWAVIXObj::fileNames[] = {
{ "DPWAVI", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "startup", DPWAVIXObj::m_startup, 0, 0, 300 },
{ "quit", DPWAVIXObj::m_quit, 0, 0, 300 },
{ "new", DPWAVIXObj::m_new, 1, 1, 300 },
{ "dispose", DPWAVIXObj::m_dispose, 0, 0, 300 },
{ "verb", DPWAVIXObj::m_verb, 2, 2, 300 },
{ nullptr, nullptr, 0, 0, 0 }
};
static const BuiltinProto xlibBuiltins[] = {
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
DPWAVIXObject::DPWAVIXObject(ObjectType ObjectType) :Object<DPWAVIXObject>("DPWAVI") {
_objType = ObjectType;
}
void DPWAVIXObj::open(ObjectType type, const Common::Path &path) {
DPWAVIXObject::initMethods(xlibMethods);
DPWAVIXObject *xobj = new DPWAVIXObject(type);
g_lingo->exposeXObject(xlibName, xobj);
g_lingo->initBuiltIns(xlibBuiltins);
}
void DPWAVIXObj::close(ObjectType type) {
DPWAVIXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
void DPWAVIXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("DPWAVIXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUBNR(DPWAVIXObj::m_startup)
XOBJSTUBNR(DPWAVIXObj::m_quit)
XOBJSTUBNR(DPWAVIXObj::m_dispose)
XOBJSTUBNR(DPWAVIXObj::m_verb)
}

View File

@@ -0,0 +1,50 @@
/* 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_DPWAVI_H
#define DIRECTOR_LINGO_XLIBS_DPWAVI_H
namespace Director {
class DPWAVIXObject : public Object<DPWAVIXObject> {
public:
DPWAVIXObject(ObjectType objType);
};
namespace DPWAVIXObj {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_startup(int nargs);
void m_quit(int nargs);
void m_new(int nargs);
void m_dispose(int nargs);
void m_verb(int nargs);
} // End of namespace DPWAVIXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,97 @@
/* 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/d/dpwqtw.h"
/**************************************************
*
* USED IN:
* jman-win
* hellcab-win
*
**************************************************/
/*
-- QuickTime for Windows Player External Factory. 02oct92 JT
--DPWQTW
X +mStartup -- First time init
X +mQuit -- Major bye bye
XI mNew qtPacket -- create a window
X mDispose -- close and dispose window
XII mVerb msg, qtPacker -- do something
*/
namespace Director {
const char *const DPWQTWXObj::xlibName = "DPWQTW";
const XlibFileDesc DPWQTWXObj::fileNames[] = {
{ "DPWQTW", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "startup", DPWQTWXObj::m_startup, 0, 0, 300 },
{ "quit", DPWQTWXObj::m_quit, 0, 0, 300 },
{ "new", DPWQTWXObj::m_new, 1, 1, 300 },
{ "dispose", DPWQTWXObj::m_dispose, 0, 0, 300 },
{ "verb", DPWQTWXObj::m_verb, 2, 2, 300 },
{ nullptr, nullptr, 0, 0, 0 }
};
static const BuiltinProto xlibBuiltins[] = {
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
DPWQTWXObject::DPWQTWXObject(ObjectType ObjectType) :Object<DPWQTWXObject>("DPWQTW") {
_objType = ObjectType;
}
void DPWQTWXObj::open(ObjectType type, const Common::Path &path) {
DPWQTWXObject::initMethods(xlibMethods);
DPWQTWXObject *xobj = new DPWQTWXObject(type);
g_lingo->exposeXObject(xlibName, xobj);
g_lingo->initBuiltIns(xlibBuiltins);
}
void DPWQTWXObj::close(ObjectType type) {
DPWQTWXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
void DPWQTWXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("DPWQTWXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUBNR(DPWQTWXObj::m_startup)
XOBJSTUBNR(DPWQTWXObj::m_quit)
XOBJSTUBNR(DPWQTWXObj::m_dispose)
XOBJSTUBNR(DPWQTWXObj::m_verb)
}

View File

@@ -0,0 +1,50 @@
/* 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_DPWQTW_H
#define DIRECTOR_LINGO_XLIBS_DPWQTW_H
namespace Director {
class DPWQTWXObject : public Object<DPWQTWXObject> {
public:
DPWQTWXObject(ObjectType objType);
};
namespace DPWQTWXObj {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_startup(int nargs);
void m_quit(int nargs);
void m_new(int nargs);
void m_dispose(int nargs);
void m_verb(int nargs);
} // End of namespace DPWQTWXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,160 @@
/* 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/>.
*
*/
/*************************************
*
* USED IN:
* מיץ פטל (Mitz Petel)
*
*************************************/
/* -- Draw XObject version 1.0 beta
* Draw
* -- (c) 1995 - Daniele Russo
* -- New York University - Center for Digital Multimedia
* I mNew --Creates a new instance of the XObject.
* --
* I mDispose --Disposes of an XObject instance.
* --
* IIIII mLine --Draws a line.
* --
* IIIII mLineBrush --Draws a line using a pen.
* --
* IIIIII mLineBrushTrans --Draws a line using a transparent, multicolored pen.
* --
* IIIIIII mLineBrushCol --Draws a line using a transparent pen.
* --
* III mFilterBMP --Gets a picture containing all the pixels in an
* -- image excluding those which are of a particular color.
* -- The image to filter must be on the clipboard (as a BITMAP).
* --
* III mFilterDIB --As above, but the image must be a DIB.
* --
* III mFilterBMP128 --Gets a picture containing all the pixels in an
* -- image whose color is within the lower/upper
* -- 128. The image to filter must be on the clipboard
* -- (as a BITMAP).
* --
* III mFilterDIB128 --As above, but the image must be a DIB.
* --
* III mFilterBMPMakeGhostImage
* -- Gets a picture which has all the pixels that don't
* -- have the background color changed to a given color,
* -- specified by the caller. The image to filter must be
* -- on the clipboard (as a BITMAP).
* --
* III mFilterDIBMakeGhostImage
* -- As above, but the image must be a DIB.
* --
* I mEmptyClipboard --Empties the clipboard. This method MUST be called
* -- after using the result of mFilterBMP and mFilterBMP128.
* --
* IIII mFill --Fills an area starting at a specified pixel
* -- and defined by all the adjacent pixels with
* -- the same color.
* --
* III mGetColor --Gets the color of a pixel on the stage. The
* -- result is the index of the color in Director's
* -- palette.
* --
* IIIIII mDrawRect -- Draws a rectangle of a specified color.
* --
* IIIIII mDrawFrame -- Draws a frame using a dotted pen.
*/
#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/d/draw.h"
namespace Director {
const char *const DrawXObj::xlibName = "Draw";
const XlibFileDesc DrawXObj::fileNames[] = {
{ "DRAW", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "New", DrawXObj::m_new, 0, 0, 400 }, // D4
{ "Dispose", DrawXObj::m_dispose, 0, 0, 400 }, // D4
{ "Line", DrawXObj::m_line, 4, 4, 400 }, // D4
{ "LineBrush", DrawXObj::m_lineBrush, 4, 4, 400 }, // D4
{ "LineBrushTrans", DrawXObj::m_lineBrushTrans, 5, 5, 400 }, // D4
{ "LineBrushCol", DrawXObj::m_lineBrushCol, 6, 6, 400 }, // D4
{ "FilterBMP", DrawXObj::m_filterBMP, 2, 2, 400 }, // D4
{ "FilterDIB", DrawXObj::m_filterDIB, 2, 2, 400 }, // D4
{ "FilterBMP128", DrawXObj::m_filterBMP128, 2, 2, 400 }, // D4
{ "FilterDIB128", DrawXObj::m_filterDIB128, 2, 2, 400 }, // D4
{ "FilterBMPMakeGhostImage", DrawXObj::m_filterBMPMakeGhostImage, 2, 2, 400 }, // D4
{ "FilterDIBMakeGhostImage", DrawXObj::m_filterDIBMakeGhostImage, 2, 2, 400 }, // D4
{ "EmptyClipboard", DrawXObj::m_emptyClipboard, 0, 0, 400 }, // D4
{ "Fill", DrawXObj::m_fill, 3, 3, 400 }, // D4
{ "GetColor", DrawXObj::m_getColor, 2, 2, 400 }, // D4
{ "DrawRect", DrawXObj::m_drawRect, 5, 5, 400 }, // D4
{ "DrawFrame", DrawXObj::m_drawFrame, 5, 5, 400 }, // D4
{ nullptr, nullptr, 0, 0, 0 }
};
void DrawXObj::open(ObjectType type, const Common::Path &path) {
if (type == kXObj) {
DrawXObject::initMethods(xlibMethods);
DrawXObject *xobj = new DrawXObject(kXObj);
g_lingo->exposeXObject(xlibName, xobj);
}
}
void DrawXObj::close(ObjectType type) {
if (type == kXObj) {
DrawXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
}
DrawXObject::DrawXObject(ObjectType ObjectType) :Object<DrawXObject>("Draw") {
_objType = ObjectType;
}
void DrawXObj::m_new(int nargs) {
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUB(DrawXObj::m_dispose, 0)
XOBJSTUB(DrawXObj::m_line, 0)
XOBJSTUB(DrawXObj::m_lineBrush, 0)
XOBJSTUB(DrawXObj::m_lineBrushTrans, 0)
XOBJSTUB(DrawXObj::m_lineBrushCol, 0)
XOBJSTUB(DrawXObj::m_filterBMP, 0)
XOBJSTUB(DrawXObj::m_filterDIB, 0)
XOBJSTUB(DrawXObj::m_filterBMP128, 0)
XOBJSTUB(DrawXObj::m_filterDIB128, 0)
XOBJSTUB(DrawXObj::m_filterBMPMakeGhostImage, 0)
XOBJSTUB(DrawXObj::m_filterDIBMakeGhostImage, 0)
XOBJSTUB(DrawXObj::m_emptyClipboard, 0)
XOBJSTUB(DrawXObj::m_fill, 0)
XOBJSTUB(DrawXObj::m_getColor, 0)
XOBJSTUB(DrawXObj::m_drawRect, 0)
XOBJSTUB(DrawXObj::m_drawFrame, 0)
} // End of namespace Director

View File

@@ -0,0 +1,62 @@
/* 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_DRAWXOBJ_H
#define DIRECTOR_LINGO_XLIBS_DRAWXOBJ_H
namespace Director {
class DrawXObject : public Object<DrawXObject> {
public:
DrawXObject(ObjectType objType);
};
namespace DrawXObj {
extern const char *const 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_line(int nargs);
void m_lineBrush(int nargs);
void m_lineBrushTrans(int nargs);
void m_lineBrushCol(int nargs);
void m_filterBMP(int nargs);
void m_filterDIB(int nargs);
void m_filterBMP128(int nargs);
void m_filterDIB128(int nargs);
void m_filterBMPMakeGhostImage(int nargs);
void m_filterDIBMakeGhostImage(int nargs);
void m_emptyClipboard(int nargs);
void m_fill(int nargs);
void m_getColor(int nargs);
void m_drawRect(int nargs);
void m_drawFrame(int nargs);
} // End of namespace DrawXObj
} // End of namespace Director
#endif