summary refs log tree commit diff
path: root/bin/color.c
blob: 75118226ab1149b32a64c49e1d5fcc4990fedb17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdint.h>

static uint32_t color;

void init() {
}

void draw(uint32_t *buf, uint32_t xres, uint32_t yres) {
    for (uint32_t i = 0; i < xres * yres; ++i) {
        buf[i] = color;
    }
}

void input(char c) {
    color = color << 4 | (c & 0xF);
}