aboutsummaryrefslogtreecommitdiff
path: root/src/text.c
blob: 4ec4c5459a3576f4cdaa839e064e73ed6fba5215 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdint.h>

#include "vga.h"
#include "data.h"

void put_text(uint16_t x, uint16_t y, const char *text, uint8_t color)
{
    Rect dst = { x, y, 8, 8};

    while (*text)
    {
        blit_c(binary_font_start + ((*text++ - ' ') << 6), &dst, color);
        dst.x += 8;
    }
}