@@ -27,11 +27,6 @@
#include <string.h>
#include <stdio.h>
#if 0
#include <gdk/gdk.h>
#include <gdk/gdkpixbuf.h>
#endif
#include "caca.h"
static void display_menu(void);
@@ -45,30 +40,19 @@ 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)
{
void (*demo)(void) = NULL;
int quit = 0;
if(caca_init())
{
return 1;
}
caca_set_delay(40000);
@@ -78,31 +62,8 @@ int main(int argc, char **argv)
sprite = caca_load_sprite("caca.txt");
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);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/union.png", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/pikachu.jpeg", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/gradient.png", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/beastie.png", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/stitch.jpg", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/caca.jpg", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/dranac.jpeg", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/artwork/aboire.png", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/web/sam.zoy.org/artwork/goret.png", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/lilkim02.jpg", NULL);
//pixbuf = gdk_pixbuf_new_from_file("/home/sam/etw.bmp", NULL);
pixbuf = gdk_pixbuf_new_from_file("/home/sam/pix/lena_std.png", NULL);
if(!pixbuf) return -2;
pixels = gdk_pixbuf_get_pixels(pixbuf);
bufx = gdk_pixbuf_get_width(pixbuf);
bufy = gdk_pixbuf_get_height(pixbuf);
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
if(!sprite)
return 1;
/* Main menu */
display_menu();
@@ -173,12 +134,6 @@ 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)
@@ -242,9 +197,6 @@ 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",
@@ -502,11 +454,3 @@ static void demo_sprites(void)
caca_rand(0, caca_get_height() - 1), sprite, 0);
}
#if 0
static void demo_blit(void)
{
caca_blit(6, 4, caca_get_width() - 6, caca_get_height() - 4,
pixels, bufx, bufy);
}
#endif