void zone_draw_tile(zone * z, int x, int y) { if (z->tiles[x][y].show == 1 || config.show_all || (z->tiles[x][y].show && z->tiles[x][y].impassible) ) { disp_put(x, y, z->tiles[x][y].show_ch); } else { disp_put(x, y, ' '); } }
void zone_draw(zone * z) { int i, j; wclear(dispscr); for (i = 0; i < z->width; i++) { for (j = 0; j < z->height; j++) { disp_put(i, j, z->tiles[i][j].ch); } } wrefresh(dispscr); }
void zone_update(zone * z, int x, int y) { int i; int weight = -1; item * it; chtype ch = '.'; if (z->tiles[x][y].crtr == NULL) { for (i = 0; i < z->tiles[x][y].inv->size; i++) { it = z->tiles[x][y].inv->itms[i]; if (it != NULL && it->f->weight > weight) { weight = it->f->weight; ch = it->f->ch; } } } else { ch = z->tiles[x][y].crtr->f->ch; } z->tiles[x][y].ch = ch; disp_put(x, y, ch); }