Ignore:
Timestamp:
Apr 28, 2009, 6:55:01 PM (11 years ago)
Author:
Sam Hocevar
Message:
  • Toying around with the old ttyvaders version.
Location:
ttyvaders/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk

    • Property svn:ignore
      •  

        old new  
        1313*-stamp
        1414INSTALL
         15*.ncb
         16*.suo
         17*.vcproj.*.user
  • ttyvaders/trunk/src/aliens.c

    r2990 r3423  
    2525void init_aliens(game *g, aliens *al)
    2626{
    27     caca_buffer_t *b;
    2827    int i;
    2928
     
    3332    }
    3433
    35     b = caca_load_file("data/foofight.caca");
    36     foo_sprite = caca_import_canvas(b, "");
    37     caca_free_buffer(b);
     34    foo_sprite = caca_create_canvas(0, 0);
     35    caca_import_file(foo_sprite, "data/foofight.txt", "utf8");
    3836
    39     b = caca_load_file("data/barfight.caca");
    40     bar_sprite = caca_import_canvas(b, "");
    41     caca_free_buffer(b);
     37    bar_sprite = caca_create_canvas(0, 0);
     38    caca_import_file(bar_sprite, "data/barfight.txt", "utf8");
    4239
    43     b = caca_load_file("data/bazfight.caca");
    44     baz_sprite = caca_import_canvas(b, "");
    45     caca_free_buffer(b);
     40    baz_sprite = caca_create_canvas(0, 0);
     41    caca_import_file(baz_sprite, "data/bazfight.txt", "utf8");
    4642}
    4743
     
    5551        {
    5652            case ALIEN_FOO:
    57                 caca_set_canvas_frame(foo_sprite, al->img[i] % 5);
     53                caca_set_frame(foo_sprite, al->img[i] % 5);
    5854                caca_blit(g->cv, al->x[i], al->y[i], foo_sprite, NULL);
    5955                break;
    6056            case ALIEN_BAR:
    61                 caca_set_canvas_frame(bar_sprite, al->img[i] % 2);
     57                caca_set_frame(bar_sprite, al->img[i] % 2);
    6258                caca_blit(g->cv, al->x[i], al->y[i], bar_sprite, NULL);
    6359                break;
    6460            case ALIEN_BAZ:
    65                 caca_set_canvas_frame(baz_sprite, al->img[i] % 4);
     61                caca_set_frame(baz_sprite, al->img[i] % 4);
    6662                caca_blit(g->cv, al->x[i], al->y[i], baz_sprite, NULL);
    6763                break;
Note: See TracChangeset for help on using the changeset viewer.