diff --git a/AUTHORS b/AUTHORS index d65e36c..7e6a5da 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,5 @@ $Id$ Sam Hocevar - main programmer +Jean-Yves Lamoureux - cacaball diff --git a/THANKS b/THANKS index eb0d257..52a9e08 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,5 @@ $Id$ +Jan Hubicka - aafire Richard Zidlicky - rpm specfile diff --git a/examples/aafire.c b/examples/aafire.c index fd87a96..3ab0e97 100644 --- a/examples/aafire.c +++ b/examples/aafire.c @@ -1,10 +1,7 @@ /* * cacafire fire demo for libcaca * Copyright (c) 2003 Sam Hocevar - * Jan Hubicka (hubicka@freesoft.cz) - * Thomas A. K. Kjaer (takjaer@daimi.aau.dk) - * Tim Newsome (nuisance@cmu.edu) - * Kamil Toman (toman@artax.karlin.mff.cuni.cz) + * 1998, 1999, 2001 Jan Hubicka * All Rights Reserved * * $Id$ diff --git a/examples/cacaball.c b/examples/cacaball.c index 771e440..7493999 100644 --- a/examples/cacaball.c +++ b/examples/cacaball.c @@ -36,8 +36,8 @@ #define METASIZE 128 +static void create_ball(void); static void draw_ball(unsigned int, unsigned int); -static void generate_ball(void); static unsigned char pixels[XSIZ * YSIZ]; static unsigned char metaball[METASIZE * METASIZE]; @@ -64,6 +64,10 @@ int main(int argc, char **argv) a[p] = 0x0; } + /* Crop the palette */ + for(p = 0; p < 150; p++) + r[p] = g[p] = b[p] = a[p] = 0x0; + /* Create the bitmap */ caca_bitmap = caca_create_bitmap(8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0); @@ -71,7 +75,7 @@ int main(int argc, char **argv) caca_set_bitmap_palette(caca_bitmap, r, g, b, a); /* Generate ball sprite */ - generate_ball(); + create_ball(); /* Go ! */ while(!caca_get_event(CACA_EVENT_KEY_PRESS)) @@ -113,7 +117,7 @@ int main(int argc, char **argv) /* Generate ball sprite * You should read the comments, I already wrote that before ... */ -static void generate_ball(void) +static void create_ball(void) { int x, y; float distance; @@ -135,7 +139,7 @@ static void draw_ball(unsigned int bx, unsigned int by) unsigned int i, e = 0; unsigned int b = (by * XSIZ) + bx; - for( i = 0; i < METASIZE * METASIZE; i++) + for(i = 0; i < METASIZE * METASIZE; i++) { color = pixels[b] + metaball[i]; @@ -152,3 +156,4 @@ static void draw_ball(unsigned int bx, unsigned int by) e++; } } +