Added second light, tidied up global variables, renamed drawLine() to drawAxisLines()
[atyndall/cits2231.git] / globals.h
1 /**
2  * Global Variables Header File
3  * @author Ashley Tyndall (20915779), Jenna de la Harpe (20367932)
4  */
5
6 #include "types.h"
7
8 #ifndef GLOBALS_H
9 #define GLOBALS_H
10
11 // Defined values
12 #define NMESH 54       // The number of meshes (in the models-textures dir)
13 #define NTEXTURE 30     // The number of textures (in the models-textures dir)
14 #define MAXOBJECTS 256
15
16 // Meshes and textures arrays
17 extern mesh* meshes[];
18 extern texture* textures[];
19
20 // Menu arrays
21 extern const char *textureMenuEntries[];
22 extern const char *objectMenuEntries[];
23
24 // Scene object arrays
25 extern SceneObject sceneObjs[];
26 extern int nObjects;
27
28 // Directories containing models
29 extern char *dirDefault1;
30 extern char *dirDefault2;
31
32 // Stores the directory name for the meshes and textures.
33 extern char dataDir[];
34
35 extern int moving, startx, starty;
36
37 /* Recursion level for floor drawing */
38 extern int drawFloorRecurse;
39
40 /* Size of floor, from -n to n */
41 extern int floorSize;
42
43 /* Current camera position */
44 extern GLfloat camx, camy, camz, keyrot;
45 extern GLfloat factor;
46
47 /* Length of axis lines */
48 extern GLfloat lineLength;
49
50 /* Light 0 parameters */
51 extern GLfloat diffuse0[];
52 extern GLfloat ambient0[];
53 extern GLfloat specular0[];
54 extern GLfloat direction0[];
55
56 extern GLfloat lightPosition0[];
57
58 extern float lightAngle0, lightHeight0;
59 extern int lightMoving0, lightStartX0, lightStartY0;
60
61 /* Light 1 parameters */
62 extern GLfloat diffuse1[];
63 extern GLfloat ambient1[];
64 extern GLfloat specular1[];
65 extern GLfloat direction1[];
66
67 extern GLfloat lightPosition1[];
68
69 extern float lightAngle1, lightHeight1;
70 extern int lightMoving1, lightStartX1, lightStartY1;
71
72 /* Material types */
73 extern GLfloat ambient[];
74 extern GLfloat diffuse[];
75 extern GLfloat specular[];
76 extern GLfloat shine;
77 extern GLfloat glightmodel[];
78 extern GLfloat emission[];
79
80 /* Beginning width, height */
81 extern int width, height;
82
83 /* Zoom and rotate tracking */
84 extern GLfloat zoom, rotate;
85 extern GLfloat zoomFactor, rotateFactor;
86
87 #endif  /* GLOBALS_H */

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