aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-15 14:07:45 +0000
committerFilippos Karapetis2009-05-15 14:07:45 +0000
commit87e8f94fde8330e1d5e600cc7b3e5c24225d6158 (patch)
tree2774c88f62f0491b480e0add2dd7e009546e7a74 /engines/sci/engine
parentce29fec17a9316b5fee0349d013a4d7863af9c03 (diff)
downloadscummvm-rg350-87e8f94fde8330e1d5e600cc7b3e5c24225d6158.tar.gz
scummvm-rg350-87e8f94fde8330e1d5e600cc7b3e5c24225d6158.tar.bz2
scummvm-rg350-87e8f94fde8330e1d5e600cc7b3e5c24225d6158.zip
- Moved all the files out of /sci/scicore and into /sci
- Moved /scicore/sciconsole.h into /engine, and renamed /engine/scriptconsole.cpp to /engine/sciconsole.cpp svn-id: r40608
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/game.cpp2
-rw-r--r--engines/sci/engine/grammar.cpp4
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/kgraphics.cpp2
-rw-r--r--engines/sci/engine/kmenu.cpp2
-rw-r--r--engines/sci/engine/kmovement.cpp2
-rw-r--r--engines/sci/engine/kscripts.cpp2
-rw-r--r--engines/sci/engine/kstring.cpp2
-rw-r--r--engines/sci/engine/message.h2
-rw-r--r--engines/sci/engine/sciconsole.cpp (renamed from engines/sci/engine/scriptconsole.cpp)2
-rw-r--r--engines/sci/engine/sciconsole.h130
-rw-r--r--engines/sci/engine/script.cpp2
-rw-r--r--engines/sci/engine/scriptdebug.cpp6
-rw-r--r--engines/sci/engine/state.h4
-rw-r--r--engines/sci/engine/vm.cpp2
15 files changed, 148 insertions, 18 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index b0df4aacde..5b25fea6e2 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -27,7 +27,7 @@
#include "common/file.h"
#include "sci/sci.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#include "sci/engine/kernel_types.h"
diff --git a/engines/sci/engine/grammar.cpp b/engines/sci/engine/grammar.cpp
index d4483045cc..63cd8a9b4a 100644
--- a/engines/sci/engine/grammar.cpp
+++ b/engines/sci/engine/grammar.cpp
@@ -29,8 +29,8 @@
*/
#include "sci/tools.h"
-#include "sci/scicore/vocabulary.h"
-#include "sci/scicore/sciconsole.h"
+#include "sci/vocabulary.h"
+#include "sci/engine/sciconsole.h"
namespace Sci {
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index d22e04ea05..ad9b57c54f 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -31,7 +31,7 @@
#include "sci/engine/intmap.h"
#include "sci/engine/gc.h"
#include "sci/engine/kernel.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/gfx/operations.h"
#include "sci/engine/kernel_types.h"
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index e32db3e1cb..e149acfc43 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -26,7 +26,7 @@
#include "common/system.h"
#include "sci/sci.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#include "sci/gfx/gfx_gui.h"
diff --git a/engines/sci/engine/kmenu.cpp b/engines/sci/engine/kmenu.cpp
index 5f585b26de..771af2a661 100644
--- a/engines/sci/engine/kmenu.cpp
+++ b/engines/sci/engine/kmenu.cpp
@@ -24,7 +24,7 @@
*/
#include "sci/sci.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#include "sci/gfx/gfx_gui.h"
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 8b3c2d0db0..9b28c1fa6d 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -24,7 +24,7 @@
*/
#include "sci/sci.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index f00731aab4..bb4c98761f 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -24,7 +24,7 @@
*/
#include "sci/sci.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/kernel_types.h"
#include "sci/engine/kernel.h"
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index edb5424219..0be3ac706b 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -25,7 +25,7 @@
/* String and parser handling */
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/message.h"
#include "sci/engine/kernel.h"
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index 82c5e4f721..b1cdb8ad99 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -26,7 +26,7 @@
#ifndef SCI_ENGINE_MESSAGE_H
#define SCI_ENGINE_MESSAGE_H
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "common/stack.h"
namespace Sci {
diff --git a/engines/sci/engine/scriptconsole.cpp b/engines/sci/engine/sciconsole.cpp
index 569c14a519..3cdb6a1768 100644
--- a/engines/sci/engine/scriptconsole.cpp
+++ b/engines/sci/engine/sciconsole.cpp
@@ -27,7 +27,7 @@
/* Remember, it doesn't have to be fast. */
#include "sci/engine/state.h"
-#include "sci/scicore/sciconsole.h"
+#include "sci/engine/sciconsole.h"
#include "sci/sci.h" // For _console only
#include "sci/console.h" // For _console only
diff --git a/engines/sci/engine/sciconsole.h b/engines/sci/engine/sciconsole.h
new file mode 100644
index 0000000000..b2060143aa
--- /dev/null
+++ b/engines/sci/engine/sciconsole.h
@@ -0,0 +1,130 @@
+/* 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$
+ *
+ */
+
+/* Header file for the SCI console.
+** Please note that the console does not use the priority field; the console
+** should therefore be drawn after everything else has been drawn (with the
+** possible exception of the mouse pointer).
+*/
+
+#ifndef SCI_SCICORE_SCICONSOLE_H
+#define SCI_SCICORE_SCICONSOLE_H
+
+#include "common/scummsys.h"
+
+#include "sci/tools.h"
+#include "sci/engine/state.h"
+#include "sci/engine/vm_types.h"
+
+#define SCI_CONSOLE
+
+namespace Sci {
+
+struct gfx_pixmap_t;
+
+union cmd_param_t {
+ int32 val;
+ const char *str;
+ reg_t reg;
+};
+
+
+typedef int (*ConCommand)(EngineState *s, const Common::Array<cmd_param_t> &cmdParams);
+
+/*** FUNCTION DEFINITIONS ***/
+
+void con_init();
+/* Initializes the command parser
+** Parameters: (void)
+** Returns : (void)
+** This function will initialize hook up a few commands to the parser.
+** It must be called before cmdParse() is used.
+*/
+
+
+void con_parse(EngineState *s, const char *command);
+/* Parses a command and summons appropriate facilities to handle it
+** Parameters: (EngineState *) s: The EngineState to use
+** command: The command to execute
+** Returns : (void)
+*/
+
+
+int con_hook_command(ConCommand command, const char *name, const char *param, const char *description);
+/* Adds a command to the parser's command list
+** Parameters: command: The command to add
+** name: The command's name
+** param: A description of the parameters it takes
+** description: A short description of what it does
+** Returns : 0 if successful, 1 if appending failed because
+** of an incorrect *param string, 'command'==0, or
+** 'name' already being in use.
+** A valid param string is either empty (no parameters allowed)
+** or contains one of the following tokens:
+** ! Special token: EngineState* must be set for this function to be called
+** i (an int)
+** s (a 'string' (char *))
+** h (a byte, described in hexadecimal digits)
+** a (a heap address, register or object name)
+** r (any register value)
+** x* (an arbitrary (possibly 0) number of 'x' tokens)
+** The '*' token may only be used as the last token of the list.
+** Another way to specify optional parameters is by means of the
+** '-opt:t' notation, which allows an optional parameter of type 't'
+** to be specified as 'opt:<value>' when calling. See also the
+** con_hasopt() and con_getopt() calls.
+**
+** Please note that the 'h' type does accept hexadecimal numbers greater
+** than 0xff and less than 0x00, but clips them to this range.
+**
+** Example: "isi*" would define the function to take an int, a
+** string, and an arbitrary number of ints as parameters (in that sequence).
+**
+** When the function is called, it can retrieve its parameters from cmd_params;
+** the actual number of parameters is stored in cmd_paramlength.
+** It is allowed to modify the char*s from a cmd_params[] element, as long
+** as no element beyond strlen(cmd_params[x].str)+1 is accessed.
+*/
+
+int con_hook_page(const char *topic, const char *body);
+/* Hooks a general information page to the manual page system
+** Parameters: (const char *) topic: The topic name
+** (const char *) body: The text body to assign to the topic
+** Returns : (int) 0 on success
+*/
+
+int con_hook_int(int *pointer, const char *name, const char *description);
+/* Adds an int to the list of modifyable ints.
+** Parameters: pointer: Pointer to the int to add to the list
+** name: Name for this value
+** description: A short description for the value
+** Returns : 0 on success, 1 if either value has already been added
+** or if name is already being used for a different value.
+** The internal list of int references is used by some of the basic commands.
+*/
+
+} // End of namespace Sci
+
+#endif // SCI_SCICORE_SCICONSOLE_H
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 828ea1f14d..7de9a7539e 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -24,7 +24,7 @@
*/
#include "sci/sci.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "common/util.h"
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 5dcf42cf59..8773b2b9c8 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -32,12 +32,12 @@
#include "sci/engine/kernel_types.h"
#include "sci/engine/kernel.h"
#include "sci/engine/savegame.h"
+#include "sci/engine/sciconsole.h"
#include "sci/gfx/gfx_widgets.h"
#include "sci/gfx/gfx_gui.h"
#include "sci/gfx/gfx_state_internal.h" // required for GfxContainer, GfxPort, GfxVisual
-#include "sci/scicore/resource.h"
-#include "sci/scicore/sciconsole.h"
-#include "sci/scicore/vocabulary.h"
+#include "sci/resource.h"
+#include "sci/vocabulary.h"
#include "sci/sfx/iterator.h"
#include "sci/sfx/sci_midi.h"
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index d8975a0aae..f6ec22a394 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -36,8 +36,8 @@ namespace Common {
}
#include "sci/sci.h"
-#include "sci/scicore/vocabulary.h"
-#include "sci/scicore/resource.h"
+#include "sci/vocabulary.h"
+#include "sci/resource.h"
#include "sci/engine/kernel.h" // for kfunct_sig_pair_t
#include "sci/engine/script.h"
#include "sci/engine/seg_manager.h"
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 81b279f00f..73e4499d20 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -27,7 +27,7 @@
#include "common/stack.h"
#include "sci/sci.h"
-#include "sci/scicore/resource.h"
+#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/intmap.h"
#include "sci/engine/kdebug.h"