Ignore:
Timestamp:
Sep 18, 2006, 6:54:08 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Bring the tree back in sync with the new libcaca API.
File:
1 edited

Legend:

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

    r544 r1057  
    2727#include "common.h"
    2828
    29 struct cucul_sprite *ship_sprite;
     29cucul_canvas_t *ship_sprite;
    3030
    3131/* Init tunnel */
    3232player * create_player(game *g)
    3333{
     34    cucul_buffer_t *b;
     35
    3436    player *p = malloc(sizeof(player));
    3537    if(p == NULL)
     
    4547    p->dead = 0;
    4648
    47     ship_sprite = cucul_load_sprite(g->qq, "data/ship.txt");
     49    b = cucul_load_file("data/ship.caca");
     50    ship_sprite = cucul_import_canvas(b, "");
     51    cucul_free_buffer(b);
    4852
    4953    return p;
     
    6064        return;
    6165
    62     cucul_draw_sprite(g->qq, p->x, p->y, ship_sprite, 0);
     66    cucul_set_canvas_frame(ship_sprite, 0);
     67    cucul_blit(g->cv, p->x, p->y, ship_sprite, NULL);
    6368}
    6469
Note: See TracChangeset for help on using the changeset viewer.