scummvm/engines/sci/engine/kernel32.cpp

360 lines
8.2 KiB
C++
Raw Normal View History

/* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
*
*/
#include "sci/engine/kernel.h"
namespace Sci {
static const char *sci2_default_knames[] = {
/*0x00*/ "Load",
/*0x01*/ "UnLoad",
/*0x02*/ "ScriptID",
/*0x03*/ "DisposeScript",
/*0x04*/ "Lock",
/*0x05*/ "ResCheck",
/*0x06*/ "Purge",
/*0x07*/ "Clone",
/*0x08*/ "DisposeClone",
/*0x09*/ "RespondsTo",
/*0x0a*/ "SetNowSeen",
/*0x0b*/ "NumLoops",
/*0x0c*/ "NumCels",
/*0x0d*/ "CelWide",
/*0x0e*/ "CelHigh",
/*0x0f*/ "GetHighPlanePri",
/*0x10*/ "GetHighItemPri",
/*0x11*/ "ShakeScreen",
/*0x12*/ "OnMe",
/*0x13*/ "ShowMovie",
/*0x14*/ "SetVideoMode",
/*0x15*/ "AddScreenItem",
/*0x16*/ "DeleteScreenItem",
/*0x17*/ "UpdateScreenItem",
/*0x18*/ "FrameOut",
/*0x19*/ "AddPlane",
/*0x1a*/ "DeletePlane",
/*0x1b*/ "UpdatePlane",
/*0x1c*/ "RepaintPlane",
/*0x1d*/ "SetShowStyle",
/*0x1e*/ "ShowStylePercent",
/*0x1f*/ "SetScroll",
/*0x20*/ "AddMagnify",
/*0x21*/ "DeleteMagnify",
/*0x22*/ "IsHiRes",
/*0x23*/ "Graph",
/*0x24*/ "InvertRect",
/*0x25*/ "TextSize",
/*0x26*/ "Message",
/*0x27*/ "TextColors",
/*0x28*/ "TextFonts",
/*0x29*/ "Dummy",
/*0x2a*/ "SetQuitStr",
/*0x2b*/ "EditText",
/*0x2c*/ "InputText",
/*0x2d*/ "CreateTextBitmap",
/*0x2e*/ "DisposeTextBitmap",
/*0x2f*/ "GetEvent",
/*0x30*/ "GlobalToLocal",
/*0x31*/ "LocalToGlobal",
/*0x32*/ "MapKeyToDir",
/*0x33*/ "HaveMouse",
/*0x34*/ "SetCursor",
/*0x35*/ "VibrateMouse",
/*0x36*/ "SaveGame",
/*0x37*/ "RestoreGame",
/*0x38*/ "RestartGame",
/*0x39*/ "GameIsRestarting",
/*0x3a*/ "MakeSaveCatName",
/*0x3b*/ "MakeSaveFileName",
/*0x3c*/ "GetSaveFiles",
/*0x3d*/ "GetSaveDir",
/*0x3e*/ "CheckSaveGame",
/*0x3f*/ "CheckFreeSpace",
/*0x40*/ "DoSound",
/*0x41*/ "DoAudio",
/*0x42*/ "DoSync",
/*0x43*/ "NewList",
/*0x44*/ "DisposeList",
/*0x45*/ "NewNode",
/*0x46*/ "FirstNode",
/*0x47*/ "LastNode",
/*0x48*/ "EmptyList",
/*0x49*/ "NextNode",
/*0x4a*/ "PrevNode",
/*0x4b*/ "NodeValue",
/*0x4c*/ "AddAfter",
/*0x4d*/ "AddToFront",
/*0x4e*/ "AddToEnd",
/*0x4f*/ "Dummy",
/*0x50*/ "Dummy",
/*0x51*/ "FindKey",
/*0x52*/ "Dummy",
/*0x53*/ "Dummy",
/*0x54*/ "Dummy",
/*0x55*/ "DeleteKey",
/*0x56*/ "Dummy",
/*0x57*/ "Dummy",
/*0x58*/ "ListAt",
/*0x59*/ "ListIndexOf",
/*0x5a*/ "ListEachElementDo",
/*0x5b*/ "ListFirstTrue",
/*0x5c*/ "ListAllTrue",
/*0x5d*/ "Random",
/*0x5e*/ "Abs",
/*0x5f*/ "Sqrt",
/*0x60*/ "GetAngle",
/*0x61*/ "GetDistance",
/*0x62*/ "ATan",
/*0x63*/ "SinMult",
/*0x64*/ "CosMult",
/*0x65*/ "SinDiv",
/*0x66*/ "CosDiv",
/*0x67*/ "GetTime",
/*0x68*/ "Platform",
/*0x69*/ "BaseSetter",
/*0x6a*/ "DirLoop",
/*0x6b*/ "CanBeHere",
/*0x6c*/ "InitBresen",
/*0x6d*/ "DoBresen",
/*0x6e*/ "SetJump",
/*0x6f*/ "AvoidPath",
/*0x70*/ "InPolygon",
/*0x71*/ "MergePoly",
/*0x72*/ "Dummy",
/*0x73*/ "Dummy",
/*0x74*/ "Dummy",
/*0x75*/ "Dummy",
/*0x76*/ "Dummy",
/*0x77*/ "Dummy",
/*0x78*/ "Dummy",
/*0x79*/ "Dummy",
/*0x7a*/ "GetCWD",
/*0x7b*/ "ValidPath",
/*0x7c*/ "FileIO",
/*0x7d*/ "Dummy",
/*0x7e*/ "DeviceInfo",
/*0x7f*/ "Palette",
/*0x80*/ "PalVary",
/*0x81*/ "PalCycle",
/*0x82*/ "Array",
/*0x83*/ "String",
/*0x84*/ "RemapColors",
/*0x85*/ "Dummy",
/*0x86*/ "Dummy",
/*0x87*/ "ObjectIntersect",
/*0x88*/ "Dummy"
/*0x89*/ "TextWidth",
/*0x8a*/ "PointSize"
};
static const char *sci21_default_knames[] = {
/*0x00*/ "LNew",
/*0x01*/ "LDispose",
/*0x02*/ "LNewNode",
/*0x03*/ "LFirstNode",
/*0x04*/ "LLastNode",
/*0x05*/ "LEmpty",
/*0x06*/ "LNextNode",
/*0x07*/ "LPrevNode",
/*0x08*/ "LNodeValue",
/*0x09*/ "LAddAfter",
/*0x0a*/ "LAddToFront",
/*0x0b*/ "LAddToEnd",
/*0x0c*/ "LAddBefore",
/*0x0d*/ "LMoveToFront",
/*0x0e*/ "LMoveToEnd",
/*0x0f*/ "LFindKey",
/*0x10*/ "LDeleteKey",
/*0x11*/ "LAt",
/*0x12*/ "LIndexOf",
/*0x13*/ "LEachElementDo",
/*0x14*/ "LFirstTrue",
/*0x15*/ "LAllTrue",
/*0x16*/ "LSort",
/*0x17*/ "Load",
/*0x18*/ "UnLoad",
/*0x19*/ "ScriptID",
/*0x1a*/ "DisposeScript",
/*0x1b*/ "Lock",
/*0x1c*/ "ResCheck",
/*0x1d*/ "Purge",
/*0x1e*/ "SetLanguage",
/*0x1f*/ "Dummy",
/*0x20*/ "Dummy",
/*0x21*/ "Clone",
/*0x22*/ "DisposeClone",
/*0x23*/ "RespondsTo",
/*0x24*/ "FindSelector",
/*0x25*/ "FindClass",
/*0x26*/ "Dummy",
/*0x27*/ "Dummy",
/*0x28*/ "Dummy",
/*0x29*/ "Dummy",
/*0x2a*/ "Dummy",
/*0x2b*/ "SetNowSeen",
/*0x2c*/ "NumLoops",
/*0x2d*/ "NumCels",
/*0x2e*/ "IsOnMe",
/*0x2f*/ "AddMagnify",
/*0x30*/ "DeleteMagnify",
/*0x31*/ "CelRect",
/*0x32*/ "BaseLineSpan"
/*0x33*/ "CelWide",
/*0x34*/ "CelHigh",
/*0x35*/ "AddScreenItem",
/*0x36*/ "DeleteScreenItem",
/*0x37*/ "UpdateScreenItem",
/*0x38*/ "FrameOut",
/*0x39*/ "CelInfo",
/*0x3a*/ "Bitmap",
/*0x3b*/ "CelLink",
/*0x3c*/ "Dummy",
/*0x3d*/ "Dummy",
/*0x3e*/ "Dummy",
/*0x3f*/ "AddPlane",
/*0x40*/ "DeletePlane",
/*0x41*/ "UpdatePlane",
/*0x42*/ "RepaintPlane",
/*0x43*/ "GetHighPlanePri",
/*0x44*/ "GetHighItemPri",
/*0x45*/ "SetShowStyle",
/*0x46*/ "ShowStylePercent",
/*0x47*/ "SetScroll",
/*0x48*/ "MovePlaneItems",
/*0x49*/ "ShakeScreen",
/*0x4a*/ "Dummy",
/*0x4b*/ "Dummy",
/*0x4c*/ "Dummy",
/*0x4d*/ "Dummy",
/*0x4e*/ "IsHiRes",
/*0x4f*/ "SetVideoMode",
/*0x50*/ "ShowMovie",
/*0x51*/ "Robot",
/*0x52*/ "CreateTextBitmap",
/*0x53*/ "Random",
/*0x54*/ "Abs",
/*0x55*/ "Sqrt",
/*0x56*/ "GetAngle",
/*0x57*/ "GetDistance",
/*0x58*/ "ATan",
/*0x59*/ "SinMult",
/*0x5a*/ "CosMult",
/*0x5b*/ "SinDiv",
/*0x5c*/ "CosDiv",
/*0x5d*/ "Text",
/*0x5e*/ "Dummy",
/*0x5f*/ "Message",
/*0x60*/ "Font",
/*0x61*/ "EditText",
/*0x62*/ "InputText",
/*0x63*/ "ScrollWindow",
/*0x64*/ "Dummy",
/*0x65*/ "Dummy",
/*0x66*/ "Dummy",
/*0x67*/ "GetEvent",
/*0x68*/ "GlobalToLocal",
/*0x69*/ "LocalToGlobal",
/*0x6a*/ "MapKeyToDir",
/*0x6b*/ "HaveMouse",
/*0x6c*/ "SetCursor",
/*0x6d*/ "VibrateMouse",
/*0x6e*/ "Dummy",
/*0x6f*/ "Dummy",
/*0x70*/ "Dummy",
/*0x71*/ "Array",
/*0x72*/ "String",
/*0x73*/ "FileIO",
/*0x74*/ "BaseSetter",
/*0x75*/ "DirLoop",
/*0x76*/ "CanBeHere",
/*0x77*/ "InitBresen",
/*0x78*/ "DoBresen",
/*0x79*/ "SetJump",
/*0x7a*/ "AvoidPath",
/*0x7b*/ "InPolygon",
/*0x7c*/ "MergePoly",
/*0x7d*/ "ObjectIntersect",
/*0x7e*/ "Dummy",
/*0x7f*/ "MemoryInfo",
/*0x80*/ "DeviceInfo",
/*0x81*/ "Palette",
/*0x82*/ "PalVary",
/*0x83*/ "PalCycle",
/*0x84*/ "RemapColors",
/*0x85*/ "AddLine",
/*0x86*/ "DeleteLine",
/*0x87*/ "UpdateLine",
/*0x88*/ "AddPolygon",
/*0x89*/ "DeletePolygon",
/*0x8a*/ "UpdatePolygon",
/*0x8b*/ "DoSound",
/*0x8c*/ "DoAudio",
/*0x8d*/ "DoSync",
/*0x8e*/ "Save",
/*0x8f*/ "GetTime",
/*0x90*/ "Platform",
/*0x91*/ "CD",
/*0x92*/ "SetQuitStr",
/*0x93*/ "GetConfig",
/*0x94*/ "Table",
/*0x95*/ "Dummy",
/*0x96*/ "Dummy",
/*0x97*/ "Dummy",
/*0x98*/ "Dummy",
/*0x99*/ "Dummy",
/*0x9a*/ "Dummy",
/*0x9b*/ "Dummy",
/*0x9c*/ "Dummy",
/*0x9d*/ "Dummy",
/*0x9e*/ "Dummy",
/*0x9f*/ "Dummy",
/*0xa0*/ "LoadChunk",
/*0xa1*/ "SetPalStyleRange"
/*0xa2*/ "AddPicAt",
/*0xa3*/ "Dummy",
/*0xa4*/ "NewRoom",
/*0xa5*/ "Dummy",
/*0xa6*/ "Priority",
/*0xa7*/ "MorphOn",
/*0xa8*/ "PlayVMD",
/*0xa9*/ "SetHotRectangles",
/*0xaa*/ "MulDiv",
/*0xab*/ "Dummy",
/*0xac*/ "Dummy",
/*0xad*/ "Dummy",
/*0xae*/ "Dummy",
/*0xaf*/ "Dummy"
};
void Kernel::setKernelNamesSci2() {
_kernelNames = Common::StringList(sci2_default_knames, ARRAYSIZE(sci2_default_knames));
}
void Kernel::setKernelNamesSci21() {
_kernelNames = Common::StringList(sci21_default_knames, ARRAYSIZE(sci21_default_knames));
}
} // End of namespace Sci