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

    r2990 r3423  
    2424void init_bonus(game *g, bonus *bo)
    2525{
    26     caca_buffer_t *b;
    2726    int i;
    2827
     
    3231    }
    3332
    34     b = caca_load_file("data/bonheart.caca");
    35     heart_sprite = caca_import_canvas(b, "");
    36     caca_free_buffer(b);
     33    heart_sprite = caca_create_canvas(0, 0);
     34    caca_import_file(heart_sprite, "data/bonheart.txt", "utf8");
    3735
    38     b = caca_load_file("data/bongem.caca");
    39     gem_sprite = caca_import_canvas(b, "");
    40     caca_free_buffer(b);
     36    gem_sprite = caca_create_canvas(0, 0);
     37    caca_import_file(gem_sprite, "data/bongem.txt", "utf8");
    4138}
    4239
     
    5047        {
    5148            case BONUS_GREEN:
    52                 caca_set_canvas_frame(gem_sprite, (bo->n[i]/2 % 3) ? 0 : 1);
     49                caca_set_frame(gem_sprite, (bo->n[i]/2 % 3) ? 0 : 1);
    5350                caca_blit(g->cv, bo->x[i], bo->y[i], gem_sprite, NULL);
    5451                break;
    5552            case BONUS_LIFE:
    56                 caca_set_canvas_frame(heart_sprite, (bo->n[i] % 3) ? 0 : 1);
     53                caca_set_frame(heart_sprite, (bo->n[i] % 3) ? 0 : 1);
    5754                caca_blit(g->cv, bo->x[i], bo->y[i], heart_sprite, NULL);
    5855                break;
Note: See TracChangeset for help on using the changeset viewer.