diff --git a/examples/Makefile.am b/examples/Makefile.am index 47cef73..f50bf2f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -20,8 +20,8 @@ bin_PROGRAMS = caca-demo caca-spritedit caca_demo_SOURCES = demo.c caca_demo_LDADD = ../src/libcaca.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) -lm caca_demo_CPPFLAGS = -DDATADIR=\"$(pkgdatadir)\" -caca_demo_CFLAGS = `pkg-config --cflags gtk+-2.0` -caca_demo_LDFLAGS = `pkg-config --libs gtk+-2.0` +#caca_demo_CFLAGS = `pkg-config --cflags gtk+-2.0` +#caca_demo_LDFLAGS = `pkg-config --libs gtk+-2.0` caca_spritedit_SOURCES = spritedit.c caca_spritedit_LDADD = ../src/libcaca.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) -lm diff --git a/examples/demo.c b/examples/demo.c index 909cccd..8af1e27 100644 --- a/examples/demo.c +++ b/examples/demo.c @@ -27,8 +27,10 @@ #include #include +#if 0 #include #include +#endif #include "caca.h" @@ -43,16 +45,20 @@ static void demo_boxes(void); static void demo_ellipses(void); static void demo_triangles(void); static void demo_sprites(void); +#if 0 static void demo_blit(void); +#endif int bounds = 0; int outline = 0; int dithering = 0; struct caca_sprite *sprite = NULL; +#if 0 GdkPixbuf *pixbuf; char *pixels; int bufx, bufy, bufpitch; +#endif int main(int argc, char **argv) { @@ -73,6 +79,7 @@ int main(int argc, char **argv) if(!sprite) sprite = caca_load_sprite("examples/caca.txt"); +#if 0 gdk_init (&argc, &argv); //pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/gally4.jpeg", NULL); //pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/badge1.jpeg", NULL); @@ -95,6 +102,7 @@ if(!pixbuf) return -2; bufpitch = gdk_pixbuf_get_rowstride(pixbuf); fprintf(stderr, "bits: %i\n", gdk_pixbuf_get_bits_per_sample(pixbuf)); fprintf(stderr, "w %i, h %i, stride %i\n", bufx, bufy, bufpitch); +#endif /* Main menu */ display_menu(); @@ -165,10 +173,12 @@ fprintf(stderr, "w %i, h %i, stride %i\n", bufx, bufy, bufpitch); case 'S': demo = demo_sprites; break; +#if 0 case 'i': case 'I': demo = demo_blit; break; +#endif } if(demo) @@ -232,7 +242,9 @@ static void display_menu(void) caca_putstr(4, 12, "'5': ellipses"); caca_putstr(4, 13, "'s': sprites"); caca_putstr(4, 14, "'c': color"); +#if 0 caca_putstr(4, 15, "'i': image blit"); +#endif caca_putstr(4, 17, "settings:"); caca_printf(4, 18, "'o': outline: %s", @@ -490,11 +502,11 @@ static void demo_sprites(void) caca_rand(0, caca_get_height() - 1), sprite, 0); } +#if 0 static void demo_blit(void) { -#if 0 caca_blit(6, 4, caca_get_width() - 6, caca_get_height() - 4, pixels, bufx, bufy); -#endif } +#endif