X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fdraw_wins.c;h=2b04ff4e93f6f2a6c4a7e8915e284305f9fe20b6;hb=8e38bb5605a46afd6398b69c63c935aa5dc83660;hp=89a3c63443f1b11b75a9c77000af79f66729d27f;hpb=adce487b47febb1d63e6ab6f50388e332c42ea91;p=plomrogue diff --git a/src/draw_wins.c b/src/draw_wins.c index 89a3c63..2b04ff4 100644 --- a/src/draw_wins.c +++ b/src/draw_wins.c @@ -8,7 +8,7 @@ #include "windows.h" /* for structs Win, Frame, for draw_scroll_hint() */ #include "misc.h" /* for center_offset(), try_malloc() */ #include "keybindings.h" /* for struct KeyBinding, for get_name_to_keycode() */ -#include "map_objects.h" /* for structs MapObj, Player */ +#include "map_objects.h" /* for structs MapObj, Player, get_map_object_def() */ #include "map.h" /* for Map struct */ #include "main.h" /* for World struct */ #include "rexit.h" /* for err_exit() */ @@ -195,12 +195,12 @@ static void draw_map_objects(struct World * world, struct MapObj * start, for (o = start; o != 0; o = o->next) { if ( o->pos.y >= map->offset.y - && o->pos.y < map->offset.y + win->frame.size.y + && o->pos.y < map->offset.y + win->frame.size.y && o->pos.x >= map->offset.x - && o->pos.x < map->offset.x + win->frame.size.x) + && o->pos.x < map->offset.x + win->frame.size.x) { - d = get_map_obj_def (world, o->type); - c = d->mapchar; + d = get_map_object_def(world, o->type); + c = d->char_on_map; mvwaddch(win->frame.curses_win, o->pos.y - map->offset.y, o->pos.x - map->offset.x, c); } @@ -341,12 +341,11 @@ extern void draw_win_map(struct Win * win) } } } - draw_map_objects (world, (struct MapObj *) world->item, map, win); - draw_map_objects (world, (struct MapObj *) world->monster, map, win); + draw_map_objects(world, world->map_objs, map, win); if ( player->pos.y >= map->offset.y - && player->pos.y < map->offset.y + win->frame.size.y + && player->pos.y < map->offset.y + win->frame.size.y && player->pos.x >= map->offset.x - && player->pos.x < map->offset.x + win->frame.size.x) + && player->pos.x < map->offset.x + win->frame.size.x) { mvwaddch(win->frame.curses_win, player->pos.y - map->offset.y, player->pos.x - map->offset.x, @@ -374,6 +373,13 @@ extern void draw_win_info(struct Win * win) +extern void draw_win_inventory(struct Win * win) +{ + mvwaddstr(win->frame.curses_win, 0, 0, "(empty)"); +} + + + extern void draw_win_available_keybindings(struct Win * win) { struct World * world = (struct World *) win->data;