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 extern int buttonSelected;
29 extern int manipulateState;
31 // Directories containing models
32 extern char *dirDefault1;
33 extern char *dirDefault2;
35 // Stores the directory name for the meshes and textures.
36 extern char dataDir[];
38 extern int moving, startx, starty;
40 /* Recursion level for floor drawing */
41 extern int drawFloorRecurse;
43 /* Size of floor, from -n to n */
45 extern float squareSize;
47 /* Current camera position */
48 extern GLfloat camx, camy, camz, keyrot;
49 extern GLfloat factor;
51 /* Length of axis lines */
52 extern GLfloat lineLength;
54 /* Light 0 parameters */
55 extern GLfloat diffuse0[];
56 extern GLfloat ambient0[];
57 extern GLfloat specular0[];
58 extern GLfloat direction0[];
60 extern GLfloat lightPosition0[];
62 extern float lightAngle0, lightHeight0;
63 extern int lightMoving0, lightStartX0, lightStartY0;
65 /* Light 1 parameters */
66 extern GLfloat diffuse1[];
67 extern GLfloat ambient1[];
68 extern GLfloat specular1[];
69 extern GLfloat direction1[];
71 extern GLfloat lightPosition1[];
73 extern float lightAngle1, lightHeight1;
74 extern int lightMoving1, lightStartX1, lightStartY1;
77 extern GLfloat ambient[];
78 extern GLfloat diffuse[];
79 extern GLfloat specular[];
81 extern GLfloat glightmodel[];
82 extern GLfloat emission[];
84 /* Beginning width, height */
85 extern int width, height;
87 /* Zoom and rotate tracking */
88 extern GLfloat zoom, rotate, camAngle;
89 extern GLfloat zoomFactor, rotateFactor, camAngleFactor;
90 extern GLfloat leftrightFactor, nearfarFactor, bigsmallFactor, updownFactor;
92 /* Texture state tracking */
93 extern int currentGroundTexture, currentMeshTexture;
95 #endif /* GLOBALS_H */