/** main subroutine for checking out things. */ void anagram(list_t* lst){ tuple_t pword[27]; clear_chars(pword ,sizeof(pword)); }
void draw_tiles(term_data* td, int x, int y, int n, const byte *ap, const char *cp, const byte *tap, const char *tcp) { clear_chars(td, x, y, n); //color_chars(td, x, y, n, TERM_SLATE, false); for (int i = 0; i < n; i++) { /* Draw the terrain, scaled to the font size */ draw_tile(td, x + i, y, tcp[i] & 0x7f, tap[i] & 0x7f, false); /* If foreground is the same as background, we're done */ if ((tap[i] == ap[i]) && (tcp[i] == cp[i])) continue; /* Draw the foreground tile, scaled to the font size */ draw_tile(td, x + i, y, cp[i] & 0x7f, ap[i] & 0x7f, true); } }
void write_chars(term_data* td, int x, int y, int n, byte a, const char* text) { PangoLayout *layout; PangoFontDescription* font; cairo_t *cr; clear_chars(td, x, y, n); cr = cairo_create(td->surface); set_foreground_color(cr, a); layout = pango_cairo_create_layout(cr); font = pango_font_description_from_string(td->font.name); pango_layout_set_font_description (layout, font); pango_layout_set_text (layout, text, n); cairo_move_to(cr, x * td->font.w, y * td->font.h); pango_cairo_show_layout (cr, layout); g_object_unref (layout); pango_font_description_free(font); cairo_destroy(cr); }