diff options
| author | Filippos Karapetis | 2009-05-30 18:22:55 +0000 |
|---|---|---|
| committer | Filippos Karapetis | 2009-05-30 18:22:55 +0000 |
| commit | 4ab05f0b387112b72fb44ed9262fde117a434586 (patch) | |
| tree | 633ac24c1fe28a6a0fa8dd85b7089a83df71ebeb /engines/sci/engine | |
| parent | 15d5b8436e768674aeb2564d6f379e906fb0898c (diff) | |
| download | scummvm-rg350-4ab05f0b387112b72fb44ed9262fde117a434586.tar.gz scummvm-rg350-4ab05f0b387112b72fb44ed9262fde117a434586.tar.bz2 scummvm-rg350-4ab05f0b387112b72fb44ed9262fde117a434586.zip | |
- Moved 3 more commands to console.cpp: "draw_pic", "draw_rect" and "fill_screen"
- Removed some FreeSCI-specific variables for checking of the on-screen console
- Removed the Control-1 key combo - the console command "visual_state" can be used for the same reason
svn-id: r41040
Diffstat (limited to 'engines/sci/engine')
| -rw-r--r-- | engines/sci/engine/game.cpp | 2 | ||||
| -rw-r--r-- | engines/sci/engine/kevent.cpp | 6 | ||||
| -rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 71 | ||||
| -rw-r--r-- | engines/sci/engine/state.cpp | 4 | ||||
| -rw-r--r-- | engines/sci/engine/state.h | 2 |
5 files changed, 2 insertions, 83 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 658cd6a694..c3b1fd7115 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -520,8 +520,6 @@ int game_init(EngineState *s) { s->game_start_time = g_system->getMillis(); s->last_wait_time = s->game_start_time; - s->onscreen_console = 0; // No onscreen console unless explicitly requested - srand(g_system->getMillis()); // Initialize random number generator // script_dissect(0, s->_selectorNames); diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index fda8e21b1f..152f343679 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -94,14 +94,10 @@ reg_t kGetEvent(EngineState *s, int funct_nr, int argc, reg_t *argv) { sciprintf("Debug mode activated\n"); script_debug_flag = 1; // Enter debug mode _debug_seeking = _debug_step_running = 0; - s->onscreen_console = 0; } else if ((e.buckybits & SCI_EVM_CTRL) && (e.data == '`')) { + sciprintf("Debug mode activated\n"); script_debug_flag = 1; // Enter debug mode _debug_seeking = _debug_step_running = 0; - s->onscreen_console = 1; - } else if ((e.buckybits & SCI_EVM_CTRL) && (e.data == '1')) { - if (s->visual) - s->visual->print(0); } else { PUT_SEL32V(obj, type, SCI_EVT_KEYBOARD); // Keyboard event s->r_acc = make_reg(0, 1); diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 53bd6f3949..c7eda6e2c7 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -1260,15 +1260,9 @@ static int c_visible_map(EngineState *s, const Common::Array<cmd_param_t> &cmdPa // TODO #if 0 - if (s->onscreen_console) - con_restore_screen(s, s->osc_backup); - if (cmdParams[0].val <= 3) s->pic_visible_map = cmdParams[0].val; c_redraw_screen(s); - - if (s->onscreen_console) - s->osc_backup = con_backup_screen(s); #endif return 0; } @@ -1293,29 +1287,6 @@ static int c_gfx_priority(EngineState *s, const Common::Array<cmd_param_t> &cmdP return 0; } -static int c_gfx_drawpic(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) { - int flags = 1, default_palette = 0; - - if (!_debugstate_valid) { - sciprintf("Not in debug state\n"); - return 1; - } - - if (cmdParams.size() > 1) { - default_palette = cmdParams[1].val; - - if (cmdParams.size() > 2) - flags = cmdParams[2].val; - } - - gfxop_new_pic(s->gfx_state, cmdParams[0].val, flags, default_palette); - gfxop_clear_box(s->gfx_state, gfx_rect(0, 0, 320, 200)); - gfxop_update(s->gfx_state); - gfxop_sleep(s->gfx_state, 0); - - return 0; -} - #ifdef GFXW_DEBUG_WIDGETS extern GfxWidget *debug_widgets[]; extern int debug_widget_pos; @@ -1364,42 +1335,6 @@ static int c_gfx_draw_cel(EngineState *s, const Common::Array<cmd_param_t> &cmdP return 0; } -static int c_gfx_fill_screen(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) { - int col = cmdParams[0].val; - - if (!s) { - sciprintf("Not in debug state!\n"); - return 1; - } - - if (col < 0 || col > 15) - col = 0; - - gfxop_set_clip_zone(s->gfx_state, gfx_rect_fullscreen); - gfxop_fill_box(s->gfx_state, gfx_rect_fullscreen, s->ega_colors[col]); - gfxop_update(s->gfx_state); - - return 0; -} - -static int c_gfx_draw_rect(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) { - int col = cmdParams[4].val; - - if (!s) { - sciprintf("Not in debug state!\n"); - return 1; - } - - if (col < 0 || col > 15) - col = 0; - - gfxop_set_clip_zone(s->gfx_state, gfx_rect_fullscreen); - gfxop_fill_box(s->gfx_state, gfx_rect(cmdParams[0].val, cmdParams[1].val, cmdParams[2].val, cmdParams[3].val), s->ega_colors[col]); - gfxop_update(s->gfx_state); - - return 0; -} - static int c_gfx_propagate_rect(EngineState *s, const Common::Array<cmd_param_t> &cmdParams) { int map = cmdParams[4].val; rect_t rect; @@ -2287,12 +2222,6 @@ void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t * con_hook_command(c_gfx_print_widget, "gfx_print_widget", "i*", "If called with no parameters, it\n shows which widgets are active.\n" " With parameters, it lists the\n widget corresponding to the\n numerical index specified (for\n each parameter)."); #endif - con_hook_command(c_gfx_drawpic, "gfx_drawpic", "ii*", "Draws a pic resource\n\nUSAGE\n gfx_drawpic <nr> [<pal> [<fl>]]\n" - " where <nr> is the number of the pic resource\n to draw\n <pal> is the optional default\n palette for the pic (0 is" - "\n assumed if not specified)\n <fl> are any pic draw flags (default\n is 1)"); - con_hook_command(c_gfx_fill_screen, "gfx_fill_screen", "i", "Fills the screen with one\n of the EGA colors\n"); - con_hook_command(c_gfx_draw_rect, "gfx_draw_rect", "iiiii", "Draws a rectangle to the screen\n with one of the EGA colors\n\nUSAGE\n\n" - " gfx_draw_rect <x> <y> <xl> <yl> <color>"); con_hook_command(c_gfx_propagate_rect, "gfx_propagate_rect", "iiiii", diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index 4fe4c8eec9..10c8afd67f 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -46,9 +46,7 @@ EngineState::EngineState() : _dirseeker(this) { pic_not_valid = 0; pic_is_new = 0; - onscreen_console = 0; - osc_backup = 0; - + pic_priority_table = 0; status_bar_foreground = 0; diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 6f273d2f91..9e380cac38 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -137,8 +137,6 @@ public: byte pic_not_valid; /**< Is 0 if the background picture is "valid" */ byte pic_is_new; /**< New pic was loaded or port was opened */ - byte onscreen_console; /**< Use the onscreen console for debugging */ - byte *osc_backup; /**< Backup of the pre-onscreen console screen data */ int *pic_priority_table; /**< 16 entries with priorities or NULL if not present */ |
