Ignore:
Timestamp:
Apr 18, 2006, 5:11:25 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Renamed caca_t into caca_display_t.
  • Renamed canvas handle variables from "c" to "cv". Eh ouais mon gros.
File:
1 edited

Legend:

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

    r810 r811  
    4040#define MAXTABLE (256*5)
    4141#ifdef LIBCACA
    42 static cucul_canvas_t *c;
    43 static caca_t *kk;
     42static cucul_canvas_t *cv;
     43static caca_display_t *dp;
    4444static int XSIZ, YSIZ;
    4545static cucul_dither_t *cucul_dither;
     
    101101
    102102#ifdef LIBCACA
    103   c = cucul_create(80, 32);
    104   if (!c)
     103  cv = cucul_create(80, 32);
     104  if (!cv)
    105105    {
    106106      printf ("Failed to initialize libcucul\n");
    107107      exit (1);
    108108    }
    109   kk = caca_attach(c);
    110   if (!kk)
     109  dp = caca_attach(cv);
     110  if (!dp)
    111111    {
    112112      printf ("Failed to initialize libcaca\n");
    113113      exit (1);
    114114    }
    115   caca_set_delay(kk, 10000);
    116   XSIZ = cucul_get_width(c) * 2;
    117   YSIZ = cucul_get_height(c) * 2 - 4;
     115  caca_set_delay(dp, 10000);
     116  XSIZ = cucul_get_width(cv) * 2;
     117  YSIZ = cucul_get_height(cv) * 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(c) * cucul_get_height(c) * sizeof(char));
    146   memset(bitmap, 0, 4 * cucul_get_width(c) * cucul_get_height(c));
     145  bitmap = malloc(4 * cucul_get_width(cv) * cucul_get_height(cv) * sizeof(char));
     146  memset(bitmap, 0, 4 * cucul_get_width(cv) * cucul_get_height(cv));
    147147#else
    148148  aa_hidecursor (context);
     
    153153{
    154154#ifdef LIBCACA
    155   caca_detach(kk);
    156   cucul_free(c);
     155  caca_detach(dp);
     156  cucul_free(cv);
    157157#else
    158158  aa_close (context);
     
    236236#ifdef LIBCACA
    237237paused:
    238   cucul_dither_bitmap(c, 0, 0,
    239                       cucul_get_width(c) - 1, cucul_get_height(c) - 1,
     238  cucul_dither_bitmap(cv, 0, 0,
     239                      cucul_get_width(cv) - 1, cucul_get_height(cv) - 1,
    240240                      cucul_dither, bitmap);
    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,
     241  cucul_set_color(cv, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
     242  cucul_putstr(cv, cucul_get_width(cv) - 30, cucul_get_height(cv) - 2,
    243243               " -=[ Powered by libcaca ]=- ");
    244244 
    245   caca_display(kk);
     245  caca_display(dp);
    246246  /*XSIZ = caca_get_width() * 2;
    247247  YSIZ = caca_get_height() * 2 - 4;*/
     
    267267#ifdef LIBCACA
    268268      caca_event_t ev;
    269       if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev, 0))
     269      if(caca_get_event(dp, CACA_EVENT_KEY_PRESS, &ev, 0))
    270270        {
    271271          switch(ev.data.key.ch)
Note: See TracChangeset for help on using the changeset viewer.