Ejemplo n.º 1
0
void refreshSimDisplay (int force)
{
  nthUpdate++;
  if( force || (nthUpdate == refreshRate) ) {
    nthUpdate = 0;
    RedrawSonar(sonarW,NULL,NULL,NULL);
    plot_robot(0);
    plot_robot(1);
    UpdateElapsedTime();
    RedrawTime();
    RedrawPosition(xposW,NULL,NULL,NULL);
  }
}
Ejemplo n.º 2
0
update_disp()
{
  register int i, j;

  /* plot each live robot and update status */
  for (i = 0; i < MAXROBOTS; i++) {
    if (robots[i].status != DEAD) {
      plot_robot(i);
      robot_stat(i);
    }
    /* plot each missile */
    for (j = 0; j < MIS_ROBOT; j++) {
      switch (missiles[i][j].stat) {
	case AVAIL:
	  break;
	case FLYING:
	  plot_miss(i,j);
	  break;
	case EXPLODING:
	  plot_exp(i,j);
	  count_miss(i,j);
	  break;
	default:
	  break;
      }
    }
  }
}