diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-29 11:47:50 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-29 11:47:50 +0000 |
commit | 2931994db5281c12610cf08647175863622f5f78 (patch) | |
tree | ee9e9c54850943e88aa90604b78a26a62d77bb7f /crawl-ref | |
parent | 141b28bcbc8ffbf643010ff2071d96ea824d90e1 (diff) | |
download | crawl-ref-2931994db5281c12610cf08647175863622f5f78.tar.gz crawl-ref-2931994db5281c12610cf08647175863622f5f78.zip |
Removed dud verbose_dump and detailed_stat_dump options, and dead code in
shopping.cc (Haran).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1395 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/chardump.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/clua.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/shopping.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/stash.cc | 22 |
6 files changed, 15 insertions, 39 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index f7fef93fa2..2f7793ae84 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -87,7 +87,6 @@ static void sdump_lua(const std::string §ion, std::string &text); static bool write_dump(const std::string &fname, const std::string &text, bool full_id); static void dump_stats2( std::string & text, bool calc_unid); -static void dump_stats( std::string & text ); struct dump_section_handler { @@ -163,10 +162,7 @@ static void sdump_header(const std::string &, std::string &text) static void sdump_stats(const std::string &, std::string &text) { - if (Options.detailed_stat_dump) - dump_stats2(text, dump_full_id); - else - dump_stats(text); + dump_stats2(text, dump_full_id); } static void sdump_burden(const std::string &, std::string &text) @@ -354,6 +350,7 @@ static void sdump_screenshot(const std::string &, std::string &text) text += "\n\n"; } +#if 0 static void dump_stats( std::string & text ) { char st_prn[20]; @@ -487,6 +484,7 @@ static void dump_stats( std::string & text ) text += "\n"; text += "\n"; } // end dump_stats() +#endif //--------------------------------------------------------------- // @@ -707,11 +705,10 @@ static void sdump_inventory(const std::string &, std::string & text) text += "\n" " (" + origin_desc(you.inv[j]) + ")"; } - if (is_dumpable_artifact( you.inv[j], - Options.verbose_dump )) + if (is_dumpable_artifact( you.inv[j], false )) { text2 = get_item_description( you.inv[j], - Options.verbose_dump, + false, true ); text += munge_description(text2); diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc index 5a870cd330..86ff09945d 100644 --- a/crawl-ref/source/clua.cc +++ b/crawl-ref/source/clua.cc @@ -1874,8 +1874,6 @@ static option_handler handlers[] = { // Boolean options come first { "easy_open", &Options.easy_open, option_hboolean }, - { "verbose_dump", &Options.verbose_dump, option_hboolean }, - { "detailed_stat_dump", &Options.detailed_stat_dump, option_hboolean }, { "colour_map", &Options.colour_map, option_hboolean }, { "clean_map", &Options.clean_map, option_hboolean }, { "show_uncursed", &Options.show_uncursed, option_hboolean }, diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 99be5026e2..3ac39950f6 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1280,8 +1280,6 @@ public: long autopickups; // items to autopickup bool show_inventory_weights; // show weights in inventory listings - bool verbose_dump; // make character dumps contain more detail - bool detailed_stat_dump; // add detailed stat and resist dump bool colour_map; // add colour to the map bool clean_map; // remove unseen clouds/monsters bool show_uncursed; // label known uncursed items as "uncursed" diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 9e2e079e1e..1502266f0b 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -584,8 +584,6 @@ void game_options::reset_options() (1L << 3) | // wands (1L << 4)); // food show_inventory_weights = false; - verbose_dump = false; - detailed_stat_dump = true; colour_map = true; clean_map = false; show_uncursed = true; @@ -1481,11 +1479,6 @@ void game_options::read_option_line(const std::string &str, bool runscript) // should weights be shown on inventory items? show_inventory_weights = read_bool( field, show_inventory_weights ); } - else if (key == "detailed_stat_dump") - { - detailed_stat_dump = - read_bool( field, detailed_stat_dump ); - } else if (key == "clean_map") { // removes monsters/clouds from map diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index c89990d03e..d9e30464e2 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -189,14 +189,6 @@ static void in_a_shop( char shoppy ) cprintf("%s", mitm[itty].name(DESC_NOCAP_A, false, id_stock).c_str()); -#if 0 - // huh? XXX XXX does this code do anything? - std::string desc; - if (is_dumpable_artifact(mitm[itty], Options.verbose_dump)) - desc = munge_description(get_item_description(mitm[itty], - Options.verbose_dump, - true )); -#endif si.add_item(mitm[itty], gp_value); gotoxy(60, i); diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc index 4a90487dff..f38d646473 100644 --- a/crawl-ref/source/stash.cc +++ b/crawl-ref/source/stash.cc @@ -481,11 +481,11 @@ bool Stash::matches_search(const std::string &prefix, continue; } - if (is_dumpable_artifact(item, Options.verbose_dump)) + if (is_dumpable_artifact(item, false)) { - std::string desc = munge_description(get_item_description(item, - Options.verbose_dump, - true )); + std::string desc = + munge_description(get_item_description(item, false, true)); + if (search.matches(desc)) { if (!res.count++) @@ -542,11 +542,11 @@ void Stash::write(std::ostream &os, << (!verified && (items.size() > 1 || i)? " (still there?)" : "") << std::endl; - if (is_dumpable_artifact(item, Options.verbose_dump)) + if (is_dumpable_artifact(item, false)) { - std::string desc = munge_description(get_item_description(item, - Options.verbose_dump, - true )); + std::string desc = + munge_description(get_item_description(item, false, true)); + // Kill leading and trailing whitespace desc.erase(desc.find_last_not_of(" \n\t") + 1); desc.erase(0, desc.find_first_not_of(" \n\t")); @@ -664,11 +664,9 @@ std::string ShopInfo::shop_item_desc(const shop_item &si) const if (shoptype_identifies_stock(this->shoptype)) const_cast<shop_item&>(si).item.flags |= ISFLAG_IDENT_MASK; - if (is_dumpable_artifact(si.item, Options.verbose_dump)) + if (is_dumpable_artifact(si.item, false)) { - desc = munge_description(get_item_description(si.item, - Options.verbose_dump, - true)); + desc = munge_description(get_item_description(si.item, false, true)); trim_string(desc); // Walk backwards and prepend indenting spaces to \n characters |