Ignore:
Timestamp:
Mar 23, 2006, 3:07:32 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Made cucul_putchar32() an internal-only function.
  • Changed the line, box, ellipsis etc. prototypes so that they use an UTF-8 string instead of a single character as their last argument.
Location:
libcaca/trunk/test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/demo.c

    r677 r678  
    242242    j = 15 + sin(0.03*i) * 8;
    243243    cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLACK);
    244     cucul_fill_ellipse(qq, xo, yo, j, j / 2, '#');
     244    cucul_fill_ellipse(qq, xo, yo, j, j / 2, "#");
    245245    cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK);
    246     cucul_draw_ellipse(qq, xo, yo, j, j / 2, '#');
     246    cucul_draw_ellipse(qq, xo, yo, j, j / 2, "#");
    247247
    248248    /* Draw the pyramid */
     
    260260
    261261    cucul_set_color(qq, CUCUL_COLOR_GREEN, CUCUL_COLOR_BLACK);
    262     cucul_fill_triangle(qq, xo, yo, xb, yb, xa, ya, '%');
     262    cucul_fill_triangle(qq, xo, yo, xb, yb, xa, ya, "%");
    263263    cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK);
    264264    cucul_draw_thin_triangle(qq, xo, yo, xb, yb, xa, ya);
    265265
    266266    cucul_set_color(qq, CUCUL_COLOR_RED, CUCUL_COLOR_BLACK);
    267     cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, '#');
     267    cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, "#");
    268268    cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK);
    269269    cucul_draw_thin_triangle(qq, xa, ya, xb, yb, xc, yc);
    270270
    271271    cucul_set_color(qq, CUCUL_COLOR_BLUE, CUCUL_COLOR_BLACK);
    272     cucul_fill_triangle(qq, xo, yo, xb, yb, xc, yc, '%');
     272    cucul_fill_triangle(qq, xo, yo, xb, yb, xc, yc, "%");
    273273    cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK);
    274274    cucul_draw_thin_triangle(qq, xo, yo, xb, yb, xc, yc);
     
    374374        cucul_draw_thin_line(qq, xa, ya, xb, yb);
    375375    else
    376         cucul_draw_line(qq, xa, ya, xb, yb, '#');
     376        cucul_draw_line(qq, xa, ya, xb, yb, "#");
    377377}
    378378
     
    395395
    396396    cucul_set_color(qq, cucul_rand(0, 15), cucul_rand(0, 15));
    397     cucul_fill_box(qq, xa, ya, xb, yb, '#');
     397    cucul_fill_box(qq, xa, ya, xb, yb, "#");
    398398
    399399    cucul_set_color(qq, cucul_rand(0, 15), CUCUL_COLOR_BLACK);
     
    401401        cucul_draw_thin_box(qq, xa, ya, xb, yb);
    402402    else if(outline == 1)
    403         cucul_draw_box(qq, xa, ya, xb, yb, '#');
     403        cucul_draw_box(qq, xa, ya, xb, yb, "#");
    404404}
    405405
     
    426426
    427427    cucul_set_color(qq, cucul_rand(0, 15), cucul_rand(0, 15));
    428     cucul_fill_ellipse(qq, x, y, a, b, '#');
     428    cucul_fill_ellipse(qq, x, y, a, b, "#");
    429429
    430430    cucul_set_color(qq, cucul_rand(0, 15), CUCUL_COLOR_BLACK);
     
    432432        cucul_draw_thin_ellipse(qq, x, y, a, b);
    433433    else if(outline == 1)
    434         cucul_draw_ellipse(qq, x, y, a, b, '#');
     434        cucul_draw_ellipse(qq, x, y, a, b, "#");
    435435}
    436436
     
    456456
    457457    cucul_set_color(qq, cucul_rand(0, 15), cucul_rand(0, 15));
    458     cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, '#');
     458    cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, "#");
    459459
    460460    cucul_set_color(qq, cucul_rand(0, 15), CUCUL_COLOR_BLACK);
     
    462462        cucul_draw_thin_triangle(qq, xa, ya, xb, yb, xc, yc);
    463463    else if(outline == 1)
    464         cucul_draw_triangle(qq, xa, ya, xb, yb, xc, yc, '#');
     464        cucul_draw_triangle(qq, xa, ya, xb, yb, xc, yc, "#");
    465465}
    466466
  • libcaca/trunk/test/event.c

    r677 r678  
    4141
    4242    cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
    43     cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, ' ');
     43    cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, " ");
    4444
    45     cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, ' ');
     45    cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, " ");
    4646    cucul_putstr(qq, 0, h, "type \"quit\" to exit");
    4747
     
    8585        /* Print current event */
    8686        cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
    87         cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, ' ');
     87        cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, " ");
    8888        print_event(0, 0, events[0]);
    8989
    90         cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, ' ');
     90        cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, " ");
    9191        cucul_printf(qq, 0, h, "type \"quit\" to exit: %s", quit_string[quit]);
    9292
  • libcaca/trunk/test/export.c

    r677 r678  
    9292
    9393    cucul_set_color(qq, CUCUL_COLOR_BLACK, CUCUL_COLOR_WHITE);
    94     cucul_fill_ellipse(qq, WIDTH / 2, HEIGHT / 2, WIDTH / 4, HEIGHT / 4, ' ');
     94    cucul_fill_ellipse(qq, WIDTH / 2, HEIGHT / 2, WIDTH / 4, HEIGHT / 4, " ");
    9595    cucul_putstr(qq, WIDTH / 2 - 5, HEIGHT / 2 - 2, "(\") \\o/ <&>");
    9696    cucul_putstr(qq, WIDTH / 2 - 7, HEIGHT / 2 + 2, "äβç ░▒▓█▓▒░ ΔЗҒ");
  • libcaca/trunk/test/spritedit.c

    r677 r678  
    101101        yb = ya + 1 + cucul_get_sprite_height(qq, sprite, frame);
    102102        cucul_set_color(qq, CUCUL_COLOR_BLACK, CUCUL_COLOR_BLACK);
    103         cucul_fill_box(qq, 57 + xa, 10 + ya, 57 + xb, 10 + yb, ' ');
     103        cucul_fill_box(qq, 57 + xa, 10 + ya, 57 + xb, 10 + yb, " ");
    104104        cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
    105105        cucul_draw_thin_box(qq, 57 + xa, 10 + ya, 57 + xb, 10 + yb);
Note: See TracChangeset for help on using the changeset viewer.