From 9304ae6cc3684377e50e6fcbc3d13e80fa092b6a Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 24 Apr 2007 22:38:41 +0000 Subject: Cleaned up shop-handling code considerably. Instead of shops passing around global id_arr arrays, shops use the newly added third argument to item_def::name() which indicates whether to override item ID status. This means that the shop ID SIGHUP protection is now unnecessary; it's been removed. Hopefully I caught all the places where the stash tracker tries to get item names and fixed them, but I might have missed something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1359 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/chardump.cc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'crawl-ref/source/chardump.cc') diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index 85d3bb1359..f7fef93fa2 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -563,7 +563,6 @@ static void sdump_religion(const std::string &, std::string & text) } } -extern char id[4][50]; // itemname.cc static bool dump_item_origin(const item_def &item, int value) { #define fs(x) (flags & (x)) @@ -611,7 +610,7 @@ static bool dump_item_origin(const item_def &item, int value) if (refpr == -1) return (false); if (value == -1) - value = item_value( item, id, false ); + value = item_value( item, false ); return (value >= refpr); #undef fs } @@ -624,18 +623,9 @@ static bool dump_item_origin(const item_def &item, int value) static void sdump_inventory(const std::string &, std::string & text) { int i, j; - char temp_id[4][50]; std::string text2; - for (i = 0; i < 4; i++) - { - for (j = 0; j < 50; j++) - { - temp_id[i][j] = 1; - } - } - int inv_class2[OBJ_GOLD]; int inv_count = 0; char tmp_quant[20]; @@ -704,8 +694,7 @@ static void sdump_inventory(const std::string &, std::string & text) { text += " ("; - itoa( ival = - item_value( you.inv[j], temp_id, true ), + itoa( ival = item_value( you.inv[j], true ), tmp_quant, 10 ); text += tmp_quant; -- cgit v1.2.3-54-g00ecf