From: Mike P. <ol...@us...> - 2002-03-27 09:45:01
|
Update of /cvsroot/u4x/fbxinit In directory usw-pr-cvs1:/tmp/cvs-serv4171/fbxinit Added Files: Makefile fbxinit.h graphics.c main.c progress.c Log Message: --- NEW FILE --- CFLAGS=-O2 LINKER=-lfbx -lfbx-gui -ltimer -ldl INCLUDES=-I./ all: clean gcc $(CFLAGS) $(INCLUDES) -c main.c gcc $(CFLAGS) $(INCLUDES) -c graphics.c gcc $(CFLAGS) $(INCLUDES) -c progress.c gcc $(CFLAGS) $(INCLUDES) $(LINKER) graphics.o progress.o main.o -o fbxinit clean: rm -f *.o rm -f fbxinit --- NEW FILE --- #include <unistd.h> #include <string.h> #include <strings.h> #include <time.h> #include <libfbx/libfbx.h> #include <libfbx/libfbx-gui.h> typedef struct fb_pipe_data { int has_data; char *data; } fb_pipe_data; void make_frame(fb_surface *bkgrnd); void print_msg(int mx, int my, char *string, fb_surface *surface); void do_timer(int time); --- NEW FILE --- #include <fbxinit.h> static int count = 0; void dummy_func(void *dummy) { int a; a=count; count++; } void print_msg(int mx, int my, char *string, fb_surface *surface) { fb_sputs(mx, my, string, surface); } void do_timer(int time) { timer_init(); timer_install_int(dummy_func, NULL, time); count=0; while (count < 1); timer_remove_int(dummy_func); timer_cleanup(); } void make_frame(fb_surface *bkgrnd) { bkgrnd = fb_load_ppm("./img/fb.ppm"); fb_draw_image(bkgrnd, fb_screen, 1, 1); } --- NEW FILE --- #include <libtimer/libtimer.h> #include <fbxinit.h> void output_frame(int ax, int ay, char *str, fb_surface *surf) { int count; count=0; while (count <= 5) { print_msg(ax, ay, str, surf); count++; } } int main(int argc, char *argv[]) { fb_surface *test; fb_init(); fb_handle_signals(); fb_cls(fb_screen); make_frame(test); output_frame(25, 50, "This is a test\n", test); do_timer(5000); // fb_cleanup(); return 0; } --- NEW FILE --- |