summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/chardump.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-15 21:26:39 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-15 21:26:39 +0100
commitdb0e3300dd36a98734dd081e35dadd3a0c6a8aa4 (patch)
tree5d91418ba2b00bccab6131c8c294ab82f1128b16 /crawl-ref/source/chardump.cc
parent4224dfb2d2276ae82502dcf2b04ae099bfe44100 (diff)
downloadcrawl-ref-db0e3300dd36a98734dd081e35dadd3a0c6a8aa4.tar.gz
crawl-ref-db0e3300dd36a98734dd081e35dadd3a0c6a8aa4.zip
New method _command_to_string() returning human-readable key names.
The plan is to replace the hardcoded command key names on the help screen and in the tutorial with these dynamic ones respecting redefined keys. Unfortunately, several commands have multiple assignments and macro.cc's command_to_key() only returns the last one, which might not be what the player is actually using. For example, I don't have a Numpad, so all mentions of it are of no use to me, and I'd rather have the vi keys listed, which in turn many other players have no interest in. You can check the current key assignments if you comment out the DEBUG_DUMP_COMMANDS definition in chardump.cc and then create a character dump. This will be removed once I'm finished here.
Diffstat (limited to 'crawl-ref/source/chardump.cc')
-rw-r--r--crawl-ref/source/chardump.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 36480530ee..1ec449eeb7 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -163,6 +163,7 @@ static void dump_section(dump_params &par)
}
}
+// #define DEBUG_DUMP_COMMANDS
bool dump_char(const std::string &fname, bool show_prices, bool full_id,
const scorefile_entry *se)
{
@@ -177,6 +178,9 @@ bool dump_char(const std::string &fname, bool show_prices, bool full_id,
par.section = Options.dump_order[i];
dump_section(par);
}
+#ifdef DEBUG_DUMP_COMMANDS
+ list_all_commands(par.text);
+#endif
return write_dump(fname, par);
}