- mvwaddstr(win->frame.curses_win, 0, 0, "(empty)");
+ struct World * world = (struct World *) win->data;
+ struct MapObj * player = get_player(world);
+ if (NULL == player->owns)
+ {
+ draw_line(win, 0, "(none)", 0, 0);
+ return;
+ }
+ win->center.y = world->inventory_select;
+ struct MapObj * owned = player->owns;
+ uint8_t y;
+ for (y = 0; NULL != owned; y++)
+ {
+ wresize(win->frame.curses_win, y + 1, getmaxx(win->frame.curses_win));
+ attr_t attri = 0;
+ if (y == world->inventory_select)
+ {
+ attri = A_REVERSE;
+ }
+ struct MapObjDef * mod = get_map_object_def(world, owned->type);
+ draw_line(win, y, mod->name, attri, 0);
+ owned = owned->next;
+ }