From f76a28883b52ad529804c1213b25f0fe42f9fc3e Mon Sep 17 00:00:00 2001 From: haranp Date: Wed, 30 Jul 2008 23:52:01 +0000 Subject: Fix 2033249: endgame and shop inventory browsing didn't allow examining items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6737 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 2 +- crawl-ref/source/invent.cc | 4 ++-- crawl-ref/source/invent.h | 11 +---------- crawl-ref/source/ouch.cc | 2 +- crawl-ref/source/shopping.cc | 2 +- 5 files changed, 6 insertions(+), 15 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 522342ef84..53e35ab5d2 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2413,7 +2413,7 @@ void process_command( command_type cmd ) break; case CMD_LIST_EQUIPMENT: - get_invent( OSEL_EQUIP ); + get_invent(OSEL_EQUIP); break; case CMD_INSCRIBE_ITEM: diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 90adbfb0ef..78b4416253 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -938,10 +938,10 @@ unsigned char invent_select( const char *title, return (menu.getkey()); } -unsigned char invent( int item_class_inv, bool show_price ) +void browse_inventory( bool show_price ) { InvShowPrices show_item_prices(show_price); - return (invent_select(NULL, MT_INVLIST, item_class_inv)); + get_invent(OSEL_ANY); } // Reads in digits for a count and apprends then to val, the diff --git a/crawl-ref/source/invent.h b/crawl-ref/source/invent.h index 357092b879..6ae30e9441 100644 --- a/crawl-ref/source/invent.h +++ b/crawl-ref/source/invent.h @@ -200,12 +200,6 @@ std::vector prompt_invent_items( const std::vector *pre_select = NULL ); -// last updated 12may2000 {dlb} -/* *********************************************************************** - * called from: invent - ouch - shopping - * *********************************************************************** */ -unsigned char invent( int item_class_inv, bool show_price ); - unsigned char invent_select( // Use NULL for stock Inventory title const char *title = NULL, @@ -220,10 +214,7 @@ unsigned char invent_select( Menu::selitem_tfn fn = NULL, const std::vector *pre_select = NULL ); -// last updated 24may2000 {dlb} -/* *********************************************************************** - * called from: acr - command - food - item_use - items - spl-book - spells1 - * *********************************************************************** */ +void browse_inventory( bool show_price ); unsigned char get_invent(int invent_type); bool in_inventory(const item_def &i); diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 9e2de8619c..5556959315 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -1063,7 +1063,7 @@ void end_game( scorefile_entry &se ) if (!crawl_state.seen_hups) more(); - invent( -1, true ); + browse_inventory(true); textcolor( LIGHTGREY ); clrscr(); diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 8e75799d31..3568d5d79d 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -436,7 +436,7 @@ static void _in_a_shop( int shopidx ) item.flags = old_flags; } else if (ft == '?' || ft == '*') - invent(-1, false); + browse_inventory(false); else if (!isalpha(ft)) { _shop_print("Huh?", 1); -- cgit v1.2.3-54-g00ecf