#include "render.h" void render_DrawLen(pen_t *pen, char *buf, char *text, int len) { int mask = pen->bold | (pen->italic << 1) | (pen->underline << 2) | (pen->strike << 3); drawText(buf, pen->pos.x, pen->pos.y, text, len, pen->color + (0xFF << 24), ((mask * 0x100 + 0x03) * 0x100 + (int)(pen->font_size.x * pen->mul)) * 0x100 + (int)(pen->font_size.y * pen->mul)); pen->pos.x += (int)(pen->font_size.x * pen->mul) * len; } void render_DrawText(pen_t *pen, char *buf, char *text) { render_DrawLen(pen, buf, text, countUTF8Z(text, -1)); } void render_NewLn(pen_t *pen) { pen->pos.x = 0; pen->pos.y += (int)(pen->font_size.y * pen->mul); }