{
char * f_name = "get_kb_line_and_iterate()";
struct KeyBinding * kb_p = * kb_pp;
- char * keyname = get_keyname_to_keycode(kb_p->key);
- struct Command * command = get_command_to_keycode(kb_p, kb_p->key);
+ char * keyname = get_keyname_to_keycode(kb_p->keycode);
+ struct Command * command = get_command_to_keycode(kb_p, kb_p->keycode);
uint16_t size = 9 + 1 + strlen(command->dsc_long) + 1;
char * line = try_malloc(size, f_name);
sprintf(line, "%-9s %s", keyname, command->dsc_long);
{
try_resize_winmap(win, world.map.size.y, world.map.size.x);
uint16_t z = 0;
- uint8_t x, y;
+ uint16_t x, y;
for (y = 0; y < world.map.size.y; y++)
{
for (x = 0; x < world.map.size.x; x++)
{
char * dsc_turn = "Turn: ";
char * dsc_hitpoints = "\nHitpoints: ";
- char * dsc_score = "\nScore: ";
- uint16_t maxl = strlen(dsc_turn) + strlen(dsc_hitpoints) + strlen(dsc_score)
- + 5 + 3 + 5; /* Max strlens of strings of numbers to use. */
+ uint16_t maxl = strlen(dsc_turn) + 5 + strlen(dsc_hitpoints) + 3;
char text[maxl + 1];
- sprintf(text, "%s%d%s%d%s%d",
- dsc_turn, world.turn,
- dsc_hitpoints, world.player_lifepoints,
- dsc_score, world.player_score);
+ sprintf(text, "%s%d%s%d",
+ dsc_turn, world.turn, dsc_hitpoints, world.player_lifepoints);
add_text_with_linebreaks(win, text);
}