From db0e3300dd36a98734dd081e35dadd3a0c6a8aa4 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Fri, 15 Jan 2010 21:26:39 +0100 Subject: 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. --- crawl-ref/source/chardump.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crawl-ref/source/chardump.cc') 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); } -- cgit v1.2.3-54-g00ecf