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

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