Example #1
0
test (int code)
{
  char *temp = frob ();
  int rotate = (code == 22);
  if (temp == 0 && !rotate)
    oof ();
}
Example #2
0
test_7 (int code)
{
  _Bool temp = testit ();
  _Bool rotate = (code == 22);
  if (!rotate || temp == 0)
    oof ();
}
Example #3
0
test_8 (int code)
{
  _Bool temp = testit ();
  _Bool rotate = (code == 22);
  if (temp == 0 || !rotate)
    oof ();
}
Example #4
0
test_3 (int code)
{
  char *temp = frob ();
  int rotate = (code == 22);
  if (!rotate || temp == 0)
    oof ();
}
Example #5
0
void
test_6 (int code)
{
  _Bool temp = testit ();
  _Bool rotate = (code == 22);
  if (!rotate && temp == 0)
    oof ();
}
Example #6
0
void
test_5 (int code)
{
  _Bool temp = testit ();
  _Bool rotate = (code == 22);
  if (temp == 0 && !rotate)
    oof ();
}
Example #7
0
void
test_4 (int code)
{
  char *temp = frob ();
  int rotate = (code == 22);
  if (temp == 0 || !rotate)
    oof ();
}
Example #8
0
void
test_2 (int code)
{
  char *temp = frob ();
  int rotate = (code == 22);
  if (!rotate && temp == 0)
    oof ();
}
com(int *blah)
{
  int z = *blah;
  if (z == 256)
    {
      oof (z);
      abort ();
    }
  return *blah;
}
Example #10
0
void
build_omp_regions_1 (basic_block bb, struct omp_region *parent,
		     unsigned char single_tree, enum gimple_code code)
{
  if (code == 25)
    parent = parent->outer;
  else if (code == 42)
    parent->cont = bb;
  if (single_tree && !parent)
    return;
  oof ();
}
Example #11
0
void Character::tick(qreal elapsedSeconds)
{
  int dx = 0; // Direction of x travel
  int dy = 0; // Direction of y travel

  if (movingUp) dy -= 1;
  if (movingDown) dy += 1;
  if (movingLeft) dx -= 1;
  if (movingRight) dx += 1;

  bool hit = false; // Ran into something?
  moved = dx != 0 || dy != 0; // Did we move?
  if (moved) {
    QPointF startpos = pos(); // We are currently here
    QList<QGraphicsItem*> hits; // We intersect these things

    // Try to move by x, then y.  If we hit something, unmove.

    moveBy(dx * speed * elapsedSeconds, 0); // Just x move first
    hits = collidingItems();
    for (int i = 0; i < hits.count(); i++) {

      // If we are intersecting something in our layer...
      if (hits.at(i)->zValue() == zValue()) {
        // Step back and make a note of it
        setPos(startpos);
        hit = true;
      }
    }

    startpos = pos(); // We are now here
    moveBy(0, dy * speed * elapsedSeconds); // Just the y now
    hits = collidingItems();
    for (int i = 0; i < hits.count(); i++) {
      // If we are intersecting something in our layer...
      if (hits.at(i)->zValue() == zValue()) {
        // Step back and make a note of it
        setPos(startpos);
        hit = true;
      }
    }

    if (hit) oof(); // Oof! We hit something! Let our subclasses know.

    frame_time += elapsedSeconds; // We're moving, so update the frame timer
  }

  // Figure out which animation to use based on movement direction
  if (movingDown) {
    current_anim = CHARACTER_SHEET_WALK_DOWN_ANIM;
  } else if (movingUp) {
    current_anim = CHARACTER_SHEET_WALK_UP_ANIM;
  } else if (movingRight) {
    current_anim = CHARACTER_SHEET_WALK_RIGHT_ANIM;
  } else if (movingLeft) {
    current_anim = CHARACTER_SHEET_WALK_LEFT_ANIM;
  }

  animed = false; // Did we do any animating this update?

  // If we want the default animation...
  if (current_anim == CHARACTER_SHEET_DEFAULT_ANIM) {
    // Use the WALK_DOWN animation
    current_anim = CHARACTER_SHEET_WALK_DOWN_ANIM;
    animed = true;
  }

  // If we want the default frame...
  if (current_frame == CHARACTER_SHEET_DEFAULT_FRAME) {
    // Use the first one
    current_frame = 0;
    animed = true;
  }

  // While it has been too long since we last updated the frame...
  // This is a 'while' instead of an 'if' so we can catch up with slow updates
  // without rendering all the frames we missed
  while (frame_time > CHARACTER_FRAME_TIME) {
    frame_time -= CHARACTER_FRAME_TIME; // One frame into the future!

    // Next frame in the animation, looping back if we reach the end
    current_frame = (current_frame + 1) % CHARACTER_SHEET_WALK_FRAME_COUNT;
    animed = true;
  }
}
Example #12
0
static void
bar ()
{
  const char *label2 = (*"*.L_sfnames_b" == '*') + "*.L_sfnames_b";
  oof (label2);
}