Fix
[matches/honours.git] / course / semester2 / pprog / assignment0 / nbody.c
index 76c9067..d8153d7 100644 (file)
@@ -327,9 +327,12 @@ void System_Step(System * system)
                
        }
 
+
+       return;
        //Check for collisions
        //Note: Only allows for one collision per step
 
+       
        for (unsigned a = 0; a < system->nMax; ++a)
        {
                if ((system->bodies+a)->exists == false || (system->bodies+a)->collided)
@@ -351,10 +354,12 @@ void System_Step(System * system)
                                
                }
 
+               /* Reflections
                if ((system->bodies+a)->x[0] + system->x[0] < 0 || (system->bodies+a)->x[0] + system->x[0] > 640)
                        (system->bodies+a)->v[0] = -(system->bodies+a)->v[0];
                if ((system->bodies+a)->x[1] + system->x[1] < 0 || (system->bodies+a)->x[1] + system->x[1] > 480)
                        (system->bodies+a)->v[1] = -(system->bodies+a)->v[1];
+               */
 
        }
 
@@ -476,25 +481,6 @@ void System_Draw(System * system)
        }
 }
 
-/**
- * @function Process_Events
- * @purpose Handle any SDL events recieved.
- */
-void Process_Events()
-{
-       SDL_Event event;
-       while (SDL_PollEvent(&event)) 
-       {
-               switch(event.type)
-               {
-                       case SDL_QUIT:
-                               exit(EXIT_SUCCESS);
-                               break;
-               }
-       }
-       //SDL_Delay(1);
-}
-
 #endif //_GRAPHICS_H
 
 //EOF

UCC git Repository :: git.ucc.asn.au