Beispiel #1
0
int main(int argc, char** argv){
    if(argc < 2){
        printf("Usage: ckb (solid | gradient | ripple | wave | random) [foreground] [background]\n");
        exit(0);
    }
    void (*mainloop)(float,float,float,float,float,float);
    if(!strcmp(argv[1], "solid"))
        mainloop = mainloop_solid;
    else if(!strcmp(argv[1], "gradient"))
        mainloop = mainloop_gradient;
    else if(!strcmp(argv[1], "ripple"))
        mainloop = mainloop_ripple;
    else if(!strcmp(argv[1], "wave"))
        mainloop = mainloop_wave;
    else if(!strcmp(argv[1], "random"))
        mainloop = mainloop_random;
    else {
        printf("Usage: ckb (solid | gradient | ripple | wave | random) [foreground] [background]\n");
        exit(0);
    }

    output = fopen("/dev/input/ckb1/led", "w");
    int foreground = 0xffffff, background = 0xffffff;
    if(argc >= 3)
        foreground = background = readcolor(argv[2]);
    if(argc >= 4)
        background = readcolor(argv[3]);
    float fr = (foreground >> 16) & 0xff, fg = (foreground >> 8) & 0xff, fb = foreground & 0xff;
    float br = (background >> 16) & 0xff, bg = (background >> 8) & 0xff, bb = background & 0xff;
    while(1){
        mainloop(fr, fg, fb, br, bg, bb);
        usleep(16667);
    }
    return 0;
}
Beispiel #2
0
int main(){

	int* image1 = readcolor();

	int* image2 = readcolor();

	free(image1);
	//free(image2);
	printf("%d%d",image1,image2);

}
Beispiel #3
0
CString DLrtfhtml::beginChange(CString rtfPath)
{
	openfile(rtfPath);
	readfontgroup();
	readcolor();
	getDefaultProperty();
	return toHtmlTag();
}
Beispiel #4
0
void readshadow()
{
	readint(&pla_num);
	int i;
	for (i = 0;i < pla_num;++i)
	{
		proj_list[i].plan=readplane();
		readpolygon(&proj_list[i].proj);
		proj_list[i].c=readcolor();
	}
}