void initialise(){
	// initialize diagonal
		for(int i=0; i < vertices; i++)
			a[i][i]=0;

		a=createAdjacencyList(g);

		for(int i = 0; i < vertices; i++)
			for(int j = 0; j < vertices; j++)
				if(i!=j && a[i][j]<999999999){
					v[i][j] = i;
				}
}
Exemple #2
0
int main(int argc, char **argv)
{
  /* Create the heightMap */
  SetHeightMap();
  
  /* Test printout for the fractal
    for(int x=0; x<gridSize; x++)
    for(int y=0; y<gridSize; y++)
    printf("heightMap[%d][%d] is %f\n", x, y, heightMap[x][y]);*/
  
  /* Create adjacency list */
  createAdjacencyList();
  printf("Number of dots is %d\n", numDots);

  /* create objects*/
  createPacman();
  createGhosts();

  /* Initialise GLUT - our window, our callbacks, etc */
  InitialiseGLUT(argc, argv);

  /* Do any one-time openGl initialisation that we might require */
  InitialiseOpenGL();

  /* Start up our timer. */
  InitialiseTimer();

  /* Start drawing the scene */
  InitialiseScene();

  /* Enter the main loop */
  glutIdleFunc(UpdateFrame);
  glutMainLoop();

  /* when the window closes, we will end up here. */
  return 0;
}