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[];
36 extern GLfloat lightColor[];
37 extern GLfloat lightPosition[];
39 extern int moving, startx, starty;
40 extern int lightMoving, lightStartX, lightStartY;
42 /* Time varying or user-controled variables. */
44 extern float lightAngle, lightHeight;
46 extern GLfloat angle2;
48 /* Near and far parameters - calculates scene size */
52 /* Near and far clipping planes - calculates clipping planes */
53 extern GLfloat nearClip;
54 extern GLfloat farClip;
56 /* Recursion level for floor drawing */
57 extern int drawFloorRecurse;
59 /* Size of floor, from -n to n */
62 /* Current camera position */
63 extern GLfloat camx, camy, camz, keyrot;
64 extern GLfloat factor;
66 /* Length of axis lines */
67 extern GLfloat lineLength;
69 /* Light 0 parameters */
70 extern GLfloat diffuse0[];
71 extern GLfloat ambient0[];
72 extern GLfloat specular0[];
73 extern GLfloat emission0[];
75 extern GLfloat direction0[];
76 extern GLfloat light0_pos[];
80 extern GLfloat glightmodel[];
83 extern GLfloat ambient[];
84 extern GLfloat diffuse[];
85 extern GLfloat specular[];
87 /* Beginning width, height */
88 extern int width, height;
90 /* Zoom and rotate tracking */
91 extern GLfloat zoom, rotate;
92 extern GLfloat zoomFactor, rotateFactor;
94 #endif /* GLOBALS_H */