Ignore:
Timestamp:
Mar 7, 2006, 3:25:20 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Ported to new libcaca/libcucul API.
File:
1 edited

Legend:

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

    r186 r544  
    2727#include "common.h"
    2828
    29 struct caca_sprite *medium_sprite;
    30 struct caca_sprite *small_sprite;
     29struct cucul_sprite *medium_sprite;
     30struct cucul_sprite *small_sprite;
    3131
    3232void init_explosions(game *g, explosions *ex)
     
    3939    }
    4040
    41     medium_sprite = caca_load_sprite("data/xplmed.txt");
    42     small_sprite = caca_load_sprite("data/xplsmall.txt");
     41    medium_sprite = cucul_load_sprite(g->qq, "data/xplmed.txt");
     42    small_sprite = cucul_load_sprite(g->qq, "data/xplsmall.txt");
    4343}
    4444
     
    7777    {
    7878#if 0
    79         caca_set_color(GREEN);
    80         caca_goto(ex->x[i] + 3, ex->y[i]);
    81         switch(caca_rand(0,2))
     79        cucul_set_fg_color(g->qq, CACA_COLOR_GREEN);
     80        cucul_goto(g->qq, ex->x[i] + 3, ex->y[i]);
     81        switch(cucul_rand(0,2))
    8282        {
    8383        case 0:
    84             caca_putchar('p');
    85             caca_putchar('i');
    86             caca_putchar('f');
     84            cucul_putchar(g->qq, 'p');
     85            cucul_putchar(g->qq, 'i');
     86            cucul_putchar(g->qq, 'f');
    8787            break;
    8888        case 1:
    89             caca_putchar('p');
    90             caca_putchar('a');
    91             caca_putchar('f');
     89            cucul_putchar(g->qq, 'p');
     90            cucul_putchar(g->qq, 'a');
     91            cucul_putchar(g->qq, 'f');
    9292            break;
    9393        case 2:
    94             caca_putchar('p');
    95             caca_putchar('o');
    96             caca_putchar('u');
    97             caca_putchar('f');
     94            cucul_putchar(g->qq, 'p');
     95            cucul_putchar(g->qq, 'o');
     96            cucul_putchar(g->qq, 'u');
     97            cucul_putchar(g->qq, 'f');
    9898            break;
    9999        }
    100         caca_putchar('!');
     100        cucul_putchar(g->qq, '!');
    101101#endif
    102102
     
    104104        {
    105105            case EXPLOSION_MEDIUM:
    106                 caca_draw_sprite(ex->x[i], ex->y[i], medium_sprite,
    107                                10 - ex->n[i]);
     106                cucul_draw_sprite(g->qq, ex->x[i], ex->y[i], medium_sprite,
     107                                  10 - ex->n[i]);
    108108                break;
    109109            case EXPLOSION_SMALL:
    110                 caca_draw_sprite(ex->x[i], ex->y[i], small_sprite,
    111                                6 - ex->n[i]);
     110                cucul_draw_sprite(g->qq, ex->x[i], ex->y[i], small_sprite,
     111                                  6 - ex->n[i]);
    112112                break;
    113113            case EXPLOSION_NONE:
Note: See TracChangeset for help on using the changeset viewer.