X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=course%2Fsemester2%2Fpprog%2Fassignment1%2Fmain.c;fp=course%2Fsemester2%2Fpprog%2Fassignment1%2Fmain.c;h=0000000000000000000000000000000000000000;hb=7a341db1fbf5db94b711135b2a79e852c6fb1bc4;hp=22bd8674ed6b933301108a7bdb295a6971265e91;hpb=8050cacaa489292c82977b3d87971eaf9ca3c39b;p=matches%2Fhonours.git diff --git a/course/semester2/pprog/assignment1/main.c b/course/semester2/pprog/assignment1/main.c deleted file mode 100644 index 22bd8674..00000000 --- a/course/semester2/pprog/assignment1/main.c +++ /dev/null @@ -1,45 +0,0 @@ - -#include -#include - -#include "nbody.h" -#include "graphics.h" - -unsigned numberOfProcessors; - -System universe; - -// This is main function. Do not change it. -int main(int argc, char** argv) -{ - glutInit(&argc, argv); - - if (argc < 2) { - puts("Please provide the filename, i.e. \'nbody bodiesfield.dat\'"); - exit(EXIT_SUCCESS); - } - if (argc == 2) - { - System_Init(&universe,argv[1]); - } - if (argc == 3) numberOfProcessors = atoi(argv[2]); - - - - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - glutInitWindowSize(WIDTH, HEIGHT); - glutInitWindowPosition(POSITION_X, POSITION_Y); - glutCreateWindow("N-Body Parallel"); - glutDisplayFunc(Graphics_Display); - glutIdleFunc(Graphics_Animate); - glutKeyboardFunc(Graphics_Keyboard); - glutReshapeFunc(Graphics_Reshape); - Graphics_Init(); - - - printf("Use:\n X - exit\n I, J, K, M - rotate\n W, Z, A, S - move to view" - " point\n ./, - zoom in/out\n +/- - scaled zoom in/out\n"); - - - glutMainLoop(); -}