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

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