aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-29 17:19:39 +0000
committerFilippos Karapetis2009-05-29 17:19:39 +0000
commitb1997801dad7f5ec30b6cb3c4a2e7574ed0cf590 (patch)
tree0b45674ae814c0053b85630098d455c596fe3763 /engines/sci/engine
parent797c35876b32988841f84318f1ef0f998f4926c9 (diff)
downloadscummvm-rg350-b1997801dad7f5ec30b6cb3c4a2e7574ed0cf590.tar.gz
scummvm-rg350-b1997801dad7f5ec30b6cb3c4a2e7574ed0cf590.tar.bz2
scummvm-rg350-b1997801dad7f5ec30b6cb3c4a2e7574ed0cf590.zip
- Moved some debug code into console.cpp, adding 3 console commands: resource_types, sci0_palette and exit
- Removed the "man" command - Removed the commands which set the SCI01 priority table flags and the crossblit alpha threshold (they're too specific, and not really useful anymore) - Removed some leftover debug code from gfxop_clear_box() svn-id: r41010
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kernel.h2
-rw-r--r--engines/sci/engine/kgraphics.cpp14
-rw-r--r--engines/sci/engine/sciconsole.cpp59
3 files changed, 14 insertions, 61 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 8269157ff9..c0be017dd0 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -170,8 +170,6 @@ int kernel_oops(EngineState *s, const char *file, int line, const char *reason);
/******************** Priority macros/functions ********************/
-extern int sci01_priority_table_flags; /* 1: delete, 2: print */
-
int _find_priority_band(EngineState *s, int band);
/* Finds the position of the priority band specified
** Parameters: (EngineState *) s: State to search in
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index c0d967083a..b0fe1d50cb 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -987,8 +987,6 @@ reg_t kOnControl(EngineState *s, int funct_nr, int argc, reg_t *argv) {
void _k_view_list_free_backgrounds(EngineState *s, ViewObject *list, int list_nr);
-int sci01_priority_table_flags = 0;
-
#define K_DRAWPIC_FLAG_MIRRORED (1 << 14)
reg_t kDrawPic(EngineState *s, int funct_nr, int argc, reg_t *argv) {
@@ -1050,18 +1048,6 @@ reg_t kDrawPic(EngineState *s, int funct_nr, int argc, reg_t *argv) {
s->pic_priority_table = gfxop_get_pic_metainfo(s->gfx_state);
- if (sci01_priority_table_flags & 0x2) {
- if (s->pic_priority_table) {
- int i;
- fprintf(stderr, "---------------------------\nPriority table:\n");
- for (i = 0; i < 16; i++)
- fprintf(stderr, "\t%d:\t%d\n", i, s->pic_priority_table[i]);
- fprintf(stderr, "---------------------------\n");
- }
- }
- if (sci01_priority_table_flags & 0x1)
- s->pic_priority_table = NULL;
-
if (argc > 1)
s->pic_animate = SKPV(1) & 0xff; // The animation used during kAnimate() later on
diff --git a/engines/sci/engine/sciconsole.cpp b/engines/sci/engine/sciconsole.cpp
index 9177a4b11f..6d4059492f 100644
--- a/engines/sci/engine/sciconsole.cpp
+++ b/engines/sci/engine/sciconsole.cpp
@@ -37,7 +37,6 @@ namespace Sci {
// console commands
static int c_list(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // lists various types of things
-static int c_man(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // 'manual page'
static int c_set(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // sets an int variable
static int c_print(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // prints a variable
//static int c_objinfo(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); // shows some info about one class
@@ -162,7 +161,6 @@ void con_init() {
// Hook up some commands
con_hook_command(&c_list, "list", "s*", "Lists various things (try 'list')");
- con_hook_command(&c_man, "man", "s", "Gives a short description of something");
con_hook_command(&c_print, "print", "s", "Prints an int variable");
con_hook_command(&c_set, "set", "si", "Sets an int variable");
con_hook_command(&c_hexgrep, "hexgrep", "shh*", "Searches some resources for a\n"
@@ -191,6 +189,20 @@ void con_init() {
" a list of addresses and indices is provided.\n"
" ?obj.idx may be used to disambiguate 'obj'\n"
" by the index 'idx'.\n");
+
+ // These were in sci.cpp
+ /*
+ con_hook_int(&(gfx_options.buffer_pics_nr), "buffer_pics_nr",
+ "Number of pics to buffer in LRU storage\n");
+ con_hook_int(&(gfx_options.pic0_dither_mode), "pic0_dither_mode",
+ "Mode to use for pic0 dithering\n");
+ con_hook_int(&(gfx_options.pic0_dither_pattern), "pic0_dither_pattern",
+ "Pattern to use for pic0 dithering\n");
+ con_hook_int(&(gfx_options.pic0_unscaled), "pic0_unscaled",
+ "Whether pic0 should be drawn unscaled\n");
+ con_hook_int(&(gfx_options.dirty_frames), "dirty_frames",
+ "Dirty frames management\n");
+ */
}
}
@@ -731,7 +743,6 @@ static int c_list(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
"vars - lists all variables\n"
"docs - lists all misc. documentation\n"
"\n"
- "restypes - lists all resource types\n"
"[resource] - lists all [resource]s");
} else if (cmdParams.size() == 1) {
const char *mm_subsects[3] = {"cmds", "vars", "docs"};
@@ -749,11 +760,6 @@ static int c_list(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
if (!s) {
sciprintf("You need a state to do that!\n");
return 1;
- }
-
- else if (strcmp("restypes", cmdParams[0].str) == 0) {
- for (i = 0; i < kResourceTypeInvalid; i++)
- sciprintf("%s\n", getResourceTypeName((ResourceType)i));
} else {
ResourceType res = parseResourceType(cmdParams[0].str);
if (res == kResourceTypeInvalid)
@@ -770,43 +776,6 @@ static int c_list(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
return 0;
}
-static int c_man(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
- int section = 0;
- uint i;
- Common::String name = cmdParams[0].str;
- const char *c = strchr(name.c_str(), '.');
- cmd_mm_entry_t *entry = 0;
-
- if (c) {
- section = atoi(c + 1);
- name = Common::String(name.begin(), c);
- }
-
- if (section < 0 || section >= CMD_MM_ENTRIES) {
- sciprintf("Invalid section %d\n", section);
- return 1;
- }
-
- sciprintf("section:%d\n", section);
- if (section)
- entry = cmd_mm_find(name.c_str(), section - 1);
- else
- for (i = 0; i < CMD_MM_ENTRIES && !section; i++) {
- if ((entry = cmd_mm_find(name.c_str(), i)))
- section = i + 1;
- }
-
- if (!entry) {
- sciprintf("No manual entry\n");
- return 1;
- }
-
- sciprintf("-- %s: %s.%d\n", cmd_mm[section - 1].name, name.c_str(), section);
- cmd_mm[section - 1].print(entry, 1);
-
- return 0;
-}
-
static int c_set(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) {
cmd_var_t *var = (cmd_var_t *)cmd_mm_find(cmdParams[0].str, CMD_MM_VAR);