}
+
+ 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)
}
+ /* 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];
+ */
}
}
}
-/**
- * @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