summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-book.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-28 03:58:15 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-28 03:58:15 +0000
commitbb8e9480efb1259fbb2da1e07bdfc0b613c68eea (patch)
tree39e4212ac5b39bae9c29959cccac479e3df5f414 /crawl-ref/source/spl-book.cc
parent0e9f823830bc5395267bc0eb795d7b1877ae5681 (diff)
downloadcrawl-ref-bb8e9480efb1259fbb2da1e07bdfc0b613c68eea.tar.gz
crawl-ref-bb8e9480efb1259fbb2da1e07bdfc0b613c68eea.zip
Reduce screen-flicker and clearing of the message window when re-doing the
previous command (`) (at least for actions involving selecting an item from inventory, selecting an ability to use, selecting a spell to cast, and selecting a spell to memorize). Not tested with the tiles build. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9839 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-book.cc')
-rw-r--r--crawl-ref/source/spl-book.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 2df122862b..5cf25a4ab1 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -892,16 +892,16 @@ int spellbook_contents( item_def &book, read_book_action_type action,
*fs = out;
int keyn = 0;
- if (update_screen)
+ if (update_screen && !crawl_state.is_replaying_keys())
{
cursor_control coff(false);
clrscr();
out.display();
+ }
- //keyn = c_getch();
+ if (update_screen)
keyn = tolower(getchm(KMC_MENU));
- }
return (keyn); // try to figure out that for which this is used {dlb}
}
@@ -1201,7 +1201,8 @@ int read_book( item_def &book, read_book_action_type action )
if (book.base_type == OBJ_BOOKS)
mark_had_book(book);
- redraw_screen();
+ if (!crawl_state.is_replaying_keys())
+ redraw_screen();
// Put special book effects in another function which can be called
// from memorise as well.
@@ -1376,10 +1377,13 @@ bool learn_spell(int book)
return (false);
int spell = read_book( you.inv[book], RBOOK_MEMORISE );
- clrscr();
- mesclr(true);
- redraw_screen();
+ if (!crawl_state.is_replaying_keys())
+ {
+ clrscr();
+ mesclr(true);
+ redraw_screen();
+ }
if ( !isalpha(spell) )
{