Ignore:
Timestamp:
Sep 27, 2008, 3:12:46 PM (11 years ago)
Author:
Sam Hocevar
Message:

Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/examples/blit.c

    r2299 r2821  
    2020#endif
    2121
    22 #include "cucul.h"
    2322#include "caca.h"
    2423
     
    4140int main(int argc, char *argv[])
    4241{
    43     cucul_canvas_t *cv, *sprite;
     42    caca_canvas_t *cv, *sprite;
    4443    caca_display_t *dp;
    4544
    46     cv = cucul_create_canvas(80, 24);
     45    cv = caca_create_canvas(80, 24);
    4746    if(cv == NULL)
    4847    {
     
    5857    }
    5958
    60     sprite = cucul_create_canvas(0, 0);
    61     cucul_set_color_ansi(sprite, CUCUL_LIGHTRED, CUCUL_BLACK);
    62     cucul_import_memory(sprite, pig, strlen(pig), "text");
    63     cucul_set_canvas_handle(sprite, cucul_get_canvas_width(sprite) / 2,
    64                                     cucul_get_canvas_height(sprite) / 2);
     59    sprite = caca_create_canvas(0, 0);
     60    caca_set_color_ansi(sprite, CACA_LIGHTRED, CACA_BLACK);
     61    caca_import_memory(sprite, pig, strlen(pig), "text");
     62    caca_set_canvas_handle(sprite, caca_get_canvas_width(sprite) / 2,
     63                                    caca_get_canvas_height(sprite) / 2);
    6564
    66     cucul_set_color_ansi(cv, CUCUL_WHITE, CUCUL_BLUE);
    67     cucul_put_str(cv, 0, 0, "Centered sprite");
     65    caca_set_color_ansi(cv, CACA_WHITE, CACA_BLUE);
     66    caca_put_str(cv, 0, 0, "Centered sprite");
    6867
    69     cucul_blit(cv, cucul_get_canvas_width(cv) / 2,
    70                    cucul_get_canvas_height(cv) / 2, sprite, NULL);
     68    caca_blit(cv, caca_get_canvas_width(cv) / 2,
     69                   caca_get_canvas_height(cv) / 2, sprite, NULL);
    7170
    7271    caca_refresh_display(dp);
     
    7574
    7675    caca_free_display(dp);
    77     cucul_free_canvas(sprite);
    78     cucul_free_canvas(cv);
     76    caca_free_canvas(sprite);
     77    caca_free_canvas(cv);
    7978
    8079    return 0;
Note: See TracChangeset for help on using the changeset viewer.