(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 /* Zoom factor for mouse movements */
57 extern GLfloat zoomFactor;
58
59 /* Recursion level for floor drawing */
60 extern int drawFloorRecurse;
61
62 /* Size of floor, from -n to n */
63 extern int floorSize;
64
65 /* Current camera position */
66 extern GLfloat camx, camy, camz, rot;
67
68 /* Length of axis lines */
69 extern GLfloat lineLength;
70
71 /* Light 0 parameters */
72 extern GLfloat diffuse0[];
73 extern GLfloat ambient0[];
74 extern GLfloat specular0[];
75 extern GLfloat emission0[];
76
77 extern GLfloat direction0[];
78 extern GLfloat light0_pos[];
79
80 extern GLfloat shine;
81
82 extern GLfloat glightmodel[];
83
84 /* Material types */
85 extern GLfloat ambient[];
86 extern GLfloat diffuse[];
87 extern GLfloat specular[];
88
89 /* Beginning width, height */
90 extern int width, height;
91
92 #endif  /* GLOBALS_H */

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