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

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