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/bonus.c

    r1460 r2990  
    1919#include "common.h"
    2020
    21 cucul_canvas_t *heart_sprite;
    22 cucul_canvas_t *gem_sprite;
     21caca_canvas_t *heart_sprite;
     22caca_canvas_t *gem_sprite;
    2323
    2424void init_bonus(game *g, bonus *bo)
    2525{
    26     cucul_buffer_t *b;
     26    caca_buffer_t *b;
    2727    int i;
    2828
     
    3232    }
    3333
    34     b = cucul_load_file("data/bonheart.caca");
    35     heart_sprite = cucul_import_canvas(b, "");
    36     cucul_free_buffer(b);
     34    b = caca_load_file("data/bonheart.caca");
     35    heart_sprite = caca_import_canvas(b, "");
     36    caca_free_buffer(b);
    3737
    38     b = cucul_load_file("data/bongem.caca");
    39     gem_sprite = cucul_import_canvas(b, "");
    40     cucul_free_buffer(b);
     38    b = caca_load_file("data/bongem.caca");
     39    gem_sprite = caca_import_canvas(b, "");
     40    caca_free_buffer(b);
    4141}
    4242
     
    5050        {
    5151            case BONUS_GREEN:
    52                 cucul_set_canvas_frame(gem_sprite, (bo->n[i]/2 % 3) ? 0 : 1);
    53                 cucul_blit(g->cv, bo->x[i], bo->y[i], gem_sprite, NULL);
     52                caca_set_canvas_frame(gem_sprite, (bo->n[i]/2 % 3) ? 0 : 1);
     53                caca_blit(g->cv, bo->x[i], bo->y[i], gem_sprite, NULL);
    5454                break;
    5555            case BONUS_LIFE:
    56                 cucul_set_canvas_frame(heart_sprite, (bo->n[i] % 3) ? 0 : 1);
    57                 cucul_blit(g->cv, bo->x[i], bo->y[i], heart_sprite, NULL);
     56                caca_set_canvas_frame(heart_sprite, (bo->n[i] % 3) ? 0 : 1);
     57                caca_blit(g->cv, bo->x[i], bo->y[i], heart_sprite, NULL);
    5858                break;
    5959            case BONUS_NONE:
Note: See TracChangeset for help on using the changeset viewer.