3 * @purpose Main program for N-Body simulator (single threaded)
15 int main(int argc, char ** argv)
19 System_Init(&system, (float[3]){320,240,0}, 0.1, 10, 1);
21 Graphics_Init("N-Body", 640, 480);
24 assert(System_AddBody(&system, 1, (float[2]){0.0f,0.0f}, (float[2]){0.0f,0.0f})->exists);
25 assert(System_AddBody(&system, 0.01, (float[2]){120.0f, -120.0f}, (float[2]){-1.1f, 1.0f})->exists);
30 //System_WriteData(&system, stdout);
32 Graphics_Clear(1, 1, 1); //Clear screen
33 System_Draw(&system); //Draw system
34 Graphics_Update(); //Update screen
35 Process_Events(); //Process SDL events
39 System_Destroy(&system);