Example #1
0
void
draw_star (struct star *s, struct stars_bitmap *sb, enum vm vm)
{
  al_lock_bitmap (sb->b, ALLEGRO_PIXEL_FORMAT_ANY, ALLEGRO_LOCK_READWRITE);
  al_set_target_bitmap (sb->b);
  al_put_pixel (s->x - sb->c.x, s->y - sb->c.y, get_star_color (s->color, vm));
  al_unlock_bitmap (sb->b);
}
Example #2
0
void
draw_star (struct stars *stars, int i, enum vm vm)
{
  al_lock_bitmap (stars->b, ALLEGRO_PIXEL_FORMAT_ANY, ALLEGRO_LOCK_READWRITE);
  set_target_bitmap (stars->b);
  al_put_pixel (stars->s[i].x - stars->c.x, stars->s[i].y - stars->c.y,
                get_star_color (stars->s[i].color, vm));
  al_unlock_bitmap (stars->b);
}