2 * Global Variables Header File
3 * @author Ashley Tyndall (20915779), Jenna de la Harpe (20367932)
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
16 // Meshes and textures arrays
17 extern mesh* meshes[];
18 extern texture* textures[];
21 extern const char *textureMenuEntries[];
22 extern const char *objectMenuEntries[];
24 // Scene object arrays
25 extern SceneObject sceneObjs[];
28 // Directories containing models
29 extern char *dirDefault1;
30 extern char *dirDefault2;
32 // Stores the directory name for the meshes and textures.
33 extern char dataDir[];
35 extern int moving, startx, starty;
37 /* Time varying or user-controled variables. */
39 extern float lightAngle, lightHeight;
41 extern GLfloat angle2;
43 /* Near and far parameters - calculates scene size */
47 /* Near and far clipping planes - calculates clipping planes */
48 extern GLfloat nearClip;
49 extern GLfloat farClip;
51 /* Recursion level for floor drawing */
52 extern int drawFloorRecurse;
54 /* Size of floor, from -n to n */
57 /* Current camera position */
58 extern GLfloat camx, camy, camz, keyrot;
59 extern GLfloat factor;
61 /* Length of axis lines */
62 extern GLfloat lineLength;
64 /* Light 0 parameters */
65 extern GLfloat diffuse0[];
66 extern GLfloat ambient0[];
67 extern GLfloat specular0[];
68 extern GLfloat direction0[];
70 extern GLfloat lightPosition0[];
72 extern float lightAngle0, lightHeight0;
73 extern int lightMoving0, lightStartX0, lightStartY0;
75 /* Light 1 parameters */
76 extern GLfloat diffuse1[];
77 extern GLfloat ambient1[];
78 extern GLfloat specular1[];
79 extern GLfloat direction1[];
81 extern GLfloat lightPosition1[];
83 extern float lightAngle1, lightHeight1;
84 extern int lightMoving1, lightStartX1, lightStartY1;
87 extern GLfloat ambient[];
88 extern GLfloat diffuse[];
89 extern GLfloat specular[];
91 extern GLfloat glightmodel[];
92 extern GLfloat emission[];
94 /* Beginning width, height */
95 extern int width, height;
97 /* Zoom and rotate tracking */
98 extern GLfloat zoom, rotate;
99 extern GLfloat zoomFactor, rotateFactor;
101 #endif /* GLOBALS_H */