8601a4ba2b533ba3e9b70815d1e9bdfc00dd45dc
[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 /* Time varying or user-controled variables. */
38 extern float jump;
39 extern float lightAngle, lightHeight;
40 extern GLfloat angle;
41 extern GLfloat angle2;
42
43 /* Near and far parameters - calculates scene size */
44 extern GLfloat near;
45 extern GLfloat far;
46
47 /* Near and far clipping planes - calculates clipping planes */
48 extern GLfloat nearClip;
49 extern GLfloat farClip;
50
51 /* Recursion level for floor drawing */
52 extern int drawFloorRecurse;
53
54 /* Size of floor, from -n to n */
55 extern int floorSize;
56
57 /* Current camera position */
58 extern GLfloat camx, camy, camz, keyrot;
59 extern GLfloat factor;
60
61 /* Length of axis lines */
62 extern GLfloat lineLength;
63
64 /* Light 0 parameters */
65 extern GLfloat diffuse0[];
66 extern GLfloat ambient0[];
67 extern GLfloat specular0[];
68 extern GLfloat direction0[];
69
70 extern GLfloat lightPosition0[];
71
72 extern float lightAngle0, lightHeight0;
73 extern int lightMoving0, lightStartX0, lightStartY0;
74
75 /* Light 1 parameters */
76 extern GLfloat diffuse1[];
77 extern GLfloat ambient1[];
78 extern GLfloat specular1[];
79 extern GLfloat direction1[];
80
81 extern GLfloat lightPosition1[];
82
83 extern float lightAngle1, lightHeight1;
84 extern int lightMoving1, lightStartX1, lightStartY1;
85
86 /* Material types */
87 extern GLfloat ambient[];
88 extern GLfloat diffuse[];
89 extern GLfloat specular[];
90 extern GLfloat shine;
91 extern GLfloat glightmodel[];
92 extern GLfloat emission[];
93
94 /* Beginning width, height */
95 extern int width, height;
96
97 /* Zoom and rotate tracking */
98 extern GLfloat zoom, rotate;
99 extern GLfloat zoomFactor, rotateFactor;
100
101 #endif  /* GLOBALS_H */

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