diff options
author | Paul Gilbert | 2010-07-31 06:23:38 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 21:55:38 +0000 |
commit | e78b19a650e27fe9a24d0e4c9c938294c7b08650 (patch) | |
tree | d61751dd6dbefe6834742ff9cc5d10f61be4dc02 /engines/sword25/script | |
parent | 1842de4b0035854f271a40dcaa514cdba66bcf57 (diff) | |
download | scummvm-rg350-e78b19a650e27fe9a24d0e4c9c938294c7b08650.tar.gz scummvm-rg350-e78b19a650e27fe9a24d0e4c9c938294c7b08650.tar.bz2 scummvm-rg350-e78b19a650e27fe9a24d0e4c9c938294c7b08650.zip |
SWORD25: Converted kernel/kernel.cpp to compile under ScummVM
This commit creates a skeleton detection and engine class, as well as code necessary to call the kernel initiation.
The kernel/kernel.cpp has been converted to compile under ScummVM, along with all dependant header files.
svn-id: r53184
Diffstat (limited to 'engines/sword25/script')
-rwxr-xr-x | engines/sword25/script/script.h | 98 |
1 files changed, 51 insertions, 47 deletions
diff --git a/engines/sword25/script/script.h b/engines/sword25/script/script.h index c00ccdd808..e33e884607 100755 --- a/engines/sword25/script/script.h +++ b/engines/sword25/script/script.h @@ -1,21 +1,27 @@ -// ----------------------------------------------------------------------------- -// This file is part of Broken Sword 2.5 -// Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdörfer -// -// Broken Sword 2.5 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. -// -// Broken Sword 2.5 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 Broken Sword 2.5; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// ----------------------------------------------------------------------------- +/* 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$ + * + */ #ifndef SWORD25_SCRIPT_H #define SWORD25_SCRIPT_H @@ -24,14 +30,13 @@ // Includes // ----------------------------------------------------------------------------- +#include "common/array.h" +#include "common/str.h" #include "sword25/kernel/common.h" #include "sword25/kernel/service.h" #include "sword25/kernel/persistable.h" -#include "sword25/kernel/memlog_off.h" -#include <vector> -#include <string> -#include "sword25/kernel/memlog_on.h" +namespace Sword25 { // ----------------------------------------------------------------------------- // Forward declarations @@ -45,55 +50,54 @@ class BS_InputPersistenceBlock; // Class declaration // ----------------------------------------------------------------------------- -class BS_ScriptEngine : public BS_Service, public BS_Persistable -{ +class BS_ScriptEngine : public BS_Service, public BS_Persistable { public: // ----------------------------------------------------------------------------- - // Konstruktion / Destruktion + // Constructor / destructor // ----------------------------------------------------------------------------- BS_ScriptEngine(BS_Kernel * KernelPtr) : BS_Service(KernelPtr) {}; virtual ~BS_ScriptEngine() {}; // ----------------------------------------------------------------------------- - // DIESE METHODEN MÜSSEN VON DER SCRIPTENGINE IMPLEMENTIERT WERDEN + // This method must be implemented by the script engine // ----------------------------------------------------------------------------- /** - @brief Initialisiert die Scriptengine. - @return Gibt true bei Erfolg zurück, ansonsten false. - */ + * Initialises the scrip tengine. Returns true if successful, false otherwise. + */ virtual bool Init() = 0; /** - @brief Lädt eine Skriptdatei und führt diese aus. - @param FileName der Dateiname der Skriptdatei - @return Gibt true bei Erfolg zurück, ansonsten false. + * Loads a script file and executes it. + * @param FileName The script filename */ - virtual bool ExecuteFile(const std::string & FileName) = 0; + virtual bool ExecuteFile(const Common::String &FileName) = 0; /** - @brief Führt einen String mit Skriptcode aus. - @param Code ein String der Skriptcode enthält. - @return Gibt true bei Erfolg zurück, ansonsten false. - */ - virtual bool ExecuteString(const std::string & Code) = 0; + * Executes a specified script fragment + * @param Code String of script code + */ + virtual bool ExecuteString(const Common::String &Code) = 0; /** - @brief Gibt einen Pointer auf das Hauptobjekt der Skriptsprache zurück. - @remark Durch die Benutzung dieser Methode wird die Kapselung der Sprache vom Rest der Engine aufgehoben. - */ + * Returns a pointer to the main object of the script engine + * Note: Using this method breaks the encapsulation of the language from the rest of the engine. + */ virtual void * GetScriptObject() = 0; /** - @brief Macht die Kommandozeilen-Parameter für die Skriptumgebung zugänglich. - @param CommandLineParameters ein string vector der alle Kommandozeilenparameter enthält. - @remark Auf welche Weise die Kommandozeilen-Parameter durch Skripte zugegriffen werden können hängt von der jeweiligen Implementierung ab. + * Makes the command line parameters for the script environment available + * Note: How the command line parameters will be used by scripts is dependant on the + * particular implementation. + * @param CommandLineParameters List containing the command line parameters */ - virtual void SetCommandLine(const std::vector<std::string> & CommandLineParameters) = 0; + virtual void SetCommandLine(const Common::Array<Common::String> &CommandLineParameters) = 0; - virtual bool Persist(BS_OutputPersistenceBlock & Writer) = 0; - virtual bool Unpersist(BS_InputPersistenceBlock & Reader) = 0; + virtual bool Persist(BS_OutputPersistenceBlock &Writer) = 0; + virtual bool Unpersist(BS_InputPersistenceBlock &Reader) = 0; }; +} // End of namespace Sword25 + #endif |