#include #include #include //--- // Kernel-level API //--- void dascii_dstack_render(struct dshader_surface *surface, uint32_t *arg) { font_t *font = dfont_get(); uint32_t buff[6] = { arg[1], arg[2], 0, 0, arg[3], arg[4] }; dfont_char_render(surface, dfont_glyph_index(font, arg[0]), buff); } //--- // User-level API //--- /* dascii() : display one char */ void dascii(char n, int x, int y, int fg, int bg) { dstack_add_action( &DSTACK_CALL( &dascii_dstack_render, n, x, y, fg, bg ), NULL, NULL ); }