diff options
author | gammafunk <gammafunk@gmail.com> | 2014-06-14 08:22:47 -0500 |
---|---|---|
committer | gammafunk <gammafunk@gmail.com> | 2014-06-25 20:50:43 -0500 |
commit | f1909d2967591ffdf556ca62d31855aa09329ad8 (patch) | |
tree | 4f9750c458d4010af4ec1666ee28e37bb33fd25a /crawl-ref/source/makeitem.cc | |
parent | 90c77aa1b4edc6e6c1c008e5a3cc634e002ea253 (diff) | |
download | crawl-ref-f1909d2967591ffdf556ca62d31855aa09329ad8.tar.gz crawl-ref-f1909d2967591ffdf556ca62d31855aa09329ad8.zip |
objstat: Item and monster generation statistics
The -objstat command-line option will generate iterations of the given
levels, compiling stats on every item and monster generated, and
average the results over the iterations. It's only available in debug
builds and uses the same map specification format as -mapstat. The
default number of iterations is 100.
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r-- | crawl-ref/source/makeitem.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index b68950e971..209169490e 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -15,6 +15,7 @@ #include "artefact.h" #include "colour.h" #include "coord.h" +#include "dbg-scan.h" #include "decks.h" #include "describe.h" #include "dungeon.h" @@ -2725,6 +2726,10 @@ int items(bool allow_uniques, { make_item_unrandart(mitm[p], force_ego); ASSERT(mitm[p].is_valid()); +#ifdef DEBUG_DIAGNOSTICS + if (crawl_state.obj_stat_gen) + objgen_report_item(mitm[p]); +#endif return p; } // the base item otherwise @@ -2864,6 +2869,10 @@ int items(bool allow_uniques, // Note that item might be invalidated now, since p could have changed. ASSERT(mitm[p].is_valid()); +#ifdef DEBUG_DIAGNOSTICS + if (crawl_state.obj_stat_gen) + objgen_report_item(mitm[p]); +#endif return p; } |