-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
67 lines (48 loc) · 1.04 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <math.h>
#include <time.h>
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "util.h"
#include "init.h"
#include "types.h"
#include "object.h"
#include "camera.h"
#include "drawShapes.h"
#include "levelGrid.h"
/* TODO: place all these global variables in a better place */
/* Global states and variables */
int* argumentCount;
char** arguments;
char* windowName;
int windowWidth;
int windowHeight;
float aspectRatio;
long currentTime;
int deltaTime;
Camera camera;
Object** objects;
int numberOfObjects = 0;
Object* flyingObjects[50];
int numberOfFlyingObjects = 50;
float randAxis[150];
Object* root;
/* Models used */
Model levelMain;
Model levelDecor;
Model skyModel;
Model gunModel;
Grid* levelGrid;
//Graph* levelGraph;
Model testModel;
Model tree;
Model skySphere; /* TODO: delete this */
int main(int argc, char** argv) {
initProgram(&argc, argv);
initGlut();
initWorld();
initGL();
/* TODO: Organize main event loop, split it from glutMainLoop? */
startGlut();
return 0;
}