summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 18:49:14 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 18:49:14 +0000
commit31ecf11f2b7ff57426fb26fce5e3e63444e743c3 (patch)
treeb1b833eea1ac7f74044df506716ef65468127945 /crawl-ref/source/invent.cc
parent8387025f9dbca1c317d332b8e17661d55d5928bb (diff)
downloadcrawl-ref-31ecf11f2b7ff57426fb26fce5e3e63444e743c3.tar.gz
crawl-ref-31ecf11f2b7ff57426fb26fce5e3e63444e743c3.zip
* 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
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc27
1 files changed, 13 insertions, 14 deletions
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<const item_def*> &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_def *>( 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<SelItem> 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 ))