Exemple #1
0
void
kid_unclimb (struct anim *k)
{
  k->oaction = k->action;
  k->action = kid_unclimb;
  k->f.flip = (k->f.dir == RIGHT) ?  ALLEGRO_FLIP_HORIZONTAL : 0;

  if (! flow (k)) return;
  if (! physics_in (k)) return;
  next_frame (&k->f, &k->f, &k->fo);
  physics_out (k);
}
Exemple #2
0
void
guard_normal (struct anim *g)
{
  g->oaction = g->action;
  g->action = guard_normal;
  g->f.flip = (g->f.dir == RIGHT) ? ALLEGRO_FLIP_HORIZONTAL : 0;

  if (! flow (g)) return;
  if (! physics_in (g)) return;
  next_frame (&g->f, &g->f, &g->fo);
  physics_out (g);
}
Exemple #3
0
void
kid_stabilize (struct anim *k)
{
  k->oaction = k->action;
  k->action = kid_stabilize;
  k->f.flip = (k->f.dir == RIGHT) ?  ALLEGRO_FLIP_HORIZONTAL : 0;

  if (! flow (k)) return;
  if (! cutscene && ! physics_in (k)) return;
  next_frame (&k->f, &k->f, &k->fo);
  physics_out (k);
}
Exemple #4
0
void
kid_stairs (struct anim *k)
{
  k->oaction = k->action;
  k->action = kid_stairs;
  k->f.dir = RIGHT;
  k->f.flip = 0;

  if (! flow (k)) return;
  if (! physics_in (k)) return;
  next_frame_inv = true;
  next_frame (&k->f, &k->f, &k->fo);
  next_frame_inv = false;
  physics_out (k);
}
Exemple #5
0
void
kid_turn_run (struct anim *k)
{
  k->oaction = k->action;
  k->action = kid_turn_run;

  if (k->oaction != kid_turn_run)
    k->f.dir = (k->f.dir == LEFT) ? RIGHT : LEFT;
  k->f.flip = (k->f.dir == RIGHT) ? 0 : ALLEGRO_FLIP_HORIZONTAL;

  if (! flow (k)) return;
  if (! physics_in (k)) return;
  next_frame_inv = true;
  next_frame (&k->f, &k->f, &k->fo);
  next_frame_inv = false;
  physics_out (k);
}