MCPcopy Create free account
hub / github.com/crawl/crawl / command_to_string

Function command_to_string

crawl-ref/source/macro.cc:2336–2352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2334}
2335
2336string command_to_string(command_type cmd, bool tutorial)
2337{
2338 const int key = command_to_key(cmd);
2339
2340 string result;
2341 if (key >= 32 && key < 256)
2342 {
2343 if (tutorial && key >= 'A' && key <= 'Z')
2344 result = make_stringf("uppercase %c", (char) key);
2345 else
2346 result = string(1, (char) key);
2347 }
2348 else
2349 result = keycode_to_name(key, false);
2350
2351 return result;
2352}
2353
2354void insert_commands(string &desc, const vector<command_type> &cmds, bool formatted)
2355{

Callers 15

crawl_get_commandFunction · 0.85
menu_keyhelp_select_keysFunction · 0.85
_command_to_stringFunction · 0.85
add_spell_to_memoryFunction · 0.85
_status_mut_rune_listFunction · 0.85
_add_commandFunction · 0.85
swap_checkFunction · 0.85
level_changeFunction · 0.85
win_apostle_challengeFunction · 0.85
insert_commandsFunction · 0.85
_esc_cmd_to_strFunction · 0.85

Calls 3

command_to_keyFunction · 0.85
make_stringfFunction · 0.85
keycode_to_nameFunction · 0.85

Tested by

no test coverage detected