Index: starfield.c =================================================================== --- starfield.c (revision 13742) +++ starfield.c (working copy) @@ -109,6 +109,9 @@ { int x,y,z; int velocity; +#if LCD_DEPTH > 1 + int color; +#endif }; static inline void star_init(struct star * star, int z_move) @@ -117,6 +120,9 @@ /* choose x between -MAX_INIT_STAR_X and MAX_INIT_STAR_X */ star->x=rb->rand() % (2*MAX_INIT_STAR_X)-MAX_INIT_STAR_X; star->y=rb->rand() % (2*MAX_INIT_STAR_Y)-MAX_INIT_STAR_Y; +#if LCD_DEPTH > 1 + star->color=LCD_RGBPACK(rb->rand()%128+128,rb->rand()%128+128,rb->rand()%128+128);//rb->rand() % (sizeof(colors) / sizeof(unsigned)); +#endif if(z_move>=0) star->z=Z_MAX_DIST; else @@ -150,6 +156,10 @@ return; } +#if LCD_DEPTH > 1 + rb->lcd_set_foreground(star->color); +#endif + rb->lcd_drawpixel(x_draw, y_draw); if(star->z<5*Z_MAX_DIST/6) { @@ -290,6 +300,9 @@ "star:%d speed:%d", starfield.nb_stars, starfield.z_move); +#if LCD_DEPTH > 1 + rb->lcd_set_foreground(LCD_WHITE); +#endif rb->lcd_putsxy(0, LCD_HEIGHT-font_h, str_buffer); } rb->lcd_update();