nuclear@0: #include nuclear@2: #include "fblib.h" nuclear@0: nuclear@0: static void display(); nuclear@0: nuclear@0: int main(int argc, char **argv) nuclear@0: { nuclear@2: if(fb_init(320, 240, 8) == -1) { nuclear@0: return 1; nuclear@0: } nuclear@2: fb_set_palette_entry(1, 255, 0, 0); nuclear@0: nuclear@0: for(;;) { nuclear@2: if(fb_process_events() == -1) { nuclear@2: break; nuclear@0: } nuclear@0: display(); nuclear@0: } nuclear@0: nuclear@0: done: nuclear@2: fb_shutdown(); nuclear@0: return 0; nuclear@0: } nuclear@0: nuclear@0: void display() nuclear@0: { nuclear@2: int width = fb_get_width(); nuclear@2: int height = fb_get_height(); nuclear@2: unsigned char *pixels = (unsigned char*)fb_begin_frame(); nuclear@0: nuclear@2: for(int i=0; i