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,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/>.
*
*/
/*************************************
*
* USED IN:
* Meet Mediaband
*
*************************************/
/*
* -- LabelDrv XObject. Version 1.1 6/5/95 greg yachuk
* LabelDrv
* I mNew --Creates a new instance of the XObject
* X mDispose --Disposes of XObject instance.
* XSS mSetRange --Sets the drive letters to begin and end the search for the label. Default is C..Z.
* SS mGetDrive --Return the drive letter where the specified label is mounted.
*/
#include "director/director.h"
#include "director/lingo/lingo.h"
#include "director/lingo/lingo-object.h"
#include "director/lingo/xlibs/l/labeldrvxobj.h"
namespace Director {
const char *const LabelDrvXObj::xlibName = "LabelDrv";
const XlibFileDesc LabelDrvXObj::fileNames[] = {
{ "LabelDrv", nullptr },
{ nullptr, nullptr },
};
static const MethodProto xlibMethods[] = {
{ "new", LabelDrvXObj::m_new, 0, 0, 400 }, // D4
{ "SetRange", LabelDrvXObj::m_setRange, 2, 2, 400 }, // D4
{ "GetDrive", LabelDrvXObj::m_getDrive, 1, 1, 400 }, // D4
{ nullptr, nullptr, 0, 0, 0 }
};
void LabelDrvXObj::open(ObjectType type, const Common::Path &path) {
if (type == kXObj) {
LabelDrvXObject::initMethods(xlibMethods);
LabelDrvXObject *xobj = new LabelDrvXObject(kXObj);
g_lingo->exposeXObject(xlibName, xobj);
}
}
void LabelDrvXObj::close(ObjectType type) {
if (type == kXObj) {
LabelDrvXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
}
LabelDrvXObject::LabelDrvXObject(ObjectType ObjectType) :Object<LabelDrvXObject>("LabelDrv") {
_objType = ObjectType;
}
void LabelDrvXObj::m_new(int nargs) {
LabelDrvXObject *me = static_cast<LabelDrvXObject *>(g_lingo->_state->me.u.obj);
me->_range = "C";
g_lingo->push(g_lingo->_state->me);
}
void LabelDrvXObj::m_setRange(int nargs) {
LabelDrvXObject *me = static_cast<LabelDrvXObject *>(g_lingo->_state->me.u.obj);
Datum d2 = g_lingo->pop();
Datum d1 = g_lingo->pop();
Common::String from = d1.asString();
Common::String to = d2.asString();
me->_range = from; // Store it so we could return value in the requested range
}
void LabelDrvXObj::m_getDrive(int nargs) {
LabelDrvXObject *me = static_cast<LabelDrvXObject *>(g_lingo->_state->me.u.obj);
Datum d1 = g_lingo->pop();
Common::String label = d1.asString();
g_lingo->push(Datum(me->_range)); // Always returning first letter
}
} // End of namespace Director

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_LABELDRVXOBJ_H
#define DIRECTOR_LINGO_XLIBS_LABELDRVXOBJ_H
namespace Director {
class LabelDrvXObject : public Object<LabelDrvXObject> {
public:
Common::String _range;
public:
LabelDrvXObject(ObjectType objType);
};
namespace LabelDrvXObj {
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_setRange(int nargs);
void m_getDrive(int nargs);
} // End of namespace LabelDrvXObject
} // End of namespace Director
#endif

View File

@@ -0,0 +1,91 @@
/* 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/l/listdev.h"
/**************************************************
*
* USED IN:
* Microphone Fiend
*
**************************************************/
/*
I mNew
I mListDev
I mDispose
*/
namespace Director {
const char *ListDevXObj::xlibName = "ListDev";
const XlibFileDesc ListDevXObj::fileNames[] = {
{ "ListDev", nullptr },
{ nullptr, nullptr },
};
static MethodProto xlibMethods[] = {
{ "new", ListDevXObj::m_new, 0, 0, 500 },
{ "listDev", ListDevXObj::m_listDev, 0, 0, 500 },
{ "dispose", ListDevXObj::m_dispose, 0, 0, 500 },
{ nullptr, nullptr, 0, 0, 0 }
};
static BuiltinProto xlibBuiltins[] = {
{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
};
ListDevXObject::ListDevXObject(ObjectType ObjectType) :Object<ListDevXObject>("ListDev") {
_objType = ObjectType;
}
void ListDevXObj::open(ObjectType type, const Common::Path &path) {
ListDevXObject::initMethods(xlibMethods);
ListDevXObject *xobj = new ListDevXObject(type);
if (type == kXtraObj)
g_lingo->_openXtras.push_back(xlibName);
g_lingo->exposeXObject(xlibName, xobj);
g_lingo->initBuiltIns(xlibBuiltins);
}
void ListDevXObj::close(ObjectType type) {
ListDevXObject::cleanupMethods();
g_lingo->_globalvars[xlibName] = Datum();
}
void ListDevXObj::m_new(int nargs) {
g_lingo->printSTUBWithArglist("ListDevXObj::m_new", nargs);
g_lingo->dropStack(nargs);
g_lingo->push(g_lingo->_state->me);
}
XOBJSTUB(ListDevXObj::m_listDev, 0)
XOBJSTUB(ListDevXObj::m_dispose, 0)
}

View File

@@ -0,0 +1,48 @@
/* 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_LISTDEV_H
#define DIRECTOR_LINGO_XLIBS_LISTDEV_H
namespace Director {
class ListDevXObject : public Object<ListDevXObject> {
public:
ListDevXObject(ObjectType objType);
};
namespace ListDevXObj {
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_listDev(int nargs);
void m_dispose(int nargs);
} // End of namespace ListDevXObj
} // End of namespace Director
#endif