int main() { Console co; Console* t = &co; struct {int w, h;} dim; console_init(t); point reso = {800, 600}; console_init_graphics(&co, reso, FONT); console_getbounds(t, &dim.w, &dim.h); bmp4* r = bmp4_new(dim.w, dim.h); gen_pal(t, color3); float time = getpid(); int k; while((k = console_getkey_nb(t)) == CK_UNDEF || !(k & CK_MASK)) { plasma3(r, &time, sinvalc4, pal); draw(t, r); console_sleep(t, 30); } console_cleanup(t); printf("got %d, cols %d\n", k, cols); }
void irq_wait(void) { console_sleep(next_wake_time); }