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

Legend:

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

    r194 r544  
    2727#include "common.h"
    2828
    29 struct caca_sprite *foo_sprite;
    30 struct caca_sprite *bar_sprite;
    31 struct caca_sprite *baz_sprite;
     29struct cucul_sprite *foo_sprite;
     30struct cucul_sprite *bar_sprite;
     31struct cucul_sprite *baz_sprite;
    3232
    3333void init_aliens(game *g, aliens *al)
     
    4040    }
    4141
    42     foo_sprite = caca_load_sprite("data/foofight.txt");
    43     bar_sprite = caca_load_sprite("data/barfight.txt");
    44     baz_sprite = caca_load_sprite("data/bazfight.txt");
     42    foo_sprite = cucul_load_sprite(g->qq, "data/foofight.txt");
     43    bar_sprite = cucul_load_sprite(g->qq, "data/barfight.txt");
     44    baz_sprite = cucul_load_sprite(g->qq, "data/bazfight.txt");
    4545}
    4646
     
    5454        {
    5555            case ALIEN_FOO:
    56                 caca_draw_sprite(al->x[i], al->y[i], foo_sprite, al->img[i] % 5);
     56                cucul_draw_sprite(g->qq, al->x[i], al->y[i], foo_sprite, al->img[i] % 5);
    5757                break;
    5858            case ALIEN_BAR:
    59                 caca_draw_sprite(al->x[i], al->y[i], bar_sprite, al->img[i] % 2);
     59                cucul_draw_sprite(g->qq, al->x[i], al->y[i], bar_sprite, al->img[i] % 2);
    6060                break;
    6161            case ALIEN_BAZ:
    62                 caca_draw_sprite(al->x[i], al->y[i], baz_sprite, al->img[i] % 4);
     62                cucul_draw_sprite(g->qq, al->x[i], al->y[i], baz_sprite, al->img[i] % 4);
    6363                break;
    6464            case ALIEN_NONE:
     
    7979            add_explosion(g, g->ex, al->x[i], al->y[i], 0, 0, EXPLOSION_MEDIUM);
    8080            al->type[i] = ALIEN_NONE;
    81             add_bonus(g, g->bo, al->x[i], al->y[i], caca_rand(0,4) ? BONUS_GREEN : BONUS_LIFE);
     81            add_bonus(g, g->bo, al->x[i], al->y[i], cucul_rand(0,4) ? BONUS_GREEN : BONUS_LIFE);
    8282        }
    8383
Note: See TracChangeset for help on using the changeset viewer.