(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 startx, starty;
39
40 /* Size of floor, from -n to n */
41 extern int floorSize;
42 extern float squareSize;
43
44 /* Current camera position */
45 extern GLfloat camx, camy, camz, keyrot;
46 extern GLfloat factor;
47
48 /* Length of axis lines */
49 extern GLfloat lineLength;
50
51 /* Light 0 parameters */
52 extern GLfloat diffuse0[];
53 extern GLfloat ambient0[];
54 extern GLfloat specular0[];
55 extern GLfloat direction0[];
56
57 extern GLfloat lightPosition0[];
58
59 extern float lightAngle0, lightHeight0;
60 extern int lightMoving0, lightStartX0, lightStartY0;
61
62 /* Light 1 parameters */
63 extern GLfloat diffuse1[];
64 extern GLfloat ambient1[];
65 extern GLfloat specular1[];
66 extern GLfloat direction1[];
67
68 extern GLfloat lightPosition1[];
69
70 extern float lightAngle1, lightHeight1;
71 extern int lightMoving1, lightStartX1, lightStartY1;
72
73 /* Material types */
74 extern GLfloat ambient[];
75 extern GLfloat diffuse[];
76 extern GLfloat specular[];
77 extern GLfloat shine;
78 extern GLfloat glightmodel[];
79 extern GLfloat emission[];
80
81 /* Beginning width, height */
82 extern int width, height;
83
84 /* Zoom and rotate tracking */
85 extern GLfloat zoom, rotate, camAngle;
86 extern GLfloat zoomFactor, camRotateFactor, camAngleFactor;
87 extern GLfloat leftrightFactor, nearfarFactor, bigsmallFactor, updownFactor, rotateFactor, texscaleFactor;
88
89 /* Texture state tracking */
90 extern int currentGroundTexture, currentMeshTexture;
91
92 #endif  /* GLOBALS_H */

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