Ignore:
Timestamp:
Sep 17, 2006, 2:32:23 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Cosmetic changes to cacademo.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/cacademo.c

    r1040 r1041  
    3232enum action { PREPARE, INIT, UPDATE, RENDER, FREE };
    3333
    34 void do_transition(cucul_canvas_t *mask, int transition, float time);
     34void transition(cucul_canvas_t *mask, int tmode, float time);
    3535void plasma(enum action, cucul_canvas_t *);
    3636void metaballs(enum action, cucul_canvas_t *);
     
    7474    int demo, next = -1, pause = 0, next_transition = DEMO_FRAMES;
    7575    unsigned int i;
    76     int transition = cucul_rand(0, TRANSITION_COUNT);
     76    int tmode = cucul_rand(0, TRANSITION_COUNT);
    7777
    7878    /* Set up two canvases, a mask, and attach a display to the front one */
     
    150150            next = -1;
    151151            next_transition = frame + DEMO_FRAMES;
     152            tmode = cucul_rand(0, TRANSITION_COUNT);
    152153        }
    153154
     
    167168            cucul_clear_canvas(mask);
    168169            cucul_set_color(mask, CUCUL_COLOR_WHITE, CUCUL_COLOR_WHITE);
    169             do_transition(mask,
    170                           transition,
     170            transition(mask, tmode,
    171171                          (float)(frame - next_transition) / TRANSITION_FRAMES * 3.0f / 4.0f);
    172172            cucul_blit(frontcv, 0, 0, backcv, mask);
    173         } else {
    174             transition = cucul_rand(0, TRANSITION_COUNT);
    175173        }
    176174
     
    195193
    196194/* Transitions */
    197 void do_transition(cucul_canvas_t *mask, int transition, float time)
     195void transition(cucul_canvas_t *mask, int tmode, float time)
    198196{
    199197    static float const star[] =
     
    219217    unsigned int i;
    220218
    221     switch(transition)
     219    switch(tmode)
    222220    {
    223221        case TRANSITION_STAR:
Note: See TracChangeset for help on using the changeset viewer.