- dsc_turn, world->turn,
- dsc_hitpoints, world->player->hitpoints,
- dsc_score, world->score);
- draw_with_linebreaks(win, text, 0);
+ dsc_turn, world.turn,
+ dsc_hitpoints, player->lifepoints,
+ dsc_score, world.score);
+ add_text_with_linebreaks(win, text);
+}
+
+
+
+extern void draw_win_inventory(struct Win * win)
+{
+ struct MapObj * player = get_player();
+ if (NULL == player->owns)
+ {
+ add_line(win, "(none)", 0, 0);
+ return;
+ }
+ win->center.y = world.inventory_select;
+ struct MapObj * owned = player->owns;
+ uint8_t y;
+ for (y = 0; NULL != owned; y++)
+ {
+ attr_t attri = 0;
+ if (y == world.inventory_select)
+ {
+ attri = A_REVERSE;
+ }
+ struct MapObjDef * mod = get_map_object_def(owned->type);
+ add_line(win, mod->name, attri, 0);
+ owned = owned->next;
+ }
+}
+
+
+
+extern void draw_win_available_keybindings(struct Win * win)
+{
+ char * title = "Active window's keybindings:";
+ struct KeyBinding * kb_p;
+ struct WinConf * wc = get_winconf_by_win(world.wmeta->active);
+ if (0 == wc->view)
+ {
+ kb_p = wc->kb.kbs;
+ }
+ else if (1 == wc->view)
+ {
+ kb_p = world.kb_wingeom.kbs;
+ }
+ else if (2 == wc->view)
+ {
+ kb_p = world.kb_winkeys.kbs;
+ }
+ uint16_t offset = draw_titled_keybinding_list(title, win, 0, kb_p);
+ add_line(win, " ", 0, 0);
+ struct KeyBinding * kbs_glo = world.kb_global.kbs;
+ draw_titled_keybinding_list("Global keybindings", win, offset + 1, kbs_glo);