Ignore:
Timestamp:
Apr 18, 2006, 2:59:07 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Renamed cucul_t into cucul_canvas_t. Eh ouais mon con.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/aafire.c

    r777 r810  
    4040#define MAXTABLE (256*5)
    4141#ifdef LIBCACA
    42 static cucul_t *qq;
     42static cucul_canvas_t *c;
    4343static caca_t *kk;
    4444static int XSIZ, YSIZ;
     
    101101
    102102#ifdef LIBCACA
    103   qq = cucul_create(80, 32);
    104   if (!qq)
     103  c = cucul_create(80, 32);
     104  if (!c)
    105105    {
    106106      printf ("Failed to initialize libcucul\n");
    107107      exit (1);
    108108    }
    109   kk = caca_attach(qq);
     109  kk = caca_attach(c);
    110110  if (!kk)
    111111    {
     
    114114    }
    115115  caca_set_delay(kk, 10000);
    116   XSIZ = cucul_get_width(qq) * 2;
    117   YSIZ = cucul_get_height(qq) * 2 - 4;
     116  XSIZ = cucul_get_width(c) * 2;
     117  YSIZ = cucul_get_height(c) * 2 - 4;
    118118#else
    119119  context = aa_autoinit (&aa_defparams);
     
    143143  cucul_dither = cucul_create_dither(8, XSIZ, YSIZ - 2, XSIZ, 0, 0, 0, 0);
    144144  cucul_set_dither_palette(cucul_dither, r, g, b, a);
    145   bitmap = malloc(4 * cucul_get_width(qq) * cucul_get_height(qq) * sizeof(char));
    146   memset(bitmap, 0, 4 * cucul_get_width(qq) * cucul_get_height(qq));
     145  bitmap = malloc(4 * cucul_get_width(c) * cucul_get_height(c) * sizeof(char));
     146  memset(bitmap, 0, 4 * cucul_get_width(c) * cucul_get_height(c));
    147147#else
    148148  aa_hidecursor (context);
     
    154154#ifdef LIBCACA
    155155  caca_detach(kk);
    156   cucul_free(qq);
     156  cucul_free(c);
    157157#else
    158158  aa_close (context);
     
    236236#ifdef LIBCACA
    237237paused:
    238   cucul_dither_bitmap(qq, 0, 0,
    239                       cucul_get_width(qq) - 1, cucul_get_height(qq) - 1,
     238  cucul_dither_bitmap(c, 0, 0,
     239                      cucul_get_width(c) - 1, cucul_get_height(c) - 1,
    240240                      cucul_dither, bitmap);
    241   cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
    242   cucul_putstr(qq, cucul_get_width(qq) - 30, cucul_get_height(qq) - 2,
     241  cucul_set_color(c, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
     242  cucul_putstr(c, cucul_get_width(c) - 30, cucul_get_height(c) - 2,
    243243               " -=[ Powered by libcaca ]=- ");
    244244 
     
    269269      if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, 0))
    270270        {
    271           switch(ev.data.key.c)
     271          switch(ev.data.key.ch)
    272272            {
    273273                case CACA_KEY_ESCAPE: return;
Note: See TracChangeset for help on using the changeset viewer.