diff options
author | Paweł Kołodziejski | 2006-05-24 21:40:24 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2006-05-24 21:40:24 +0000 |
commit | 383b598c5cde4c64729d89a7ca84039dc5fabb58 (patch) | |
tree | c677e5ba33ee5c255b2937497a0bbef647233e45 /engines/agi/cycle.cpp | |
parent | 0f5a4b304b4cb3aa498610617d3ded63aad69c3d (diff) | |
download | scummvm-rg350-383b598c5cde4c64729d89a7ca84039dc5fabb58.tar.gz scummvm-rg350-383b598c5cde4c64729d89a7ca84039dc5fabb58.tar.bz2 scummvm-rg350-383b598c5cde4c64729d89a7ca84039dc5fabb58.zip |
converted to scummvm console style
svn-id: r22618
Diffstat (limited to 'engines/agi/cycle.cpp')
-rw-r--r-- | engines/agi/cycle.cpp | 89 |
1 files changed, 36 insertions, 53 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 2374d0dccd..2057189cd6 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -217,7 +217,6 @@ int main_cycle() { game.vars[29] = mouse.y; } -#ifdef USE_CONSOLE if (key == KEY_PRIORITY) { erase_both(); debug_.priority = !debug_.priority; @@ -232,7 +231,6 @@ int main_cycle() { write_status(); key = 0; } -#endif /* Click-to-walk mouse interface */ if (game.player_control && v->flags & ADJ_EGO_XY) { @@ -244,56 +242,46 @@ int main_cycle() { kascii = KEY_ASCII(key); - if (!console_keyhandler(key)) { - if (kascii) - setvar(V_key, kascii); - process_key: - switch (game.input_mode) { - case INPUT_NORMAL: - if (!handle_controller(key)) { - if (key == 0 || !game.input_enabled) - break; - handle_keys(key); - - /* if ESC pressed, activate menu before - * accept.input from the interpreter cycle - * sets the input mode to normal again - * (closes: #540856) - */ - if (key == KEY_ESCAPE) { - key = 0; - goto process_key; - } - - /* commented out to close bug #438872 - * if (key) game.keypress = key; - */ + if (kascii) + setvar(V_key, kascii); + process_key: + switch (game.input_mode) { + case INPUT_NORMAL: + if (!handle_controller(key)) { + if (key == 0 || !game.input_enabled) + break; + handle_keys(key); + + /* if ESC pressed, activate menu before + * accept.input from the interpreter cycle + * sets the input mode to normal again + * (closes: #540856) + */ + if (key == KEY_ESCAPE) { + key = 0; + goto process_key; } - break; - case INPUT_GETSTRING: - handle_controller(key); - handle_getstring(key); - setvar(V_key, 0); /* clear ENTER key */ - break; - case INPUT_MENU: - menu_keyhandler(key); - console_cycle(); - return false; - case INPUT_NONE: - handle_controller(key); - if (key) - game.keypress = key; - break; - } - } else { - if (game.input_mode == INPUT_MENU) { - console_cycle(); - return false; + + /* commented out to close bug #438872 + * if (key) game.keypress = key; + */ } + break; + case INPUT_GETSTRING: + handle_controller(key); + handle_getstring(key); + setvar(V_key, 0); /* clear ENTER key */ + break; + case INPUT_MENU: + menu_keyhandler(key); + return false; + case INPUT_NONE: + handle_controller(key); + if (key) + game.keypress = key; + break; } - console_cycle(); - if (game.msg_box_ticks > 0) game.msg_box_ticks--; @@ -327,11 +315,6 @@ static int play_game() { report("Running AGI script.\n"); -#ifdef USE_CONSOLE - console.count = 5; - console_prompt(); -#endif - setflag(F_entered_cli, false); setflag(F_said_accepted_input, false); game.vars[V_word_not_found] = 0; |