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,106 @@
/* 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/g/genutils.h"
/**************************************************
*
* USED IN:
* Isis
*
**************************************************/
/*
-- GenUtils External Factory. 16Feb93 PTM
--GenUtils
I mNew --Creates a new instance of the XObject
X mDispose --Disposes of XObject instance
S mName --Returns the XObject name (GenUtils)
I mStatus --Returns an integer status code
S mGetWindowsFolder --Retrieves the location of the windows folder
I mFlushEvents --Clears the event queue.
III mMoveCursor --Moves the cursor to x,y
III mClickCursor --Moves the cursor to x,y and clicks it.
*/
namespace Director {
const char *const GenUtilsXObj::xlibName = "GenUtils";
const XlibFileDesc GenUtilsXObj::fileNames[] = {
{ "GENUTILS", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "new", GenUtilsXObj::m_new, 0, 0, 400 },
{ "dispose", GenUtilsXObj::m_dispose, 0, 0, 400 },
{ "name", GenUtilsXObj::m_name, 0, 0, 400 },
{ "status", GenUtilsXObj::m_status, 0, 0, 400 },
{ "getWindowsFolder", GenUtilsXObj::m_getWindowsFolder, 0, 0, 400 },
{ "flushEvents", GenUtilsXObj::m_flushEvents, 0, 0, 400 },
{ "moveCursor", GenUtilsXObj::m_moveCursor, 2, 2, 400 },
{ "clickCursor", GenUtilsXObj::m_clickCursor, 2, 2, 400 },
{ nullptr, nullptr, 0, 0, 0 }
};
static const BuiltinProto xlibBuiltins[] = {
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
GenUtilsXObject::GenUtilsXObject(ObjectType ObjectType) :Object<GenUtilsXObject>("GenUtils") {
_objType = ObjectType;
}
void GenUtilsXObj::open(ObjectType type, const Common::Path &path) {
GenUtilsXObject::initMethods(xlibMethods);
GenUtilsXObject *xobj = new GenUtilsXObject(type);
g_lingo->exposeXObject(xlibName, xobj);
g_lingo->initBuiltIns(xlibBuiltins);
}
void GenUtilsXObj::close(ObjectType type) {
GenUtilsXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
void GenUtilsXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("GenUtilsXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUBNR(GenUtilsXObj::m_dispose)
XOBJSTUB(GenUtilsXObj::m_name, "")
XOBJSTUB(GenUtilsXObj::m_status, 0)
XOBJSTUB(GenUtilsXObj::m_getWindowsFolder, "")
XOBJSTUB(GenUtilsXObj::m_flushEvents, 0)
XOBJSTUB(GenUtilsXObj::m_moveCursor, 0)
XOBJSTUB(GenUtilsXObj::m_clickCursor, 0)
}

View File

@@ -0,0 +1,53 @@
/* 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_GENUTILS_H
#define DIRECTOR_LINGO_XLIBS_GENUTILS_H
namespace Director {
class GenUtilsXObject : public Object<GenUtilsXObject> {
public:
GenUtilsXObject(ObjectType objType);
};
namespace GenUtilsXObj {
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_getWindowsFolder(int nargs);
void m_flushEvents(int nargs);
void m_moveCursor(int nargs);
void m_clickCursor(int nargs);
} // End of namespace GenUtilsXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,60 @@
/* 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/g/getscreenrectsxfcn.h"
/**************************************************
*
* USED IN:
* the7colors
*
**************************************************/
namespace Director {
const char *const GetScreenRectsXFCN::xlibName = "GetScreenRects";
const XlibFileDesc GetScreenRectsXFCN::fileNames[] = {
{ "GetScreenRects", nullptr },
{ nullptr, nullptr },
};
static const BuiltinProto builtins[] = {
{ "GetScreenRects", GetScreenRectsXFCN::m_GetScreenRects, -1, 0, 300, HBLTIN },
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
void GetScreenRectsXFCN::open(ObjectType type, const Common::Path &path) {
g_lingo->initBuiltIns(builtins);
}
void GetScreenRectsXFCN::close(ObjectType type) {
g_lingo->cleanupBuiltIns(builtins);
}
XOBJSTUB(GetScreenRectsXFCN::m_GetScreenRects, 0)
}

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_GETSCREENRECTSXFCN_H
#define DIRECTOR_LINGO_XLIBS_GETSCREENRECTSXFCN_H
namespace Director {
namespace GetScreenRectsXFCN {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_GetScreenRects(int nargs);
} // End of namespace GetScreenRectsXFCN
} // End of namespace Director
#endif

View File

@@ -0,0 +1,60 @@
/* 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/g/getscreensizexfcn.h"
/**************************************************
*
* USED IN:
* the7colors
*
**************************************************/
namespace Director {
const char *const GetScreenSizeXFCN::xlibName = "GetScreenSize";
const XlibFileDesc GetScreenSizeXFCN::fileNames[] = {
{ "GetScreenSize", nullptr },
{ nullptr, nullptr },
};
static const BuiltinProto builtins[] = {
{ "GetScreenSize", GetScreenSizeXFCN::m_GetScreenSize, -1, 0, 300, HBLTIN },
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
void GetScreenSizeXFCN::open(ObjectType type, const Common::Path &path) {
g_lingo->initBuiltIns(builtins);
}
void GetScreenSizeXFCN::close(ObjectType type) {
g_lingo->cleanupBuiltIns(builtins);
}
XOBJSTUB(GetScreenSizeXFCN::m_GetScreenSize, 0)
}

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_GETSCREENSIZEXFCN_H
#define DIRECTOR_LINGO_XLIBS_GETSCREENSIZEXFCN_H
namespace Director {
namespace GetScreenSizeXFCN {
extern const char *const xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
void close(ObjectType type);
void m_GetScreenSize(int nargs);
} // End of namespace GetScreenSizeXFCN
} // End of namespace Director
#endif

View File

@@ -0,0 +1,107 @@
/* 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/g/getsoundinlevel.h"
/**************************************************
*
* USED IN:
* Microphone Fiend
*
**************************************************/
/*
-- GetSoundInLevel, v1.4 C G.M.Smith 1994/5/6
I mNew
I mGetLevel --> I -- Get the sound input current level
I mGetLeftLevel --> I -- Get the left sound input current level
I mGetRightLevel --> I -- Get the right sound input current level
I mGetChannelCount --> I -- Get the number of sound channels
X mDispose
--
-- mNew return error values
-- -227 Sound input busy
-- -108 Out of memory, increase partition in info dialog
-- -10 No stereo input
-- -20 Cannot access data - odd hardware?
*/
namespace Director {
const char *GetSoundInLevelXObj::xlibName = "GetSoundInLevel";
const XlibFileDesc GetSoundInLevelXObj::fileNames[] = {
{ "GetSoundInLevel", nullptr },
{ nullptr, nullptr },
};
static MethodProto xlibMethods[] = {
{ "new", GetSoundInLevelXObj::m_new, 0, 0, 400 },
{ "getLevel", GetSoundInLevelXObj::m_getLevel, 0, 0, 400 },
{ "getLeftLevel", GetSoundInLevelXObj::m_getLeftLevel, 0, 0, 400 },
{ "getRightLevel", GetSoundInLevelXObj::m_getRightLevel, 0, 0, 400 },
{ "getChannelCount", GetSoundInLevelXObj::m_getChannelCount, 0, 0, 400 },
{ "dispose", GetSoundInLevelXObj::m_dispose, 0, 0, 400 },
{ nullptr, nullptr, 0, 0, 0 }
};
static BuiltinProto xlibBuiltins[] = {
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
GetSoundInLevelXObject::GetSoundInLevelXObject(ObjectType ObjectType) :Object<GetSoundInLevelXObject>("GetSoundInLevel") {
_objType = ObjectType;
}
void GetSoundInLevelXObj::open(ObjectType type, const Common::Path &path) {
GetSoundInLevelXObject::initMethods(xlibMethods);
GetSoundInLevelXObject *xobj = new GetSoundInLevelXObject(type);
if (type == kXtraObj)
g_lingo->_openXtras.push_back(xlibName);
g_lingo->exposeXObject(xlibName, xobj);
g_lingo->initBuiltIns(xlibBuiltins);
}
void GetSoundInLevelXObj::close(ObjectType type) {
GetSoundInLevelXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
void GetSoundInLevelXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("GetSoundInLevelXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUB(GetSoundInLevelXObj::m_getLevel, 100)
XOBJSTUB(GetSoundInLevelXObj::m_getLeftLevel, 100)
XOBJSTUB(GetSoundInLevelXObj::m_getRightLevel, 100)
XOBJSTUB(GetSoundInLevelXObj::m_getChannelCount, 1)
XOBJSTUBNR(GetSoundInLevelXObj::m_dispose)
}

View File

@@ -0,0 +1,51 @@
/* 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_GETSOUNDINLEVEL_H
#define DIRECTOR_LINGO_XLIBS_GETSOUNDINLEVEL_H
namespace Director {
class GetSoundInLevelXObject : public Object<GetSoundInLevelXObject> {
public:
GetSoundInLevelXObject(ObjectType objType);
};
namespace GetSoundInLevelXObj {
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_getLevel(int nargs);
void m_getLeftLevel(int nargs);
void m_getRightLevel(int nargs);
void m_getChannelCount(int nargs);
void m_dispose(int nargs);
} // End of namespace GetSoundInLevelXObj
} // End of namespace Director
#endif

View File

@@ -0,0 +1,104 @@
/* 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:
* Gahan Wilson's Ultimate Haunted House
*
*************************************/
/*
* Product Identification Number
* Gahan Wilson's Ultimate Haunted House
* Copyright 1994 Byron Preiss Multimedia Company, Inc.
* 'Copyright 1994, Byron Preiss Multimedia
* -- copyright 1994 by Byron Priess Multimedia, authored by MayoSmith
* gpid
* I mNew --Read Docs to avoid Hard Drive failure
* X mDispose --Disposes of XObject instance
* S mName --Returns the XObject name (Widget)
* I mStatus --Returns an integer status code
* SI mError, code --Returns an error string
* S mLastError --Returns last error string
* I mGetPid --Retrieves PID
*
*/
#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/g/gpid.h"
namespace Director {
const char *const GpidXObj::xlibName = "gpid";
const XlibFileDesc GpidXObj::fileNames[] = {
{ "GPID", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "new", GpidXObj::m_new, 0, 0, 400 }, // D4
{ "dispose", GpidXObj::m_dispose, 0, 0, 400 }, // D4
{ "name", GpidXObj::m_name, 0, 0, 400 }, // D4
{ "status", GpidXObj::m_status, 0, 0, 400 }, // D4
{ "error", GpidXObj::m_error, 1, 1, 400 }, // D4
{ "lastError", GpidXObj::m_lastError, 0, 0, 400 }, // D4
{ "getPid", GpidXObj::m_getPid, 0, 0, 400 }, // D4
{ nullptr, nullptr, 0, 0, 0 }
};
void GpidXObj::open(ObjectType type, const Common::Path &path) {
if (type == kXObj) {
ProductIdXObject::initMethods(xlibMethods);
ProductIdXObject *xobj = new ProductIdXObject(kXObj);
g_lingo->exposeXObject(xlibName, xobj);
}
}
void GpidXObj::close(ObjectType type) {
if (type == kXObj) {
ProductIdXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
}
ProductIdXObject::ProductIdXObject(ObjectType ObjectType) :Object<ProductIdXObject>("gpid") {
_objType = ObjectType;
}
void GpidXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("gpid::new", nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUBNR(GpidXObj::m_dispose)
XOBJSTUB(GpidXObj::m_name, "")
XOBJSTUB(GpidXObj::m_status, 0)
XOBJSTUB(GpidXObj::m_error, "")
XOBJSTUB(GpidXObj::m_lastError, "")
XOBJSTUB(GpidXObj::m_getPid, 0)
} // End of namespace Director

View File

@@ -0,0 +1,53 @@
/* 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_GPID_H
#define DIRECTOR_LINGO_XLIBS_GPID_H
namespace Director {
class ProductIdXObject : public Object<ProductIdXObject> {
public:
ProductIdXObject(ObjectType objType);
};
namespace GpidXObj {
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_getPid(int nargs);
} // End of namespace GpidXObj
} // End of namespace Director
#endif