From 31ecf11f2b7ff57426fb26fce5e3e63444e743c3 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 9 Mar 2009 18:49:14 +0000 Subject: * Add tile for Nergalle, who's actually not all that ugly but apparently has a really bad fashion sense. * Add a sticky flame marker for monsters. * Replace the trapdoor spider tile with a less original, but nicer one. * Improve shopping interface: replace "examine item" command with a toggle between browsing and shopping. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9397 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/invent.cc | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/invent.cc') diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index e650b4dfa9..aa7a0f7016 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -51,7 +51,7 @@ static void _get_inv_items_to_show( std::vector &v, int selector, int excluded_slot = -1); InvTitle::InvTitle( Menu *mn, const std::string &title, - invtitle_annotator tfn ) + invtitle_annotator tfn ) : MenuEntry( title, MEL_TITLE ) { m = mn; @@ -60,15 +60,15 @@ InvTitle::InvTitle( Menu *mn, const std::string &title, std::string InvTitle::get_text() const { - return titlefn? titlefn( m, MenuEntry::get_text() ) : - MenuEntry::get_text(); + return (titlefn ? titlefn( m, MenuEntry::get_text() ) + : MenuEntry::get_text()); } InvEntry::InvEntry( const item_def &i ) : MenuEntry( "", MEL_ITEM ), item( &i ) { data = const_cast( item ); - if ( in_inventory(i) && i.base_type != OBJ_GOLD ) + if (in_inventory(i) && i.base_type != OBJ_GOLD) { // We need to do this in order to get the 'wielded' annotation. // We then toss out the first four characters, which look @@ -1094,7 +1094,7 @@ std::vector prompt_invent_items( } if (need_prompt) - mpr( prompt, MSGCH_PROMPT ); + mpr(prompt, MSGCH_PROMPT); if (need_getch) keyin = get_ch(); @@ -1448,7 +1448,7 @@ int prompt_invent_item( const char *prompt, } if (need_prompt) - mpr( prompt, MSGCH_PROMPT ); + mpr(prompt, MSGCH_PROMPT); if (need_getch) keyin = get_ch(); @@ -1502,21 +1502,20 @@ int prompt_invent_item( const char *prompt, need_prompt = false; need_getch = false; } - else if ( count == NULL && isdigit( keyin ) ) + else if (count == NULL && isdigit( keyin )) { - /* scan for our item */ + // scan for our item int res = _digit_to_index( keyin, oper ); - if ( res != -1 ) + if (res != -1) { ret = res; - if ( check_warning_inscriptions( you.inv[ret], oper ) ) + if (check_warning_inscriptions( you.inv[ret], oper )) break; } } else if (keyin == ESCAPE || (Options.easy_quit_item_prompts - && allow_easy_quit - && keyin == ' ')) + && allow_easy_quit && keyin == ' ')) { ret = PROMPT_ABORT; break; @@ -1526,8 +1525,8 @@ int prompt_invent_item( const char *prompt, ret = letter_to_index( keyin ); if (must_exist && !is_valid_item( you.inv[ret] )) - mpr( "You do not have any such object." ); - else if ( check_warning_inscriptions( you.inv[ret], oper ) ) + mpr("You do not have any such object."); + else if (check_warning_inscriptions( you.inv[ret], oper )) break; } else if (!isspace( keyin )) -- cgit v1.2.3-54-g00ecf