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
17 #define M_PI 3.14159265358979323846
20 // Meshes and textures arrays
21 extern mesh* meshes[];
22 extern texture* textures[];
25 extern const char *textureMenuEntries[];
26 extern const char *objectMenuEntries[];
28 // Scene object arrays
29 extern SceneObject sceneObjs[];
32 extern int buttonSelected;
33 extern int manipulateState;
35 // Directories containing models
36 extern char *dirDefault1;
37 extern char *dirDefault2;
39 // Stores the directory name for the meshes and textures.
40 extern char dataDir[];
42 extern int startx, starty;
44 /* Size of floor, from -n to n */
46 extern float squareSize;
48 /* Current camera position */
49 extern GLfloat camx, camy, camz, keyrot;
50 extern GLfloat factor;
52 /* Length of axis lines */
53 extern GLfloat lineLength;
55 /* Light 0 parameters */
56 extern GLfloat diffuse0[];
57 extern GLfloat ambient0[];
58 extern GLfloat specular0[];
59 extern GLfloat direction0[];
61 extern GLfloat lightPosition0[];
63 extern float lightAngle0, lightHeight0;
64 extern int lightMoving0, lightStartX0, lightStartY0;
66 /* Light 1 parameters */
67 extern GLfloat diffuse1[];
68 extern GLfloat ambient1[];
69 extern GLfloat specular1[];
70 extern GLfloat direction1[];
72 extern GLfloat lightPosition1[];
74 extern float lightAngle1, lightHeight1;
75 extern int lightMoving1, lightStartX1, lightStartY1;
78 extern GLfloat ambient[];
79 extern GLfloat diffuse[];
80 extern GLfloat specular[];
82 extern GLfloat glightmodel[];
83 extern GLfloat emission[];
85 /* Beginning width, height */
86 extern int width, height;
88 /* Zoom and rotate tracking */
89 extern GLfloat zoom, rotate, camAngle;
90 extern GLfloat zoomFactor, camRotateFactor, camAngleFactor;
91 extern GLfloat leftrightFactor, nearfarFactor, bigsmallFactor, updownFactor, rotateFactor, texscaleFactor;
93 /* Texture state tracking */
94 extern int currentGroundTexture, currentMeshTexture;
96 #endif /* GLOBALS_H */