aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/scicore
diff options
context:
space:
mode:
authorMax Horn2009-03-04 05:19:19 +0000
committerMax Horn2009-03-04 05:19:19 +0000
commit302a99a2c0223bceb3a1f553f1b4ec0bf4b13fea (patch)
treeabbf172d4eac22d9090c4021b5e9310d6f902d7f /engines/sci/scicore
parent57e0d1611268efc5f4dda8fd02fb4dfe11b0eb5b (diff)
downloadscummvm-rg350-302a99a2c0223bceb3a1f553f1b4ec0bf4b13fea.tar.gz
scummvm-rg350-302a99a2c0223bceb3a1f553f1b4ec0bf4b13fea.tar.bz2
scummvm-rg350-302a99a2c0223bceb3a1f553f1b4ec0bf4b13fea.zip
SCI: cleanup
svn-id: r39106
Diffstat (limited to 'engines/sci/scicore')
-rw-r--r--engines/sci/scicore/sciconsole.cpp29
-rw-r--r--engines/sci/scicore/sciconsole.h65
2 files changed, 5 insertions, 89 deletions
diff --git a/engines/sci/scicore/sciconsole.cpp b/engines/sci/scicore/sciconsole.cpp
index a8e57e6d74..3e70dfe64c 100644
--- a/engines/sci/scicore/sciconsole.cpp
+++ b/engines/sci/scicore/sciconsole.cpp
@@ -33,8 +33,7 @@ namespace Sci {
#ifdef SCI_CONSOLE
-int con_passthrough = 0;
-FILE *con_file = NULL;
+int con_passthrough = false;
static void (*_con_string_callback)(char*) = NULL;
static void (*_con_pixmap_callback)(gfx_pixmap_t *) = NULL;
@@ -68,8 +67,6 @@ int sciprintf(const char *fmt, ...) {
if (con_passthrough)
printf("%s", buf);
- if (con_file)
- fprintf(con_file, "%s", buf);
if (_con_string_callback)
_con_string_callback(buf);
@@ -99,30 +96,6 @@ int con_insert_pixmap(gfx_pixmap_t *pixmap) {
return 0;
}
-void open_console_file(char *filename) {
- if (con_file != NULL)
- fclose(con_file);
-
- if (NULL == filename) {
- fprintf(stderr, "console.c: open_console_file(): NULL passed for parameter filename\r\n");
- }
-#ifdef WIN32
- con_file = fopen(filename, "wt");
-#else
- con_file = fopen(filename, "w");
-#endif
-
- if (NULL == con_file)
- fprintf(stderr, "console.c: open_console_file(): Could not open output file %s\n", filename);
-}
-
-void close_console_file() {
- if (con_file != NULL) {
- fclose(con_file);
- con_file = NULL;
- }
-}
-
#endif // SCI_CONSOLE
} // End of namespace Sci
diff --git a/engines/sci/scicore/sciconsole.h b/engines/sci/scicore/sciconsole.h
index 25b8907a50..e451895a9a 100644
--- a/engines/sci/scicore/sciconsole.h
+++ b/engines/sci/scicore/sciconsole.h
@@ -34,7 +34,6 @@
#include "common/scummsys.h"
-#include "sci/sci_memory.h"
#include "sci/tools.h"
#include "sci/engine/vm_types.h"
@@ -43,13 +42,8 @@
namespace Sci {
+/** If this flag is set, we echo all sciprintf() stuff to the text console. */
extern int con_passthrough;
-/* Echo all sciprintf() stuff to the text console */
-extern FILE *con_file;
-/* Echo all sciprintf() output to a text file. Note: clients of freesci.dll
-** should use open_console_file and close_console_file, rather than refer
-** directly to the con_file variable.
-*/
union cmd_param_t {
int32 val;
@@ -57,14 +51,14 @@ union cmd_param_t {
reg_t reg;
};
+/** The number of parameters passed to a function called from the parser */
extern unsigned int cmd_paramlength;
-/* The number of parameters passed to a function called from the parser */
+/** The parameters passed to a function called by the parser */
extern cmd_param_t *cmd_params;
-/* The parameters passed to a function called by the parser */
+/** The game state as used by some of the console commands */
extern struct EngineState *con_gamestate;
-/* The game state as used by some of the console commands */
/*** FUNCTION DEFINITIONS ***/
@@ -139,21 +133,6 @@ int con_hook_command(int command(EngineState *s), const char *name, const char *
** as no element beyond strlen(cmd_params[x].str)+1 is accessed.
*/
-cmd_param_t con_getopt(char *opt);
-/* Retreives the specified optional parameter
-** -- for use within console functions only --
-** Parameters: (char *) opt: The optional parameter to retrieve
-** Returns : (cmd_param_t) The corresponding parameter
-** Should only be used if con_hasopt() reports its presence.
-*/
-
-int con_hasopt(char *opt);
-/* Checks whether an optional parameter was specified
-** -- for use within console functions only --
-** Parameters: (char *) opt: The optional parameter to check for
-** Returns : (int) non-zero iff the parameter was specified
-*/
-
int con_can_handle_pixmaps();
/* Determines whether the console supports pixmap inserts
** Returns : (int) non-zero iff pixmap inserts are supported
@@ -187,44 +166,8 @@ int con_hook_int(int *pointer, const char *name, const char *description);
*/
-void con_gfx_init();
-/* Initializes the gfx console
-*/
-
-void con_gfx_show(gfx_state_t *state);
-/* Enters on-screen console mode
-** Parameters: (gfx_state_t *state): The graphics state to use for interaction
-** Returns : (void)
-*/
-
-char *con_gfx_read(gfx_state_t *state);
-/* Reads a single line from the on-screen console, if it is open
-** Parameters: (gfx_state_t *state): The graphics state to use for interaction
-** Returns : (char *) The input, in a static buffer
-*/
-
-void con_gfx_hide(gfx_state_t *stae);
-/* Closes the on-screen console
-** Parameters: (gfx_state_t *state): The graphics state to use for interaction
-** Returns : (void)
-*/
-
-
int sci_hexdump(byte *data, int length, int offsetplus);
-void open_console_file(char *filename);
-/* Opens the file to which the console output is echoed. If a file was opened
-** before, closes it.
-** Parameters: filename - name of the file
-** Returns : (void)
-*/
-
-void close_console_file();
-/* Closes the console output file.
-** Parameters: (void)
-** Returns : (void)
-*/
-
} // End of namespace Sci
#endif // SCI_SCICORE_SCICONSOLE_H