Ignore:
Timestamp:
Oct 18, 2008, 11:42:24 PM (11 years ago)
Author:
Sam Hocevar
Message:

Port ttyvaders to the unified libcaca 0.99.beta15 API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/src/tunnel.c

    r1460 r2990  
    7070    char c;
    7171
    72     cucul_set_color(g->cv, CUCUL_COLOR_RED, CUCUL_COLOR_BLACK);
     72    caca_set_color(g->cv, CACA_COLOR_RED, CACA_COLOR_BLACK);
    7373
    7474    /* Left border */
     
    8383            c = (i == 0 || t->left[i] > t->left[i-1]) ? '\\' : '<';
    8484
    85         cucul_putchar(g->cv, t->left[i] + 1, i, c);
     85        caca_putchar(g->cv, t->left[i] + 1, i, c);
    8686
    8787        if(i + 1 < g->h)
    8888            for(j = 1; j < t->left[i+1] - t->left[i]; j++)
    89                 cucul_putchar(g->cv, t->left[i] + j + 1, i, '_');
     89                caca_putchar(g->cv, t->left[i] + j + 1, i, '_');
    9090    }
    9191
     
    103103        if(i + 1 < g->h)
    104104            for(j = 1; j < t->right[i] - t->right[i+1]; j++)
    105                 cucul_putchar(g->cv, t->right[i+1] + j - 1, i, '_');
     105                caca_putchar(g->cv, t->right[i+1] + j - 1, i, '_');
    106106
    107         cucul_putchar(g->cv, t->right[i] - 1, i, c);
     107        caca_putchar(g->cv, t->right[i] - 1, i, c);
    108108    }
    109109
    110     cucul_set_color(g->cv, CUCUL_COLOR_LIGHTRED, CUCUL_COLOR_RED);
     110    caca_set_color(g->cv, CACA_COLOR_LIGHTRED, CACA_COLOR_RED);
    111111
    112112    /* Left concrete */
    113113    for(i = 0; i < g->h ; i++)
    114114        for(j = 0 ; j <= t->left[i]; j++)
    115             cucul_putchar(g->cv, j, i, '#');
     115            caca_putchar(g->cv, j, i, '#');
    116116
    117117    /* Right concrete */
    118118    for(i = 0; i < g->h ; i++)
    119119        for(j = t->right[i] ; j < g->w ; j++)
    120             cucul_putchar(g->cv, j, i, '#');
     120            caca_putchar(g->cv, j, i, '#');
    121121}
    122122
     
    134134
    135135    /* Generate new values */
    136     i = delta[cucul_rand(0,5)];
    137     j = delta[cucul_rand(0,5)];
     136    i = delta[caca_rand(0,5)];
     137    j = delta[caca_rand(0,5)];
    138138
    139139    /* Check in which direction we need to alter tunnel */
Note: See TracChangeset for help on using the changeset viewer.