Ejemplo n.º 1
0
void
ship_draw(SHIP *ship, bool thrusting)
{
  if(ship->explosion != NULL) {
    animation_draw(ship->explosion);
    return;
  }

  ALLEGRO_BITMAP *current_sprite;

  /* this creates a flashing thrust visualization
   * not _exactly_ like the original (too fast), but close. (FIXME) */
  current_sprite = ship->sprite;
  if(thrusting && !ship->thrust_visible)
    current_sprite = ship->thrust_sprite;

  al_draw_rotated_bitmap(
      current_sprite,
      ship->width  / 2,
      ship->height / 2,
      ship->position->x,
      ship->position->y,
      deg2rad(ship->angle),
      DRAWING_FLAGS);

  ship->thrust_visible = (ship->thrust_visible) ? false : true;
}
Ejemplo n.º 2
0
void sprite_draw(sprite *sp) {
	animation_draw(sp->anim, sp->x, sp->y, sp->direction);
	//  g_print("%d ", fixtoi(sp->direction));
}
Ejemplo n.º 3
0
void personagem_draw(personagem * p){
    animation_draw(p->animacao_atual, p->x, p->y);

    flecha_draw(&p->f);
}