X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=src%2Fdraw_wins.c;h=45cb2bfd72cfb8294575e150dd668b1385d7618e;hb=64e1bc2a874308530b7b45c33ed5d37f34f5f8be;hp=3741e4965371afb6ae3a287fe908972ba15c7bcc;hpb=6d5705b43adbc2a4b522f971206007c9073c7144;p=plomrogue diff --git a/src/draw_wins.c b/src/draw_wins.c index 3741e49..45cb2bf 100644 --- a/src/draw_wins.c +++ b/src/draw_wins.c @@ -85,13 +85,13 @@ void draw_map_win (struct Win * win) { if (y < height_map_av && x < width_map_av) { mvwaddch(win->frame.curses_win, y, x, cells[z]); z++; } } } - if ( player->y >= map->offset_y && player->y < map->offset_y + win->frame.size.y - && player->x >= map->offset_x && player->x < map->offset_x + win->frame.size.x) - mvwaddch(win->frame.curses_win, player->y - map->offset_y, player->x - map->offset_x, '@'); + if ( player->pos.y >= map->offset_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) + mvwaddch(win->frame.curses_win, player->pos.y - map->offset_y, player->pos.x - map->offset_x, '@'); for (monster = world->monster; monster != 0; monster = monster->next) - if ( monster->y >= map->offset_y && monster->y < map->offset_y + win->frame.size.y - && monster->x >= map->offset_x && monster->x < map->offset_x + win->frame.size.x) - mvwaddch(win->frame.curses_win, monster->y - map->offset_y, monster->x - map->offset_x, monster->name); } + if ( monster->pos.y >= map->offset_y && monster->pos.y < map->offset_y + win->frame.size.y + && monster->pos.x >= map->offset_x && monster->pos.x < map->offset_x + win->frame.size.x) + mvwaddch(win->frame.curses_win, monster->pos.y - map->offset_y, monster->pos.x - map->offset_x, monster->name); } void draw_info_win (struct Win * win) { // Draw info window by appending win->data integer value to "Turn: " display.