mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
DIRECTOR: LINGO: Added BlitPict XObject stub
This commit is contained in:
parent
7e6c8964b8
commit
57a9a801a6
@ -41,6 +41,7 @@
|
||||
#include "director/lingo/xlibs/askuser.h"
|
||||
#include "director/lingo/xlibs/barakeobj.h"
|
||||
#include "director/lingo/xlibs/batqt.h"
|
||||
#include "director/lingo/xlibs/blitpict.h"
|
||||
#include "director/lingo/xlibs/cdromxobj.h"
|
||||
#include "director/lingo/xlibs/darkenscreen.h"
|
||||
#include "director/lingo/xlibs/developerStack.h"
|
||||
@ -152,6 +153,7 @@ static struct XLibProto {
|
||||
{ AskUser::fileNames, AskUser::open, AskUser::close, kXObj, 400 }, // D4
|
||||
{ BarakeObj::fileNames, BarakeObj::open, BarakeObj::close, kXObj, 400 }, // D4
|
||||
{ BatQT::fileNames, BatQT::open, BatQT::close, kXObj, 400 }, // D4
|
||||
{ BlitPict::fileNames, BlitPict::open, BlitPict::close, kXObj, 400 }, // D4
|
||||
{ CDROMXObj::fileNames, CDROMXObj::open, CDROMXObj::close, kXObj, 200 }, // D2
|
||||
{ DarkenScreen::fileNames, DarkenScreen::open, DarkenScreen::close, kXObj, 300 }, // D3
|
||||
{ DeveloperStack::fileNames, DeveloperStack::open, DeveloperStack::close, kXObj, 300 }, // D3
|
||||
|
83
engines/director/lingo/xlibs/blitpict.cpp
Normal file
83
engines/director/lingo/xlibs/blitpict.cpp
Normal file
@ -0,0 +1,83 @@
|
||||
/* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* -- BlitPict effects factory. 29Jun94 RNB
|
||||
* BlitPict
|
||||
* I mNew --Creates a new instance of the XObject
|
||||
* X mDispose --Disposes of XObject instance
|
||||
* S mName --Returns the XObject name (BlitPict)
|
||||
* I mStatus --Returns an integer status code
|
||||
* SI mError, code --Returns an error string
|
||||
* S mLastError --Returns last error string
|
||||
* SSIIIII mInit --Initializer
|
||||
* SOIIII mCopy --Initializes from an existing object
|
||||
* IIIIIOIIIIIIII mDraw --Draws to a destinitation
|
||||
* IIIIIIIIIIII mSparkle --Draws a sparkle from a bitmap
|
||||
*
|
||||
* USED IN: teamxtreme2-win
|
||||
*/
|
||||
|
||||
#include "director/director.h"
|
||||
#include "director/lingo/lingo.h"
|
||||
#include "director/lingo/lingo-object.h"
|
||||
#include "director/lingo/xlibs/blitpict.h"
|
||||
|
||||
|
||||
namespace Director {
|
||||
|
||||
// The name is different from the obj filename.
|
||||
const char *BlitPict::xlibName = "BlitPict";
|
||||
const char *BlitPict::fileNames[] = {
|
||||
"BlitPict",
|
||||
nullptr
|
||||
};
|
||||
|
||||
static MethodProto xlibMethods[] = {
|
||||
{ "new", BlitPict::m_new, 0, 0, 400 }, // D4
|
||||
{ nullptr, nullptr, 0, 0, 0 }
|
||||
};
|
||||
|
||||
void BlitPict::open(int type) {
|
||||
if (type == kXObj) {
|
||||
BlitPictXObject::initMethods(xlibMethods);
|
||||
BlitPictXObject *xobj = new BlitPictXObject(kXObj);
|
||||
g_lingo->exposeXObject(xlibName, xobj);
|
||||
}
|
||||
}
|
||||
|
||||
void BlitPict::close(int type) {
|
||||
if (type == kXObj) {
|
||||
BlitPictXObject::cleanupMethods();
|
||||
g_lingo->_globalvars[xlibName] = Datum();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BlitPictXObject::BlitPictXObject(ObjectType ObjectType) : Object<BlitPictXObject>("BlitPict") {
|
||||
_objType = ObjectType;
|
||||
}
|
||||
|
||||
void BlitPict::m_new(int nargs) {
|
||||
g_lingo->push(g_lingo->_state->me);
|
||||
}
|
||||
|
||||
} // End of namespace Director
|
46
engines/director/lingo/xlibs/blitpict.h
Normal file
46
engines/director/lingo/xlibs/blitpict.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* 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_BLITPICT_H
|
||||
#define DIRECTOR_LINGO_XLIBS_BLITPICT_H
|
||||
|
||||
namespace Director {
|
||||
|
||||
class BlitPictXObject : public Object<BlitPictXObject> {
|
||||
public:
|
||||
BlitPictXObject(ObjectType objType);
|
||||
};
|
||||
|
||||
namespace BlitPict {
|
||||
|
||||
extern const char *xlibName;
|
||||
extern const char *fileNames[];
|
||||
|
||||
void open(int type);
|
||||
void close(int type);
|
||||
|
||||
void m_new(int nargs);
|
||||
|
||||
} // End of namespace BlitPict
|
||||
|
||||
} // End of namespace Director
|
||||
|
||||
#endif
|
@ -44,6 +44,7 @@ MODULE_OBJS = \
|
||||
lingo/xlibs/askuser.o \
|
||||
lingo/xlibs/barakeobj.o \
|
||||
lingo/xlibs/batqt.o \
|
||||
lingo/xlibs/blitpict.o \
|
||||
lingo/xlibs/cdromxobj.o \
|
||||
lingo/xlibs/darkenscreen.o \
|
||||
lingo/xlibs/developerStack.o \
|
||||
|
Loading…
Reference in New Issue
Block a user