예제 #1
0
int
main (void)
{
  int i;
  break_me (); /* BREAK HERE.  */
  break_me (); /* Try a thread-specific breakpoint.  */

  for (i = 0; i < 5; i++)
    break_me (); /* Try a condition-specific breakpoint.  */

  break_me (); /* Finally, try a breakpoint with commands.  */
  return 0;
}
예제 #2
0
void
Brick::try_break(bool playerhit)
{
  if(sprite->get_action() == "empty")
    return;

  sound_manager->play("sounds/brick.wav");
  Sector* sector = Sector::current();
  Player& player = *(sector->player);
  if(coin_counter > 0) {
    sector->add_object(new BouncyCoin(get_pos()));
    coin_counter--;
    player.get_status()->add_coins(1);
    if(coin_counter == 0)
      sprite->set_action("empty");
    start_bounce();
  } else if(breakable) {
    if(playerhit){
      if(player.is_big()){
        start_break();
        return;
      } else {
        start_bounce();
        return;
      }
    }
   break_me();
  }
}
예제 #3
0
파일: brick.cpp 프로젝트: leyyin/supertux
void
Brick::try_break(Player* player)
{
  if(sprite->get_action() == "empty")
    return;

  SoundManager::current()->play("sounds/brick.wav");
  Sector* sector = Sector::current();
  Player& player_one = *(sector->player);
  if(coin_counter > 0 ){
    sector->add_object(std::make_shared<BouncyCoin>(get_pos(), true));
    coin_counter--;
    player_one.get_status()->add_coins(1);
    if(coin_counter == 0)
      sprite->set_action("empty");
    start_bounce(player);
  } else if(breakable) {
    if(player){
      if(player->is_big()){
        start_break(player);
        return;
      } else {
        start_bounce(player);
        return;
      }
    }
    break_me();
  }
}
예제 #4
0
파일: pthread_cond_wait.c 프로젝트: 5kg/gdb
int
main (void)
{
  pthread_t forever;

  pthread_create (&forever, NULL, forever_pthread, NULL);
  for (;;)
    {
      sleep (2);
      break_me();
    }

  return 0;
}
예제 #5
0
파일: bp_in_thread.c 프로젝트: 5kg/gdb
int
main (void)
{
  pthread_t forever;
  const struct timespec ts = { 0, 10000000 }; /* 0.01 sec */

  pthread_create (&forever, NULL, forever_pthread, NULL);
  for (;;)
    {
      nanosleep (&ts, NULL);
      break_me();
    }

  return 0;
}
예제 #6
0
void
Block::update(float elapsed_time)
{
  if(!bouncing)
    return;

  float offset = original_y - get_pos().y;
  if(offset > BOUNCY_BRICK_MAX_OFFSET) {
    bounce_dir = BOUNCY_BRICK_SPEED;
    movement = Vector(0, bounce_dir * elapsed_time);
    if(breaking){
      break_me();
    }
  } else if(offset < BOUNCY_BRICK_SPEED * elapsed_time && bounce_dir > 0) {
    movement = Vector(0, offset);
    bounce_dir = 0;
    bouncing = false;
  } else {
    movement = Vector(0, bounce_dir * elapsed_time);
  }
}
예제 #7
0
static void
call_me (int i, float f, struct s s, struct s *ss, union u u, enum color e)
{
  break_me ();
}