Changeset 320


Ignore:
Timestamp:
Jan 6, 2004, 5:31:27 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • examples/cacaball.c: + Crop the palette so that it looks a bit more like metaballs.
  • AUTHORS THANKS: + Credited Jylam and Jan Hubicka.
Location:
libcaca/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/AUTHORS

    r301 r320  
    22
    33Sam Hocevar <sam@zoy.org> - main programmer
     4Jean-Yves Lamoureux <jylam@lnxscene.org> - cacaball
    45
  • libcaca/trunk/THANKS

    r301 r320  
    11$Id$
    22
     3Jan Hubicka <hubicka@freesoft.cz> - aafire
    34Richard Zidlicky <rz@linux-m68k.org> - rpm specfile
    45
  • libcaca/trunk/examples/aafire.c

    r316 r320  
    22 *  cacafire      fire demo for libcaca
    33 *  Copyright (c) 2003 Sam Hocevar <sam@zoy.org>
    4  *                Jan Hubicka (hubicka@freesoft.cz)
    5  *                Thomas A. K. Kjaer (takjaer@daimi.aau.dk)
    6  *                Tim Newsome (nuisance@cmu.edu)
    7  *                Kamil Toman (toman@artax.karlin.mff.cuni.cz)
     4 *                1998, 1999, 2001 Jan Hubicka <hubicka@freesoft.cz>
    85 *                All Rights Reserved
    96 *
  • libcaca/trunk/examples/cacaball.c

    r319 r320  
    3737#define METASIZE 128
    3838
     39static void create_ball(void);
    3940static void draw_ball(unsigned int, unsigned int);
    40 static void generate_ball(void);
    4141
    4242static unsigned char pixels[XSIZ * YSIZ];
     
    6565    }
    6666
     67    /* Crop the palette */
     68    for(p = 0; p < 150; p++)
     69        r[p] = g[p] = b[p] = a[p] = 0x0;
     70
    6771    /* Create the bitmap */
    6872    caca_bitmap = caca_create_bitmap(8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0);
     
    7276
    7377    /* Generate ball sprite */
    74     generate_ball();
     78    create_ball();
    7579
    7680    /* Go ! */
     
    114118/* Generate ball sprite
    115119 * You should read the comments, I already wrote that before ... */
    116 static void generate_ball(void)
     120static void create_ball(void)
    117121{
    118122    int x, y;
     
    136140    unsigned int b = (by * XSIZ) + bx;
    137141
    138     for( i = 0; i < METASIZE * METASIZE; i++)
     142    for(i = 0; i < METASIZE * METASIZE; i++)
    139143    {
    140144        color = pixels[b] + metaball[i];
     
    153157    }
    154158}
     159
Note: See TracChangeset for help on using the changeset viewer.