(no commit message)
[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 lightColor0[];
71 extern GLfloat lightPosition0[];
72
73 extern float lightAngle0, lightHeight0;
74 extern int lightMoving0, lightStartX0, lightStartY0;
75
76 /* Light 1 parameters */
77 extern GLfloat diffuse1[];
78 extern GLfloat ambient1[];
79 extern GLfloat specular1[];
80 extern GLfloat direction1[];
81
82 extern GLfloat lightColor1[];
83 extern GLfloat lightPosition1[];
84
85 extern float lightAngle1, lightHeight1;
86 extern int lightMoving1, lightStartX1, lightStartY1;
87
88 /* Material types */
89 extern GLfloat ambient[];
90 extern GLfloat diffuse[];
91 extern GLfloat specular[];
92 extern GLfloat shine;
93 extern GLfloat glightmodel[];
94 extern GLfloat emission[];
95
96 /* Beginning width, height */
97 extern int width, height;
98
99 /* Zoom and rotate tracking */
100 extern GLfloat zoom, rotate;
101 extern GLfloat zoomFactor, rotateFactor;
102
103 #endif  /* GLOBALS_H */

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