Ejemplo n.º 1
0
void Video::sparseRetrace(int max) {
	uint32 timeKey = _vm->_util->getTimeKey();

	if ((_curSparse++ > max) || ((timeKey - _lastSparse) > 1000)) {
		_curSparse = 0;
		retrace(false);
	}

	_lastSparse = timeKey;
}
Ejemplo n.º 2
0
constexpr inline std::size_t
circular_iteration<I_inter>::retrace_times(
        const std::size_t i, const std::size_t times)
{
    return (times == 0) ? i : retrace_times(retrace(i), times - 1);
}
Ejemplo n.º 3
0
void Video::waitRetrace(bool mouse) {
	uint32 time = _vm->_util->getTimeKey();
	retrace(mouse);
	_vm->_util->delay(MAX(1, 10 - (int)(_vm->_util->getTimeKey() - time)));
}
Ejemplo n.º 4
0
void init_all()
{
	int y;
	word t;

/*  OldFileMode = FileMode;
  FileMode = 0;
  ch = param[0];
  switch(ch)
  {
   case '0' : overscan = FALSE; highres = FALSE; break;
   case '1' : overscan = FALSE; highres = TRUE; break;
   case '2' : overscan = TRUE; highres = FALSE; break;
   case '3' : overscan = TRUE; highres = TRUE; break;
   default:
	   exit(2);
  }
  VideoMode = ch;
  ch = param[1];
  switch(ch)
  {
   case '1' : UseSound=yes; break;
   case '0' : UseSound=no; break;
   default: exit(2);
  }

  ch = param[2];
  if (ch >= '1' && ch <= '6')
  {
	  MaxPlayer = ch - 48;
//      printf(MaxPlayer);
  } else
	  exit(2);
*/
  FederY=FEDER_TOP;
  FederHoehe=40;
  set_feder();
  bally = 50;
  calc_page_pos_of_ballpos();
  
  arm_links_old_status=2;
  arm_rechts_old_status=2;
  arm_links_status=1;
  arm_rechts_status=1;
  for (y=0; y <=255;y++) ground[y]=0;
  ballx=50; bally=260; get_ground_auto(); bx_old=50; by_old=260;

//  {show led}
  LED_anzeige_1();


//  {normal position}
/*  switch(VideoMode)
  {
   case '2' : NormalPos = 400-led_hoehe*2+7; break;
   case '0' : NormalPos = 400-led_hoehe*2+7; break;
   case '3' : NormalPos = 400-led_hoehe+3; break;
   case '1' : NormalPos = 400-led_hoehe+3; break;
  }
*/
  NormalPos = 400-led_hoehe+3;
  CurrentPos = 400;
  bende = FALSE;
  ActPlayer = 1;
  for (t = 1; t <= 6; t++)
  {
     Balls[t] = 1;
     score[t] = 0;
  }
  ruetteln = 0;
//  {**********}
  draw_arm_links(); draw_arm_rechts();
  if (highres)
  {
      for (bally = 50; bally <= 350; bally++)
	  {
           retrace(); calc_page_pos_of_ballpos();
	  }
  } else for (bally = 50; bally <= 560; bally++)
  {	  
      retrace(); calc_page_pos_of_ballpos();
  }

  init_ball_values();
}